cloudstack: fix public and private ports results not int

reviewable/pr18780/r1
Rene Moser 10 years ago
parent 8147103da9
commit 525ef47247

@ -33,7 +33,8 @@ options:
required: true required: true
vm: vm:
description: description:
- Name of virtual machine which we make the port forwarding rule for. Required if C(state=present). - Name of virtual machine which we make the port forwarding rule for.
- Required if C(state=present).
required: false required: false
default: null default: null
state: state:
@ -54,7 +55,8 @@ options:
required: true required: true
public_end_port: public_end_port:
description: description:
- End public port for this rule. If not specific, equal C(public_port). - End public port for this rule.
- If not specified equal C(public_port).
required: false required: false
default: null default: null
private_port: private_port:
@ -63,7 +65,8 @@ options:
required: true required: true
private_end_port: private_end_port:
description: description:
- End private port for this rule. If not specific, equal C(private_port) - End private port for this rule.
- If not specified equal C(private_port).
required: false required: false
default: null default: null
open_firewall: open_firewall:
@ -362,13 +365,13 @@ class AnsibleCloudStackPortforwarding(AnsibleCloudStack):
if 'vmguestip' in portforwarding_rule: if 'vmguestip' in portforwarding_rule:
self.result['vm_guest_ip'] = portforwarding_rule['vmguestip'] self.result['vm_guest_ip'] = portforwarding_rule['vmguestip']
if 'publicport' in portforwarding_rule: if 'publicport' in portforwarding_rule:
self.result['public_port'] = portforwarding_rule['publicport'] self.result['public_port'] = int(portforwarding_rule['publicport'])
if 'publicendport' in portforwarding_rule: if 'publicendport' in portforwarding_rule:
self.result['public_end_port'] = portforwarding_rule['publicendport'] self.result['public_end_port'] = int(portforwarding_rule['publicendport'])
if 'privateport' in portforwarding_rule: if 'privateport' in portforwarding_rule:
self.result['private_port'] = portforwarding_rule['privateport'] self.result['private_port'] = int(portforwarding_rule['privateport'])
if 'privateendport' in portforwarding_rule: if 'privateendport' in portforwarding_rule:
self.result['private_end_port'] = portforwarding_rule['privateendport'] self.result['private_end_port'] = int(portforwarding_rule['privateendport'])
if 'protocol' in portforwarding_rule: if 'protocol' in portforwarding_rule:
self.result['protocol'] = portforwarding_rule['protocol'] self.result['protocol'] = portforwarding_rule['protocol']
if 'tags' in portforwarding_rule: if 'tags' in portforwarding_rule:

Loading…
Cancel
Save