示例#1
0
        /// <summary>
        /// Backward compatibility for VDI.introduce in XenServer 6.0.
        /// </summary>
        public static XenRef<VDI> introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary<string, string> _other_config, string _location, Dictionary<string, string> _xenstore_data, Dictionary<string, string> _sm_config)
        {
            if (Helper.APIVersionMeets(session, API_Version.API_1_10))
                System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");

            return XenRef<VDI>.Create(session.proxy.vdi_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse());
        }
示例#2
0
        public static string ToString(vdi_type x)
        {
            switch (x)
            {
            case vdi_type.system:
                return("system");

            case vdi_type.user:
                return("user");

            case vdi_type.ephemeral:
                return("ephemeral");

            case vdi_type.suspend:
                return("suspend");

            case vdi_type.crashdump:
                return("crashdump");

            case vdi_type.ha_statefile:
                return("ha_statefile");

            case vdi_type.metadata:
                return("metadata");

            case vdi_type.redo_log:
                return("redo_log");
            }
            return("unknown");
        }
示例#3
0
 public static string ToString(vdi_type x)
 {
     switch (x)
     {
         case vdi_type.system:
             return "system";
         case vdi_type.user:
             return "user";
         case vdi_type.ephemeral:
             return "ephemeral";
         case vdi_type.suspend:
             return "suspend";
         case vdi_type.crashdump:
             return "crashdump";
         case vdi_type.ha_statefile:
             return "ha_statefile";
         case vdi_type.metadata:
             return "metadata";
         case vdi_type.redo_log:
             return "redo_log";
         case vdi_type.rrd:
             return "rrd";
         default:
             return "unknown";
     }
 }
        private void ProcessRecordType(string vdi)
        {
            RunApiCall(() =>
            {
                vdi_type obj = XenAPI.VDI.get_type(session, vdi);

                WriteObject(obj, true);
            });
        }
示例#5
0
        public static string StringOf(this vdi_type x)
        {
            switch (x)
            {
            case vdi_type.system:
                return("system");

            case vdi_type.user:
                return("user");

            case vdi_type.ephemeral:
                return("ephemeral");

            case vdi_type.suspend:
                return("suspend");

            case vdi_type.crashdump:
                return("crashdump");

            case vdi_type.ha_statefile:
                return("ha_statefile");

            case vdi_type.metadata:
                return("metadata");

            case vdi_type.redo_log:
                return("redo_log");

            case vdi_type.rrd:
                return("rrd");

            case vdi_type.pvs_cache:
                return("pvs_cache");

            case vdi_type.cbt_metadata:
                return("cbt_metadata");

            default:
                return("unknown");
            }
        }
示例#6
0
 public static string ToString(vdi_type x)
 {
     return(x.StringOf());
 }
示例#7
0
        /// <summary>
        /// Backward compatibility for VDI.async_db_introduce in XenServer 6.0.
        /// </summary>
        public static XenRef <Task> async_db_introduce(Session session, string _uuid, string _name_label, string _name_description, string _sr, vdi_type _type, bool _sharable, bool _read_only, Dictionary <string, string> _other_config, string _location, Dictionary <string, string> _xenstore_data, Dictionary <string, string> _sm_config)
        {
            if (Helper.APIVersionMeets(session, API_Version.API_1_10))
            {
                System.Diagnostics.Debug.Assert(false, "Cannot use this call on XenServer 6.1 or newer.");
            }

            return(XenRef <Task> .Create(session.proxy.async_vdi_db_introduce(session.uuid, (_uuid != null) ? _uuid : "", (_name_label != null) ? _name_label : "", (_name_description != null) ? _name_description : "", (_sr != null) ? _sr : "", vdi_type_helper.ToString(_type), _sharable, _read_only, Maps.convert_to_proxy_string_string(_other_config), (_location != null) ? _location : "", Maps.convert_to_proxy_string_string(_xenstore_data), Maps.convert_to_proxy_string_string(_sm_config)).parse()));
        }