From 318a6b606b4b39e4749691bd020affcd2533499f Mon Sep 17 00:00:00 2001 From: Akihiro Motoki Date: Thu, 15 Dec 2016 17:38:38 +0900 Subject: [PATCH] api-ref: project_id in req/resp body should be "body" project_id and tenant_id field in request/response body are marked as "path" now. It should be "body". - "project_id-path" already exists and it can be used for "project_id" in URL path. - "project_id" is now used for body. - "project_id-body" is now duplicated, so it was removed. fwaas.inc is the only user of project_id-body and it is updated accordingly. - quotas.inc is updated to use 'project_id-path'. Also project_id and tenant_id in response body of a quotas operation have been dropped as they do not exist. Note that project_id/tenant_id in request body should be marked as "optional" in most resources but this patch does not touch them to avoid unnecessary merge conflicts. They will be fixed in separate patches. Change-Id: Ic5a4f55b837ee0a51b7186c3342a94c8c00f6c97 Closes-Bug: #1650174 --- api-ref/source/v2/fwaas.inc | 68 +++++++++++++++---------------- api-ref/source/v2/parameters.yaml | 8 +--- api-ref/source/v2/quotas.inc | 8 +--- 3 files changed, 36 insertions(+), 48 deletions(-) diff --git a/api-ref/source/v2/fwaas.inc b/api-ref/source/v2/fwaas.inc index 9e75e868f..1c0478b61 100644 --- a/api-ref/source/v2/fwaas.inc +++ b/api-ref/source/v2/fwaas.inc @@ -62,7 +62,7 @@ Response Parameters .. rest_parameters:: parameters.yaml - - tenant_id: project_id-body + - tenant_id: project_id - firewall_policies: firewall_policies - audited: audited - description: description @@ -70,7 +70,7 @@ Response Parameters - id: firewall_policy_id-body - name: name - shared: shared-response - - tenant_id: project_id-body + - project_id: project_id Response Example ---------------- @@ -97,8 +97,8 @@ Request - firewall_policy: firewall_policy - firewall_rules_id: firewall_rules_id - name: name - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id-request + - project_id: project_id-request - shared: shared - audited: audited - description: description-request @@ -117,8 +117,8 @@ Response Parameters - firewall_policy: firewall_policy - name: name - firewall_rules: firewall_rules - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - audited: audited - shared: shared-response - id: firewall_policy_id-body @@ -152,8 +152,8 @@ Response Parameters .. rest_parameters:: parameters.yaml - firewall_policy: firewall_policy - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - audited: audited - description: description - firewall_rules: firewall_rules @@ -202,14 +202,14 @@ Response Parameters .. rest_parameters:: parameters.yaml - firewall_policy: firewall_policy - - project_id: project_id-body + - project_id: project_id - audited: audited - description: description - firewall_rules: firewall_rules - id: firewall_policy_id-body - name: name - shared: shared-response - - tenant_id: project_id-body + - tenant_id: project_id Response Example ---------------- @@ -282,8 +282,8 @@ Response Parameters - description: description - firewall_list: firewall_list - firewall_rules: firewall_rules - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - id: firewall_policy_id-body - name: name - shared: shared-response @@ -324,8 +324,8 @@ Response Parameters .. rest_parameters:: parameters.yaml - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - audited: audited - description: description - firewall_list: firewall_list @@ -364,8 +364,8 @@ Response Parameters - firewall_rule: firewall_rule - action: action-response - description: description - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - destination_ip_address: destination_ip_address-response - destination_port: destination_port-response - enabled: enabled-response @@ -406,8 +406,8 @@ Request - destination_port: destination_port - enabled: enabled - description: description-request - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id-request + - project_id: project_id-request - enabled: enabled - name: name - protocol: protocol @@ -430,8 +430,8 @@ Response Parameters - firewall_rule: firewall_rule - action: action-response - description: description - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - destination_ip_address: destination_ip_address-response - destination_port: destination_port-response - enabled: enabled-response @@ -481,8 +481,8 @@ Response Parameters - firewall_rule: firewall_rule - action: action-response - description: description - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - destination_ip_address: destination_ip_address-response - destination_port: destination_port-response - enabled: enabled-response @@ -522,8 +522,8 @@ Request - firewall_rule: firewall_rule - shared: shared - description: description-request - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id-request + - project_id: project_id-request - enabled: enabled - ip_version: ip_version - destination_ip_address: destination_ip_address @@ -548,8 +548,8 @@ Response Parameters - action: action-response - description: description - source_ip_address: source_ip_address - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - enabled: enabled - protocol: protocol - source_port: source_port @@ -619,8 +619,8 @@ Response Parameters - firewalls: firewalls - admin_state_up: admin_state_up - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - description: description - firewall_policy_id: firewall_policy_id-body - id: firewall_id-body @@ -673,8 +673,8 @@ Response Parameters .. rest_parameters:: parameters.yaml - firewall: firewall - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - admin_state_up: admin_state_up - description: description - firewall_policy_id: firewall_policy_id-body @@ -717,8 +717,8 @@ Response Parameters .. rest_parameters:: parameters.yaml - firewall: firewall - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - admin_state_up: admin_state_up - description: description - status: firewall-status @@ -772,8 +772,8 @@ Response Parameters .. rest_parameters:: parameters.yaml - firewall: firewall - - tenant_id: project_id-body - - project_id: project_id-body + - tenant_id: project_id + - project_id: project_id - admin_state_up: admin_state_up - description: description - status: firewall-status diff --git a/api-ref/source/v2/parameters.yaml b/api-ref/source/v2/parameters.yaml index 5583ceccc..2b3ec5647 100644 --- a/api-ref/source/v2/parameters.yaml +++ b/api-ref/source/v2/parameters.yaml @@ -151,12 +151,6 @@ profile_id: in: path required: true type: string -project_id: - description: | - The ID of the project. - in: path - required: true - type: string project_id-path: description: | The ID of the project. @@ -3154,7 +3148,7 @@ prefixes_2: in: body required: true type: array -project_id-body: +project_id: description: | The ID of the project. in: body diff --git a/api-ref/source/v2/quotas.inc b/api-ref/source/v2/quotas.inc index 39147d6f8..eefd08d7c 100644 --- a/api-ref/source/v2/quotas.inc +++ b/api-ref/source/v2/quotas.inc @@ -65,7 +65,6 @@ Request .. rest_parameters:: parameters.yaml - - tenant_id: project_id-path - project_id: project_id-path Response Parameters @@ -106,6 +105,7 @@ Request .. rest_parameters:: parameters.yaml + - project_id: project_id-path - subnet: quota-subnet - network: quota-network - floatingip: quota-floatingip @@ -116,8 +116,6 @@ Request - router: quota-router - rbac_policy: quota-rbac_policy - port: quota-port - - tenant_id: project_id - - project_id: project_id Request Example --------------- @@ -140,8 +138,6 @@ Response Parameters - router: quota-router - rbac_policy: quota-rbac_policy - port: quota-port - - tenant_id: project_id - - project_id: project_id Response Example ---------------- @@ -163,7 +159,6 @@ Request .. rest_parameters:: parameters.yaml - - tenant_id: project_id-path - project_id: project_id-path List default quotas for a project @@ -182,7 +177,6 @@ Request .. rest_parameters:: parameters.yaml - - tenant_id: project_id-path - project_id: project_id-path Response Parameters