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:
Gaurav Aradhye 2013-09-13 00:32:45 -04:00 committed by venkataswamybabu budumuru
parent f946747091
commit ae1cebf4e9
3 changed files with 1347 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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__)

View File

@ -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