cloudstack: cs_portforward: fix returns for int casting
* missing self. * variable must be named portforwarding_rule, not resource
This commit is contained in:
parent
249b7bf969
commit
a279207c7b
1 changed files with 3 additions and 3 deletions
|
@ -361,9 +361,9 @@ class AnsibleCloudStackPortforwarding(AnsibleCloudStack):
|
||||||
super(AnsibleCloudStackPortforwarding, self).get_result(portforwarding_rule)
|
super(AnsibleCloudStackPortforwarding, self).get_result(portforwarding_rule)
|
||||||
if portforwarding_rule:
|
if portforwarding_rule:
|
||||||
# Bad bad API does not always return int when it should.
|
# Bad bad API does not always return int when it should.
|
||||||
for search_key, return_key in returns_to_int.iteritems():
|
for search_key, return_key in self.returns_to_int.iteritems():
|
||||||
if search_key in resource:
|
if search_key in portforwarding_rule:
|
||||||
self.result[return_key] = int(resource[search_key])
|
self.result[return_key] = int(portforwarding_rule[search_key])
|
||||||
return self.result
|
return self.result
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue