public Task(string uuid, string name_label, string name_description, List <task_allowed_operations> allowed_operations, Dictionary <string, task_allowed_operations> current_operations, DateTime created, DateTime finished, task_status_type status, XenRef <Host> resident_on, double progress, string type, string result, string[] error_info, Dictionary <string, string> other_config, XenRef <Task> subtask_of, List <XenRef <Task> > subtasks) { this.uuid = uuid; this.name_label = name_label; this.name_description = name_description; this.allowed_operations = allowed_operations; this.current_operations = current_operations; this.created = created; this.finished = finished; this.status = status; this.resident_on = resident_on; this.progress = progress; this.type = type; this.result = result; this.error_info = error_info; this.other_config = other_config; this.subtask_of = subtask_of; this.subtasks = subtasks; }
private void ProcessRecordStatus(string task) { RunApiCall(() => { task_status_type obj = XenAPI.Task.get_status(session, task); WriteObject(obj, true); }); }
/// <summary> /// Set the task status /// First published in XenServer 7.2. /// </summary> /// <param name="session">The session</param> /// <param name="_task">The opaque_ref of the given task</param> /// <param name="_value">task status value to be set</param> public static void set_status(Session session, string _task, task_status_type _value) { if (session.JsonRpcClient != null) { session.JsonRpcClient.task_set_status(session.opaque_ref, _task, _value); } else { session.proxy.task_set_status(session.opaque_ref, _task ?? "", task_status_type_helper.ToString(_value)).parse(); } }
public static string ToString(task_status_type x) { switch (x) { case task_status_type.pending: return "pending"; case task_status_type.success: return "success"; case task_status_type.failure: return "failure"; case task_status_type.cancelling: return "cancelling"; case task_status_type.cancelled: return "cancelled"; default: return "unknown"; } }
public static string ToString(task_status_type x) { switch (x) { case task_status_type.pending: return("pending"); case task_status_type.success: return("success"); case task_status_type.failure: return("failure"); case task_status_type.cancelling: return("cancelling"); case task_status_type.cancelled: return("cancelled"); } return("unknown"); }
/// <summary> /// Set the task status /// First published in . /// </summary> /// <param name="session">The session</param> /// <param name="_task">The opaque_ref of the given task</param> /// <param name="_value">task status value to be set</param> public static void set_status(Session session, string _task, task_status_type _value) { session.proxy.task_set_status(session.uuid, (_task != null) ? _task : "", task_status_type_helper.ToString(_value)).parse(); }
public static string ToString(task_status_type x) { return(x.StringOf()); }