예제 #1
0
        public Proxy_PGPU ToProxy()
        {
            Proxy_PGPU result_ = new Proxy_PGPU();

            result_.uuid         = (uuid != null) ? uuid : "";
            result_.PCI          = (PCI != null) ? PCI : "";
            result_.GPU_group    = (GPU_group != null) ? GPU_group : "";
            result_.host         = (host != null) ? host : "";
            result_.other_config = Maps.convert_to_proxy_string_string(other_config);
            return(result_);
        }
예제 #2
0
        internal void UpdateFromProxy(Proxy_PGPU proxy)
        {
            uuid = proxy.uuid == null ? null : (string)proxy.uuid;
            PCI  = proxy.PCI == null ? null : XenRef <PCI> .Create(proxy.PCI);

            GPU_group = proxy.GPU_group == null ? null : XenRef <GPU_group> .Create(proxy.GPU_group);

            host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host);

            other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
        }
예제 #3
0
        public Proxy_PGPU ToProxy()
        {
            Proxy_PGPU result_ = new Proxy_PGPU();

            result_.uuid                          = (uuid != null) ? uuid : "";
            result_.PCI                           = (PCI != null) ? PCI : "";
            result_.GPU_group                     = (GPU_group != null) ? GPU_group : "";
            result_.host                          = (host != null) ? host : "";
            result_.other_config                  = Maps.convert_to_proxy_string_string(other_config);
            result_.supported_VGPU_types          = (supported_VGPU_types != null) ? Helper.RefListToStringArray(supported_VGPU_types) : new string[] {};
            result_.enabled_VGPU_types            = (enabled_VGPU_types != null) ? Helper.RefListToStringArray(enabled_VGPU_types) : new string[] {};
            result_.resident_VGPUs                = (resident_VGPUs != null) ? Helper.RefListToStringArray(resident_VGPUs) : new string[] {};
            result_.supported_VGPU_max_capacities = Maps.convert_to_proxy_XenRefVGPU_type_long(supported_VGPU_max_capacities);
            return(result_);
        }
예제 #4
0
        public Proxy_PGPU ToProxy()
        {
            Proxy_PGPU result_ = new Proxy_PGPU();

            result_.uuid                          = uuid ?? "";
            result_.PCI                           = PCI ?? "";
            result_.GPU_group                     = GPU_group ?? "";
            result_.host                          = host ?? "";
            result_.other_config                  = Maps.convert_to_proxy_string_string(other_config);
            result_.supported_VGPU_types          = (supported_VGPU_types != null) ? Helper.RefListToStringArray(supported_VGPU_types) : new string[] {};
            result_.enabled_VGPU_types            = (enabled_VGPU_types != null) ? Helper.RefListToStringArray(enabled_VGPU_types) : new string[] {};
            result_.resident_VGPUs                = (resident_VGPUs != null) ? Helper.RefListToStringArray(resident_VGPUs) : new string[] {};
            result_.supported_VGPU_max_capacities = Maps.convert_to_proxy_XenRefVGPU_type_long(supported_VGPU_max_capacities);
            result_.dom0_access                   = pgpu_dom0_access_helper.ToString(dom0_access);
            result_.is_system_display_device      = is_system_display_device;
            return(result_);
        }
예제 #5
0
        internal void UpdateFromProxy(Proxy_PGPU proxy)
        {
            uuid = proxy.uuid == null ? null : (string)proxy.uuid;
            PCI  = proxy.PCI == null ? null : XenRef <PCI> .Create(proxy.PCI);

            GPU_group = proxy.GPU_group == null ? null : XenRef <GPU_group> .Create(proxy.GPU_group);

            host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host);

            other_config         = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
            supported_VGPU_types = proxy.supported_VGPU_types == null ? null : XenRef <VGPU_type> .Create(proxy.supported_VGPU_types);

            enabled_VGPU_types = proxy.enabled_VGPU_types == null ? null : XenRef <VGPU_type> .Create(proxy.enabled_VGPU_types);

            resident_VGPUs = proxy.resident_VGPUs == null ? null : XenRef <VGPU> .Create(proxy.resident_VGPUs);

            supported_VGPU_max_capacities = proxy.supported_VGPU_max_capacities == null ? null : Maps.convert_from_proxy_XenRefVGPU_type_long(proxy.supported_VGPU_max_capacities);
        }
예제 #6
0
        internal void UpdateFromProxy(Proxy_PGPU proxy)
        {
            uuid = proxy.uuid == null ? null : (string)proxy.uuid;
            PCI  = proxy.PCI == null ? null : XenRef <PCI> .Create(proxy.PCI);

            GPU_group = proxy.GPU_group == null ? null : XenRef <GPU_group> .Create(proxy.GPU_group);

            host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host);

            other_config         = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config);
            supported_VGPU_types = proxy.supported_VGPU_types == null ? null : XenRef <VGPU_type> .Create(proxy.supported_VGPU_types);

            enabled_VGPU_types = proxy.enabled_VGPU_types == null ? null : XenRef <VGPU_type> .Create(proxy.enabled_VGPU_types);

            resident_VGPUs = proxy.resident_VGPUs == null ? null : XenRef <VGPU> .Create(proxy.resident_VGPUs);

            supported_VGPU_max_capacities = proxy.supported_VGPU_max_capacities == null ? null : Maps.convert_from_proxy_XenRefVGPU_type_long(proxy.supported_VGPU_max_capacities);
            dom0_access = proxy.dom0_access == null ? (pgpu_dom0_access)0 : (pgpu_dom0_access)Helper.EnumParseDefault(typeof(pgpu_dom0_access), (string)proxy.dom0_access);
            is_system_display_device = (bool)proxy.is_system_display_device;
        }
예제 #7
0
파일: PGPU.cs 프로젝트: ywwseu/xenadmin
 /// <summary>
 /// Creates a new PGPU from a Proxy_PGPU.
 /// </summary>
 /// <param name="proxy"></param>
 public PGPU(Proxy_PGPU proxy)
 {
     this.UpdateFromProxy(proxy);
 }
예제 #8
0
 /// <summary>
 /// Creates a new PGPU from a Proxy_PGPU.
 /// </summary>
 /// <param name="proxy"></param>
 public PGPU(Proxy_PGPU proxy)
 {
     UpdateFrom(proxy);
 }