예제 #1
0
파일: SR.cs 프로젝트: ryu2048/xenadmin
        public Proxy_SR ToProxy()
        {
            Proxy_SR result_ = new Proxy_SR();

            result_.uuid                 = (uuid != null) ? uuid : "";
            result_.name_label           = (name_label != null) ? name_label : "";
            result_.name_description     = (name_description != null) ? name_description : "";
            result_.allowed_operations   = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
            result_.current_operations   = Maps.convert_to_proxy_string_storage_operations(current_operations);
            result_.VDIs                 = (VDIs != null) ? Helper.RefListToStringArray(VDIs) : new string[] {};
            result_.PBDs                 = (PBDs != null) ? Helper.RefListToStringArray(PBDs) : new string[] {};
            result_.virtual_allocation   = virtual_allocation.ToString();
            result_.physical_utilisation = physical_utilisation.ToString();
            result_.physical_size        = physical_size.ToString();
            result_.type                 = (type != null) ? type : "";
            result_.content_type         = (content_type != null) ? content_type : "";
            result_.shared               = shared;
            result_.other_config         = Maps.convert_to_proxy_string_string(other_config);
            result_.tags                 = tags;
            result_.sm_config            = Maps.convert_to_proxy_string_string(sm_config);
            result_.blobs                = Maps.convert_to_proxy_string_XenRefBlob(blobs);
            result_.local_cache_enabled  = local_cache_enabled;
            result_.introduced_by        = (introduced_by != null) ? introduced_by : "";
            return(result_);
        }
예제 #2
0
        public Proxy_Network ToProxy()
        {
            Proxy_Network result_ = new Proxy_Network();

            result_.uuid               = (uuid != null) ? uuid : "";
            result_.name_label         = (name_label != null) ? name_label : "";
            result_.name_description   = (name_description != null) ? name_description : "";
            result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
            result_.current_operations = Maps.convert_to_proxy_string_network_operations(current_operations);
            result_.VIFs               = (VIFs != null) ? Helper.RefListToStringArray(VIFs) : new string[] {};
            result_.PIFs               = (PIFs != null) ? Helper.RefListToStringArray(PIFs) : new string[] {};
            result_.MTU                  = MTU.ToString();
            result_.other_config         = Maps.convert_to_proxy_string_string(other_config);
            result_.bridge               = (bridge != null) ? bridge : "";
            result_.blobs                = Maps.convert_to_proxy_string_XenRefBlob(blobs);
            result_.tags                 = tags;
            result_.default_locking_mode = network_default_locking_mode_helper.ToString(default_locking_mode);
            return(result_);
        }
예제 #3
0
        public Proxy_Network ToProxy()
        {
            Proxy_Network result_ = new Proxy_Network();

            result_.uuid               = uuid ?? "";
            result_.name_label         = name_label ?? "";
            result_.name_description   = name_description ?? "";
            result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {};
            result_.current_operations = Maps.convert_to_proxy_string_network_operations(current_operations);
            result_.VIFs               = (VIFs != null) ? Helper.RefListToStringArray(VIFs) : new string[] {};
            result_.PIFs               = (PIFs != null) ? Helper.RefListToStringArray(PIFs) : new string[] {};
            result_.MTU                  = MTU.ToString();
            result_.other_config         = Maps.convert_to_proxy_string_string(other_config);
            result_.bridge               = bridge ?? "";
            result_.managed              = managed;
            result_.blobs                = Maps.convert_to_proxy_string_XenRefBlob(blobs);
            result_.tags                 = tags;
            result_.default_locking_mode = network_default_locking_mode_helper.ToString(default_locking_mode);
            result_.assigned_ips         = Maps.convert_to_proxy_XenRefVIF_string(assigned_ips);
            return(result_);
        }