diff --git a/XenModel/XenAPI/Pool.cs b/XenModel/XenAPI/Pool.cs index 62b16a58c..79400448f 100644 --- a/XenModel/XenAPI/Pool.cs +++ b/XenModel/XenAPI/Pool.cs @@ -78,7 +78,8 @@ namespace XenAPI List> metadata_VDIs, string ha_cluster_stack, List allowed_operations, - Dictionary current_operations) + Dictionary current_operations, + Dictionary cpu_info) { this.uuid = uuid; this.name_label = name_label; @@ -111,6 +112,7 @@ namespace XenAPI this.ha_cluster_stack = ha_cluster_stack; this.allowed_operations = allowed_operations; this.current_operations = current_operations; + this.cpu_info = cpu_info; } /// @@ -155,6 +157,7 @@ namespace XenAPI ha_cluster_stack = update.ha_cluster_stack; allowed_operations = update.allowed_operations; current_operations = update.current_operations; + cpu_info = update.cpu_info; } internal void UpdateFromProxy(Proxy_Pool proxy) @@ -190,6 +193,7 @@ namespace XenAPI ha_cluster_stack = proxy.ha_cluster_stack == null ? null : (string)proxy.ha_cluster_stack; allowed_operations = proxy.allowed_operations == null ? null : Helper.StringArrayToEnumList(proxy.allowed_operations); current_operations = proxy.current_operations == null ? null : Maps.convert_from_proxy_string_pool_allowed_operations(proxy.current_operations); + cpu_info = proxy.cpu_info == null ? null : Maps.convert_from_proxy_string_string(proxy.cpu_info); } public Proxy_Pool ToProxy() @@ -226,6 +230,7 @@ namespace XenAPI result_.ha_cluster_stack = (ha_cluster_stack != null) ? ha_cluster_stack : ""; result_.allowed_operations = (allowed_operations != null) ? Helper.ObjectListToStringArray(allowed_operations) : new string[] {}; result_.current_operations = Maps.convert_to_proxy_string_pool_allowed_operations(current_operations); + result_.cpu_info = Maps.convert_to_proxy_string_string(cpu_info); return result_; } @@ -266,6 +271,7 @@ namespace XenAPI ha_cluster_stack = Marshalling.ParseString(table, "ha_cluster_stack"); allowed_operations = Helper.StringArrayToEnumList(Marshalling.ParseStringArray(table, "allowed_operations")); current_operations = Maps.convert_from_proxy_string_pool_allowed_operations(Marshalling.ParseHashTable(table, "current_operations")); + cpu_info = Maps.convert_from_proxy_string_string(Marshalling.ParseHashTable(table, "cpu_info")); } public bool DeepEquals(Pool other, bool ignoreCurrentOperations) @@ -307,7 +313,8 @@ namespace XenAPI Helper.AreEqual2(this._restrictions, other._restrictions) && Helper.AreEqual2(this._metadata_VDIs, other._metadata_VDIs) && Helper.AreEqual2(this._ha_cluster_stack, other._ha_cluster_stack) && - Helper.AreEqual2(this._allowed_operations, other._allowed_operations); + Helper.AreEqual2(this._allowed_operations, other._allowed_operations) && + Helper.AreEqual2(this._cpu_info, other._cpu_info); } public override string SaveChanges(Session session, string opaqueRef, Pool server) @@ -734,6 +741,17 @@ namespace XenAPI return Maps.convert_from_proxy_string_pool_allowed_operations(session.proxy.pool_get_current_operations(session.uuid, (_pool != null) ? _pool : "").parse()); } + /// + /// Get the cpu_info field of the given pool. + /// First published in XenServer Dundee. + /// + /// The session + /// The opaque_ref of the given pool + public static Dictionary get_cpu_info(Session session, string _pool) + { + return Maps.convert_from_proxy_string_string(session.proxy.pool_get_cpu_info(session.uuid, (_pool != null) ? _pool : "").parse()); + } + /// /// Set the name_label field of the given pool. /// First published in XenServer 4.0. @@ -2524,5 +2542,24 @@ namespace XenAPI } } private Dictionary _current_operations; + + /// + /// Details about the physical CPUs on the pool + /// First published in XenServer Dundee. + /// + public virtual Dictionary cpu_info + { + get { return _cpu_info; } + set + { + if (!Helper.AreEqual(value, _cpu_info)) + { + _cpu_info = value; + Changed = true; + NotifyPropertyChanged("cpu_info"); + } + } + } + private Dictionary _cpu_info; } } diff --git a/XenModel/XenAPI/Proxy.cs b/XenModel/XenAPI/Proxy.cs index a15552842..9a5ee359e 100644 --- a/XenModel/XenAPI/Proxy.cs +++ b/XenModel/XenAPI/Proxy.cs @@ -576,6 +576,10 @@ namespace XenAPI Response pool_get_current_operations(string session, string _pool); + [XmlRpcMethod("pool.get_cpu_info")] + Response + pool_get_cpu_info(string session, string _pool); + [XmlRpcMethod("pool.set_name_label")] Response pool_set_name_label(string session, string _pool, string _name_label); @@ -6836,6 +6840,7 @@ namespace XenAPI public string ha_cluster_stack; public string [] allowed_operations; public Object current_operations; + public Object cpu_info; } [XmlRpcMissingMapping(MappingAction.Ignore)]