Skip to content

Commit 64522b6

Browse files
author
Prasanna Santhanam
committed
moving test data to top level dictionary
Signed-off-by: Prasanna Santhanam <tsp@apache.org>
1 parent 26d637a commit 64522b6

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

test/integration/smoke/test_guest_vlan_range.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def __init__(self):
4343
"username": "test",
4444
"password": "password",
4545
},
46-
"name": "testphysicalnetwork"
46+
"name": "testphysicalnetwork",
47+
"vlan": "2118-2120",
4748
}
4849

4950

@@ -64,14 +65,21 @@ def setUpClass(cls):
6465
domainid=cls.domain.id
6566
)
6667
cls._cleanup = [
67-
#cls.account,
68+
cls.account,
6869
]
6970
return
7071

7172
@classmethod
7273
def tearDownClass(cls):
7374
try:
7475
# Cleanup resources used
76+
list_physical_network_response = PhysicalNetwork.list(cls.api_client)
77+
if list_physical_network_response is not None and len(list_physical_network_response) > 0:
78+
physical_network = list_physical_network_response[0]
79+
removeGuestVlanRangeResponse = \
80+
physical_network.update(cls.api_client,
81+
id=physical_network.id,
82+
removevlan=cls.services["vlan"])
7583
cleanup_resources(cls.api_client, cls._cleanup)
7684
except Exception as e:
7785
raise Exception("Warning: Exception during cleanup : %s" % e)
@@ -119,12 +127,12 @@ def test_dedicateGuestVlanRange(self):
119127
physical_network_response = list_physical_network_response[0]
120128

121129
self.debug("Adding guest vlan range")
122-
addGuestVlanRangeResponse = physical_network_response.update(self.apiclient, id=physical_network_response.id, vlan="387-390")
130+
addGuestVlanRangeResponse = physical_network_response.update(self.apiclient, id=physical_network_response.id, vlan=self.services["vlan"])
123131

124132
self.debug("Dedicating guest vlan range");
125133
dedicate_guest_vlan_range_response = PhysicalNetwork.dedicate(
126134
self.apiclient,
127-
"387-390",
135+
self.services["vlan"],
128136
physicalnetworkid=physical_network_response.id,
129137
account=self.account.name,
130138
domainid=self.account.domainid
@@ -153,5 +161,3 @@ def test_dedicateGuestVlanRange(self):
153161
"Check account name is system account in listDedicatedGuestVlanRanges"
154162
)
155163

156-
self.debug("Removing guest vlan range")
157-
removeGuestVlanRangeResponse = physical_network_response.update(self.apiclient, id=physical_network_response.id, removevlan="387-390")

tools/marvin/marvin/cloudstackConnection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def sign(self, payload):
113113
)
114114
signature = base64.encodestring(hmac.new(
115115
self.securityKey, hashStr, hashlib.sha1).digest()).strip()
116-
self.logging.info("Computed Signature by Marvin: %s" % signature)
116+
self.logging.debug("Computed Signature by Marvin: %s" % signature)
117117
return signature
118118

119119
def request(self, command, auth=True, payload={}, method='GET'):

0 commit comments

Comments
 (0)