launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #14748
[Merge] lp:~rvb/maas/qa-lab-tests-arm into lp:~maas-maintainers/maas/qa-lab-tests
Raphaël Badin has proposed merging lp:~rvb/maas/qa-lab-tests-arm into lp:~maas-maintainers/maas/qa-lab-tests with lp:~rvb/maas/qa-lab-tests-port as a prerequisite.
Commit message:
Add option to disable ARM nodes.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~rvb/maas/qa-lab-tests-arm/+merge/138420
--
https://code.launchpad.net/~rvb/maas/qa-lab-tests-arm/+merge/138420
Your team MAAS Maintainers is requested to review the proposed merge of lp:~rvb/maas/qa-lab-tests-arm into lp:~maas-maintainers/maas/qa-lab-tests.
=== modified file 'maas-integration.py'
--- maas-integration.py 2012-12-06 14:30:47 +0000
+++ maas-integration.py 2012-12-06 16:33:27 +0000
@@ -30,12 +30,15 @@
"00:E0:81:DD:D1:0B" : "192.168.22.34",
"00:E0:81:DD:D4:11" : "192.168.22.35",
"00:E0:81:D1:B1:47" : "192.168.22.36",
- "00:E0:81:DD:D1:1B" : "192.168.22.37",
- "00:E0:81:DD:D1:2B" : "192.168.22.38",
- "00:E0:81:DD:D1:A3" : "192.168.22.39",
- "00:E0:81:DC:38:6D" : "192.168.22.40",
- "00:E0:81:DD:D0:FF" : "192.168.22.41",
- "00:E0:81:DD:D4:F9" : "192.168.22.42"
+# There are in a different network, enable them
+# when testing with a CC on a different network
+# is supported.
+# "00:E0:81:DD:D1:1B" : "192.168.22.37",
+# "00:E0:81:DD:D1:2B" : "192.168.22.38",
+# "00:E0:81:DD:D1:A3" : "192.168.22.39",
+# "00:E0:81:DC:38:6D" : "192.168.22.40",
+# "00:E0:81:DD:D0:FF" : "192.168.22.41",
+# "00:E0:81:DD:D4:F9" : "192.168.22.42"
}
ARM_LAB = {
@@ -137,6 +140,15 @@
# Series to install on deployed nodes.
NODE_SERIES = 'precise'
+ USE_ARM_NODES = False
+
+ def get_node_count(self):
+ """The number of available nodes."""
+ count = len(LENOVO_LAB)
+ if self.USE_ARM_NODES:
+ count += len(ARM_LAB)
+ return count
+
def _run_command(self, args):
process = Popen(args, stdout=PIPE, stderr=PIPE, stdin=PIPE)
stdout, stderr = process.communicate()
@@ -278,15 +290,18 @@
for ipmi_address in LENOVO_LAB.values():
self.power_off(ipmi_address, POWER_USER, POWER_PASS)
self.power_on(ipmi_address, POWER_USER, POWER_PASS)
- for ipmi_address in ARM_LAB.values():
- self.power_off(ipmi_address, 'admin', 'admin')
- self.power_on(ipmi_address, 'admin', 'admin')
+ if self.USE_ARM_NODES:
+ for ipmi_address in ARM_LAB.values():
+ self.power_off(ipmi_address, 'admin', 'admin')
+ self.power_on(ipmi_address, 'admin', 'admin')
def test_10_boot_nodes_enlist(self):
self._boot_nodes()
- def _wait_nodes(self, status, min_node=8):
- """Wait for 4 Lenovo nodes (amd64) and 4 arm nodes."""
+ def _wait_nodes(self, status, min_node=None):
+ """Wait for `min_node` nodes with status `status`."""
+ if min_node is None:
+ min_node = self.get_node_count()
# XXX: matsubara Can't filter by status.
output, err = self._run_maas_cli(["nodes", "list"])
node_list = loads(output)