mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
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>
This commit is contained in:
parent
d875a36e5c
commit
28835054e6
@ -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…
x
Reference in New Issue
Block a user