Merge "api-ref: Adding request parameter for sec-grp-rule"

This commit is contained in:
Jenkins 2017-01-12 20:54:53 +00:00 committed by Gerrit Code Review
commit c6bf8f796e
3 changed files with 120 additions and 71 deletions

View File

@ -187,6 +187,12 @@ security_group_id_2:
in: path
required: false
type: string
security_group_rule-id-path:
description: |
The ID of the security group rule.
in: path
required: true
type: string
segment_id-path:
description: |
The UUID of the segment.
@ -3774,6 +3780,19 @@ security_group_rule:
in: body
required: true
type: object
security_group_rule-id:
description: |
The ID of the security group rule.
in: body
required: true
type: string
security_group_rule-security_group_id:
description: |
The security group ID to associate with this
security group rule.
in: body
required: true
type: string
security_group_rules:
description: |
A list of ``security_group_rule`` objects.

View File

@ -1,2 +1,2 @@
GET /v2.0/security-group-rules/ 3c0e45ff-adaf-4124-b083-bf390e5482ff
Accept: application/json
GET /v2.0/security-group-rules/3c0e45ff-adaf-4124-b083-bf390e5482ff
Accept: application/json

View File

@ -1,8 +1,4 @@
.. -*- rst -*-
.. needs:method_verification
.. needs:parameter_verification
.. needs:example_verification
.. needs:body_verification
===========================================
Security group rules (security-group-rules)
@ -11,68 +7,20 @@ Security group rules (security-group-rules)
Lists, creates, shows information for, and deletes security group
rules.
Show security group rule
========================
.. rest_method:: GET /v2.0/security-group-rules/{security-group-rules-id}
Shows detailed information for a security group rule.
The response body contains the following information about the
security group rule:
Normal response codes: 200
Error response codes: 404,401
Request
-------
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- remote_group_id: remote_group_id
- direction: direction
- protocol: protocol
- ethertype: ethertype
- port_range_max: port_range_max
- security_group_id: security_group_id
- security_group_rule: security_group_rule
- tenant_id: project_id
- project_id: project_id
- port_range_min: port_range_min
- remote_ip_prefix: remote_ip_prefix
- id: id
Response Example
----------------
.. literalinclude:: samples/security-groups/security-group-rule-show-response.json
:language: javascript
Delete security group rule
==========================
.. rest_method:: DELETE /v2.0/security-group-rules/{security-group-rules-id}
Deletes a rule from an OpenStack Networking security group.
Error response codes: 404,204,401
Request
-------
List security group rules
=========================
.. rest_method:: GET /v2.0/security-group-rules
Lists a summary of all OpenStack Networking security group rules that
the project has access to.
Lists a summary of all OpenStack Networking security group rules that the project can access.
The list provides the UUID for each security group rule.
The list provides the ID for each security group rule.
Use the ``fields`` query parameter to control which fields are
returned in the response body. Additionally, you can filter results
by using query string parameters. For information, see `Filtering
and Column Selection <https://wiki.openstack.org/wiki/Neutron/APIv2
-specification#Filtering_and_Column_Selection>`__.
Normal response codes: 200
@ -81,23 +29,27 @@ Error response codes: 401
Request
-------
.. rest_parameters:: parameters.yaml
- fields: fields
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- security_group_rules: security_group_rules
- remote_group_id: remote_group_id
- direction: direction
- protocol: protocol
- ethertype: ethertype
- port_range_max: port_range_max
- security_group_rules: security_group_rules
- security_group_id: security_group_id
- security_group_id: security_group_rule-security_group_id
- tenant_id: project_id
- project_id: project_id
- port_range_min: port_range_min
- remote_ip_prefix: remote_ip_prefix
- id: id
- id: security_group_rule-id
Response Example
----------------
@ -112,20 +64,22 @@ Create security group rule
Creates an OpenStack Networking security group rule.
Error response codes: 201,404,409,401,400
Normal response codes: 201
Error response codes: 400, 401, 404, 409
Request
-------
.. rest_parameters:: parameters.yaml
- security_group_rule: security_group_rule
- remote_group_id: remote_group_id
- direction: direction
- protocol: protocol
- ethertype: ethertype
- port_range_max: port_range_max
- security_group_id: security_group_id
- security_group_rule: security_group_rule
- security_group_id: security_group_rule-security_group_id
- port_range_min: port_range_min
- remote_ip_prefix: remote_ip_prefix
@ -140,15 +94,91 @@ Response Parameters
.. rest_parameters:: parameters.yaml
- security_group_rule: security_group_rule
- remote_group_id: remote_group_id
- direction: direction
- protocol: protocol
- ethertype: ethertype
- port_range_max: port_range_max
- security_group_id: security_group_id
- security_group_rule: security_group_rule
- security_group_id: security_group_rule-security_group_id
- tenant_id: project_id
- project_id: project_id
- port_range_min: port_range_min
- remote_ip_prefix: remote_ip_prefix
- id: id
- id: security_group_rule-id
Response Example
----------------
.. literalinclude:: samples/security-groups/security-group-rule-create-response.json
:language: javascript
Show security group rule
========================
.. rest_method:: GET /v2.0/security-group-rules/{security_group_rule_id}
Shows detailed information for a security group rule.
The response body contains the following information about the
security group rule:
Normal response codes: 200
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- security_group_rule_id: security_group_rule-id-path
- verbose: verbose
- fields: fields
Response Parameters
-------------------
.. rest_parameters:: parameters.yaml
- security_group_rule: security_group_rule
- remote_group_id: remote_group_id
- direction: direction
- protocol: protocol
- ethertype: ethertype
- port_range_max: port_range_max
- security_group_id: security_group_rule-security_group_id
- tenant_id: project_id
- project_id: project_id
- port_range_min: port_range_min
- remote_ip_prefix: remote_ip_prefix
- id: security_group_rule-id
Response Example
----------------
.. literalinclude:: samples/security-groups/security-group-rule-show-response.json
:language: javascript
Delete security group rule
==========================
.. rest_method:: DELETE /v2.0/security-group-rules/{security_group_rule_id}
Deletes a rule from an OpenStack Networking security group.
Normal response codes: 204
Error response codes: 401, 404
Request
-------
.. rest_parameters:: parameters.yaml
- security_group_rule_id: security_group_rule-id-path
Response
--------
There is no body content is returned on a successful DELETE request.