From 9bc797c80f2e6ce2f1fb7245704d9997ae95d9c3 Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Mon, 16 May 2016 12:14:39 -0400 Subject: [PATCH] api-ref: complete verification for os-flavor-access This completes the parameter, example and body verification for the os-flavor-access API. The tenant_id_body parameter description was made more generic to be able to reuse it here. Part of blueprint api-ref-in-rst Change-Id: I78755f0f92f8e742b668102b98ae15d94f8bf941 --- api-ref/source/os-flavor-access.inc | 37 ++++++++++++++++++++++------- api-ref/source/parameters.yaml | 26 +++++++++++++++++++- 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/api-ref/source/os-flavor-access.inc b/api-ref/source/os-flavor-access.inc index 0cfdb2c744..b4dead0da1 100644 --- a/api-ref/source/os-flavor-access.inc +++ b/api-ref/source/os-flavor-access.inc @@ -1,7 +1,4 @@ .. -*- rst -*- -.. needs:parameter_verification -.. needs:example_verification -.. needs:body_verification ============================================ Flavors access (flavors, os-flavor-access) @@ -35,19 +32,25 @@ Request Response -------- +.. rest_parameters:: parameters.yaml + + - flavor_access: flavor_access + - tenant_id: tenant_id_body + - flavor_id: flavor_id_body + **Example List Flavor Access Information For Given Flavor: JSON response** .. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-list-resp.json :language: javascript -Add Flavor Access To Tenant -=========================== +Add Flavor Access To Tenant (addTenantAccess Action) +==================================================== .. rest_method:: POST /v2.1/{tenant_id}/flavors/{flavor_id}/action Adds flavor access to a tenant and flavor. -Specify the ``addTenantAccess`` action and the ``tenant_id`` in the request body. +Specify the ``addTenantAccess`` action and the ``tenant`` in the request body. Normal response codes: 200 @@ -61,6 +64,8 @@ Request - tenant_id: tenant_id - flavor_id: flavor_id + - addTenantAccess: addTenantAccess + - tenant: tenant_id_body **Example Add Flavor Access To Tenant: JSON request** @@ -70,19 +75,25 @@ Request Response -------- +.. rest_parameters:: parameters.yaml + + - flavor_access: flavor_access + - tenant_id: tenant_id_body + - flavor_id: flavor_id_body + **Example Add Flavor Access To Tenant: JSON response** .. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-add-tenant-resp.json :language: javascript -Remove Flavor Access From Tenant -================================ +Remove Flavor Access From Tenant (removeTenantAccess Action) +============================================================ .. rest_method:: POST /v2.1/{tenant_id}/flavors/{flavor_id}/action Removes flavor access from a tenant and flavor. -Specify the ``removeTenantAccess`` action and the ``tenant_id`` in the request body. +Specify the ``removeTenantAccess`` action and the ``tenant`` in the request body. Normal response codes: 200 @@ -96,6 +107,8 @@ Request - tenant_id: tenant_id - flavor_id: flavor_id + - removeTenantAccess: removeTenantAccess + - tenant: tenant_id_body **Example Remove Flavor Access From Tenant: JSON request** @@ -105,6 +118,12 @@ Request Response -------- +.. rest_parameters:: parameters.yaml + + - flavor_access: flavor_access + - tenant_id: tenant_id_body + - flavor_id: flavor_id_body + **Example Remove Flavor Access From Tenant: JSON response** .. literalinclude:: ../../doc/api_samples/flavor-access/flavor-access-remove-tenant-resp.json diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index e883e82f0c..81f3537e0f 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -614,6 +614,12 @@ addSecurityGroup: in: body required: true type: string +addTenantAccess: + description: | + The action. + in: body + required: true + type: string adminPass: description: | The administrative password of the server. @@ -1027,6 +1033,18 @@ flavor: in: body required: true type: object +flavor_access: + description: | + A list of dictionaries, each with the keys ``flavor_id`` and ``tenant_id``. + in: body + required: true + type: array +flavor_id_body: + description: | + The ID of the flavor. + in: body + required: true + type: string flavorRef: description: | The flavor reference, as a UUID or full URL, for the flavor for your server instance. @@ -1954,6 +1972,12 @@ removeSecurityGroup: in: body required: true type: string +removeTenantAccess: + description: | + The action. + in: body + required: true + type: string rescue: description: | The action. @@ -2261,7 +2285,7 @@ suspend: type: string tenant_id_body: description: | - The UUID of the tenant this server is owned by. + The UUID of the tenant in a multi-tenancy cloud. in: body required: true type: string