cloudstack: rename displaytext, displayname to dislplay_... for consistency
This commit is contained in:
parent
65dc7af166
commit
7bcbc7819c
5 changed files with 27 additions and 30 deletions
|
@ -150,7 +150,7 @@ name:
|
|||
returned: success
|
||||
type: string
|
||||
sample: Debian 7 64-bit
|
||||
displaytext:
|
||||
display_text:
|
||||
description: Text to be displayed of the ISO.
|
||||
returned: success
|
||||
type: string
|
||||
|
|
|
@ -31,10 +31,10 @@ options:
|
|||
description:
|
||||
- Name (case sensitive) of the network.
|
||||
required: true
|
||||
displaytext:
|
||||
display_text:
|
||||
description:
|
||||
- Display text of the network.
|
||||
- If not specified, C(name) will be used as displaytext.
|
||||
- If not specified, C(name) will be used as C(display_text).
|
||||
required: false
|
||||
default: null
|
||||
network_offering:
|
||||
|
@ -177,7 +177,7 @@ EXAMPLES = '''
|
|||
- local_action:
|
||||
module: cs_network
|
||||
name: my network
|
||||
displaytext: network of domain example.local
|
||||
display_text: network of domain example.local
|
||||
network_domain: example.local
|
||||
|
||||
# restart a network with clean up
|
||||
|
@ -206,7 +206,7 @@ name:
|
|||
returned: success
|
||||
type: string
|
||||
sample: web project
|
||||
displaytext:
|
||||
display_text:
|
||||
description: Display text of the network.
|
||||
returned: success
|
||||
type: string
|
||||
|
@ -390,7 +390,7 @@ class AnsibleCloudStackNetwork(AnsibleCloudStack):
|
|||
def _get_args(self):
|
||||
args = {}
|
||||
args['name'] = self.module.params.get('name')
|
||||
args['displaytext'] = self.get_or_fallback('displaytext', 'name')
|
||||
args['displaytext'] = self.get_or_fallback('display_text', 'name')
|
||||
args['networkdomain'] = self.module.params.get('network_domain')
|
||||
args['networkofferingid'] = self.get_network_offering(key='id')
|
||||
return args
|
||||
|
@ -525,7 +525,7 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
name = dict(required=True),
|
||||
displaytext = dict(default=None),
|
||||
display_text = dict(default=None),
|
||||
network_offering = dict(default=None),
|
||||
zone = dict(default=None),
|
||||
start_ip = dict(default=None),
|
||||
|
|
|
@ -31,10 +31,10 @@ options:
|
|||
description:
|
||||
- Name of the project.
|
||||
required: true
|
||||
displaytext:
|
||||
display_text:
|
||||
description:
|
||||
- Display text of the project.
|
||||
- If not specified, C(name) will be used as displaytext.
|
||||
- If not specified, C(name) will be used as C(display_text).
|
||||
required: false
|
||||
default: null
|
||||
state:
|
||||
|
@ -71,7 +71,7 @@ EXAMPLES = '''
|
|||
- local_action:
|
||||
module: cs_project
|
||||
name: web
|
||||
displaytext: my web project
|
||||
display_text: my web project
|
||||
|
||||
# Suspend an existing project
|
||||
- local_action:
|
||||
|
@ -104,7 +104,7 @@ name:
|
|||
returned: success
|
||||
type: string
|
||||
sample: web project
|
||||
displaytext:
|
||||
display_text:
|
||||
description: Display text of the project.
|
||||
returned: success
|
||||
type: string
|
||||
|
@ -173,7 +173,7 @@ class AnsibleCloudStackProject(AnsibleCloudStack):
|
|||
def update_project(self, project):
|
||||
args = {}
|
||||
args['id'] = project['id']
|
||||
args['displaytext'] = self.get_or_fallback('displaytext', 'name')
|
||||
args['displaytext'] = self.get_or_fallback('display_text', 'name')
|
||||
|
||||
if self._has_changed(args, project):
|
||||
self.result['changed'] = True
|
||||
|
@ -194,7 +194,7 @@ class AnsibleCloudStackProject(AnsibleCloudStack):
|
|||
|
||||
args = {}
|
||||
args['name'] = self.module.params.get('name')
|
||||
args['displaytext'] = self.get_or_fallback('displaytext', 'name')
|
||||
args['displaytext'] = self.get_or_fallback('display_text', 'name')
|
||||
args['account'] = self.get_account('name')
|
||||
args['domainid'] = self.get_domain('id')
|
||||
|
||||
|
@ -262,7 +262,7 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
name = dict(required=True),
|
||||
displaytext = dict(default=None),
|
||||
display_text = dict(default=None),
|
||||
state = dict(choices=['present', 'absent', 'active', 'suspended' ], default='present'),
|
||||
domain = dict(default=None),
|
||||
account = dict(default=None),
|
||||
|
|
|
@ -158,9 +158,9 @@ options:
|
|||
- 32 or 64 bits support.
|
||||
required: false
|
||||
default: '64'
|
||||
displaytext:
|
||||
display_text:
|
||||
description:
|
||||
- the display text of the template.
|
||||
- Display text of the template.
|
||||
required: true
|
||||
default: null
|
||||
state:
|
||||
|
@ -229,7 +229,7 @@ name:
|
|||
returned: success
|
||||
type: string
|
||||
sample: Debian 7 64-bit
|
||||
displaytext:
|
||||
display_text:
|
||||
description: Display text of the template.
|
||||
returned: success
|
||||
type: string
|
||||
|
@ -371,7 +371,7 @@ class AnsibleCloudStackTemplate(AnsibleCloudStack):
|
|||
def _get_args(self):
|
||||
args = {}
|
||||
args['name'] = self.module.params.get('name')
|
||||
args['displaytext'] = self.module.params.get('displaytext')
|
||||
args['displaytext'] = self.get_or_fallback('display_text', 'name')
|
||||
args['bits'] = self.module.params.get('bits')
|
||||
args['isdynamicallyscalable'] = self.module.params.get('is_dynamically_scalable')
|
||||
args['isextractable'] = self.module.params.get('is_extractable')
|
||||
|
@ -385,8 +385,6 @@ class AnsibleCloudStackTemplate(AnsibleCloudStack):
|
|||
if not args['ostypeid']:
|
||||
self.module.fail_json(msg="Missing required arguments: os_type")
|
||||
|
||||
if not args['displaytext']:
|
||||
args['displaytext'] = self.module.params.get('name')
|
||||
return args
|
||||
|
||||
|
||||
|
@ -523,7 +521,7 @@ def main():
|
|||
module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
name = dict(required=True),
|
||||
displaytext = dict(default=None),
|
||||
display_text = dict(default=None),
|
||||
url = dict(default=None),
|
||||
vm = dict(default=None),
|
||||
snapshot = dict(default=None),
|
||||
|
|
|
@ -28,9 +28,9 @@ author: "René Moser (@resmo)"
|
|||
options:
|
||||
name:
|
||||
description:
|
||||
- Unique Name of the snapshot. In CloudStack terms C(displayname).
|
||||
- Unique Name of the snapshot. In CloudStack terms display name.
|
||||
required: true
|
||||
aliases: ['displayname']
|
||||
aliases: ['display_name']
|
||||
vm:
|
||||
description:
|
||||
- Name of the virtual machine.
|
||||
|
@ -114,8 +114,8 @@ name:
|
|||
returned: success
|
||||
type: string
|
||||
sample: snapshot before update
|
||||
displayname:
|
||||
description: displayname of the snapshot.
|
||||
display_name:
|
||||
description: Display name of the snapshot.
|
||||
returned: success
|
||||
type: string
|
||||
sample: snapshot before update
|
||||
|
@ -139,7 +139,6 @@ type:
|
|||
returned: success
|
||||
type: string
|
||||
sample: DiskAndMemory
|
||||
description:
|
||||
description:
|
||||
description: description of vm snapshot
|
||||
returned: success
|
||||
|
@ -259,7 +258,7 @@ class AnsibleCloudStackVmSnapshot(AnsibleCloudStack):
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec = dict(
|
||||
name = dict(required=True, aliases=['displayname']),
|
||||
name = dict(required=True, aliases=['display_name']),
|
||||
vm = dict(required=True),
|
||||
description = dict(default=None),
|
||||
zone = dict(default=None),
|
||||
|
|
Loading…
Reference in a new issue