Skip to content

Commit ccd1734

Browse files
committed
Merge branch '4.9'
2 parents c9e14c9 + 9b9b49e commit ccd1734

19 files changed

+479
-216
lines changed

systemvm/patches/debian/config/opt/cloud/bin/merge.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,10 @@ def processCL(self, dbag):
214214
elif (self.qFile.data['cmd_line']['type'] == "dhcpsrvr"):
215215
self.processCLItem('0', "guest")
216216
self.processCLItem('1', "control")
217+
elif (self.qFile.data['cmd_line']['type'] == "ilbvm"):
218+
self.processCLItem('0', "guest")
219+
self.processCLItem('1', "control")
220+
217221
return cs_cmdline.merge(dbag, self.qFile.data)
218222

219223
def processCLItem(self, num, nw_type):
@@ -225,10 +229,13 @@ def processCLItem(self, num, nw_type):
225229
dp['source_nat'] = False
226230
dp['add'] = True
227231
dp['one_to_one_nat'] = False
228-
if('localgw' in self.qFile.data['cmd_line']):
229-
dp['gateway'] = self.qFile.data['cmd_line']['localgw']
232+
if nw_type == "public":
233+
dp['gateway'] = self.qFile.data['cmd_line']['gateway']
230234
else:
231-
dp['gateway'] = 'None'
235+
if('localgw' in self.qFile.data['cmd_line']):
236+
dp['gateway'] = self.qFile.data['cmd_line']['localgw']
237+
else:
238+
dp['gateway'] = 'None'
232239
dp['nic_dev_id'] = num
233240
dp['nw_type'] = nw_type
234241
qf = QueueFile()

test/integration/smoke/test_deploy_vgpu_enabled_vm.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ def setUpClass(self):
4848
testClient = super(TestDeployvGPUenabledVM, self).getClsTestClient()
4949
self.apiclient = testClient.getApiClient()
5050
self.testdata = self.testClient.getParsedTestDataConfig()
51+
self.hostConfig = self.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
52+
self._cleanup = []
5153
self.unsupportedHypervisor = False
5254
self.noSuitableHost = False
5355
# Need to add check whether zone containing the xen hypervisor or not
@@ -67,8 +69,8 @@ def setUpClass(self):
6769
sshClient = SshClient(
6870
host=ghost.ipaddress,
6971
port=self.testdata['configurableData']['host']["publicport"],
70-
user=self.testdata['configurableData']['host']["username"],
71-
passwd=self.testdata['configurableData']['host']["password"])
72+
user=self.hostConfig['username'],
73+
passwd=self.hostConfig['password'])
7274
if ghost.hypervisorversion == "6.2.0":
7375
res = sshClient.execute(
7476
"xe patch-list uuid=0850b186-4d47-11e3-a720-001b2151a503")

test/integration/smoke/test_internal_lb.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ def __init__(self):
226226
"displaytext": "macchinina kvm",
227227
"format": "qcow2",
228228
"hypervisor": "kvm",
229-
"ostype": "Other PV (64-bit)",
229+
"ostype": "Other Linux (64-bit)",
230230
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-kvm.qcow2.bz2",
231231
"requireshvm": "True"
232232
},
@@ -235,7 +235,7 @@ def __init__(self):
235235
"displaytext": "macchinina xen",
236236
"format": "vhd",
237237
"hypervisor": "xenserver",
238-
"ostype": "Other PV (64-bit)",
238+
"ostype": "Other Linux (64-bit)",
239239
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-xen.vhd.bz2",
240240
"requireshvm": "True",
241241
},
@@ -244,7 +244,7 @@ def __init__(self):
244244
"displaytext": "macchinina xen",
245245
"format": "vhd",
246246
"hypervisor": "hyperv",
247-
"ostype": "Other PV (64-bit)",
247+
"ostype": "Other Linux (64-bit)",
248248
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-hyperv.vhd.zip",
249249
"requireshvm": "True",
250250
},
@@ -253,8 +253,8 @@ def __init__(self):
253253
"displaytext": "macchinina vmware",
254254
"format": "ova",
255255
"hypervisor": "vmware",
256-
"ostype": "Other PV (64-bit)",
257-
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.vmdk.bz2",
256+
"ostype": "Other Linux (64-bit)",
257+
"url": "http://dl.openvm.eu/cloudstack/macchinina/x86_64/macchinina-vmware.ova",
258258
"requireshvm": "True",
259259
}
260260
}
@@ -302,7 +302,7 @@ def setUpClass(cls):
302302
%s" % (cls.account.name,
303303
cls.account.id))
304304

305-
cls._cleanup = [cls.template, cls.account, cls.compute_offering]
305+
cls._cleanup = [cls.account, cls.compute_offering]
306306
return
307307

308308
def setUp(self):
@@ -842,6 +842,9 @@ def execute_internallb_haproxy_tests(self, vpc_offering):
842842
def tearDownClass(cls):
843843
try:
844844
cls.logger.debug("Cleaning up class resources")
845+
try:
846+
cls.template.delete(cls.apiclient)
847+
except Exception: pass
845848
cleanup_resources(cls.apiclient, cls._cleanup)
846849
except Exception as e:
847850
raise Exception("Cleanup failed with %s" % e)

test/integration/smoke/test_network.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,7 @@ def setUpClass(cls):
10391039
cls.domain = get_domain(cls.apiclient)
10401040
cls.zone = get_zone(cls.apiclient, testClient.getZoneForTests())
10411041
cls.hypervisor = testClient.getHypervisorInfo()
1042+
cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
10421043
template = get_template(
10431044
cls.apiclient,
10441045
cls.zone.id,
@@ -1117,8 +1118,8 @@ def getCommandResultFromRouter(self, router, command):
11171118
"Check for list hosts response return valid data"
11181119
)
11191120
host = hosts[0]
1120-
host.user = self.services["configurableData"]["host"]["username"]
1121-
host.passwd = self.services["configurableData"]["host"]["password"]
1121+
host.user = self.hostConfig['username']
1122+
host.passwd = self.hostConfig['password']
11221123

11231124
result = get_process_status(
11241125
host.ipaddress,

test/integration/smoke/test_network_acl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_network_acl(self):
6464
self.assert_(networkOffering is not None and len(networkOffering) > 0, "No VPC based network offering")
6565

6666
# 1) Create VPC
67-
vpcOffering = VpcOffering.list(self.apiclient,isdefault=True)
67+
vpcOffering = VpcOffering.list(self.apiclient, name="Default VPC offering")
6868
self.assert_(vpcOffering is not None and len(vpcOffering)>0, "No VPC offerings found")
6969
self.services["vpc"] = {}
7070
self.services["vpc"]["name"] = "vpc-networkacl"

test/integration/smoke/test_non_contigiousvlan.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,17 @@ def test_extendPhysicalNetworkVlan(self):
4747
self.assertNotEqual(len(phy_networks), 0,
4848
msg="There are no physical networks in the zone")
4949

50-
self.network = phy_networks[0]
51-
self.networkid = phy_networks[0].id
52-
self.existing_vlan = phy_networks[0].vlan
50+
phy_network = None
51+
for network in phy_networks:
52+
if hasattr(network, 'vlan'):
53+
phy_network = network
54+
break
55+
56+
self.assert_(phy_network is not None, msg="No network with vlan found")
57+
58+
self.network = phy_network
59+
self.networkid = phy_network.id
60+
self.existing_vlan = phy_network.vlan
5361
vlan1 = self.existing_vlan+","+self.vlan["partial_range"][0]
5462
updatePhysicalNetworkResponse = self.network.update(self.apiClient, id = self.networkid, vlan = vlan1)
5563
self.assert_(updatePhysicalNetworkResponse is not None,
@@ -65,7 +73,6 @@ def test_extendPhysicalNetworkVlan(self):
6573
vlanranges= updatePhysicalNetworkResponse2.vlan
6674
self.assert_(vlanranges is not None,
6775
"No VLAN ranges found on the deployment")
68-
self.assert_(str(vlanranges) == vlan2, "vlan ranges are not extended")
6976

7077

7178
def tearDown(self):

test/integration/smoke/test_password_server.py

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ def setUpClass(cls):
6464
cls.testClient = super(TestIsolatedNetworksPasswdServer, cls).getClsTestClient()
6565
cls.api_client = cls.testClient.getApiClient()
6666

67+
cls.hostConfig = cls.config.__dict__["zones"][0].__dict__["pods"][0].__dict__["clusters"][0].__dict__["hosts"][0].__dict__
6768
cls.services = cls.testClient.getParsedTestDataConfig()
6869
# Get Zone, Domain and templates
6970
cls.domain = get_domain(cls.api_client)
@@ -141,8 +142,6 @@ def setUpClass(cls):
141142

142143
cls.services["configurableData"] = {
143144
"host": {
144-
"password": "password",
145-
"username": "root",
146145
"port": 22
147146
},
148147
"input": "INPUT",
@@ -170,6 +169,7 @@ def tearDownClass(cls):
170169

171170
def setUp(self):
172171
self.apiclient = self.testClient.getApiClient()
172+
self.hypervisor = self.testClient.getHypervisorInfo()
173173
return
174174

175175
def test_ssh_command(self, vm, nat_rule, rule_label):
@@ -181,12 +181,12 @@ def test_ssh_command(self, vm, nat_rule, rule_label):
181181
ssh = vm.get_ssh_client(ipaddress=nat_rule.ipaddress, port=self.services[rule_label]["publicport"], retries=5)
182182
result = str(ssh.execute(ssh_command))
183183

184-
self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count("3 packets received")))
184+
self.logger.debug("SSH result: %s; COUNT is ==> %s" % (result, result.count(" 0% packet loss")))
185185
except:
186186
self.fail("Failed to SSH into VM - %s" % (nat_rule.ipaddress))
187187

188188
self.assertEqual(
189-
result.count("3 packets received"),
189+
result.count(" 0% packet loss"),
190190
1,
191191
"Ping to outside world from VM should be successful"
192192
)
@@ -202,23 +202,34 @@ def test_password_file_not_empty(self, vm, router):
202202
"Check for list hosts response return valid data")
203203

204204
host = hosts[0]
205-
host.user = self.services["configurableData"]["host"]["username"]
206-
host.passwd = self.services["configurableData"]["host"]["password"]
205+
host.user = self.hostConfig['username']
206+
host.passwd = self.hostConfig['password']
207207
host.port = self.services["configurableData"]["host"]["port"]
208-
209-
try:
208+
209+
if self.hypervisor.lower() in ('vmware', 'hyperv'):
210210
result = get_process_status(
211-
host.ipaddress,
212-
host.port,
213-
host.user,
214-
host.passwd,
211+
self.apiclient.connection.mgtSvr,
212+
22,
213+
self.apiclient.connection.user,
214+
self.apiclient.connection.passwd,
215215
router.linklocalip,
216-
"cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}'" % (vm.nic[0].gateway, vm.nic[0].ipaddress))
217-
except KeyError:
218-
self.skipTest(
219-
"Provide a marvin config file with host\
220-
credentials to run %s" %
221-
self._testMethodName)
216+
"cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}'" % (vm.nic[0].gateway, vm.nic[0].ipaddress),
217+
hypervisor=self.hypervisor
218+
)
219+
else:
220+
try:
221+
result = get_process_status(
222+
host.ipaddress,
223+
host.port,
224+
host.user,
225+
host.passwd,
226+
router.linklocalip,
227+
"cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}'" % (vm.nic[0].gateway, vm.nic[0].ipaddress))
228+
except KeyError:
229+
self.skipTest(
230+
"Provide a marvin config file with host\
231+
credentials to run %s" %
232+
self._testMethodName)
222233

223234
self.logger.debug("cat /var/cache/cloud/passwords-%s | grep %s | sed 's/=/ /g' | awk '{print $1}' RESULT IS ==> %s" % (vm.nic[0].gateway, vm.nic[0].ipaddress, result))
224235
res = str(result)

test/integration/smoke/test_primary_storage.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def test_01_primary_storage_iscsi(self):
157157
if self.hypervisor.lower() in ["kvm","hyperv", "vmware", "lxc"]:
158158
raise self.skipTest("iscsi primary storage not supported on kvm, VMWare, Hyper-V, or LXC")
159159

160+
if not self.services["configurableData"]["iscsi"]["url"]:
161+
raise self.skipTest("iscsi test storage url not setup, skipping")
162+
160163
# Validate the following:
161164
# 1. List Clusters
162165
# 2. verify that the cluster is in 'Enabled' allocation state

0 commit comments

Comments
 (0)