Ejemplo n.º 1
0
 /// <summary>
 /// Creates a new PIF from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public PIF(Hashtable table)
 {
     uuid                  = Marshalling.ParseString(table, "uuid");
     device                = Marshalling.ParseString(table, "device");
     network               = Marshalling.ParseRef <Network>(table, "network");
     host                  = Marshalling.ParseRef <Host>(table, "host");
     MAC                   = Marshalling.ParseString(table, "MAC");
     MTU                   = Marshalling.ParseLong(table, "MTU");
     VLAN                  = Marshalling.ParseLong(table, "VLAN");
     metrics               = Marshalling.ParseRef <PIF_metrics>(table, "metrics");
     physical              = Marshalling.ParseBool(table, "physical");
     currently_attached    = Marshalling.ParseBool(table, "currently_attached");
     ip_configuration_mode = (ip_configuration_mode)Helper.EnumParseDefault(typeof(ip_configuration_mode), Marshalling.ParseString(table, "ip_configuration_mode"));
     IP                      = Marshalling.ParseString(table, "IP");
     netmask                 = Marshalling.ParseString(table, "netmask");
     gateway                 = Marshalling.ParseString(table, "gateway");
     DNS                     = Marshalling.ParseString(table, "DNS");
     bond_slave_of           = Marshalling.ParseRef <Bond>(table, "bond_slave_of");
     bond_master_of          = Marshalling.ParseSetRef <Bond>(table, "bond_master_of");
     VLAN_master_of          = Marshalling.ParseRef <VLAN>(table, "VLAN_master_of");
     VLAN_slave_of           = Marshalling.ParseSetRef <VLAN>(table, "VLAN_slave_of");
     management              = Marshalling.ParseBool(table, "management");
     other_config            = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     disallow_unplug         = Marshalling.ParseBool(table, "disallow_unplug");
     tunnel_access_PIF_of    = Marshalling.ParseSetRef <Tunnel>(table, "tunnel_access_PIF_of");
     tunnel_transport_PIF_of = Marshalling.ParseSetRef <Tunnel>(table, "tunnel_transport_PIF_of");
     ipv6_configuration_mode = (ipv6_configuration_mode)Helper.EnumParseDefault(typeof(ipv6_configuration_mode), Marshalling.ParseString(table, "ipv6_configuration_mode"));
     IPv6                    = Marshalling.ParseStringArray(table, "IPv6");
     ipv6_gateway            = Marshalling.ParseString(table, "ipv6_gateway");
     primary_address_type    = (primary_address_type)Helper.EnumParseDefault(typeof(primary_address_type), Marshalling.ParseString(table, "primary_address_type"));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Data_source
 /// 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("name_label"))
     {
         name_label = Marshalling.ParseString(table, "name_label");
     }
     if (table.ContainsKey("name_description"))
     {
         name_description = Marshalling.ParseString(table, "name_description");
     }
     if (table.ContainsKey("enabled"))
     {
         enabled = Marshalling.ParseBool(table, "enabled");
     }
     if (table.ContainsKey("standard"))
     {
         standard = Marshalling.ParseBool(table, "standard");
     }
     if (table.ContainsKey("units"))
     {
         units = Marshalling.ParseString(table, "units");
     }
     if (table.ContainsKey("min"))
     {
         min = Marshalling.ParseDouble(table, "min");
     }
     if (table.ContainsKey("max"))
     {
         max = Marshalling.ParseDouble(table, "max");
     }
     if (table.ContainsKey("value"))
     {
         value = Marshalling.ParseDouble(table, "value");
     }
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Sr_stat
 /// 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("name_label"))
     {
         name_label = Marshalling.ParseString(table, "name_label");
     }
     if (table.ContainsKey("name_description"))
     {
         name_description = Marshalling.ParseString(table, "name_description");
     }
     if (table.ContainsKey("free_space"))
     {
         free_space = Marshalling.ParseLong(table, "free_space");
     }
     if (table.ContainsKey("total_space"))
     {
         total_space = Marshalling.ParseLong(table, "total_space");
     }
     if (table.ContainsKey("clustered"))
     {
         clustered = Marshalling.ParseBool(table, "clustered");
     }
     if (table.ContainsKey("health"))
     {
         health = (sr_health)Helper.EnumParseDefault(typeof(sr_health), Marshalling.ParseString(table, "health"));
     }
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Feature
 /// 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("name_label"))
     {
         name_label = Marshalling.ParseString(table, "name_label");
     }
     if (table.ContainsKey("name_description"))
     {
         name_description = Marshalling.ParseString(table, "name_description");
     }
     if (table.ContainsKey("enabled"))
     {
         enabled = Marshalling.ParseBool(table, "enabled");
     }
     if (table.ContainsKey("experimental"))
     {
         experimental = Marshalling.ParseBool(table, "experimental");
     }
     if (table.ContainsKey("version"))
     {
         version = Marshalling.ParseString(table, "version");
     }
     if (table.ContainsKey("host"))
     {
         host = Marshalling.ParseRef <Host>(table, "host");
     }
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Blob
 /// 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("name_label"))
     {
         name_label = Marshalling.ParseString(table, "name_label");
     }
     if (table.ContainsKey("name_description"))
     {
         name_description = Marshalling.ParseString(table, "name_description");
     }
     if (table.ContainsKey("size"))
     {
         size = Marshalling.ParseLong(table, "size");
     }
     if (table.ContainsKey("pubblic"))
     {
         pubblic = Marshalling.ParseBool(table, "pubblic");
     }
     if (table.ContainsKey("last_updated"))
     {
         last_updated = Marshalling.ParseDateTime(table, "last_updated");
     }
     if (table.ContainsKey("mime_type"))
     {
         mime_type = Marshalling.ParseString(table, "mime_type");
     }
 }
Ejemplo n.º 6
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Cluster_host
 /// 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("cluster"))
     {
         cluster = Marshalling.ParseRef <Cluster>(table, "cluster");
     }
     if (table.ContainsKey("host"))
     {
         host = Marshalling.ParseRef <Host>(table, "host");
     }
     if (table.ContainsKey("enabled"))
     {
         enabled = Marshalling.ParseBool(table, "enabled");
     }
     if (table.ContainsKey("allowed_operations"))
     {
         allowed_operations = Helper.StringArrayToEnumList <cluster_host_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
     }
     if (table.ContainsKey("current_operations"))
     {
         current_operations = Maps.convert_from_proxy_string_cluster_host_operation(Marshalling.ParseHashTable(table, "current_operations"));
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VUSB
 /// 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("allowed_operations"))
     {
         allowed_operations = Helper.StringArrayToEnumList <vusb_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
     }
     if (table.ContainsKey("current_operations"))
     {
         current_operations = Maps.convert_from_proxy_string_vusb_operations(Marshalling.ParseHashTable(table, "current_operations"));
     }
     if (table.ContainsKey("VM"))
     {
         VM = Marshalling.ParseRef <VM>(table, "VM");
     }
     if (table.ContainsKey("USB_group"))
     {
         USB_group = Marshalling.ParseRef <USB_group>(table, "USB_group");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("currently_attached"))
     {
         currently_attached = Marshalling.ParseBool(table, "currently_attached");
     }
 }
Ejemplo n.º 8
0
 /// <summary>
 /// Creates a new VBD from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VBD(Hashtable table)
 {
     uuid = Marshalling.ParseString(table, "uuid");
     allowed_operations = Helper.StringArrayToEnumList <vbd_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
     current_operations = Maps.convert_from_proxy_string_vbd_operations(Marshalling.ParseHashTable(table, "current_operations"));
     VM                       = Marshalling.ParseRef <VM>(table, "VM");
     VDI                      = Marshalling.ParseRef <VDI>(table, "VDI");
     device                   = Marshalling.ParseString(table, "device");
     userdevice               = Marshalling.ParseString(table, "userdevice");
     bootable                 = Marshalling.ParseBool(table, "bootable");
     mode                     = (vbd_mode)Helper.EnumParseDefault(typeof(vbd_mode), Marshalling.ParseString(table, "mode"));
     type                     = (vbd_type)Helper.EnumParseDefault(typeof(vbd_type), Marshalling.ParseString(table, "type"));
     unpluggable              = Marshalling.ParseBool(table, "unpluggable");
     storage_lock             = Marshalling.ParseBool(table, "storage_lock");
     empty                    = Marshalling.ParseBool(table, "empty");
     other_config             = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     currently_attached       = Marshalling.ParseBool(table, "currently_attached");
     status_code              = Marshalling.ParseLong(table, "status_code");
     status_detail            = Marshalling.ParseString(table, "status_detail");
     runtime_properties       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "runtime_properties"));
     qos_algorithm_type       = Marshalling.ParseString(table, "qos_algorithm_type");
     qos_algorithm_params     = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "qos_algorithm_params"));
     qos_supported_algorithms = Marshalling.ParseStringArray(table, "qos_supported_algorithms");
     metrics                  = Marshalling.ParseRef <VBD_metrics>(table, "metrics");
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Host_metrics
 /// 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("memory_total"))
     {
         memory_total = Marshalling.ParseLong(table, "memory_total");
     }
     if (table.ContainsKey("memory_free"))
     {
         memory_free = Marshalling.ParseLong(table, "memory_free");
     }
     if (table.ContainsKey("live"))
     {
         live = Marshalling.ParseBool(table, "live");
     }
     if (table.ContainsKey("last_updated"))
     {
         last_updated = Marshalling.ParseDateTime(table, "last_updated");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this PBD
 /// 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("host"))
     {
         host = Marshalling.ParseRef <Host>(table, "host");
     }
     if (table.ContainsKey("SR"))
     {
         SR = Marshalling.ParseRef <SR>(table, "SR");
     }
     if (table.ContainsKey("device_config"))
     {
         device_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "device_config"));
     }
     if (table.ContainsKey("currently_attached"))
     {
         currently_attached = Marshalling.ParseBool(table, "currently_attached");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VM_guest_metrics
 /// 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("os_version"))
     {
         os_version = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "os_version"));
     }
     if (table.ContainsKey("PV_drivers_version"))
     {
         PV_drivers_version = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "PV_drivers_version"));
     }
     if (table.ContainsKey("PV_drivers_up_to_date"))
     {
         PV_drivers_up_to_date = Marshalling.ParseBool(table, "PV_drivers_up_to_date");
     }
     if (table.ContainsKey("memory"))
     {
         memory = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "memory"));
     }
     if (table.ContainsKey("disks"))
     {
         disks = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "disks"));
     }
     if (table.ContainsKey("networks"))
     {
         networks = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "networks"));
     }
     if (table.ContainsKey("other"))
     {
         other = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other"));
     }
     if (table.ContainsKey("last_updated"))
     {
         last_updated = Marshalling.ParseDateTime(table, "last_updated");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("live"))
     {
         live = Marshalling.ParseBool(table, "live");
     }
     if (table.ContainsKey("can_use_hotplug_vbd"))
     {
         can_use_hotplug_vbd = (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), Marshalling.ParseString(table, "can_use_hotplug_vbd"));
     }
     if (table.ContainsKey("can_use_hotplug_vif"))
     {
         can_use_hotplug_vif = (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), Marshalling.ParseString(table, "can_use_hotplug_vif"));
     }
     if (table.ContainsKey("PV_drivers_detected"))
     {
         PV_drivers_detected = Marshalling.ParseBool(table, "PV_drivers_detected");
     }
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this PUSB
 /// 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("USB_group"))
     {
         USB_group = Marshalling.ParseRef <USB_group>(table, "USB_group");
     }
     if (table.ContainsKey("host"))
     {
         host = Marshalling.ParseRef <Host>(table, "host");
     }
     if (table.ContainsKey("path"))
     {
         path = Marshalling.ParseString(table, "path");
     }
     if (table.ContainsKey("vendor_id"))
     {
         vendor_id = Marshalling.ParseString(table, "vendor_id");
     }
     if (table.ContainsKey("vendor_desc"))
     {
         vendor_desc = Marshalling.ParseString(table, "vendor_desc");
     }
     if (table.ContainsKey("product_id"))
     {
         product_id = Marshalling.ParseString(table, "product_id");
     }
     if (table.ContainsKey("product_desc"))
     {
         product_desc = Marshalling.ParseString(table, "product_desc");
     }
     if (table.ContainsKey("serial"))
     {
         serial = Marshalling.ParseString(table, "serial");
     }
     if (table.ContainsKey("version"))
     {
         version = Marshalling.ParseString(table, "version");
     }
     if (table.ContainsKey("description"))
     {
         description = Marshalling.ParseString(table, "description");
     }
     if (table.ContainsKey("passthrough_enabled"))
     {
         passthrough_enabled = Marshalling.ParseBool(table, "passthrough_enabled");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("speed"))
     {
         speed = Marshalling.ParseDouble(table, "speed");
     }
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Creates a new PVS_proxy from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public PVS_proxy(Hashtable table)
 {
     uuid = Marshalling.ParseString(table, "uuid");
     site = Marshalling.ParseRef <PVS_site>(table, "site");
     VIF  = Marshalling.ParseRef <VIF>(table, "VIF");
     currently_attached = Marshalling.ParseBool(table, "currently_attached");
     status             = (pvs_proxy_status)Helper.EnumParseDefault(typeof(pvs_proxy_status), Marshalling.ParseString(table, "status"));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Creates a new VGPU from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VGPU(Hashtable table)
 {
     uuid               = Marshalling.ParseString(table, "uuid");
     VM                 = Marshalling.ParseRef <VM>(table, "VM");
     GPU_group          = Marshalling.ParseRef <GPU_group>(table, "GPU_group");
     device             = Marshalling.ParseString(table, "device");
     currently_attached = Marshalling.ParseBool(table, "currently_attached");
     other_config       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Creates a new Host_metrics from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Host_metrics(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     memory_total = Marshalling.ParseLong(table, "memory_total");
     memory_free  = Marshalling.ParseLong(table, "memory_free");
     live         = Marshalling.ParseBool(table, "live");
     last_updated = Marshalling.ParseDateTime(table, "last_updated");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
Ejemplo n.º 16
0
 /// <summary>
 /// Creates a new PBD from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public PBD(Hashtable table)
 {
     uuid               = Marshalling.ParseString(table, "uuid");
     host               = Marshalling.ParseRef <Host>(table, "host");
     SR                 = Marshalling.ParseRef <SR>(table, "SR");
     device_config      = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "device_config"));
     currently_attached = Marshalling.ParseBool(table, "currently_attached");
     other_config       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
Ejemplo n.º 17
0
 /// <summary>
 /// Creates a new VUSB from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VUSB(Hashtable table)
 {
     uuid = Marshalling.ParseString(table, "uuid");
     allowed_operations = Helper.StringArrayToEnumList <vusb_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
     current_operations = Maps.convert_from_proxy_string_vusb_operations(Marshalling.ParseHashTable(table, "current_operations"));
     VM                 = Marshalling.ParseRef <VM>(table, "VM");
     USB_group          = Marshalling.ParseRef <USB_group>(table, "USB_group");
     other_config       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     currently_attached = Marshalling.ParseBool(table, "currently_attached");
 }
Ejemplo n.º 18
0
 /// <summary>
 /// Creates a new Feature from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Feature(Hashtable table)
 {
     uuid             = Marshalling.ParseString(table, "uuid");
     name_label       = Marshalling.ParseString(table, "name_label");
     name_description = Marshalling.ParseString(table, "name_description");
     enabled          = Marshalling.ParseBool(table, "enabled");
     experimental     = Marshalling.ParseBool(table, "experimental");
     version          = Marshalling.ParseString(table, "version");
     host             = Marshalling.ParseRef <Host>(table, "host");
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Creates a new Blob from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Blob(Hashtable table)
 {
     uuid             = Marshalling.ParseString(table, "uuid");
     name_label       = Marshalling.ParseString(table, "name_label");
     name_description = Marshalling.ParseString(table, "name_description");
     size             = Marshalling.ParseLong(table, "size");
     pubblic          = Marshalling.ParseBool(table, "pubblic");
     last_updated     = Marshalling.ParseDateTime(table, "last_updated");
     mime_type        = Marshalling.ParseString(table, "mime_type");
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this PIF_metrics
 /// 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("io_read_kbs"))
     {
         io_read_kbs = Marshalling.ParseDouble(table, "io_read_kbs");
     }
     if (table.ContainsKey("io_write_kbs"))
     {
         io_write_kbs = Marshalling.ParseDouble(table, "io_write_kbs");
     }
     if (table.ContainsKey("carrier"))
     {
         carrier = Marshalling.ParseBool(table, "carrier");
     }
     if (table.ContainsKey("vendor_id"))
     {
         vendor_id = Marshalling.ParseString(table, "vendor_id");
     }
     if (table.ContainsKey("vendor_name"))
     {
         vendor_name = Marshalling.ParseString(table, "vendor_name");
     }
     if (table.ContainsKey("device_id"))
     {
         device_id = Marshalling.ParseString(table, "device_id");
     }
     if (table.ContainsKey("device_name"))
     {
         device_name = Marshalling.ParseString(table, "device_name");
     }
     if (table.ContainsKey("speed"))
     {
         speed = Marshalling.ParseLong(table, "speed");
     }
     if (table.ContainsKey("duplex"))
     {
         duplex = Marshalling.ParseBool(table, "duplex");
     }
     if (table.ContainsKey("pci_bus_path"))
     {
         pci_bus_path = Marshalling.ParseString(table, "pci_bus_path");
     }
     if (table.ContainsKey("last_updated"))
     {
         last_updated = Marshalling.ParseDateTime(table, "last_updated");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 21
0
 /// <summary>
 /// Creates a new Data_source from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Data_source(Hashtable table)
 {
     name_label       = Marshalling.ParseString(table, "name_label");
     name_description = Marshalling.ParseString(table, "name_description");
     enabled          = Marshalling.ParseBool(table, "enabled");
     standard         = Marshalling.ParseBool(table, "standard");
     units            = Marshalling.ParseString(table, "units");
     min   = Marshalling.ParseDouble(table, "min");
     max   = Marshalling.ParseDouble(table, "max");
     value = Marshalling.ParseDouble(table, "value");
 }
Ejemplo n.º 22
0
 /// <summary>
 /// Creates a new VGPU from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VGPU(Hashtable table)
 {
     uuid                        = Marshalling.ParseString(table, "uuid");
     VM                          = Marshalling.ParseRef <VM>(table, "VM");
     GPU_group                   = Marshalling.ParseRef <GPU_group>(table, "GPU_group");
     device                      = Marshalling.ParseString(table, "device");
     currently_attached          = Marshalling.ParseBool(table, "currently_attached");
     other_config                = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     type                        = Marshalling.ParseRef <VGPU_type>(table, "type");
     resident_on                 = Marshalling.ParseRef <PGPU>(table, "resident_on");
     scheduled_to_be_resident_on = Marshalling.ParseRef <PGPU>(table, "scheduled_to_be_resident_on");
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Creates a new Pool_patch from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Pool_patch(Hashtable table)
 {
     uuid                 = Marshalling.ParseString(table, "uuid");
     name_label           = Marshalling.ParseString(table, "name_label");
     name_description     = Marshalling.ParseString(table, "name_description");
     version              = Marshalling.ParseString(table, "version");
     size                 = Marshalling.ParseLong(table, "size");
     pool_applied         = Marshalling.ParseBool(table, "pool_applied");
     host_patches         = Marshalling.ParseSetRef <Host_patch>(table, "host_patches");
     after_apply_guidance = Helper.StringArrayToEnumList <after_apply_guidance>(Marshalling.ParseStringArray(table, "after_apply_guidance"));
     other_config         = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Creates a new VMSS from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VMSS(Hashtable table)
 {
     uuid               = Marshalling.ParseString(table, "uuid");
     name_label         = Marshalling.ParseString(table, "name_label");
     name_description   = Marshalling.ParseString(table, "name_description");
     enabled            = Marshalling.ParseBool(table, "enabled");
     type               = (vmss_type)Helper.EnumParseDefault(typeof(vmss_type), Marshalling.ParseString(table, "type"));
     retained_snapshots = Marshalling.ParseLong(table, "retained_snapshots");
     frequency          = (vmss_frequency)Helper.EnumParseDefault(typeof(vmss_frequency), Marshalling.ParseString(table, "frequency"));
     schedule           = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "schedule"));
     last_run_time      = Marshalling.ParseDateTime(table, "last_run_time");
     VMs = Marshalling.ParseSetRef <VM>(table, "VMs");
 }
Ejemplo n.º 25
0
 /// <summary>
 /// Creates a new Host_patch from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Host_patch(Hashtable table)
 {
     uuid              = Marshalling.ParseString(table, "uuid");
     name_label        = Marshalling.ParseString(table, "name_label");
     name_description  = Marshalling.ParseString(table, "name_description");
     version           = Marshalling.ParseString(table, "version");
     host              = Marshalling.ParseRef <Host>(table, "host");
     applied           = Marshalling.ParseBool(table, "applied");
     timestamp_applied = Marshalling.ParseDateTime(table, "timestamp_applied");
     size              = Marshalling.ParseLong(table, "size");
     pool_patch        = Marshalling.ParseRef <Pool_patch>(table, "pool_patch");
     other_config      = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
Ejemplo n.º 26
0
 /// <summary>
 /// Creates a new Pool_update from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Pool_update(Hashtable table)
 {
     uuid              = Marshalling.ParseString(table, "uuid");
     name_label        = Marshalling.ParseString(table, "name_label");
     name_description  = Marshalling.ParseString(table, "name_description");
     version           = Marshalling.ParseString(table, "version");
     installation_size = Marshalling.ParseLong(table, "installation_size");
     key = Marshalling.ParseString(table, "key");
     after_apply_guidance = Helper.StringArrayToEnumList <update_after_apply_guidance>(Marshalling.ParseStringArray(table, "after_apply_guidance"));
     vdi   = Marshalling.ParseRef <VDI>(table, "vdi");
     hosts = Marshalling.ParseSetRef <Host>(table, "hosts");
     enforce_homogeneity = Marshalling.ParseBool(table, "enforce_homogeneity");
 }
Ejemplo n.º 27
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Cluster
 /// 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("cluster_hosts"))
     {
         cluster_hosts = Marshalling.ParseSetRef <Cluster_host>(table, "cluster_hosts");
     }
     if (table.ContainsKey("network"))
     {
         network = Marshalling.ParseRef <Network>(table, "network");
     }
     if (table.ContainsKey("cluster_token"))
     {
         cluster_token = Marshalling.ParseString(table, "cluster_token");
     }
     if (table.ContainsKey("cluster_stack"))
     {
         cluster_stack = Marshalling.ParseString(table, "cluster_stack");
     }
     if (table.ContainsKey("allowed_operations"))
     {
         allowed_operations = Helper.StringArrayToEnumList <cluster_operation>(Marshalling.ParseStringArray(table, "allowed_operations"));
     }
     if (table.ContainsKey("current_operations"))
     {
         current_operations = Maps.convert_from_proxy_string_cluster_operation(Marshalling.ParseHashTable(table, "current_operations"));
     }
     if (table.ContainsKey("pool_auto_join"))
     {
         pool_auto_join = Marshalling.ParseBool(table, "pool_auto_join");
     }
     if (table.ContainsKey("token_timeout"))
     {
         token_timeout = Marshalling.ParseLong(table, "token_timeout");
     }
     if (table.ContainsKey("token_timeout_coefficient"))
     {
         token_timeout_coefficient = Marshalling.ParseLong(table, "token_timeout_coefficient");
     }
     if (table.ContainsKey("cluster_config"))
     {
         cluster_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "cluster_config"));
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 28
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VGPU
 /// 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("VM"))
     {
         VM = Marshalling.ParseRef <VM>(table, "VM");
     }
     if (table.ContainsKey("GPU_group"))
     {
         GPU_group = Marshalling.ParseRef <GPU_group>(table, "GPU_group");
     }
     if (table.ContainsKey("device"))
     {
         device = Marshalling.ParseString(table, "device");
     }
     if (table.ContainsKey("currently_attached"))
     {
         currently_attached = Marshalling.ParseBool(table, "currently_attached");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("type"))
     {
         type = Marshalling.ParseRef <VGPU_type>(table, "type");
     }
     if (table.ContainsKey("resident_on"))
     {
         resident_on = Marshalling.ParseRef <PGPU>(table, "resident_on");
     }
     if (table.ContainsKey("scheduled_to_be_resident_on"))
     {
         scheduled_to_be_resident_on = Marshalling.ParseRef <PGPU>(table, "scheduled_to_be_resident_on");
     }
     if (table.ContainsKey("compatibility_metadata"))
     {
         compatibility_metadata = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "compatibility_metadata"));
     }
     if (table.ContainsKey("extra_args"))
     {
         extra_args = Marshalling.ParseString(table, "extra_args");
     }
     if (table.ContainsKey("PCI"))
     {
         PCI = Marshalling.ParseRef <PCI>(table, "PCI");
     }
 }
Ejemplo n.º 29
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"));
     }
 }
Ejemplo n.º 30
0
 /// <summary>
 /// Creates a new VM_guest_metrics from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VM_guest_metrics(Hashtable table)
 {
     uuid                  = Marshalling.ParseString(table, "uuid");
     os_version            = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "os_version"));
     PV_drivers_version    = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "PV_drivers_version"));
     PV_drivers_up_to_date = Marshalling.ParseBool(table, "PV_drivers_up_to_date");
     memory                = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "memory"));
     disks                 = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "disks"));
     networks              = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "networks"));
     other                 = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other"));
     last_updated          = Marshalling.ParseDateTime(table, "last_updated");
     other_config          = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     live                  = Marshalling.ParseBool(table, "live");
 }