Example #1
0
 /// <summary>
 /// Get the supported_VGPU_max_capacities field of the given PGPU.
 /// First published in XenServer 6.2 SP1.
 /// </summary>
 /// <param name="session">The session</param>
 /// <param name="_pgpu">The opaque_ref of the given pgpu</param>
 public static Dictionary <XenRef <VGPU_type>, long> get_supported_VGPU_max_capacities(Session session, string _pgpu)
 {
     if (session.JsonRpcClient != null)
     {
         return(session.JsonRpcClient.pgpu_get_supported_vgpu_max_capacities(session.opaque_ref, _pgpu));
     }
     else
     {
         return(Maps.convert_from_proxy_XenRefVGPU_type_long(session.proxy.pgpu_get_supported_vgpu_max_capacities(session.opaque_ref, _pgpu ?? "").parse()));
     }
 }
Example #2
0
 /// <summary>
 /// Creates a new PGPU from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public PGPU(Hashtable table)
 {
     uuid                          = Marshalling.ParseString(table, "uuid");
     PCI                           = Marshalling.ParseRef <PCI>(table, "PCI");
     GPU_group                     = Marshalling.ParseRef <GPU_group>(table, "GPU_group");
     host                          = Marshalling.ParseRef <Host>(table, "host");
     other_config                  = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     supported_VGPU_types          = Marshalling.ParseSetRef <VGPU_type>(table, "supported_VGPU_types");
     enabled_VGPU_types            = Marshalling.ParseSetRef <VGPU_type>(table, "enabled_VGPU_types");
     resident_VGPUs                = Marshalling.ParseSetRef <VGPU>(table, "resident_VGPUs");
     supported_VGPU_max_capacities = Maps.convert_from_proxy_XenRefVGPU_type_long(Marshalling.ParseHashTable(table, "supported_VGPU_max_capacities"));
 }
Example #3
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this PGPU
 /// with the values listed in the Hashtable. Note that only the fields contained
 /// in the Hashtable will be updated and the rest will remain the same.
 /// </summary>
 /// <param name="table"></param>
 public void UpdateFrom(Hashtable table)
 {
     if (table.ContainsKey("uuid"))
     {
         uuid = Marshalling.ParseString(table, "uuid");
     }
     if (table.ContainsKey("PCI"))
     {
         PCI = Marshalling.ParseRef <PCI>(table, "PCI");
     }
     if (table.ContainsKey("GPU_group"))
     {
         GPU_group = Marshalling.ParseRef <GPU_group>(table, "GPU_group");
     }
     if (table.ContainsKey("host"))
     {
         host = Marshalling.ParseRef <Host>(table, "host");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("supported_VGPU_types"))
     {
         supported_VGPU_types = Marshalling.ParseSetRef <VGPU_type>(table, "supported_VGPU_types");
     }
     if (table.ContainsKey("enabled_VGPU_types"))
     {
         enabled_VGPU_types = Marshalling.ParseSetRef <VGPU_type>(table, "enabled_VGPU_types");
     }
     if (table.ContainsKey("resident_VGPUs"))
     {
         resident_VGPUs = Marshalling.ParseSetRef <VGPU>(table, "resident_VGPUs");
     }
     if (table.ContainsKey("supported_VGPU_max_capacities"))
     {
         supported_VGPU_max_capacities = Maps.convert_from_proxy_XenRefVGPU_type_long(Marshalling.ParseHashTable(table, "supported_VGPU_max_capacities"));
     }
     if (table.ContainsKey("dom0_access"))
     {
         dom0_access = (pgpu_dom0_access)Helper.EnumParseDefault(typeof(pgpu_dom0_access), Marshalling.ParseString(table, "dom0_access"));
     }
     if (table.ContainsKey("is_system_display_device"))
     {
         is_system_display_device = Marshalling.ParseBool(table, "is_system_display_device");
     }
     if (table.ContainsKey("compatibility_metadata"))
     {
         compatibility_metadata = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "compatibility_metadata"));
     }
 }
Example #4
0
 /// <summary>
 /// Creates a new PGPU from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public PGPU(Hashtable table)
 {
     uuid                          = Marshalling.ParseString(table, "uuid");
     PCI                           = Marshalling.ParseRef <PCI>(table, "PCI");
     GPU_group                     = Marshalling.ParseRef <GPU_group>(table, "GPU_group");
     host                          = Marshalling.ParseRef <Host>(table, "host");
     other_config                  = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     supported_VGPU_types          = Marshalling.ParseSetRef <VGPU_type>(table, "supported_VGPU_types");
     enabled_VGPU_types            = Marshalling.ParseSetRef <VGPU_type>(table, "enabled_VGPU_types");
     resident_VGPUs                = Marshalling.ParseSetRef <VGPU>(table, "resident_VGPUs");
     supported_VGPU_max_capacities = Maps.convert_from_proxy_XenRefVGPU_type_long(Marshalling.ParseHashTable(table, "supported_VGPU_max_capacities"));
     dom0_access                   = (pgpu_dom0_access)Helper.EnumParseDefault(typeof(pgpu_dom0_access), Marshalling.ParseString(table, "dom0_access"));
     is_system_display_device      = Marshalling.ParseBool(table, "is_system_display_device");
 }
Example #5
0
        internal void UpdateFromProxy(Proxy_PGPU proxy)
        {
            uuid = proxy.uuid == null ? null : 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;
            compatibility_metadata   = proxy.compatibility_metadata == null ? null : Maps.convert_from_proxy_string_string(proxy.compatibility_metadata);
        }
Example #6
0
 /// <summary>
 /// Get the supported_VGPU_max_capacities field of the given PGPU.
 /// First published in XenServer 6.2 SP1.
 /// </summary>
 /// <param name="session">The session</param>
 /// <param name="_pgpu">The opaque_ref of the given pgpu</param>
 public static Dictionary <XenRef <VGPU_type>, long> get_supported_VGPU_max_capacities(Session session, string _pgpu)
 {
     return(Maps.convert_from_proxy_XenRefVGPU_type_long(session.proxy.pgpu_get_supported_vgpu_max_capacities(session.uuid, _pgpu ?? "").parse()));
 }
Example #7
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);
        }