Ejemplo n.º 1
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.º 2
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.º 3
0
 /// <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"));
 }
Ejemplo n.º 4
0
 /// <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"));
     }
 }
Ejemplo n.º 5
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.º 6
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.º 7
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("pending_forget"))
     {
         pending_forget = Marshalling.ParseStringArray(table, "pending_forget");
     }
     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.ParseDouble(table, "token_timeout");
     }
     if (table.ContainsKey("token_timeout_coefficient"))
     {
         token_timeout_coefficient = Marshalling.ParseDouble(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.º 8
0
 /// <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"));
 }
Ejemplo n.º 9
0
 /// <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"));
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Creates a new Task from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Task(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 <task_allowed_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
     current_operations = Maps.convert_from_proxy_string_task_allowed_operations(Marshalling.ParseHashTable(table, "current_operations"));
     created            = Marshalling.ParseDateTime(table, "created");
     finished           = Marshalling.ParseDateTime(table, "finished");
     status             = (task_status_type)Helper.EnumParseDefault(typeof(task_status_type), Marshalling.ParseString(table, "status"));
     resident_on        = Marshalling.ParseRef <Host>(table, "resident_on");
     progress           = Marshalling.ParseDouble(table, "progress");
     type               = Marshalling.ParseString(table, "type");
     result             = Marshalling.ParseString(table, "result");
     error_info         = Marshalling.ParseStringArray(table, "error_info");
     other_config       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     subtask_of         = Marshalling.ParseRef <Task>(table, "subtask_of");
     subtasks           = Marshalling.ParseSetRef <Task>(table, "subtasks");
 }
Ejemplo n.º 11
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VBD_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("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.º 12
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Task
 /// 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("allowed_operations"))
     {
         allowed_operations = Helper.StringArrayToEnumList <task_allowed_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
     }
     if (table.ContainsKey("current_operations"))
     {
         current_operations = Maps.convert_from_proxy_string_task_allowed_operations(Marshalling.ParseHashTable(table, "current_operations"));
     }
     if (table.ContainsKey("created"))
     {
         created = Marshalling.ParseDateTime(table, "created");
     }
     if (table.ContainsKey("finished"))
     {
         finished = Marshalling.ParseDateTime(table, "finished");
     }
     if (table.ContainsKey("status"))
     {
         status = (task_status_type)Helper.EnumParseDefault(typeof(task_status_type), Marshalling.ParseString(table, "status"));
     }
     if (table.ContainsKey("resident_on"))
     {
         resident_on = Marshalling.ParseRef <Host>(table, "resident_on");
     }
     if (table.ContainsKey("progress"))
     {
         progress = Marshalling.ParseDouble(table, "progress");
     }
     if (table.ContainsKey("type"))
     {
         type = Marshalling.ParseString(table, "type");
     }
     if (table.ContainsKey("result"))
     {
         result = Marshalling.ParseString(table, "result");
     }
     if (table.ContainsKey("error_info"))
     {
         error_info = Marshalling.ParseStringArray(table, "error_info");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
     if (table.ContainsKey("subtask_of"))
     {
         subtask_of = Marshalling.ParseRef <Task>(table, "subtask_of");
     }
     if (table.ContainsKey("subtasks"))
     {
         subtasks = Marshalling.ParseSetRef <Task>(table, "subtasks");
     }
     if (table.ContainsKey("backtrace"))
     {
         backtrace = Marshalling.ParseString(table, "backtrace");
     }
 }