mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-3454: Fix test_portable_publicip
Added isportable param to associateIP API. Fixed base class for PortableIP tio call portableip APIs. Removed test_createPortablePublicIPAcquire from basic zone run requires additional network creation handling which can be done in component tests. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
3a3145507d
commit
4054a8e2ac
@ -219,7 +219,7 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
|
|||||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||||
return
|
return
|
||||||
|
|
||||||
@attr(tags = ["simulator", "basic", "advanced", "portablepublicip"])
|
@attr(tags = ["simulator", "advanced", "portablepublicip"])
|
||||||
def test_createPortablePublicIPAcquire(self):
|
def test_createPortablePublicIPAcquire(self):
|
||||||
""" Test to acquire a provisioned public ip range
|
""" Test to acquire a provisioned public ip range
|
||||||
"""
|
"""
|
||||||
@ -229,7 +229,9 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
|
|||||||
self.services
|
self.services
|
||||||
)
|
)
|
||||||
|
|
||||||
ip_address = PublicIPAddress.create(self.api_client, self.account.name, self.zone.id, self.account.domainid)
|
ip_address = PublicIPAddress.create(self.api_client, self.account.name,
|
||||||
|
self.zone.id, self.account.domainid, True)
|
||||||
|
|
||||||
|
ip_address.delete(self.api_client)
|
||||||
self.portable_ip_range.delete(self.apiclient)
|
self.portable_ip_range.delete(self.apiclient)
|
||||||
return
|
return
|
||||||
@ -1074,7 +1074,7 @@ class PublicIPAddress:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, apiclient, accountid=None, zoneid=None, domainid=None,
|
def create(cls, apiclient, accountid=None, zoneid=None, domainid=None,
|
||||||
services=None, networkid=None, projectid=None, vpcid=None):
|
isportable=None, services=None, networkid=None, projectid=None, vpcid=None):
|
||||||
"""Associate Public IP address"""
|
"""Associate Public IP address"""
|
||||||
cmd = associateIpAddress.associateIpAddressCmd()
|
cmd = associateIpAddress.associateIpAddressCmd()
|
||||||
|
|
||||||
@ -1093,6 +1093,9 @@ class PublicIPAddress:
|
|||||||
elif "domainid" in services:
|
elif "domainid" in services:
|
||||||
cmd.domainid = services["domainid"]
|
cmd.domainid = services["domainid"]
|
||||||
|
|
||||||
|
if isportable:
|
||||||
|
cmd.isportable = isportable
|
||||||
|
|
||||||
if networkid:
|
if networkid:
|
||||||
cmd.networkid = networkid
|
cmd.networkid = networkid
|
||||||
|
|
||||||
@ -2271,7 +2274,7 @@ class PortablePublicIpRange:
|
|||||||
cmd.regionid = services["regionid"]
|
cmd.regionid = services["regionid"]
|
||||||
cmd.vlan = services["vlan"]
|
cmd.vlan = services["vlan"]
|
||||||
|
|
||||||
return PortablePublicIpRange(apiclient.createVlanIpRange(cmd).__dict__)
|
return PortablePublicIpRange(apiclient.createPortableIpRange(cmd).__dict__)
|
||||||
|
|
||||||
def delete(self, apiclient):
|
def delete(self, apiclient):
|
||||||
"""Delete portable IpRange"""
|
"""Delete portable IpRange"""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user