cloudstack: cs_portforward: fix rule not found if domain is not account's domain. (#3093)
cs_portforward will not find the rule and tries to create it resulting in an API error. Thanks to @mostkopf for reporting.
This commit is contained in:
parent
d698a9b5f7
commit
9518290454
1 changed files with 4 additions and 0 deletions
|
@ -239,6 +239,8 @@ class AnsibleCloudStackPortforwarding(AnsibleCloudStack):
|
|||
|
||||
args = {}
|
||||
args['ipaddressid'] = self.get_ip_address(key='id')
|
||||
args['account'] = self.get_account(key='name')
|
||||
args['domainid'] = self.get_domain(key='id')
|
||||
args['projectid'] = self.get_project(key='id')
|
||||
portforwarding_rules = self.cs.listPortForwardingRules(**args)
|
||||
|
||||
|
@ -271,6 +273,8 @@ class AnsibleCloudStackPortforwarding(AnsibleCloudStack):
|
|||
args['vmguestip'] = self.get_vm_guest_ip()
|
||||
args['ipaddressid'] = self.get_ip_address(key='id')
|
||||
args['virtualmachineid'] = self.get_vm(key='id')
|
||||
args['account'] = self.get_account(key='name')
|
||||
args['domainid'] = self.get_domain(key='id')
|
||||
|
||||
portforwarding_rule = None
|
||||
self.result['changed'] = True
|
||||
|
|
Loading…
Reference in a new issue