mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6764: Marvin - Accomodating networkid parameter while deploying VM in advanced zone and account contains mor than one network
(cherry picked from commit 50d4963d53)
This commit is contained in:
parent
5cb6f7375e
commit
ed77cf84f2
|
|
@ -316,7 +316,8 @@ class VirtualMachine:
|
|||
|
||||
@classmethod
|
||||
def access_ssh_over_nat(
|
||||
cls, apiclient, services, virtual_machine, allow_egress=False):
|
||||
cls, apiclient, services, virtual_machine, allow_egress=False,
|
||||
networkid=None):
|
||||
"""
|
||||
Program NAT and PF rules to open up ssh access to deployed guest
|
||||
@return:
|
||||
|
|
@ -326,7 +327,8 @@ class VirtualMachine:
|
|||
accountid=virtual_machine.account,
|
||||
zoneid=virtual_machine.zoneid,
|
||||
domainid=virtual_machine.domainid,
|
||||
services=services
|
||||
services=services,
|
||||
networkid=networkid
|
||||
)
|
||||
FireWallRule.create(
|
||||
apiclient=apiclient,
|
||||
|
|
@ -482,7 +484,8 @@ class VirtualMachine:
|
|||
apiclient,
|
||||
services,
|
||||
virtual_machine,
|
||||
allow_egress=allow_egress)
|
||||
allow_egress=allow_egress,
|
||||
networkid=cmd.networkids[0] if cmd.networkids else None)
|
||||
elif mode.lower() == 'basic':
|
||||
if virtual_machine.publicip is not None:
|
||||
# EIP/ELB (netscaler) enabled zone
|
||||
|
|
|
|||
Loading…
Reference in New Issue