Add id query parameter to sg rules

id paramter is needed for filter functionality in Ansible modules. See PR https://review.opendev.org/c/openstack/ansible-collections-openstack/+/765580

Change-Id: If08fa34672ff32dda139b0b50cc7c4af89107846
(cherry picked from commit b86edc3683)
This commit is contained in:
tischrei
2020-12-08 11:46:50 +00:00
committed by Shnaidman Sagi
parent c418320e84
commit e3da0210b1
2 changed files with 2 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ class SecurityGroupRule(_base.NetworkResource, resource.TagMixin):
allow_list = True
_query_mapping = resource.QueryParameters(
'description', 'direction', 'protocol',
'description', 'direction', 'id', 'protocol',
'remote_group_id', 'security_group_id',
'port_range_max', 'port_range_min',
'remote_ip_prefix', 'revision_number',

View File

@@ -50,6 +50,7 @@ class TestSecurityGroupRule(base.TestCase):
self.assertDictEqual({'any_tags': 'tags-any',
'description': 'description',
'direction': 'direction',
'id': 'id',
'ether_type': 'ethertype',
'limit': 'limit',
'marker': 'marker',