mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-3921: AssociateIpAddress fails
When you have a method with named parameters, all calls to it should
explicitly pass name=value pairs. Not doing so can result in the wrong
params being passed in the method call. This is a result of the
"services" dictionary being passed into the isportable flag failing the
API signature generation and hence the API call.
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
(cherry picked from commit 28835054e6)
This commit is contained in:
parent
90c6fcf2a9
commit
c93c321b3b
|
|
@ -275,14 +275,14 @@ class VirtualMachine:
|
|||
@return:
|
||||
"""
|
||||
public_ip = PublicIPAddress.create(
|
||||
apiclient,
|
||||
virtual_machine.account,
|
||||
virtual_machine.zoneid,
|
||||
virtual_machine.domainid,
|
||||
services
|
||||
apiclient=apiclient,
|
||||
accountid=virtual_machine.account,
|
||||
zoneid=virtual_machine.zoneid,
|
||||
domainid=virtual_machine.domainid,
|
||||
services=services
|
||||
)
|
||||
FireWallRule.create(
|
||||
apiclient,
|
||||
apiclient=apiclient,
|
||||
ipaddressid=public_ip.ipaddress.id,
|
||||
protocol='TCP',
|
||||
cidrlist=['0.0.0.0/0'],
|
||||
|
|
@ -290,9 +290,9 @@ class VirtualMachine:
|
|||
endport=22
|
||||
)
|
||||
nat_rule = NATRule.create(
|
||||
apiclient,
|
||||
virtual_machine,
|
||||
services,
|
||||
apiclient=apiclient,
|
||||
virtual_machine=virtual_machine,
|
||||
services=services,
|
||||
ipaddressid=public_ip.ipaddress.id
|
||||
)
|
||||
virtual_machine.ssh_ip = nat_rule.ipaddress
|
||||
|
|
|
|||
Loading…
Reference in New Issue