コード例 #1
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Tunnel
 /// 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("access_PIF"))
     {
         access_PIF = Marshalling.ParseRef <PIF>(table, "access_PIF");
     }
     if (table.ContainsKey("transport_PIF"))
     {
         transport_PIF = Marshalling.ParseRef <PIF>(table, "transport_PIF");
     }
     if (table.ContainsKey("status"))
     {
         status = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "status"));
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("protocol"))
     {
         protocol = (tunnel_protocol)Helper.EnumParseDefault(typeof(tunnel_protocol), Marshalling.ParseString(table, "protocol"));
     }
 }
コード例 #2
0
ファイル: PBD.cs プロジェクト: borzel/xenadmin
 /// <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"));
     }
 }
コード例 #3
0
ファイル: USB_group.cs プロジェクト: ywscr/xenadmin
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this USB_group
 /// 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("PUSBs"))
     {
         PUSBs = Marshalling.ParseSetRef <PUSB>(table, "PUSBs");
     }
     if (table.ContainsKey("VUSBs"))
     {
         VUSBs = Marshalling.ParseSetRef <VUSB>(table, "VUSBs");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
コード例 #4
0
ファイル: Crashdump.cs プロジェクト: wuzhiwyyx/xenadmin
 /// <summary>
 /// Creates a new Crashdump from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Crashdump(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     VM           = Marshalling.ParseRef <VM>(table, "VM");
     VDI          = Marshalling.ParseRef <VDI>(table, "VDI");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #5
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"));
 }
コード例 #6
0
ファイル: Bond.cs プロジェクト: borzel/xenadmin
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Bond
 /// 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("master"))
     {
         master = Marshalling.ParseRef <PIF>(table, "master");
     }
     if (table.ContainsKey("slaves"))
     {
         slaves = Marshalling.ParseSetRef <PIF>(table, "slaves");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("primary_slave"))
     {
         primary_slave = Marshalling.ParseRef <PIF>(table, "primary_slave");
     }
     if (table.ContainsKey("mode"))
     {
         mode = (bond_mode)Helper.EnumParseDefault(typeof(bond_mode), Marshalling.ParseString(table, "mode"));
     }
     if (table.ContainsKey("properties"))
     {
         properties = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "properties"));
     }
     if (table.ContainsKey("links_up"))
     {
         links_up = Marshalling.ParseLong(table, "links_up");
     }
 }
コード例 #7
0
ファイル: VUSB.cs プロジェクト: ywwseu/xenadmin
 /// <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");
     }
 }
コード例 #8
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"));
     }
 }
コード例 #9
0
ファイル: User.cs プロジェクト: hl10502/XenCenter
 /// <summary>
 /// Creates a new User from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public User(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     short_name   = Marshalling.ParseString(table, "short_name");
     fullname     = Marshalling.ParseString(table, "fullname");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #10
0
ファイル: VBD.cs プロジェクト: ryu2048/xenadmin
 /// <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");
 }
コード例 #11
0
 /// <summary>
 /// Creates a new Subject from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Subject(Hashtable table)
 {
     uuid = Marshalling.ParseString(table, "uuid");
     subject_identifier = Marshalling.ParseString(table, "subject_identifier");
     other_config       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     roles = Marshalling.ParseSetRef <Role>(table, "roles");
 }
コード例 #12
0
ファイル: Host_metrics.cs プロジェクト: borzel/xenadmin
 /// <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"));
     }
 }
コード例 #13
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this SM
 /// 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("type"))
     {
         type = Marshalling.ParseString(table, "type");
     }
     if (table.ContainsKey("vendor"))
     {
         vendor = Marshalling.ParseString(table, "vendor");
     }
     if (table.ContainsKey("copyright"))
     {
         copyright = Marshalling.ParseString(table, "copyright");
     }
     if (table.ContainsKey("version"))
     {
         version = Marshalling.ParseString(table, "version");
     }
     if (table.ContainsKey("required_api_version"))
     {
         required_api_version = Marshalling.ParseString(table, "required_api_version");
     }
     if (table.ContainsKey("configuration"))
     {
         configuration = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "configuration"));
     }
     if (table.ContainsKey("capabilities"))
     {
         capabilities = Marshalling.ParseStringArray(table, "capabilities");
     }
     if (table.ContainsKey("features"))
     {
         features = Maps.convert_from_proxy_string_long(Marshalling.ParseHashTable(table, "features"));
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("driver_filename"))
     {
         driver_filename = Marshalling.ParseString(table, "driver_filename");
     }
     if (table.ContainsKey("required_cluster_stack"))
     {
         required_cluster_stack = Marshalling.ParseStringArray(table, "required_cluster_stack");
     }
 }
コード例 #14
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");
     }
 }
コード例 #15
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");
     }
 }
コード例 #16
0
 /// <summary>
 /// Creates a new Host_crashdump from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Host_crashdump(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     host         = Marshalling.ParseRef <Host>(table, "host");
     timestamp    = Marshalling.ParseDateTime(table, "timestamp");
     size         = Marshalling.ParseLong(table, "size");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #17
0
 /// <summary>
 /// Creates a new Console from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Console(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     protocol     = (console_protocol)Helper.EnumParseDefault(typeof(console_protocol), Marshalling.ParseString(table, "protocol"));
     location     = Marshalling.ParseString(table, "location");
     VM           = Marshalling.ParseRef <VM>(table, "VM");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #18
0
ファイル: VLAN.cs プロジェクト: wuzhiwyyx/xenadmin
 /// <summary>
 /// Creates a new VLAN from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VLAN(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     tagged_PIF   = Marshalling.ParseRef <PIF>(table, "tagged_PIF");
     untagged_PIF = Marshalling.ParseRef <PIF>(table, "untagged_PIF");
     tag          = Marshalling.ParseLong(table, "tag");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #19
0
 /// <summary>
 /// Creates a new Tunnel from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Tunnel(Hashtable table)
 {
     uuid          = Marshalling.ParseString(table, "uuid");
     access_PIF    = Marshalling.ParseRef <PIF>(table, "access_PIF");
     transport_PIF = Marshalling.ParseRef <PIF>(table, "transport_PIF");
     status        = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "status"));
     other_config  = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #20
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"));
 }
コード例 #21
0
ファイル: VIF_metrics.cs プロジェクト: ryu2048/xenadmin
 /// <summary>
 /// Creates a new VIF_metrics from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VIF_metrics(Hashtable table)
 {
     uuid         = Marshalling.ParseString(table, "uuid");
     io_read_kbs  = Marshalling.ParseDouble(table, "io_read_kbs");
     io_write_kbs = Marshalling.ParseDouble(table, "io_write_kbs");
     last_updated = Marshalling.ParseDateTime(table, "last_updated");
     other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #22
0
 /// <summary>
 /// Creates a new USB_group from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public USB_group(Hashtable table)
 {
     uuid             = Marshalling.ParseString(table, "uuid");
     name_label       = Marshalling.ParseString(table, "name_label");
     name_description = Marshalling.ParseString(table, "name_description");
     PUSBs            = Marshalling.ParseSetRef <PUSB>(table, "PUSBs");
     VUSBs            = Marshalling.ParseSetRef <VUSB>(table, "VUSBs");
     other_config     = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #23
0
ファイル: VGPU.cs プロジェクト: heiden-deng/xenadmin
 /// <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"));
 }
コード例 #24
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"));
 }
コード例 #25
0
ファイル: PBD.cs プロジェクト: hl10502/XenCenter
 /// <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"));
 }
コード例 #26
0
 /// <summary>
 /// Creates a new GPU_group from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public GPU_group(Hashtable table)
 {
     uuid             = Marshalling.ParseString(table, "uuid");
     name_label       = Marshalling.ParseString(table, "name_label");
     name_description = Marshalling.ParseString(table, "name_description");
     PGPUs            = Marshalling.ParseSetRef <PGPU>(table, "PGPUs");
     VGPUs            = Marshalling.ParseSetRef <VGPU>(table, "VGPUs");
     GPU_types        = Marshalling.ParseStringArray(table, "GPU_types");
     other_config     = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
 }
コード例 #27
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");
 }
コード例 #28
0
ファイル: PIF_metrics.cs プロジェクト: ywscr/xenadmin
 /// <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"));
     }
 }
コード例 #29
0
ファイル: Host_cpu.cs プロジェクト: xueqingz/xenadmin
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Host_cpu
 /// 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("number"))
     {
         number = Marshalling.ParseLong(table, "number");
     }
     if (table.ContainsKey("vendor"))
     {
         vendor = Marshalling.ParseString(table, "vendor");
     }
     if (table.ContainsKey("speed"))
     {
         speed = Marshalling.ParseLong(table, "speed");
     }
     if (table.ContainsKey("modelname"))
     {
         modelname = Marshalling.ParseString(table, "modelname");
     }
     if (table.ContainsKey("family"))
     {
         family = Marshalling.ParseLong(table, "family");
     }
     if (table.ContainsKey("model"))
     {
         model = Marshalling.ParseLong(table, "model");
     }
     if (table.ContainsKey("stepping"))
     {
         stepping = Marshalling.ParseString(table, "stepping");
     }
     if (table.ContainsKey("flags"))
     {
         flags = Marshalling.ParseString(table, "flags");
     }
     if (table.ContainsKey("features"))
     {
         features = Marshalling.ParseString(table, "features");
     }
     if (table.ContainsKey("utilisation"))
     {
         utilisation = Marshalling.ParseDouble(table, "utilisation");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
コード例 #30
0
ファイル: Bond.cs プロジェクト: ryu2048/xenadmin
 /// <summary>
 /// Creates a new Bond from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Bond(Hashtable table)
 {
     uuid          = Marshalling.ParseString(table, "uuid");
     master        = Marshalling.ParseRef <PIF>(table, "master");
     slaves        = Marshalling.ParseSetRef <PIF>(table, "slaves");
     other_config  = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     primary_slave = Marshalling.ParseRef <PIF>(table, "primary_slave");
     mode          = (bond_mode)Helper.EnumParseDefault(typeof(bond_mode), Marshalling.ParseString(table, "mode"));
     properties    = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "properties"));
     links_up      = Marshalling.ParseLong(table, "links_up");
 }