Remove population of is_filter keyword

The population of is_filter in network_ip_availability and
portbindings_extended modules was a walk-around for the missing
of this keyword in neutron-lib's resource attributes.
This issue is resolved in the release of neutron-lib 1.19.0
so this walk-around can be removed.

Depends-On: https://review.openstack.org/#/c/605690/
Change-Id: I7bb29bbe68f7e9afbc20704948661dd5e9dae912
This commit is contained in:
Hongbin Lu 2018-10-02 15:14:11 +00:00
parent f0ba3f99c8
commit b43b8c446d
2 changed files with 0 additions and 24 deletions

View File

@ -30,9 +30,6 @@ class Network_ip_availability(api_extensions.APIExtensionDescriptor):
"""Returns Extended Resource for service type management."""
resource_attributes = apidef.RESOURCE_ATTRIBUTE_MAP[
apidef.RESOURCE_PLURAL]
# TODO(hongbin): Delete _populate_is_filter_keyword once neutron-lib
# containing https://review.openstack.org/#/c/583838/ is released.
cls._populate_is_filter_keyword(resource_attributes)
controller = base.create_resource(
apidef.RESOURCE_PLURAL,
apidef.RESOURCE_NAME,
@ -41,13 +38,3 @@ class Network_ip_availability(api_extensions.APIExtensionDescriptor):
return [extensions.ResourceExtension(apidef.COLLECTION_NAME,
controller,
attr_map=resource_attributes)]
@classmethod
def _populate_is_filter_keyword(cls, params):
filter_keys = ['network_id', 'network_name', 'tenant_id',
'project_id']
for name in params:
if name in filter_keys:
params[name]['is_filter'] = True
params['ip_version'] = {'allow_post': False, 'allow_put': False,
'is_visible': False, 'is_filter': True}

View File

@ -52,9 +52,6 @@ class Portbindings_extended(api_extensions.ExtensionDescriptor):
params = pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP[
pbe_ext.COLLECTION_NAME]['parameters']
# TODO(hongbin): Delete _populate_is_filter_keyword once neutron-lib
# containing https://review.openstack.org/#/c/583437/ is released.
cls._populate_is_filter_keyword(params)
parent = pbe_ext.SUB_RESOURCE_ATTRIBUTE_MAP[
pbe_ext.COLLECTION_NAME]['parent']
controller = base.create_resource(
@ -78,11 +75,3 @@ class Portbindings_extended(api_extensions.ExtensionDescriptor):
]
return exts
@classmethod
def _populate_is_filter_keyword(cls, params):
filter_keys = [pbe_ext.HOST, pbe_ext.VIF_TYPE, pbe_ext.VNIC_TYPE,
pbe_ext.STATUS]
for name in params:
if name in filter_keys:
params[name]['is_filter'] = True