Beispiel #1
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"));
     }
 }
Beispiel #2
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Network_sriov
 /// 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("physical_PIF"))
     {
         physical_PIF = Marshalling.ParseRef <PIF>(table, "physical_PIF");
     }
     if (table.ContainsKey("logical_PIF"))
     {
         logical_PIF = Marshalling.ParseRef <PIF>(table, "logical_PIF");
     }
     if (table.ContainsKey("requires_reboot"))
     {
         requires_reboot = Marshalling.ParseBool(table, "requires_reboot");
     }
     if (table.ContainsKey("configuration_mode"))
     {
         configuration_mode = (sriov_configuration_mode)Helper.EnumParseDefault(typeof(sriov_configuration_mode), Marshalling.ParseString(table, "configuration_mode"));
     }
 }
Beispiel #3
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this VLAN
 /// 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("tagged_PIF"))
     {
         tagged_PIF = Marshalling.ParseRef <PIF>(table, "tagged_PIF");
     }
     if (table.ContainsKey("untagged_PIF"))
     {
         untagged_PIF = Marshalling.ParseRef <PIF>(table, "untagged_PIF");
     }
     if (table.ContainsKey("tag"))
     {
         tag = Marshalling.ParseLong(table, "tag");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Beispiel #4
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this PVS_proxy
 /// 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("site"))
     {
         site = Marshalling.ParseRef <PVS_site>(table, "site");
     }
     if (table.ContainsKey("VIF"))
     {
         VIF = Marshalling.ParseRef <VIF>(table, "VIF");
     }
     if (table.ContainsKey("currently_attached"))
     {
         currently_attached = Marshalling.ParseBool(table, "currently_attached");
     }
     if (table.ContainsKey("status"))
     {
         status = (pvs_proxy_status)Helper.EnumParseDefault(typeof(pvs_proxy_status), Marshalling.ParseString(table, "status"));
     }
 }
Beispiel #5
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this Console
 /// 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("protocol"))
     {
         protocol = (console_protocol)Helper.EnumParseDefault(typeof(console_protocol), Marshalling.ParseString(table, "protocol"));
     }
     if (table.ContainsKey("location"))
     {
         location = Marshalling.ParseString(table, "location");
     }
     if (table.ContainsKey("VM"))
     {
         VM = Marshalling.ParseRef <VM>(table, "VM");
     }
     if (table.ContainsKey("other_config"))
     {
         other_config = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "other_config"));
     }
 }
Beispiel #6
0
 /// <summary>
 /// Given a Hashtable with field-value pairs, it updates the fields of this PVS_server
 /// 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("addresses"))
     {
         addresses = Marshalling.ParseStringArray(table, "addresses");
     }
     if (table.ContainsKey("first_port"))
     {
         first_port = Marshalling.ParseLong(table, "first_port");
     }
     if (table.ContainsKey("last_port"))
     {
         last_port = Marshalling.ParseLong(table, "last_port");
     }
     if (table.ContainsKey("site"))
     {
         site = Marshalling.ParseRef <PVS_site>(table, "site");
     }
 }
Beispiel #7
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"));
     }
 }
Beispiel #8
0
 /// <summary>
 /// Creates a new VIF from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VIF(Hashtable table)
 {
     uuid = Marshalling.ParseString(table, "uuid");
     allowed_operations = Helper.StringArrayToEnumList <vif_operations>(Marshalling.ParseStringArray(table, "allowed_operations"));
     current_operations = Maps.convert_from_proxy_string_vif_operations(Marshalling.ParseHashTable(table, "current_operations"));
     device             = Marshalling.ParseString(table, "device");
     network            = Marshalling.ParseRef <Network>(table, "network");
     VM                       = Marshalling.ParseRef <VM>(table, "VM");
     MAC                      = Marshalling.ParseString(table, "MAC");
     MTU                      = Marshalling.ParseLong(table, "MTU");
     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 <VIF_metrics>(table, "metrics");
     MAC_autogenerated        = Marshalling.ParseBool(table, "MAC_autogenerated");
     locking_mode             = (vif_locking_mode)Helper.EnumParseDefault(typeof(vif_locking_mode), Marshalling.ParseString(table, "locking_mode"));
     ipv4_allowed             = Marshalling.ParseStringArray(table, "ipv4_allowed");
     ipv6_allowed             = Marshalling.ParseStringArray(table, "ipv6_allowed");
 }
Beispiel #9
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");
     }
 }
Beispiel #10
0
 /// <summary>
 /// Creates a new VTPM from a Hashtable.
 /// </summary>
 /// <param name="table"></param>
 public VTPM(Hashtable table)
 {
     uuid    = Marshalling.ParseString(table, "uuid");
     VM      = Marshalling.ParseRef <VM>(table, "VM");
     backend = Marshalling.ParseRef <VM>(table, "backend");
 }