mirror of https://github.com/apache/cloudstack.git
Automation - Portable Ip feature test cases
Signed-off-by: venkataswamybabu budumuru <venkataswamybabu.budumuru@citrix.com>
(cherry picked from commit 23c759ec35)
This commit is contained in:
parent
f946747091
commit
ae1cebf4e9
File diff suppressed because it is too large
Load Diff
|
|
@ -2360,7 +2360,9 @@ class PortablePublicIpRange:
|
|||
cmd.startip = services["startip"]
|
||||
cmd.endip = services["endip"]
|
||||
cmd.regionid = services["regionid"]
|
||||
cmd.vlan = services["vlan"]
|
||||
|
||||
if "vlan" in services:
|
||||
cmd.vlan = services["vlan"]
|
||||
|
||||
return PortablePublicIpRange(apiclient.createPortableIpRange(cmd).__dict__)
|
||||
|
||||
|
|
|
|||
|
|
@ -686,3 +686,38 @@ def get_resource_type(resource_id):
|
|||
}
|
||||
|
||||
return lookup[resource_id]
|
||||
|
||||
def get_portable_ip_range_services(config):
|
||||
""" Reads config values related to portable ip and fills up
|
||||
services accordingly"""
|
||||
|
||||
services = {}
|
||||
attributeError = False
|
||||
|
||||
if config.portableIpRange.startip:
|
||||
services["startip"] = config.portableIpRange.startip
|
||||
else:
|
||||
attributeError = True
|
||||
|
||||
if config.portableIpRange.endip:
|
||||
services["endip"] = config.portableIpRange.endip
|
||||
else:
|
||||
attributeError = True
|
||||
|
||||
if config.portableIpRange.netmask:
|
||||
services["netmask"] = config.portableIpRange.netmask
|
||||
else:
|
||||
attributeError = True
|
||||
|
||||
if config.portableIpRange.gateway:
|
||||
services["gateway"] = config.portableIpRange.gateway
|
||||
else:
|
||||
attributeError = True
|
||||
|
||||
if config.portableIpRange.vlan:
|
||||
services["vlan"] = config.portableIpRange.vlan
|
||||
|
||||
if attributeError:
|
||||
services = None
|
||||
|
||||
return services
|
||||
|
|
|
|||
Loading…
Reference in New Issue