+ def nodestate_upgrade(self):
+ "all nodes: mark PLCAPI boot_state as upgrade"
+ self.test_plc.apiserver.UpdateNode(self.test_plc.auth_root(),
+ self.name(),{'boot_state':'upgrade'})
+ return True
+
+ def nodestate_safeboot(self):
+ "all nodes: mark PLCAPI boot_state as safeboot"
+ self.test_plc.apiserver.UpdateNode(self.test_plc.auth_root(),
+ self.name(),{'boot_state':'safeboot'})
+ return True
+
+ def nodestate_boot(self):
+ "all nodes: mark PLCAPI boot_state as boot"
+ self.test_plc.apiserver.UpdateNode(self.test_plc.auth_root(),
+ self.name(),{'boot_state':'boot'})
+ return True
+
+ def nodestate_show(self):
+ "all nodes: show PLCAPI boot_state"
+ if self.dry_run():
+ print("Dry_run: skipped getting current node state")
+ return True
+ state = self.test_plc.apiserver.GetNodes(self.test_plc.auth_root(), self.name(), ['boot_state'])[0]['boot_state']
+ print("boot_state for {} : {}".format(self.name(), state))
+ return True
+
+ def nodedistro_f14(self):
+ return self.nodedistro_set('f14', 'onelab')
+ def nodedistro_f18(self):
+ return self.nodedistro_set('f18', 'lxc')
+ def nodedistro_f20(self):
+ return self.nodedistro_set('f20', 'lxc')
+ def nodedistro_f21(self):
+ return self.nodedistro_set('f21', 'lxc')
+ def nodedistro_f22(self):
+ return self.nodedistro_set('f22', 'lxc')
+ def nodedistro_set(self, fcdistro, pldistro):
+ "set the fcdistro tag to distro, passed in arg"
+ self.test_plc.apiserver.SetNodeFcdistro(self.test_plc.auth_root(),
+ self.name(), fcdistro)
+ self.test_plc.apiserver.SetNodePldistro(self.test_plc.auth_root(),
+ self.name(), pldistro)
+ return True
+ def nodedistro_show(self):
+ "display the fcdistro tag - or flavour actually - of node"
+ if self.dry_run():
+ print("Dry_run: would fetch node flavour")
+ return True
+ flavour = self.test_plc.apiserver.GetNodeFlavour(self.test_plc.auth_root(),
+ self.name())
+ print("Flavour for {} : {}".format(self.name(), flavour))
+ return True
+
+ def qemu_local_config(self):
+ "all nodes: compute qemu config qemu.conf and store it locally"