From 4f186a149b65ff9b108e22b6f897be1b00650f1c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Sun, 12 Apr 2015 17:47:34 +0200 Subject: [PATCH] bootmedium options and node tags in the config --- system/TestNode.py | 14 +++++++------- system/config_default.py | 3 +++ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/system/TestNode.py b/system/TestNode.py index b018598..b236643 100644 --- a/system/TestNode.py +++ b/system/TestNode.py @@ -103,6 +103,10 @@ class TestNode: # create as reinstall to avoid user confirmation server.UpdateNode(userauth, self.name(), {'boot_state':'reinstall'}) + # you are supposed to make sure the tags exist + for tagname, tagvalue in self.node_spec['tags'].items(): + server.AddNodeTag(userauth, node_id, tagname, tagvalue) + if not self.test_plc.has_addresses_api(): # print 'USING OLD INTERFACE' # populate network interfaces - primary @@ -161,13 +165,9 @@ class TestNode: "all nodes: invoke GetBootMedium and store result locally" utils.header("Calling GetBootMedium for {}".format(self.name())) # this would clearly belong in the config but, well .. - options = [] - if self.is_qemu(): - options.append('serial') - options.append('no-hangcheck') - options.append('systemd-debug') - encoded = self.test_plc.apiserver.GetBootMedium(self.test_plc.auth_root(), - self.name(), 'node-iso', '', options) + options = self.node_spec['bootmedium_options'] if 'bootmedium_options' in self.node_spec else [] + encoded = self.test_plc.apiserver.GetBootMedium( + self.test_plc.auth_root(), self.name(), 'node-iso', '', options) if encoded == '': raise Exception('GetBootmedium failed') diff --git a/system/config_default.py b/system/config_default.py index 609cc4a..3a840fe 100644 --- a/system/config_default.py +++ b/system/config_default.py @@ -66,6 +66,9 @@ def nodes(options, index): 'route_fields' : { 'subnet' : '0.0.0.0/0', 'next_hop' : 'xxx-deferred-xxx', }, + 'bootmedium_options' : [ 'serial', 'no-hangcheck', 'systemd-debug' ], + # provision for bonding + 'tags' : {}, # boot cd settings # we should have tags here instead of the hard-wired # options set for GetBootMedium in TestNode.py -- 2.43.0