mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
moving test data to top level dictionary
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
26d637a0fb
commit
64522b6bd5
@ -43,7 +43,8 @@ class Services:
|
||||
"username": "test",
|
||||
"password": "password",
|
||||
},
|
||||
"name": "testphysicalnetwork"
|
||||
"name": "testphysicalnetwork",
|
||||
"vlan": "2118-2120",
|
||||
}
|
||||
|
||||
|
||||
@ -64,7 +65,7 @@ class TesDedicateGuestVlanRange(cloudstackTestCase):
|
||||
domainid=cls.domain.id
|
||||
)
|
||||
cls._cleanup = [
|
||||
#cls.account,
|
||||
cls.account,
|
||||
]
|
||||
return
|
||||
|
||||
@ -72,6 +73,13 @@ class TesDedicateGuestVlanRange(cloudstackTestCase):
|
||||
def tearDownClass(cls):
|
||||
try:
|
||||
# Cleanup resources used
|
||||
list_physical_network_response = PhysicalNetwork.list(cls.api_client)
|
||||
if list_physical_network_response is not None and len(list_physical_network_response) > 0:
|
||||
physical_network = list_physical_network_response[0]
|
||||
removeGuestVlanRangeResponse = \
|
||||
physical_network.update(cls.api_client,
|
||||
id=physical_network.id,
|
||||
removevlan=cls.services["vlan"])
|
||||
cleanup_resources(cls.api_client, cls._cleanup)
|
||||
except Exception as e:
|
||||
raise Exception("Warning: Exception during cleanup : %s" % e)
|
||||
@ -119,12 +127,12 @@ class TesDedicateGuestVlanRange(cloudstackTestCase):
|
||||
physical_network_response = list_physical_network_response[0]
|
||||
|
||||
self.debug("Adding guest vlan range")
|
||||
addGuestVlanRangeResponse = physical_network_response.update(self.apiclient, id=physical_network_response.id, vlan="387-390")
|
||||
addGuestVlanRangeResponse = physical_network_response.update(self.apiclient, id=physical_network_response.id, vlan=self.services["vlan"])
|
||||
|
||||
self.debug("Dedicating guest vlan range");
|
||||
dedicate_guest_vlan_range_response = PhysicalNetwork.dedicate(
|
||||
self.apiclient,
|
||||
"387-390",
|
||||
self.services["vlan"],
|
||||
physicalnetworkid=physical_network_response.id,
|
||||
account=self.account.name,
|
||||
domainid=self.account.domainid
|
||||
@ -153,5 +161,3 @@ class TesDedicateGuestVlanRange(cloudstackTestCase):
|
||||
"Check account name is system account in listDedicatedGuestVlanRanges"
|
||||
)
|
||||
|
||||
self.debug("Removing guest vlan range")
|
||||
removeGuestVlanRangeResponse = physical_network_response.update(self.apiclient, id=physical_network_response.id, removevlan="387-390")
|
||||
|
||||
@ -113,7 +113,7 @@ class cloudConnection(object):
|
||||
)
|
||||
signature = base64.encodestring(hmac.new(
|
||||
self.securityKey, hashStr, hashlib.sha1).digest()).strip()
|
||||
self.logging.info("Computed Signature by Marvin: %s" % signature)
|
||||
self.logging.debug("Computed Signature by Marvin: %s" % signature)
|
||||
return signature
|
||||
|
||||
def request(self, command, auth=True, payload={}, method='GET'):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user