public static string StringOf(this vmss_type x) { switch (x) { case vmss_type.snapshot: return("snapshot"); case vmss_type.checkpoint: return("checkpoint"); case vmss_type.snapshot_with_quiesce: return("snapshot_with_quiesce"); default: return("unknown"); } }
private static string FormatBackupType(vmss_type backupType) { if (backupType == vmss_type.snapshot) { return(Messages.DISKS_ONLY); } else if (backupType == vmss_type.checkpoint) { return(Messages.DISKS_AND_MEMORY); } else if (backupType == vmss_type.snapshot_with_quiesce) { return(Messages.QUIESCED_SNAPSHOTS); } throw new ArgumentException("wrong argument"); }
public VMSS(string uuid, string name_label, string name_description, bool enabled, vmss_type type, long retained_snapshots, vmss_frequency frequency, Dictionary <string, string> schedule, DateTime last_run_time, List <XenRef <VM> > VMs) { this.uuid = uuid; this.name_label = name_label; this.name_description = name_description; this.enabled = enabled; this.type = type; this.retained_snapshots = retained_snapshots; this.frequency = frequency; this.schedule = schedule; this.last_run_time = last_run_time; this.VMs = VMs; }
/// <summary> /// /// First published in XenServer 7.2. /// </summary> /// <param name="session">The session</param> /// <param name="_vmss">The opaque_ref of the given vmss</param> /// <param name="_value">the snapshot schedule type</param> public static void set_type(Session session, string _vmss, vmss_type _value) { session.proxy.vmss_set_type(session.uuid, _vmss ?? "", vmss_type_helper.ToString(_value)).parse(); }
public static string ToString(vmss_type x) { return(x.StringOf()); }