cs_physical_network: use name as param for network (#54602)

This commit is contained in:
René Moser 2019-03-29 15:45:01 +01:00 committed by ansibot
parent b0d0a3a2f8
commit 9cdad6a01e

View file

@ -22,12 +22,12 @@ author:
- Netservers Ltd. (@netservers)
- Patryk Cichy (@PatTheSilent)
options:
physical_network:
name:
description:
- Name of the physical network.
required: true
aliases:
- name
- physical_network
type: str
zone:
description:
@ -231,7 +231,7 @@ class AnsibleCloudStackPhysicalNetwork(AnsibleCloudStack):
def _get_common_args(self):
args = {
'name': self.module.params.get('physical_network'),
'name': self.module.params.get('name'),
'isolationmethods': self.module.params.get('isolation_method'),
'broadcastdomainrange': self.module.params.get('broadcast_domain_range'),
'networkspeed': self.module.params.get('network_speed'),
@ -245,7 +245,7 @@ class AnsibleCloudStackPhysicalNetwork(AnsibleCloudStack):
return args
def get_physical_network(self, key=None):
physical_network = self.module.params.get('physical_network')
physical_network = self.module.params.get('name')
if self.physical_network:
return self._get_by_key(key, self.physical_network)
@ -423,7 +423,7 @@ class AnsibleCloudStackPhysicalNetwork(AnsibleCloudStack):
def main():
argument_spec = cs_argument_spec()
argument_spec.update(dict(
physical_network=dict(required=True, aliases=['name']),
name=dict(required=True, aliases=['physical_network']),
zone=dict(),
domain=dict(),
vlan=dict(),