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-06-14 15:31:18 +09:00
|
|
|
==================================================
|
|
|
|
Security groups (os-security-groups) (DEPRECATED)
|
|
|
|
==================================================
|
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
|
|
|
These APIs are proxy calls to the Network service. Nova has
|
|
|
|
deprecated all the proxy APIs and users should use the native APIs
|
2016-12-10 15:57:14 +08:00
|
|
|
instead. These will fail with a 404 starting from microversion 2.36.
|
2016-06-14 15:31:18 +09:00
|
|
|
See: `Relevant Network APIs
|
2016-07-25 17:13:05 -04:00
|
|
|
<http://developer.openstack.org/api-ref/networking/v2-ext/index.html#security-groups-security-groups>`__.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
Lists, shows information for, creates, updates and deletes security groups.
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
List Security Groups
|
|
|
|
====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /os-security-groups
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Lists security groups.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
Error response codes: unauthorized(401), forbidden(403), itemNotFound(404)
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-12-15 13:20:32 -05:00
|
|
|
Request
|
|
|
|
-------
|
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- limit: limit_simple
|
|
|
|
- offset: offset_simple
|
|
|
|
|
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
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- security_groups: security_groups
|
|
|
|
- description: description
|
|
|
|
- id: id
|
|
|
|
- name: name
|
|
|
|
- rules: rules
|
2016-06-02 08:50:03 -04:00
|
|
|
- tenant_id: tenant_id_body
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example List security groups: JSON response**
|
|
|
|
|
2016-04-19 12:06:49 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-groups-list-get-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Create Security Group
|
|
|
|
=====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: POST /os-security-groups
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Creates a security group.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
Error response codes: badRequest(400), unauthorized(401), forbidden(403)
|
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
|
|
|
|
|
|
|
|
- security_group: security_group
|
|
|
|
- name: name
|
|
|
|
- description: description
|
|
|
|
|
|
|
|
**Example Create security group: JSON request**
|
|
|
|
|
2016-04-19 12:06:49 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-post-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
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- security_group: security_group
|
|
|
|
- description: description
|
|
|
|
- id: id
|
|
|
|
- name: name
|
|
|
|
- rules: rules
|
2016-06-02 08:50:03 -04:00
|
|
|
- tenant_id: tenant_id_body
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example Create security group: JSON response**
|
|
|
|
|
2016-04-19 12:06:49 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-groups-create-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Show Security Group Details
|
|
|
|
===========================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: GET /os-security-groups/{security_group_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Shows details for a security group.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
Error response codes: badRequest(400), 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
|
|
|
|
|
|
|
|
- security_group_id: security_group_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- security_group: security_group
|
|
|
|
- description: description
|
|
|
|
- id: id
|
|
|
|
- name: name
|
|
|
|
- rules: rules
|
2016-06-02 08:50:03 -04:00
|
|
|
- tenant_id: tenant_id_body
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example Show security group: JSON response**
|
|
|
|
|
2016-04-19 12:06:49 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-groups-get-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Update Security Group
|
|
|
|
=====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: PUT /os-security-groups/{security_group_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Updates a security group.
|
|
|
|
|
|
|
|
Normal response codes: 200
|
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
Error response codes: badRequest(400), 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
|
|
|
|
|
|
|
|
- security_group_id: security_group_id
|
|
|
|
- name: name
|
|
|
|
- description: description
|
|
|
|
|
|
|
|
**Example Update security group: JSON request**
|
|
|
|
|
2016-04-19 12:06:49 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-group-post-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
|
|
|
|
|
|
|
.. rest_parameters:: parameters.yaml
|
|
|
|
|
|
|
|
- security_group: security_group
|
|
|
|
- description: description
|
|
|
|
- id: id
|
|
|
|
- name: name
|
|
|
|
- rules: rules
|
2016-06-02 08:50:03 -04:00
|
|
|
- tenant_id: tenant_id_body
|
|
|
|
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
**Example Update security group: JSON response**
|
|
|
|
|
2016-04-19 12:06:49 -04:00
|
|
|
.. literalinclude:: ../../doc/api_samples/os-security-groups/security-groups-create-resp.json
|
2016-04-12 09:03:46 -04:00
|
|
|
:language: javascript
|
|
|
|
|
|
|
|
Delete Security Group
|
|
|
|
=====================
|
|
|
|
|
2016-06-02 08:50:03 -04:00
|
|
|
.. rest_method:: DELETE /os-security-groups/{security_group_id}
|
2016-04-12 09:03:46 -04:00
|
|
|
|
|
|
|
Deletes a security group.
|
|
|
|
|
|
|
|
Normal response codes: 202
|
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
Error response codes: badRequest(400), 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
|
|
|
|
|
|
|
|
- security_group_id: security_group_id
|
|
|
|
|
|
|
|
Response
|
2016-04-14 13:10:59 -04:00
|
|
|
--------
|
2016-04-12 09:03:46 -04:00
|
|
|
|
2016-05-09 15:47:45 -04:00
|
|
|
There is no body content for the response of a successful DELETE query.
|