Ejemplo n.º 1
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.º 2
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Message
 /// 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"))
     {
         name = Marshalling.ParseString(table, "name");
     }
     if (table.ContainsKey("priority"))
     {
         priority = Marshalling.ParseLong(table, "priority");
     }
     if (table.ContainsKey("cls"))
     {
         cls = (cls)Helper.EnumParseDefault(typeof(cls), Marshalling.ParseString(table, "cls"));
     }
     if (table.ContainsKey("obj_uuid"))
     {
         obj_uuid = Marshalling.ParseString(table, "obj_uuid");
     }
     if (table.ContainsKey("timestamp"))
     {
         timestamp = Marshalling.ParseDateTime(table, "timestamp");
     }
     if (table.ContainsKey("body"))
     {
         body = Marshalling.ParseString(table, "body");
     }
 }
Ejemplo n.º 3
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.º 4
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.º 5
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"));
 }
Ejemplo n.º 6
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.º 7
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.º 8
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.º 9
0
 /// <summary>
 /// Creates a new Message from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public Message(Hashtable table)
 {
     uuid      = Marshalling.ParseString(table, "uuid");
     name      = Marshalling.ParseString(table, "name");
     priority  = Marshalling.ParseLong(table, "priority");
     cls       = (cls)Helper.EnumParseDefault(typeof(cls), Marshalling.ParseString(table, "cls"));
     obj_uuid  = Marshalling.ParseString(table, "obj_uuid");
     timestamp = Marshalling.ParseDateTime(table, "timestamp");
     body      = Marshalling.ParseString(table, "body");
 }
Ejemplo n.º 10
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.º 11
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.º 12
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.º 13
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");
 }
Ejemplo n.º 14
0
 /// <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"));
 }
Ejemplo n.º 15
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.º 16
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");
     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");
 }
Ejemplo n.º 17
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.º 18
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VMSS
 /// 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("type"))
     {
         type = (vmss_type)Helper.EnumParseDefault(typeof(vmss_type), Marshalling.ParseString(table, "type"));
     }
     if (table.ContainsKey("retained_snapshots"))
     {
         retained_snapshots = Marshalling.ParseLong(table, "retained_snapshots");
     }
     if (table.ContainsKey("frequency"))
     {
         frequency = (vmss_frequency)Helper.EnumParseDefault(typeof(vmss_frequency), Marshalling.ParseString(table, "frequency"));
     }
     if (table.ContainsKey("schedule"))
     {
         schedule = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "schedule"));
     }
     if (table.ContainsKey("last_run_time"))
     {
         last_run_time = Marshalling.ParseDateTime(table, "last_run_time");
     }
     if (table.ContainsKey("VMs"))
     {
         VMs = Marshalling.ParseSetRef <VM>(table, "VMs");
     }
 }
Ejemplo n.º 19
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Host_patch
 /// 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("host"))
     {
         host = Marshalling.ParseRef <Host>(table, "host");
     }
     if (table.ContainsKey("applied"))
     {
         applied = Marshalling.ParseBool(table, "applied");
     }
     if (table.ContainsKey("timestamp_applied"))
     {
         timestamp_applied = Marshalling.ParseDateTime(table, "timestamp_applied");
     }
     if (table.ContainsKey("size"))
     {
         size = Marshalling.ParseLong(table, "size");
     }
     if (table.ContainsKey("pool_patch"))
     {
         pool_patch = Marshalling.ParseRef <Pool_patch>(table, "pool_patch");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 20
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Certificate
 /// 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("not_before"))
     {
         not_before = Marshalling.ParseDateTime(table, "not_before");
     }
     if (table.ContainsKey("not_after"))
     {
         not_after = Marshalling.ParseDateTime(table, "not_after");
     }
     if (table.ContainsKey("fingerprint"))
     {
         fingerprint = Marshalling.ParseString(table, "fingerprint");
     }
 }
Ejemplo n.º 21
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.º 22
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Host_crashdump
 /// 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("timestamp"))
     {
         timestamp = Marshalling.ParseDateTime(table, "timestamp");
     }
     if (table.ContainsKey("size"))
     {
         size = Marshalling.ParseLong(table, "size");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Ejemplo n.º 23
0
 /// <summary>
 /// Creates a new VMPP from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VMPP(Hashtable table)
 {
     uuid                   = Marshalling.ParseString(table, "uuid");
     name_label             = Marshalling.ParseString(table, "name_label");
     name_description       = Marshalling.ParseString(table, "name_description");
     is_policy_enabled      = Marshalling.ParseBool(table, "is_policy_enabled");
     backup_type            = (vmpp_backup_type)Helper.EnumParseDefault(typeof(vmpp_backup_type), Marshalling.ParseString(table, "backup_type"));
     backup_retention_value = Marshalling.ParseLong(table, "backup_retention_value");
     backup_frequency       = (vmpp_backup_frequency)Helper.EnumParseDefault(typeof(vmpp_backup_frequency), Marshalling.ParseString(table, "backup_frequency"));
     backup_schedule        = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "backup_schedule"));
     is_backup_running      = Marshalling.ParseBool(table, "is_backup_running");
     backup_last_run_time   = Marshalling.ParseDateTime(table, "backup_last_run_time");
     archive_target_type    = (vmpp_archive_target_type)Helper.EnumParseDefault(typeof(vmpp_archive_target_type), Marshalling.ParseString(table, "archive_target_type"));
     archive_target_config  = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "archive_target_config"));
     archive_frequency      = (vmpp_archive_frequency)Helper.EnumParseDefault(typeof(vmpp_archive_frequency), Marshalling.ParseString(table, "archive_frequency"));
     archive_schedule       = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "archive_schedule"));
     is_archive_running     = Marshalling.ParseBool(table, "is_archive_running");
     archive_last_run_time  = Marshalling.ParseDateTime(table, "archive_last_run_time");
     VMs = Marshalling.ParseSetRef <VM>(table, "VMs");
     is_alarm_enabled = Marshalling.ParseBool(table, "is_alarm_enabled");
     alarm_config     = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "alarm_config"));
     recent_alerts    = Marshalling.ParseStringArray(table, "recent_alerts");
 }
Ejemplo n.º 24
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VM_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_actual"))
     {
         memory_actual = Marshalling.ParseLong(table, "memory_actual");
     }
     if (table.ContainsKey("VCPUs_number"))
     {
         VCPUs_number = Marshalling.ParseLong(table, "VCPUs_number");
     }
     if (table.ContainsKey("VCPUs_utilisation"))
     {
         VCPUs_utilisation = Maps.convert_from_proxy_long_double(Marshalling.ParseHashTable(table, "VCPUs_utilisation"));
     }
     if (table.ContainsKey("VCPUs_CPU"))
     {
         VCPUs_CPU = Maps.convert_from_proxy_long_long(Marshalling.ParseHashTable(table, "VCPUs_CPU"));
     }
     if (table.ContainsKey("VCPUs_params"))
     {
         VCPUs_params = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "VCPUs_params"));
     }
     if (table.ContainsKey("VCPUs_flags"))
     {
         VCPUs_flags = Maps.convert_from_proxy_long_string_array(Marshalling.ParseHashTable(table, "VCPUs_flags"));
     }
     if (table.ContainsKey("state"))
     {
         state = Marshalling.ParseStringArray(table, "state");
     }
     if (table.ContainsKey("start_time"))
     {
         start_time = Marshalling.ParseDateTime(table, "start_time");
     }
     if (table.ContainsKey("install_time"))
     {
         install_time = Marshalling.ParseDateTime(table, "install_time");
     }
     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("hvm"))
     {
         hvm = Marshalling.ParseBool(table, "hvm");
     }
     if (table.ContainsKey("nested_virt"))
     {
         nested_virt = Marshalling.ParseBool(table, "nested_virt");
     }
     if (table.ContainsKey("nomigrate"))
     {
         nomigrate = Marshalling.ParseBool(table, "nomigrate");
     }
     if (table.ContainsKey("current_domain_type"))
     {
         current_domain_type = (domain_type)Helper.EnumParseDefault(typeof(domain_type), Marshalling.ParseString(table, "current_domain_type"));
     }
 }
Ejemplo n.º 25
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");
     }
 }