mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2251: Automation - dedicated guest VLAN ranges feature
This commit is contained in:
parent
3d5c217c8d
commit
4c69609fa1
File diff suppressed because it is too large
Load Diff
|
|
@ -2560,7 +2560,7 @@ class Network:
|
|||
def create(cls, apiclient, services, accountid=None, domainid=None,
|
||||
networkofferingid=None, projectid=None,
|
||||
subdomainaccess=None, zoneid=None,
|
||||
gateway=None, netmask=None, vpcid=None, aclid=None):
|
||||
gateway=None, netmask=None, vpcid=None, aclid=None, vlan=None):
|
||||
"""Create Network for account"""
|
||||
cmd = createNetwork.createNetworkCmd()
|
||||
cmd.name = services["name"]
|
||||
|
|
@ -2591,7 +2591,9 @@ class Network:
|
|||
cmd.startip = services["startip"]
|
||||
if "endip" in services:
|
||||
cmd.endip = services["endip"]
|
||||
if "vlan" in services:
|
||||
if vlan:
|
||||
cmd.vlan = vlan
|
||||
elif "vlan" in services:
|
||||
cmd.vlan = services["vlan"]
|
||||
if "acltype" in services:
|
||||
cmd.acltype = services["acltype"]
|
||||
|
|
|
|||
|
|
@ -1363,3 +1363,16 @@ def isDomainResourceCountEqualToExpectedCount(apiclient, domainid, expectedcount
|
|||
if resourcecount == expectedcount:
|
||||
isResourceCountEqual = True
|
||||
return [isExceptionOccured, reasonForException, isResourceCountEqual]
|
||||
|
||||
def isNetworkDeleted(apiclient, networkid, timeout=600):
|
||||
""" List the network and check that the list is empty or not"""
|
||||
networkDeleted = False
|
||||
while timeout >= 0:
|
||||
networks = Network.list(apiclient, id=networkid)
|
||||
if networks is None:
|
||||
networkDeleted = True
|
||||
break
|
||||
timeout -= 60
|
||||
time.sleep(60)
|
||||
#end while
|
||||
return networkDeleted
|
||||
|
|
|
|||
Loading…
Reference in New Issue