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:
Girish Shilamkar 2013-07-25 01:52:26 -04:00 committed by Prasanna Santhanam
parent 3a3145507d
commit 4054a8e2ac
2 changed files with 10 additions and 5 deletions

View File

@ -219,7 +219,7 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@attr(tags = ["simulator", "basic", "advanced", "portablepublicip"])
@attr(tags = ["simulator", "advanced", "portablepublicip"])
def test_createPortablePublicIPAcquire(self):
""" Test to acquire a provisioned public ip range
"""
@ -229,7 +229,9 @@ class TestPortablePublicIPAcquire(cloudstackTestCase):
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)
return
return

View File

@ -1074,7 +1074,7 @@ class PublicIPAddress:
@classmethod
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"""
cmd = associateIpAddress.associateIpAddressCmd()
@ -1093,6 +1093,9 @@ class PublicIPAddress:
elif "domainid" in services:
cmd.domainid = services["domainid"]
if isportable:
cmd.isportable = isportable
if networkid:
cmd.networkid = networkid
@ -2271,7 +2274,7 @@ class PortablePublicIpRange:
cmd.regionid = services["regionid"]
cmd.vlan = services["vlan"]
return PortablePublicIpRange(apiclient.createVlanIpRange(cmd).__dict__)
return PortablePublicIpRange(apiclient.createPortableIpRange(cmd).__dict__)
def delete(self, apiclient):
"""Delete portable IpRange"""