mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Revert "CLOUDSTACK-6992 Test data was passed to test methods.Made code changes to get test data and pass it to test methods. Also reading portable ip config values was not proper in getPortableIpRangeServices method. So corrected it"
This reverts commit dfee7b1456e9490889f93060023555d898bf5ae5.
This commit is contained in:
parent
98e2a0444f
commit
2231fc8920
@ -143,14 +143,6 @@ class Services:
|
|||||||
"publicport": 22,
|
"publicport": 22,
|
||||||
"protocol": 'TCP',
|
"protocol": 'TCP',
|
||||||
},
|
},
|
||||||
"portableIpRange":
|
|
||||||
{
|
|
||||||
"gateway": "10.223.252.195",
|
|
||||||
"netmask": "255.255.255.192",
|
|
||||||
"startip": "10.223.252.196",
|
|
||||||
"endip": "10.223.252.197",
|
|
||||||
"vlan": "1001",
|
|
||||||
},
|
|
||||||
"ostype": 'CentOS 5.3 (64-bit)'
|
"ostype": 'CentOS 5.3 (64-bit)'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,8 +155,8 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestCreatePortablePublicIpRanges, cls).getClsTestClient()
|
cls.testClient = super(TestCreatePortablePublicIpRanges, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
@ -295,8 +287,8 @@ class TestDeletePortablePublicIpRanges(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestDeletePortablePublicIpRanges, cls).getClsTestClient()
|
cls.testClient = super(TestDeletePortablePublicIpRanges, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
@ -453,8 +445,8 @@ class TestListPortablePublicIpRanges(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestListPortablePublicIpRanges, cls).getClsTestClient()
|
cls.testClient = super(TestListPortablePublicIpRanges, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
@ -579,8 +571,8 @@ class TestAssociatePublicIp(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestAssociatePublicIp, cls).getClsTestClient()
|
cls.testClient = super(TestAssociatePublicIp, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
@ -895,8 +887,8 @@ class TestDisassociatePublicIp(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestDisassociatePublicIp, cls).getClsTestClient()
|
cls.testClient = super(TestDisassociatePublicIp, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
@ -1134,8 +1126,8 @@ class TestDeleteAccount(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestDeleteAccount, cls).getClsTestClient()
|
cls.testClient = super(TestDeleteAccount, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
@ -1336,8 +1328,8 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase):
|
|||||||
def setUpClass(cls):
|
def setUpClass(cls):
|
||||||
cls.testClient = super(TestPortableIpTransferAcrossNetworks, cls).getClsTestClient()
|
cls.testClient = super(TestPortableIpTransferAcrossNetworks, cls).getClsTestClient()
|
||||||
cls.api_client = cls.testClient.getApiClient()
|
cls.api_client = cls.testClient.getApiClient()
|
||||||
|
|
||||||
cls.services = Services().services
|
cls.services = Services().services
|
||||||
cls.config = cls.services
|
|
||||||
# Get Zone, Domain and templates
|
# Get Zone, Domain and templates
|
||||||
cls.region = get_region(cls.api_client)
|
cls.region = get_region(cls.api_client)
|
||||||
cls.domain = get_domain(cls.api_client)
|
cls.domain = get_domain(cls.api_client)
|
||||||
|
|||||||
@ -1172,28 +1172,28 @@ def getPortableIpRangeServices(config):
|
|||||||
services = {}
|
services = {}
|
||||||
attributeError = False
|
attributeError = False
|
||||||
|
|
||||||
if config["portableIpRange"]["startip"]:
|
if config.portableIpRange.startip:
|
||||||
services["startip"] = config["portableIpRange"]["startip"]
|
services["startip"] = config.portableIpRange.startip
|
||||||
else:
|
else:
|
||||||
attributeError = True
|
attributeError = True
|
||||||
|
|
||||||
if config["portableIpRange"]["endip"]:
|
if config.portableIpRange.endip:
|
||||||
services["endip"] = config["portableIpRange"]["endip"]
|
services["endip"] = config.portableIpRange.endip
|
||||||
else:
|
else:
|
||||||
attributeError = True
|
attributeError = True
|
||||||
|
|
||||||
if config["portableIpRange"]["netmask"]:
|
if config.portableIpRange.netmask:
|
||||||
services["netmask"] = config["portableIpRange"]["netmask"]
|
services["netmask"] = config.portableIpRange.netmask
|
||||||
else:
|
else:
|
||||||
attributeError = True
|
attributeError = True
|
||||||
|
|
||||||
if config["portableIpRange"]["gateway"]:
|
if config.portableIpRange.gateway:
|
||||||
services["gateway"] = config["portableIpRange"]["gateway"]
|
services["gateway"] = config.portableIpRange.gateway
|
||||||
else:
|
else:
|
||||||
attributeError = True
|
attributeError = True
|
||||||
|
|
||||||
if config["portableIpRange"]["vlan"]:
|
if config.portableIpRange.vlan:
|
||||||
services["vlan"] = config["portableIpRange"]["vlan"]
|
services["vlan"] = config.portableIpRange.vlan
|
||||||
|
|
||||||
if attributeError:
|
if attributeError:
|
||||||
services = FAILED
|
services = FAILED
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user