internal void UpdateFromProxy(Proxy_PCI proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; class_name = proxy.class_name == null ? null : (string)proxy.class_name; vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name; device_name = proxy.device_name == null ? null : (string)proxy.device_name; host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host); pci_id = proxy.pci_id == null ? null : (string)proxy.pci_id; dependencies = proxy.dependencies == null ? null : XenRef <PCI> .Create(proxy.dependencies); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); subsystem_vendor_name = proxy.subsystem_vendor_name == null ? null : (string)proxy.subsystem_vendor_name; subsystem_device_name = proxy.subsystem_device_name == null ? null : (string)proxy.subsystem_device_name; }
internal void UpdateFrom(Proxy_Bond proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; master = proxy.master == null ? null : XenRef <PIF> .Create(proxy.master); slaves = proxy.slaves == null ? null : XenRef <PIF> .Create(proxy.slaves); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); primary_slave = proxy.primary_slave == null ? null : XenRef <PIF> .Create(proxy.primary_slave); mode = proxy.mode == null ? (bond_mode)0 : (bond_mode)Helper.EnumParseDefault(typeof(bond_mode), (string)proxy.mode); properties = proxy.properties == null ? null : Maps.convert_from_proxy_string_string(proxy.properties); links_up = proxy.links_up == null ? 0 : long.Parse(proxy.links_up); auto_update_mac = (bool)proxy.auto_update_mac; }
/// <summary> /// Given a Hashtable with field-value pairs, it updates the fields of this Secret /// 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("value")) { value = Marshalling.ParseString(table, "value"); } if (table.ContainsKey("other_config")) { other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); } }
/// <summary> /// Creates a new VM_metrics from a Hashtable. /// </summary> /// <param name="table"></param> public VM_metrics(Hashtable table) { uuid = Marshalling.ParseString(table, "uuid"); memory_actual = Marshalling.ParseLong(table, "memory_actual"); VCPUs_number = Marshalling.ParseLong(table, "VCPUs_number"); VCPUs_utilisation = Maps.convert_from_proxy_long_double(Marshalling.ParseHashTable(table, "VCPUs_utilisation")); VCPUs_CPU = Maps.convert_from_proxy_long_long(Marshalling.ParseHashTable(table, "VCPUs_CPU")); VCPUs_params = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "VCPUs_params")); VCPUs_flags = Maps.convert_from_proxy_long_string_array(Marshalling.ParseHashTable(table, "VCPUs_flags")); state = Marshalling.ParseStringArray(table, "state"); start_time = Marshalling.ParseDateTime(table, "start_time"); install_time = Marshalling.ParseDateTime(table, "install_time"); last_updated = Marshalling.ParseDateTime(table, "last_updated"); other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); }
internal void UpdateFromProxy(Proxy_VM_metrics proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; memory_actual = proxy.memory_actual == null ? 0 : long.Parse((string)proxy.memory_actual); VCPUs_number = proxy.VCPUs_number == null ? 0 : long.Parse((string)proxy.VCPUs_number); VCPUs_utilisation = proxy.VCPUs_utilisation == null ? null : Maps.convert_from_proxy_long_double(proxy.VCPUs_utilisation); VCPUs_CPU = proxy.VCPUs_CPU == null ? null : Maps.convert_from_proxy_long_long(proxy.VCPUs_CPU); VCPUs_params = proxy.VCPUs_params == null ? null : Maps.convert_from_proxy_string_string(proxy.VCPUs_params); VCPUs_flags = proxy.VCPUs_flags == null ? null : Maps.convert_from_proxy_long_string_array(proxy.VCPUs_flags); state = proxy.state == null ? new string[] {} : (string [])proxy.state; start_time = proxy.start_time; install_time = proxy.install_time; last_updated = proxy.last_updated; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
internal void UpdateFrom(Proxy_Pool_patch proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; name_label = proxy.name_label == null ? null : proxy.name_label; name_description = proxy.name_description == null ? null : proxy.name_description; version = proxy.version == null ? null : proxy.version; size = proxy.size == null ? 0 : long.Parse(proxy.size); pool_applied = (bool)proxy.pool_applied; host_patches = proxy.host_patches == null ? null : XenRef <Host_patch> .Create(proxy.host_patches); after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList <after_apply_guidance>(proxy.after_apply_guidance); pool_update = proxy.pool_update == null ? null : XenRef <Pool_update> .Create(proxy.pool_update); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
internal void UpdateFromProxy(Proxy_Host_patch proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; name_label = proxy.name_label == null ? null : (string)proxy.name_label; name_description = proxy.name_description == null ? null : (string)proxy.name_description; version = proxy.version == null ? null : (string)proxy.version; host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host); applied = (bool)proxy.applied; timestamp_applied = proxy.timestamp_applied; size = proxy.size == null ? 0 : long.Parse((string)proxy.size); pool_patch = proxy.pool_patch == null ? null : XenRef <Pool_patch> .Create(proxy.pool_patch); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
/// <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"); compatibility_metadata = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "compatibility_metadata")); }
/// <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"); network_paths_optimized = Marshalling.ParseBool(table, "network_paths_optimized"); storage_paths_optimized = Marshalling.ParseBool(table, "storage_paths_optimized"); 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"); }
/// <summary> /// Creates a new Network from a Hashtable. /// </summary> /// <param name="table"></param> public Network(Hashtable table) { uuid = Marshalling.ParseString(table, "uuid"); name_label = Marshalling.ParseString(table, "name_label"); name_description = Marshalling.ParseString(table, "name_description"); allowed_operations = Helper.StringArrayToEnumList <network_operations>(Marshalling.ParseStringArray(table, "allowed_operations")); current_operations = Maps.convert_from_proxy_string_network_operations(Marshalling.ParseHashTable(table, "current_operations")); VIFs = Marshalling.ParseSetRef <VIF>(table, "VIFs"); PIFs = Marshalling.ParseSetRef <PIF>(table, "PIFs"); MTU = Marshalling.ParseLong(table, "MTU"); other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); bridge = Marshalling.ParseString(table, "bridge"); blobs = Maps.convert_from_proxy_string_XenRefBlob(Marshalling.ParseHashTable(table, "blobs")); tags = Marshalling.ParseStringArray(table, "tags"); default_locking_mode = (network_default_locking_mode)Helper.EnumParseDefault(typeof(network_default_locking_mode), Marshalling.ParseString(table, "default_locking_mode")); }
internal void UpdateFromProxy(Proxy_Pool_update proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; name_label = proxy.name_label == null ? null : (string)proxy.name_label; name_description = proxy.name_description == null ? null : (string)proxy.name_description; version = proxy.version == null ? null : (string)proxy.version; installation_size = proxy.installation_size == null ? 0 : long.Parse((string)proxy.installation_size); key = proxy.key == null ? null : (string)proxy.key; after_apply_guidance = proxy.after_apply_guidance == null ? null : Helper.StringArrayToEnumList <update_after_apply_guidance>(proxy.after_apply_guidance); vdi = proxy.vdi == null ? null : XenRef <VDI> .Create(proxy.vdi); hosts = proxy.hosts == null ? null : XenRef <Host> .Create(proxy.hosts); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); enforce_homogeneity = (bool)proxy.enforce_homogeneity; }
/// <summary> /// Creates a new SM from a Hashtable. /// </summary> /// <param name="table"></param> public SM(Hashtable table) { uuid = Marshalling.ParseString(table, "uuid"); name_label = Marshalling.ParseString(table, "name_label"); name_description = Marshalling.ParseString(table, "name_description"); type = Marshalling.ParseString(table, "type"); vendor = Marshalling.ParseString(table, "vendor"); copyright = Marshalling.ParseString(table, "copyright"); version = Marshalling.ParseString(table, "version"); required_api_version = Marshalling.ParseString(table, "required_api_version"); configuration = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "configuration")); capabilities = Marshalling.ParseStringArray(table, "capabilities"); features = Maps.convert_from_proxy_string_long(Marshalling.ParseHashTable(table, "features")); other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); driver_filename = Marshalling.ParseString(table, "driver_filename"); }
internal void UpdateFromProxy(Proxy_VM_guest_metrics proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; os_version = proxy.os_version == null ? null : Maps.convert_from_proxy_string_string(proxy.os_version); PV_drivers_version = proxy.PV_drivers_version == null ? null : Maps.convert_from_proxy_string_string(proxy.PV_drivers_version); PV_drivers_up_to_date = (bool)proxy.PV_drivers_up_to_date; network_paths_optimized = (bool)proxy.network_paths_optimized; storage_paths_optimized = (bool)proxy.storage_paths_optimized; memory = proxy.memory == null ? null : Maps.convert_from_proxy_string_string(proxy.memory); disks = proxy.disks == null ? null : Maps.convert_from_proxy_string_string(proxy.disks); networks = proxy.networks == null ? null : Maps.convert_from_proxy_string_string(proxy.networks); other = proxy.other == null ? null : Maps.convert_from_proxy_string_string(proxy.other); last_updated = proxy.last_updated; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); live = (bool)proxy.live; }
internal void UpdateFromProxy(Proxy_SM proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; name_label = proxy.name_label == null ? null : (string)proxy.name_label; name_description = proxy.name_description == null ? null : (string)proxy.name_description; type = proxy.type == null ? null : (string)proxy.type; vendor = proxy.vendor == null ? null : (string)proxy.vendor; copyright = proxy.copyright == null ? null : (string)proxy.copyright; version = proxy.version == null ? null : (string)proxy.version; required_api_version = proxy.required_api_version == null ? null : (string)proxy.required_api_version; configuration = proxy.configuration == null ? null : Maps.convert_from_proxy_string_string(proxy.configuration); capabilities = proxy.capabilities == null ? new string[] {} : (string [])proxy.capabilities; features = proxy.features == null ? null : Maps.convert_from_proxy_string_long(proxy.features); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); driver_filename = proxy.driver_filename == null ? null : (string)proxy.driver_filename; }
/// <summary> /// Creates a new Host_cpu from a Hashtable. /// </summary> /// <param name="table"></param> public Host_cpu(Hashtable table) { uuid = Marshalling.ParseString(table, "uuid"); host = Marshalling.ParseRef <Host>(table, "host"); number = Marshalling.ParseLong(table, "number"); vendor = Marshalling.ParseString(table, "vendor"); speed = Marshalling.ParseLong(table, "speed"); modelname = Marshalling.ParseString(table, "modelname"); family = Marshalling.ParseLong(table, "family"); model = Marshalling.ParseLong(table, "model"); stepping = Marshalling.ParseString(table, "stepping"); flags = Marshalling.ParseString(table, "flags"); features = Marshalling.ParseString(table, "features"); utilisation = Marshalling.ParseDouble(table, "utilisation"); other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); }
internal void UpdateFromProxy(Proxy_VGPU proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; VM = proxy.VM == null ? null : XenRef <VM> .Create(proxy.VM); GPU_group = proxy.GPU_group == null ? null : XenRef <GPU_group> .Create(proxy.GPU_group); device = proxy.device == null ? null : (string)proxy.device; currently_attached = (bool)proxy.currently_attached; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); type = proxy.type == null ? null : XenRef <VGPU_type> .Create(proxy.type); resident_on = proxy.resident_on == null ? null : XenRef <PGPU> .Create(proxy.resident_on); scheduled_to_be_resident_on = proxy.scheduled_to_be_resident_on == null ? null : XenRef <PGPU> .Create(proxy.scheduled_to_be_resident_on); }
internal void UpdateFromProxy(Proxy_GPU_group proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; name_label = proxy.name_label == null ? null : (string)proxy.name_label; name_description = proxy.name_description == null ? null : (string)proxy.name_description; PGPUs = proxy.PGPUs == null ? null : XenRef <PGPU> .Create(proxy.PGPUs); VGPUs = proxy.VGPUs == null ? null : XenRef <VGPU> .Create(proxy.VGPUs); GPU_types = proxy.GPU_types == null ? new string[] {} : (string [])proxy.GPU_types; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); allocation_algorithm = proxy.allocation_algorithm == null ? (allocation_algorithm)0 : (allocation_algorithm)Helper.EnumParseDefault(typeof(allocation_algorithm), (string)proxy.allocation_algorithm); 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); }
internal void UpdateFromProxy(Proxy_PIF_metrics proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; io_read_kbs = Convert.ToDouble(proxy.io_read_kbs); io_write_kbs = Convert.ToDouble(proxy.io_write_kbs); carrier = (bool)proxy.carrier; vendor_id = proxy.vendor_id == null ? null : (string)proxy.vendor_id; vendor_name = proxy.vendor_name == null ? null : (string)proxy.vendor_name; device_id = proxy.device_id == null ? null : (string)proxy.device_id; device_name = proxy.device_name == null ? null : (string)proxy.device_name; speed = proxy.speed == null ? 0 : long.Parse((string)proxy.speed); duplex = (bool)proxy.duplex; pci_bus_path = proxy.pci_bus_path == null ? null : (string)proxy.pci_bus_path; last_updated = proxy.last_updated; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
/// <summary> /// Creates a new PIF_metrics from a Hashtable. /// </summary> /// <param name="table"></param> public PIF_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"); carrier = Marshalling.ParseBool(table, "carrier"); vendor_id = Marshalling.ParseString(table, "vendor_id"); vendor_name = Marshalling.ParseString(table, "vendor_name"); device_id = Marshalling.ParseString(table, "device_id"); device_name = Marshalling.ParseString(table, "device_name"); speed = Marshalling.ParseLong(table, "speed"); duplex = Marshalling.ParseBool(table, "duplex"); pci_bus_path = Marshalling.ParseString(table, "pci_bus_path"); last_updated = Marshalling.ParseDateTime(table, "last_updated"); other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); }
/// <summary> /// Creates a new PUSB from a Hashtable. /// </summary> /// <param name="table"></param> public PUSB(Hashtable table) { uuid = Marshalling.ParseString(table, "uuid"); USB_group = Marshalling.ParseRef <USB_group>(table, "USB_group"); host = Marshalling.ParseRef <Host>(table, "host"); path = Marshalling.ParseString(table, "path"); vendor_id = Marshalling.ParseString(table, "vendor_id"); vendor_desc = Marshalling.ParseString(table, "vendor_desc"); product_id = Marshalling.ParseString(table, "product_id"); product_desc = Marshalling.ParseString(table, "product_desc"); serial = Marshalling.ParseString(table, "serial"); version = Marshalling.ParseString(table, "version"); description = Marshalling.ParseString(table, "description"); passthrough_enabled = Marshalling.ParseBool(table, "passthrough_enabled"); other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); }
internal void UpdateFromProxy(Proxy_Cluster proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; cluster_hosts = proxy.cluster_hosts == null ? null : XenRef <Cluster_host> .Create(proxy.cluster_hosts); pending_forget = proxy.pending_forget == null ? new string[] {} : (string [])proxy.pending_forget; cluster_token = proxy.cluster_token == null ? null : proxy.cluster_token; cluster_stack = proxy.cluster_stack == null ? null : proxy.cluster_stack; allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList <cluster_operation>(proxy.allowed_operations); current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_cluster_operation(proxy.current_operations); pool_auto_join = (bool)proxy.pool_auto_join; token_timeout = Convert.ToDouble(proxy.token_timeout); token_timeout_coefficient = Convert.ToDouble(proxy.token_timeout_coefficient); cluster_config = proxy.cluster_config == null ? null : Maps.convert_from_proxy_string_string(proxy.cluster_config); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
/// <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"); } }
/// <summary> /// Given a Hashtable with field-value pairs, it updates the fields of this Pool_update /// 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("version")) { version = Marshalling.ParseString(table, "version"); } if (table.ContainsKey("installation_size")) { installation_size = Marshalling.ParseLong(table, "installation_size"); } if (table.ContainsKey("key")) { key = Marshalling.ParseString(table, "key"); } if (table.ContainsKey("after_apply_guidance")) { after_apply_guidance = Helper.StringArrayToEnumList <update_after_apply_guidance>(Marshalling.ParseStringArray(table, "after_apply_guidance")); } if (table.ContainsKey("vdi")) { vdi = Marshalling.ParseRef <VDI>(table, "vdi"); } if (table.ContainsKey("hosts")) { hosts = Marshalling.ParseSetRef <Host>(table, "hosts"); } if (table.ContainsKey("other_config")) { other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); } if (table.ContainsKey("enforce_homogeneity")) { enforce_homogeneity = Marshalling.ParseBool(table, "enforce_homogeneity"); } }
/// <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("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")); } }
/// <summary> /// Given a Hashtable with field-value pairs, it updates the fields of this PCI /// 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("class_name")) { class_name = Marshalling.ParseString(table, "class_name"); } if (table.ContainsKey("vendor_name")) { vendor_name = Marshalling.ParseString(table, "vendor_name"); } if (table.ContainsKey("device_name")) { device_name = Marshalling.ParseString(table, "device_name"); } if (table.ContainsKey("host")) { host = Marshalling.ParseRef <Host>(table, "host"); } if (table.ContainsKey("pci_id")) { pci_id = Marshalling.ParseString(table, "pci_id"); } if (table.ContainsKey("dependencies")) { dependencies = Marshalling.ParseSetRef <PCI>(table, "dependencies"); } if (table.ContainsKey("other_config")) { other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config")); } if (table.ContainsKey("subsystem_vendor_name")) { subsystem_vendor_name = Marshalling.ParseString(table, "subsystem_vendor_name"); } if (table.ContainsKey("subsystem_device_name")) { subsystem_device_name = Marshalling.ParseString(table, "subsystem_device_name"); } if (table.ContainsKey("driver_name")) { driver_name = Marshalling.ParseString(table, "driver_name"); } }
internal void UpdateFromProxy(Proxy_Cluster proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; cluster_hosts = proxy.cluster_hosts == null ? null : XenRef <Cluster_host> .Create(proxy.cluster_hosts); network = proxy.network == null ? null : XenRef <Network> .Create(proxy.network); cluster_token = proxy.cluster_token == null ? null : (string)proxy.cluster_token; cluster_stack = proxy.cluster_stack == null ? null : (string)proxy.cluster_stack; allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList <cluster_operation>(proxy.allowed_operations); current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_cluster_operation(proxy.current_operations); pool_auto_join = (bool)proxy.pool_auto_join; token_timeout = proxy.token_timeout == null ? 0 : long.Parse((string)proxy.token_timeout); token_timeout_coefficient = proxy.token_timeout_coefficient == null ? 0 : long.Parse((string)proxy.token_timeout_coefficient); cluster_config = proxy.cluster_config == null ? null : Maps.convert_from_proxy_string_string(proxy.cluster_config); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
internal void UpdateFrom(Proxy_VM_guest_metrics proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; os_version = proxy.os_version == null ? null : Maps.convert_from_proxy_string_string(proxy.os_version); PV_drivers_version = proxy.PV_drivers_version == null ? null : Maps.convert_from_proxy_string_string(proxy.PV_drivers_version); PV_drivers_up_to_date = (bool)proxy.PV_drivers_up_to_date; memory = proxy.memory == null ? null : Maps.convert_from_proxy_string_string(proxy.memory); disks = proxy.disks == null ? null : Maps.convert_from_proxy_string_string(proxy.disks); networks = proxy.networks == null ? null : Maps.convert_from_proxy_string_string(proxy.networks); other = proxy.other == null ? null : Maps.convert_from_proxy_string_string(proxy.other); last_updated = proxy.last_updated; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); live = (bool)proxy.live; can_use_hotplug_vbd = proxy.can_use_hotplug_vbd == null ? (tristate_type)0 : (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), (string)proxy.can_use_hotplug_vbd); can_use_hotplug_vif = proxy.can_use_hotplug_vif == null ? (tristate_type)0 : (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), (string)proxy.can_use_hotplug_vif); PV_drivers_detected = (bool)proxy.PV_drivers_detected; }
internal void UpdateFromProxy(Proxy_Host_cpu proxy) { uuid = proxy.uuid == null ? null : (string)proxy.uuid; host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host); number = proxy.number == null ? 0 : long.Parse((string)proxy.number); vendor = proxy.vendor == null ? null : (string)proxy.vendor; speed = proxy.speed == null ? 0 : long.Parse((string)proxy.speed); modelname = proxy.modelname == null ? null : (string)proxy.modelname; family = proxy.family == null ? 0 : long.Parse((string)proxy.family); model = proxy.model == null ? 0 : long.Parse((string)proxy.model); stepping = proxy.stepping == null ? null : (string)proxy.stepping; flags = proxy.flags == null ? null : (string)proxy.flags; features = proxy.features == null ? null : (string)proxy.features; utilisation = Convert.ToDouble(proxy.utilisation); other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }
/// <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"); can_use_hotplug_vbd = (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), Marshalling.ParseString(table, "can_use_hotplug_vbd")); can_use_hotplug_vif = (tristate_type)Helper.EnumParseDefault(typeof(tristate_type), Marshalling.ParseString(table, "can_use_hotplug_vif")); PV_drivers_detected = Marshalling.ParseBool(table, "PV_drivers_detected"); }
internal void UpdateFromProxy(Proxy_PUSB proxy) { uuid = proxy.uuid == null ? null : proxy.uuid; USB_group = proxy.USB_group == null ? null : XenRef <USB_group> .Create(proxy.USB_group); host = proxy.host == null ? null : XenRef <Host> .Create(proxy.host); path = proxy.path == null ? null : proxy.path; vendor_id = proxy.vendor_id == null ? null : proxy.vendor_id; vendor_desc = proxy.vendor_desc == null ? null : proxy.vendor_desc; product_id = proxy.product_id == null ? null : proxy.product_id; product_desc = proxy.product_desc == null ? null : proxy.product_desc; serial = proxy.serial == null ? null : proxy.serial; version = proxy.version == null ? null : proxy.version; description = proxy.description == null ? null : proxy.description; passthrough_enabled = (bool)proxy.passthrough_enabled; other_config = proxy.other_config == null ? null : Maps.convert_from_proxy_string_string(proxy.other_config); }