mirror of
https://opendev.org/openstack/ansible-collections-openstack.git
synced 2026-11-23 15:40:24 +00:00
Makes security_group_info compatible with new openstacksdk
Updated documentation of return values and added test to verify return values Function self.conn.search_security_groups() cannot be used here. Arguments for filtering such as 'description' would have to be passed to self.conn.search_security_groups() in its 'filters' argument [1]. The latter is passed to both as query arguments to OpenStack API and later to _utils._filter_list() [2] for filtering the results. Some arguments such as 'any_tags' are only used as query arguments by openstacksdk [3] when querying OpenStack API. They are no valid attributes in security_group.py [4]. Whenever those non-attribute arguments are passed to self.conn.search_security_groups(), _utils._filter_list() [2] would drop all results because no result would have a matching attributes. [1] https://opendev.org/openstack/openstacksdk/src/commit/0898398415ae7b0e2447d61226acf50f01567cdd/openstack/cloud/_security_group.py#L31 [2] https://opendev.org/openstack/openstacksdk/src/commit/0898398415ae7b0e2447d61226acf50f01567cdd/openstack/cloud/_utils.py#L63 [3] https://opendev.org/openstack/openstacksdk/src/commit/0898398415ae7b0e2447d61226acf50f01567cdd/openstack/common/tag.py#L19 [4] https://opendev.org/openstack/openstacksdk/src/commit/0898398415ae7b0e2447d61226acf50f01567cdd/openstack/network/v2/security_group.py Change-Id: Ie7fe9d2e973d38751c48e71e6bd55e56a591ac1f
This commit is contained in:
@@ -1 +1,13 @@
|
||||
expected_fields:
|
||||
- created_at
|
||||
- description
|
||||
- name
|
||||
- project_id
|
||||
- security_group_rules
|
||||
- stateful
|
||||
- tenant_id
|
||||
- updated_at
|
||||
- revision_number
|
||||
- id
|
||||
- tags
|
||||
secgroup_name: shade_secgroup
|
||||
|
||||
Reference in New Issue
Block a user