From f19f03f4e4489f9ac09bf517c50ad68ca9143f2b Mon Sep 17 00:00:00 2001 From: junboli Date: Mon, 9 Oct 2017 12:53:42 +0800 Subject: [PATCH] Api-ref: Fix incorrect api params description It occurs in the following APIs: 1. Commit a container 2. Rename a container 3. Add security group for specified container 4. Show details of a host Change-Id: I1c0e4f475bb02209ac18ae92d04899a670779907 Closes-bug: #1722150 --- api-ref/source/containers.inc | 4 +-- api-ref/source/parameters.yaml | 53 +++++++++++++++++++--------------- 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/api-ref/source/containers.inc b/api-ref/source/containers.inc index 8589b0194..d44bd7291 100644 --- a/api-ref/source/containers.inc +++ b/api-ref/source/containers.inc @@ -624,7 +624,7 @@ Response Example Add security group for specified container ========================================== -.. rest_method:: POST /v1/containers/{container_ident}/add_securtiy_group?name=security_group +.. rest_method:: POST /v1/containers/{container_ident}/add_securtiy_group?name={security_group} Add security group for specified container. @@ -648,7 +648,7 @@ Request .. rest_parameters:: parameters.yaml - container_ident: container_ident - - security_group: security_groups + - security_group: security_group_query Response -------- diff --git a/api-ref/source/parameters.yaml b/api-ref/source/parameters.yaml index 83560856c..65d79479b 100644 --- a/api-ref/source/parameters.yaml +++ b/api-ref/source/parameters.yaml @@ -11,6 +11,12 @@ container_ident: in: path required: true type: string +host_ident: + description: | + The UUID or name of host in Zun. + in: path + required: true + type: string force: description: | Specify to delete container forcefully. @@ -29,6 +35,30 @@ network: in: query required: true type: string +new_name: + description: | + The new name for the container. + in: query + required: true + type: string +repository: + description: | + The reposiroty of the container image. + in: query + required: true + type: string +security_group_query: + description: | + Security groups to be added to the container. + in: query + required: true + type: string +tag: + description: | + The tag of the container image. + in: query + required: true + type: string timeout: description: | Seconds to wait before operating on container. @@ -125,12 +155,6 @@ host: in: body required: true type: string -host_ident: - description: | - The UUID or name of host in Zun. - in: body - required: true - type: string host_list: description: | The host information list, including hostname, uuid, links, labels, @@ -222,12 +246,6 @@ nets: requested as strings for the networks value, not in a list. in: body type: object -new_name: - description: | - The new name for the container. - in: body - required: true - type: string ports: description: | The ports exposed on the container. @@ -240,11 +258,6 @@ report_count: in: body required: true type: integer -repository: - description: | - The reposiroty of the container image. - in: body - type: string restart_policy: description: | Restart policy to apply when a container exits. Allowed values are @@ -306,12 +319,6 @@ status_reason: in: body required: true type: string -tag: - description: | - The tag of the container image. - in: body - required: true - type: string task_state: description: | The current task of the container.