2016-04-12 09:03:46 -04:00
|
|
|
.. -*- rst -*-
|
2016-04-20 16:10:51 -04:00
|
|
|
.. needs:parameter_verification
|
|
|
|
.. needs:example_verification
|
|
|
|
.. needs:body_verification
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
============================================
|
|
|
|
Flavors access (flavors, os-flavor-access)
|
|
|
|
============================================
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Lists tenants who have access to a private flavor and adds private
|
|
|
|
flavor access to and removes private flavor access from tenants. By
|
|
|
|
default, only administrators can manage private flavor access. A private
|
|
|
|
flavor has ``is_public`` set to ``false`` while a public flavor has
|
|
|
|
``is_public`` set to ``true``.
|
|
|
|
|
|
|
|
List Flavor Access Information For Given Flavor
|
|
|
|
===============================================
|
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
.. rest_method:: GET /v2.1/{tenant_id}/flavors/{flavor_id}/os-flavor-access
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Lists flavor access information.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
2016-04-23 11:14:16 +08:00
|
|
|
- flavor_id: flavor_id
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example List Flavor Access Information For Given Flavor: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-list-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Add Flavor Access To Tenant
|
|
|
|
===========================
|
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
.. rest_method:: POST /v2.1/{tenant_id}/flavors/{flavor_id}/action
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Adds flavor access to a tenant and flavor.
|
|
|
|
|
|
|
|
Specify the ``addTenantAccess`` action and the ``tenant_id`` in the request body.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404), conflict(409)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
- flavor_id: flavor_id
|
|
|
|
|
|
|
|
**Example Add Flavor Access To Tenant: JSON request**
|
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-add-tenant-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Add Flavor Access To Tenant: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-add-tenant-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Remove Flavor Access From Tenant
|
|
|
|
================================
|
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
.. rest_method:: POST /v2.1/{tenant_id}/flavors/{flavor_id}/action
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Removes flavor access from a tenant and flavor.
|
|
|
|
|
|
|
|
Specify the ``removeTenantAccess`` action and the ``tenant_id`` in the request body.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-04-23 11:14:16 +08:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403),
|
|
|
|
itemNotFound(404), conflict(409)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Request
|
2016-04-14 13:10:59 -04:00
|
|
|
-------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- tenant_id: tenant_id
|
|
|
|
- flavor_id: flavor_id
|
|
|
|
|
|
|
|
**Example Remove Flavor Access From Tenant: JSON request**
|
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-remove-tenant-req.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-04-19 17:52:18 +09:00
|
|
|
**Example Remove Flavor Access From Tenant: JSON response**
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-03-23 19:56:48 +08:00
|
|
|
.. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-remove-tenant-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|