api-ref: several fixes on security group rules

* Fix the attributes 'remote_ip_prefix' and 'direction' that were
  messed up with metering rules.
* Fix the attributes 'ethertype', 'port_range_max', 'port_range_min'
  and 'remote_group_id' that have the wrong required/optional.
* Add the missing query parameter 'remote_ip_prefix'
* Remove an extra ` in remote_group_id

Change-Id: I92ff1ad5921695c569c8c831a70d388a7900809c
This commit is contained in:
Hongbin Lu 2018-05-01 21:11:29 +00:00
parent eadc2a90a6
commit 34b984ef84
3 changed files with 100 additions and 20 deletions

View File

@ -208,8 +208,8 @@ Response Parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- metering_label_rules: metering_label_rules - metering_label_rules: metering_label_rules
- direction: direction - direction: metering_label_rule-direction
- remote_ip_prefix: remote_ip_prefix - remote_ip_prefix: metering_label_rule-remote_ip_prefix
- excluded : excluded - excluded : excluded
- metering_label_id: metering_label-id-body - metering_label_id: metering_label-id-body
- id: metering_label_rule-id - id: metering_label_rule-id
@ -237,8 +237,8 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- metering_label_rule: metering_label_rule - metering_label_rule: metering_label_rule
- remote_ip_prefix: remote_ip_prefix - remote_ip_prefix: metering_label_rule-remote_ip_prefix
- direction: direction - direction: metering_label_rule-direction
- metering_label_id: metering_label-id-body - metering_label_id: metering_label-id-body
- excluded: excluded-request - excluded: excluded-request
@ -254,8 +254,8 @@ Response Parameters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- metering_label_rule: metering_label_rule - metering_label_rule: metering_label_rule
- direction: direction - direction: metering_label_rule-direction
- remote_ip_prefix: remote_ip_prefix - remote_ip_prefix: metering_label_rule-remote_ip_prefix
- excluded : excluded - excluded : excluded
- metering_label_id: metering_label-id-body - metering_label_id: metering_label-id-body
- id: metering_label_rule-id - id: metering_label_rule-id
@ -309,8 +309,8 @@ Response Paramters
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- metering_label_rule: metering_label_rule - metering_label_rule: metering_label_rule
- direction: direction - direction: metering_label_rule-direction
- remote_ip_prefix: remote_ip_prefix - remote_ip_prefix: metering_label_rule-remote_ip_prefix
- excluded : excluded - excluded : excluded
- metering_label_id: metering_label-id-body - metering_label_id: metering_label-id-body
- id: metering_label_rule-id - id: metering_label_rule-id

View File

@ -375,8 +375,8 @@ device_owner-query:
type: string type: string
direction-query: direction-query:
description: | description: |
Filter the security group rule list result by the direction in Filter the security group rule list result by the direction in which
which the metering rule is applied, which is ``ingress`` or ``egress``. the security group rule is applied, which is ``ingress`` or ``egress``.
in: query in: query
required: false required: false
type: string type: string
@ -855,6 +855,13 @@ remote_group_id-query:
in: query in: query
required: false required: false
type: string type: string
remote_ip_prefix-query:
description: |
Filter the list result by the remote IP prefix that is matched by
this security group rule.
in: query
required: false
type: string
resource_log_id-query: resource_log_id-query:
description: | description: |
Filter the log list result by the ID of resource (e.g security group ID). Filter the log list result by the ID of resource (e.g security group ID).
@ -930,7 +937,7 @@ security_group_rule-sort_key:
- ``port_range_max`` - ``port_range_max``
- ``port_range_min`` - ``port_range_min``
- ``protocol`` - ``protocol``
- ``remote_group_id``` - ``remote_group_id``
- ``remote_ip_prefix`` - ``remote_ip_prefix``
- ``security_group_id`` - ``security_group_id``
- ``tenant_id`` - ``tenant_id``
@ -1939,7 +1946,7 @@ device_owner-request:
direction: direction:
description: | description: |
Ingress or egress, which is the direction in Ingress or egress, which is the direction in
which the metering rule is applied. which the security group rule is applied.
in: body in: body
required: true required: true
type: string type: string
@ -2078,6 +2085,13 @@ endpoints:
required: true required: true
type: array type: array
ethertype: ethertype:
description: |
Must be IPv4 or IPv6, and addresses represented
in CIDR must match the ingress or egress rules.
in: body
required: true
type: string
ethertype-request:
description: | description: |
Must be IPv4 or IPv6, and addresses represented Must be IPv4 or IPv6, and addresses represented
in CIDR must match the ingress or egress rules. in CIDR must match the ingress or egress rules.
@ -3538,12 +3552,25 @@ metering_label_rule:
in: body in: body
required: true required: true
type: object type: object
metering_label_rule-direction:
description: |
Ingress or egress, which is the direction in
which the metering rule is applied.
in: body
required: true
type: string
metering_label_rule-id: metering_label_rule-id:
description: | description: |
The ID of the metering label rule. The ID of the metering label rule.
in: body in: body
required: true required: true
type: string type: string
metering_label_rule-remote_ip_prefix:
description: |
The remote IP prefix that is matched by this metering rule.
in: body
required: true
type: string
metering_label_rules: metering_label_rules:
description: | description: |
A list of ``metering_label_rule`` objects. A list of ``metering_label_rule`` objects.
@ -3941,6 +3968,16 @@ port_id_subport:
required: true required: true
type: string type: string
port_range_max: port_range_max:
description: |
The maximum port number in the range that is
matched by the security group rule. If the protocol is TCP, UDP,
DCCP, SCTP or UDP-Lite this value must be greater than or equal to
the ``port_range_min`` attribute value. If the protocol is ICMP,
this value must be an ICMP type.
in: body
required: true
type: integer
port_range_max-request:
description: | description: |
The maximum port number in the range that is The maximum port number in the range that is
matched by the security group rule. If the protocol is TCP, UDP, matched by the security group rule. If the protocol is TCP, UDP,
@ -3951,6 +3988,16 @@ port_range_max:
required: false required: false
type: integer type: integer
port_range_min: port_range_min:
description: |
The minimum port number in the range that is
matched by the security group rule. If the protocol is TCP, UDP,
DCCP, SCTP or UDP-Lite this value must be less than or equal to
the ``port_range_max`` attribute value. If the protocol is ICMP,
this value must be an ICMP type.
in: body
required: true
type: integer
port_range_min-request:
description: | description: |
The minimum port number in the range that is The minimum port number in the range that is
matched by the security group rule. If the protocol is TCP, UDP, matched by the security group rule. If the protocol is TCP, UDP,
@ -4056,6 +4103,24 @@ protocol:
in: body in: body
required: true required: true
type: string type: string
protocol-request:
description: |
The IP protocol can be represented by a string, an integer, or ``null``.
Valid string or integer values are ``any`` or ``0``, ``ah`` or ``51``,
``dccp`` or ``33``, ``egp`` or ``8``, ``esp`` or ``50``, ``gre`` or ``47``,
``icmp`` or ``1``, ``icmpv6`` or ``58``, ``igmp`` or ``2``,
``ipip`` or ``4``, ``ipv6-encap`` or ``41``,
``ipv6-frag`` or ``44``, ``ipv6-icmp`` or ``58``, ``ipv6-nonxt`` or ``59``,
``ipv6-opts`` or ``60``, ``ipv6-route`` or ``43``, ``ospf`` or ``89``,
``pgm`` or ``113``, ``rsvp`` or ``46``, ``sctp`` or ``132``,
``tcp`` or ``6``, ``udp`` or ``17``, ``udplite`` or ``136``,
``vrrp`` or ``112``. Additionally, any integer value between [0-255] is
also valid. The string ``any`` (or integer ``0``) means ``all`` IP
protocols. See the constants in ``neutron_lib.constants`` for the most
up-to-date list of supported strings.
in: body
required: false
type: string
protocol-response: protocol-response:
description: | description: |
The IP protocol. Valid value is ``icmp``, The IP protocol. Valid value is ``icmp``,
@ -4437,6 +4502,15 @@ rbac_policy_id:
required: true required: true
type: string type: string
remote_group_id: remote_group_id:
description: |
The remote group UUID to associate with this
security group rule. You can specify either the
``remote_group_id`` or ``remote_ip_prefix`` attribute in the
request body.
in: body
required: true
type: string
remote_group_id-request:
description: | description: |
The remote group UUID to associate with this The remote group UUID to associate with this
security group rule. You can specify either the security group rule. You can specify either the
@ -4447,11 +4521,16 @@ remote_group_id:
type: string type: string
remote_ip_prefix: remote_ip_prefix:
description: | description: |
The remote IP prefix to associate with this The remote IP prefix that is matched by this security group rule.
metering rule packet.
in: body in: body
required: true required: true
type: string type: string
remote_ip_prefix-request:
description: |
The remote IP prefix that is matched by this security group rule.
in: body
required: false
type: string
resource-collection: resource-collection:
description: | description: |
Collection name of the resource. Collection name of the resource.

View File

@ -48,6 +48,7 @@ Request
- tenant_id: project_id-query - tenant_id: project_id-query
- project_id: project_id-query - project_id: project_id-query
- port_range_min: port_range_min-query - port_range_min: port_range_min-query
- remote_ip_prefix: remote_ip_prefix-query
- revision_number: revision_number-query - revision_number: revision_number-query
- id: id-query - id: id-query
- description: description-query - description: description-query
@ -100,14 +101,14 @@ Request
.. rest_parameters:: parameters.yaml .. rest_parameters:: parameters.yaml
- security_group_rule: security_group_rule - security_group_rule: security_group_rule
- remote_group_id: remote_group_id - remote_group_id: remote_group_id-request
- direction: direction - direction: direction
- protocol: protocol - protocol: protocol-request
- ethertype: ethertype - ethertype: ethertype-request
- port_range_max: port_range_max - port_range_max: port_range_max-request
- security_group_id: security_group_rule-security_group_id - security_group_id: security_group_rule-security_group_id
- port_range_min: port_range_min - port_range_min: port_range_min-request
- remote_ip_prefix: remote_ip_prefix - remote_ip_prefix: remote_ip_prefix-request
- description: description-request - description: description-request
Request Example Request Example