This website requires JavaScript.
2016年04月12日 09:03:46 -04:00
.. -*- rst -*-
================================
Compute services (os-services)
================================
Lists all running Compute services for a tenant, enables or disables
scheduling for a Compute service, logs disabled Compute service
information, and deletes a Compute service.
For an overview of Compute services, see `OpenStack
Compute <http://docs.openstack.org/liberty/install-guide-obs/common/get_started_compute.html>`__.
.. rest_method:: GET /v2.1/{tenant_id}/os-services
Lists all running Compute services for a tenant.
Includes reasons, if available, for why any services were disabled.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
.. rest_parameters:: parameters.yaml
.. rest_parameters:: parameters.yaml
- disabled_reason: disabled_reason
- forced_down: forced_down
**Example List Compute Services: JSON request**
.. literalinclude:: ../../doc/api_samples/v2.11/services-list-resp.json
Enable Scheduling For A Compute Service
=======================================
.. rest_method:: PUT /v2.1/{tenant_id}/os-services/enable
Enables scheduling for a Compute service.
Specify the service by its host name and binary name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
.. rest_parameters:: parameters.yaml
**Example Enable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/v2.11/service-enable-req.json
.. rest_parameters:: parameters.yaml
**Example Enable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/v2.11/service-enable-resp.json
Disable Scheduling For A Compute Service
========================================
.. rest_method:: PUT /v2.1/{tenant_id}/os-services/disable
Disables scheduling for a Compute service.
Specify the service by its host name and binary name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
.. rest_parameters:: parameters.yaml
**Example Disable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-req.json
.. rest_parameters:: parameters.yaml
**Example Disable Scheduling For A Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-resp.json
Log Disabled Compute Service Information
========================================
.. rest_method:: PUT /v2.1/{tenant_id}/os-services/disable-log-reason
Logs information to the Compute service table about why a Compute service was disabled.
Specify the service by its host name and binary name.
Normal response codes: 200
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
.. rest_parameters:: parameters.yaml
- disabled_reason: disabled_reason
**Example Log Disabled Compute Service Information: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-log-req.json
.. rest_parameters:: parameters.yaml
- disabled_reason: disabled_reason
**Example Log Disabled Compute Service Information: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-disable-log-resp.json
.. rest_method:: DELETE /v2.1/{tenant_id}/os-services/{service_id}
Deletes a Compute service.
Specify the service by its host name and binary name.
Normal response codes: 204,404
Error response codes: computeFault(400, 500), serviceUnavailable(503), badRequest(400),
unauthorized(401), forbidden(403), badMethod(405), itemNotFound(404)
.. rest_parameters:: parameters.yaml
**Example Delete Compute Service: JSON request**
.. literalinclude:: ../../doc/api_samples/os-services/service-enable-req.json