Refactored security_group{,_info} modules

Change-Id: I8ae38c038e24ae53704224adb614b98e2e56a271
This commit is contained in:
Jakob Meng
2022-12-14 20:55:24 +01:00
parent 647ffef375
commit 4cf6842222
10 changed files with 375 additions and 280 deletions

View File

@@ -143,10 +143,6 @@ EXAMPLES = '''
'''
RETURN = '''
id:
description: Unique rule UUID.
type: str
returned: state == present
rule:
description: Representation of the security group rule
type: dict
@@ -430,7 +426,7 @@ class SecurityGroupRuleModule(OpenStackModule):
changed = True
rule = rule.to_dict(computed=False)
self.exit_json(changed=changed, rule=rule, id=rule['id'])
self.exit_json(changed=changed, rule=rule)
if state == 'absent' and rule:
self.conn.network.delete_security_group_rule(rule['id'])