summaryrefslogtreecommitdiffstats
path: root/patches
diff options
context:
space:
mode:
authorAlexandru Nemes <alexandru.nemes@enea.com>2017-05-05 14:19:38 +0300
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-05-05 19:24:43 +0200
commitff1b400a69aad4cce484690b22dfc408615217f3 (patch)
tree84df8ea039a71aa872caa5f4d6d0371789cddd7c /patches
parenta53792b11c7e56272a3c33d1cb43148ddebc7aa9 (diff)
Fuel-OSTF: Arch dependent Cirros ssh password
For arm64 "gocubsgo" will be used For x86 it will use "cubswin:)" JIRA: ARMBAND-250 Change-Id: Id580168cee1dd7c52876f2781b7cbbf733169ef3 Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/fuel-ostf/0001-Arch-dependent-Cirros-ssh-password.patch71
1 files changed, 71 insertions, 0 deletions
diff --git a/patches/fuel-ostf/0001-Arch-dependent-Cirros-ssh-password.patch b/patches/fuel-ostf/0001-Arch-dependent-Cirros-ssh-password.patch
new file mode 100644
index 00000000..b066cdf8
--- /dev/null
+++ b/patches/fuel-ostf/0001-Arch-dependent-Cirros-ssh-password.patch
@@ -0,0 +1,71 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 Enea AB and others.
+:
+: All rights reserved. This program and the accompanying materials
+: are made available under the terms of the Apache License, Version 2.0
+: which accompanies this distribution, and is available at
+: http://www.apache.org/licenses/LICENSE-2.0
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Nemes <alexandru.nemes@enea.com>
+Date: Fri, 5 May 2017 14:16:03 +0300
+Subject: [PATCH] Arch dependent Cirros ssh password
+
+JIRA: https://jira.opnfv.org/browse/ARMBAND-250
+
+Signed-off-by: Alexandru Nemes <alexandru.nemes@enea.com>
+---
+ fuel_health/nmanager.py | 19 +++++++++++++++++--
+ 1 file changed, 17 insertions(+), 2 deletions(-)
+
+diff --git a/fuel_health/nmanager.py b/fuel_health/nmanager.py
+index 74e5a03..5bfb552 100644
+--- a/fuel_health/nmanager.py
++++ b/fuel_health/nmanager.py
+@@ -843,12 +843,13 @@ class NovaNetworkScenarioTest(OfficialClientTest):
+ LOG.exception("")
+
+ command = "ping -q -c1 -w10 8.8.8.8"
++ cirros_pass = self.get_cirros_password()
+
+ return self.retry_command(retries[0], retries[1],
+ ssh.exec_command_on_vm,
+ command=command,
+ user='cirros',
+- password='cubswin:)',
++ password=cirros_pass,
+ vm=ip_address)
+
+ # TODO(???) Allow configuration of execution and sleep duration.
+@@ -873,11 +874,13 @@ class NovaNetworkScenarioTest(OfficialClientTest):
+ except Exception:
+ LOG.exception("")
+
++ cirros_pass = self.get_cirros_password()
++
+ return self.retry_command(retries[0], retries[1],
+ ssh.exec_command_on_vm,
+ command=cmd,
+ user='cirros',
+- password='cubswin:)',
++ password=cirros_pass,
+ vm=ip_address)
+
+ # TODO(???) Allow configuration of execution and sleep duration.
+@@ -934,6 +937,17 @@ class NovaNetworkScenarioTest(OfficialClientTest):
+ instance.id, 'ACTIVE')
+ return instance
+
++ def get_cirros_password(self):
++ hypervisor_list = self.compute_client.hypervisors.list()
++ for hypervisor in hypervisor_list:
++ if hypervisor and hypervisor.status == "enabled":
++ cpu_info = hypervisor.cpu_info.lower()
++ LOG.debug('Compute CPU INFO {0}'.format(cpu_info))
++ break
++ if cpu_info and ("arm" in cpu_info or "aarch64" in cpu_info):
++ return "gocubsgo"
++ return "cubswin:)"
++
+ @classmethod
+ def tearDownClass(cls):
+ super(NovaNetworkScenarioTest, cls).tearDownClass()