+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "node_powercycle", [hypervisor])
+
+
+ def call_test_delay(self, node_list, duration):
+ """Sleep for a fixed time on given node(s).
+
+ This is a multi-node call.
+
+ """
+ return self._MultiNodeCall(node_list, "test_delay", [duration])
+
+ def call_file_storage_dir_create(self, node, file_storage_dir):
+ """Create the given file storage directory.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "file_storage_dir_create",
+ [file_storage_dir])
+
+ def call_file_storage_dir_remove(self, node, file_storage_dir):
+ """Remove the given file storage directory.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "file_storage_dir_remove",
+ [file_storage_dir])
+
+ def call_file_storage_dir_rename(self, node, old_file_storage_dir,
+ new_file_storage_dir):
+ """Rename file storage directory.
+
+ This is a single-node call.
+
+ """
+ return self._SingleNodeCall(node, "file_storage_dir_rename",
+ [old_file_storage_dir, new_file_storage_dir])
+
+ @classmethod
+ def call_jobqueue_update(cls, node_list, address_list, file_name, content):
+ """Update job queue.
+
+ This is a multi-node call.
+
+ """
+ return cls._StaticMultiNodeCall(node_list, "jobqueue_update",
+ [file_name, cls._Compress(content)],
+ address_list=address_list)
+
+ @classmethod
+ def call_jobqueue_purge(cls, node):
+ """Purge job queue.
+
+ This is a single-node call.
+
+ """
+ return cls._StaticSingleNodeCall(node, "jobqueue_purge", [])
+
+ @classmethod
+ def call_jobqueue_rename(cls, node_list, address_list, rename):
+ """Rename a job queue file.
+
+ This is a multi-node call.
+
+ """
+ return cls._StaticMultiNodeCall(node_list, "jobqueue_rename", rename,
+ address_list=address_list)
+
+ @classmethod
+ def call_jobqueue_set_drain(cls, node_list, drain_flag):
+ """Set the drain flag on the queue.
+
+ This is a multi-node call.
+
+ @type node_list: list
+ @param node_list: the list of nodes to query
+ @type drain_flag: bool
+ @param drain_flag: if True, will set the drain flag, otherwise reset it.
+
+ """
+ return cls._StaticMultiNodeCall(node_list, "jobqueue_set_drain",
+ [drain_flag])
+
+ def call_hypervisor_validate_params(self, node_list, hvname, hvparams):
+ """Validate the hypervisor params.
+
+ This is a multi-node call.
+
+ @type node_list: list
+ @param node_list: the list of nodes to query
+ @type hvname: string
+ @param hvname: the hypervisor name
+ @type hvparams: dict
+ @param hvparams: the hypervisor parameters to be validated
+
+ """
+ cluster = self._cfg.GetClusterInfo()
+ hv_full = objects.FillDict(cluster.hvparams.get(hvname, {}), hvparams)
+ return self._MultiNodeCall(node_list, "hypervisor_validate_params",
+ [hvname, hv_full])