mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
cloudstack: use new get_result() handling
This commit is contained in:
@@ -64,6 +64,11 @@ EXAMPLES = '''
|
||||
|
||||
RETURN = '''
|
||||
---
|
||||
id:
|
||||
description: UUID of the security group.
|
||||
returned: success
|
||||
type: string
|
||||
sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f
|
||||
name:
|
||||
description: Name of security group.
|
||||
returned: success
|
||||
@@ -89,7 +94,7 @@ from ansible.module_utils.cloudstack import *
|
||||
class AnsibleCloudStackSecurityGroup(AnsibleCloudStack):
|
||||
|
||||
def __init__(self, module):
|
||||
AnsibleCloudStack.__init__(self, module)
|
||||
super(AnsibleCloudStackSecurityGroup, self).__init__(module)
|
||||
self.security_group = None
|
||||
|
||||
|
||||
@@ -143,14 +148,6 @@ class AnsibleCloudStackSecurityGroup(AnsibleCloudStack):
|
||||
return security_group
|
||||
|
||||
|
||||
def get_result(self, security_group):
|
||||
if security_group:
|
||||
if 'name' in security_group:
|
||||
self.result['name'] = security_group['name']
|
||||
if 'description' in security_group:
|
||||
self.result['description'] = security_group['description']
|
||||
return self.result
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
|
||||
Reference in New Issue
Block a user