Skip to content

Commit fa05cfb

Browse files
Gaurav AradhyeGirish Shilamkar
authored andcommitted
CLOUDSTACK-6764: Marvin - Accomodating networkid parameter while deploying VM in advanced zone and account contains mor than one network
1 parent 3e3dc73 commit fa05cfb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

tools/marvin/marvin/lib/base.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ def ssh_access_group(cls, apiclient, cmd):
310310

311311
@classmethod
312312
def access_ssh_over_nat(
313-
cls, apiclient, services, virtual_machine, allow_egress=False):
313+
cls, apiclient, services, virtual_machine, allow_egress=False,
314+
networkid=None):
314315
"""
315316
Program NAT and PF rules to open up ssh access to deployed guest
316317
@return:
@@ -320,7 +321,8 @@ def access_ssh_over_nat(
320321
accountid=virtual_machine.account,
321322
zoneid=virtual_machine.zoneid,
322323
domainid=virtual_machine.domainid,
323-
services=services
324+
services=services,
325+
networkid=networkid
324326
)
325327
FireWallRule.create(
326328
apiclient=apiclient,
@@ -476,7 +478,8 @@ def create(cls, apiclient, services, templateid=None, accountid=None,
476478
apiclient,
477479
services,
478480
virtual_machine,
479-
allow_egress=allow_egress)
481+
allow_egress=allow_egress,
482+
networkid=cmd.networkids[0] if cmd.networkids else None)
480483
elif mode.lower() == 'basic':
481484
if virtual_machine.publicip is not None:
482485
# EIP/ELB (netscaler) enabled zone

0 commit comments

Comments
 (0)