public static string ToString(livepatch_status x) { switch (x) { case livepatch_status.ok_livepatch_complete: return "ok_livepatch_complete"; case livepatch_status.ok_livepatch_incomplete: return "ok_livepatch_incomplete"; case livepatch_status.ok: return "ok"; default: return "unknown"; } }
public static string StringOf(this livepatch_status x) { switch (x) { case livepatch_status.ok_livepatch_complete: return("ok_livepatch_complete"); case livepatch_status.ok_livepatch_incomplete: return("ok_livepatch_incomplete"); case livepatch_status.ok: return("ok"); default: return("unknown"); } }
private void ProcessRecordPrecheck(string pool_update) { if (!ShouldProcess(pool_update, "Pool_update.precheck")) { return; } RunApiCall(() => { var contxt = _context as XenPoolUpdateActionPrecheckDynamicParameters; if (contxt != null && contxt.Async) { taskRef = XenAPI.Pool_update.async_precheck(session, pool_update, contxt.XenHost); if (PassThru) { XenAPI.Task taskObj = null; if (taskRef != "OpaqueRef:NULL") { taskObj = XenAPI.Task.get_record(session, taskRef.opaque_ref); taskObj.opaque_ref = taskRef.opaque_ref; } WriteObject(taskObj, true); } } else { livepatch_status obj = XenAPI.Pool_update.precheck(session, pool_update, contxt.XenHost); if (PassThru) { WriteObject(obj, true); } } }); }
public static string ToString(livepatch_status x) { return(x.StringOf()); }