Add is_filter to network_ip_availability
Change-Id: Ie1d69c3575210c99f9f4c3e9f709da5d3f972c06
This commit is contained in:
parent
d24aa98369
commit
10eaab3242
@ -70,6 +70,14 @@ Error response codes: 401
|
|||||||
Request
|
Request
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
.. rest_parameters:: parameters.yaml
|
||||||
|
|
||||||
|
- network_id: network_ip_availability-network_id-query
|
||||||
|
- network_name: network-name-query
|
||||||
|
- tenant_id: project_id-query
|
||||||
|
- project_id: project_id-query
|
||||||
|
- ip_version: ip_version-query
|
||||||
|
|
||||||
Response Parameters
|
Response Parameters
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
@ -755,6 +755,12 @@ name-query:
|
|||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
network-name-query:
|
||||||
|
description: |
|
||||||
|
Filter the list result by the human-readable name of the network.
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
network-shared-query:
|
network-shared-query:
|
||||||
description: |
|
description: |
|
||||||
Filter the network list result based on if the network is shared across
|
Filter the network list result based on if the network is shared across
|
||||||
@ -791,6 +797,13 @@ network_id-query:
|
|||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
network_ip_availability-network_id-query:
|
||||||
|
description: |
|
||||||
|
Filter the list result by the ID of the network whose IP availability
|
||||||
|
detail is reported.
|
||||||
|
in: query
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
network_is_default-query:
|
network_is_default-query:
|
||||||
description: |
|
description: |
|
||||||
Filter the network list result based on if the network is default pool
|
Filter the network list result based on if the network is default pool
|
||||||
|
@ -27,15 +27,15 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
RESOURCE_PLURAL: {
|
RESOURCE_PLURAL: {
|
||||||
'network_id': {
|
'network_id': {
|
||||||
'allow_post': False, 'allow_put': False,
|
'allow_post': False, 'allow_put': False,
|
||||||
'is_visible': True
|
'is_visible': True, 'is_filter': True
|
||||||
},
|
},
|
||||||
'network_name': {
|
'network_name': {
|
||||||
'allow_post': False, 'allow_put': False,
|
'allow_post': False, 'allow_put': False,
|
||||||
'is_visible': True
|
'is_visible': True, 'is_filter': True
|
||||||
},
|
},
|
||||||
'tenant_id': {
|
'tenant_id': {
|
||||||
'allow_post': False, 'allow_put': False,
|
'allow_post': False, 'allow_put': False,
|
||||||
'is_visible': True
|
'is_visible': True, 'is_filter': True
|
||||||
},
|
},
|
||||||
'total_ips': {
|
'total_ips': {
|
||||||
'allow_post': False, 'allow_put': False,
|
'allow_post': False, 'allow_put': False,
|
||||||
@ -48,6 +48,18 @@ RESOURCE_ATTRIBUTE_MAP = {
|
|||||||
'subnet_ip_availability': {
|
'subnet_ip_availability': {
|
||||||
'allow_post': False, 'allow_put': False,
|
'allow_post': False, 'allow_put': False,
|
||||||
'is_visible': True
|
'is_visible': True
|
||||||
|
},
|
||||||
|
# NOTE(hongbin): This 'ip_version' attribute (top-level) is only used
|
||||||
|
# as a filter on listing the resources. There is another 'ip_version'
|
||||||
|
# attribute nested inside the 'subnet_ip_availability'.
|
||||||
|
# The difference is that the top-level attribute is used as input
|
||||||
|
# and the nested attribute is an output.
|
||||||
|
# In here, 'allow_post', 'allow_put' and 'is_visible' are set to False
|
||||||
|
# because this attribute should be used as filter only. Please do not
|
||||||
|
# set it to True to avoid introducing inconsistency.
|
||||||
|
'ip_version': {
|
||||||
|
'allow_post': False, 'allow_put': False,
|
||||||
|
'is_visible': False, 'is_filter': True
|
||||||
}
|
}
|
||||||
# TODO(wwriverrat) Make composite attribute for subnet_ip_availability
|
# TODO(wwriverrat) Make composite attribute for subnet_ip_availability
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user