Merge pull request #511 from resmo/fix/cs_portforward
cloudstack: fix public and private ports results not int
This commit is contained in:
commit
fefbf7c41a
1 changed files with 10 additions and 7 deletions
|
@ -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…
Reference in a new issue