Class: NutanixClustermgmt::ClustermgmtV40ConfigClusterNetworkReference
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- NutanixClustermgmt::ClustermgmtV40ConfigClusterNetworkReference
- Defined in:
- lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb
Overview
Network details of a cluster.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#backplane ⇒ Object
Returns the value of attribute backplane.
-
#external_address ⇒ Object
Returns the value of attribute external_address.
-
#external_data_service_ip ⇒ Object
Returns the value of attribute external_data_service_ip.
-
#external_subnet ⇒ Object
Cluster external subnet address.
-
#fqdn ⇒ Object
Cluster fully qualified domain name.
-
#http_proxy_list ⇒ Object
List of HTTP Proxy server configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity.
-
#http_proxy_white_list ⇒ Object
Targets HTTP traffic to which is exempted from going through the configured HTTP Proxy.
-
#internal_subnet ⇒ Object
Cluster internal subnet address.
-
#key_management_server_type ⇒ Object
Returns the value of attribute key_management_server_type.
-
#management_server ⇒ Object
Returns the value of attribute management_server.
-
#masquerading_ip ⇒ Object
Returns the value of attribute masquerading_ip.
-
#masquerading_port ⇒ Object
The port to connect to the cluster when using masquerading IP.
-
#name_server_ip_list ⇒ Object
List of name servers on a cluster.
-
#nfs_subnet_whitelist ⇒ Object
NFS subnet whitelist addresses.
-
#ntp_server_ip_list ⇒ Object
List of NTP servers on a cluster.
-
#smtp_server ⇒ Object
Returns the value of attribute smtp_server.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ClustermgmtV40ConfigClusterNetworkReference
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ClustermgmtV40ConfigClusterNetworkReference
Initializes the object
144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 144 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `NutanixClustermgmt::ClustermgmtV40ConfigClusterNetworkReference` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `NutanixClustermgmt::ClustermgmtV40ConfigClusterNetworkReference`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'external_address') self.external_address = attributes[:'external_address'] end if attributes.key?(:'external_data_service_ip') self.external_data_service_ip = attributes[:'external_data_service_ip'] end if attributes.key?(:'external_subnet') self.external_subnet = attributes[:'external_subnet'] end if attributes.key?(:'internal_subnet') self.internal_subnet = attributes[:'internal_subnet'] end if attributes.key?(:'nfs_subnet_whitelist') if (value = attributes[:'nfs_subnet_whitelist']).is_a?(Array) self.nfs_subnet_whitelist = value end end if attributes.key?(:'name_server_ip_list') if (value = attributes[:'name_server_ip_list']).is_a?(Array) self.name_server_ip_list = value end end if attributes.key?(:'ntp_server_ip_list') if (value = attributes[:'ntp_server_ip_list']).is_a?(Array) self.ntp_server_ip_list = value end end if attributes.key?(:'smtp_server') self.smtp_server = attributes[:'smtp_server'] end if attributes.key?(:'masquerading_ip') self.masquerading_ip = attributes[:'masquerading_ip'] end if attributes.key?(:'masquerading_port') self.masquerading_port = attributes[:'masquerading_port'] end if attributes.key?(:'management_server') self.management_server = attributes[:'management_server'] end if attributes.key?(:'fqdn') self.fqdn = attributes[:'fqdn'] end if attributes.key?(:'key_management_server_type') self.key_management_server_type = attributes[:'key_management_server_type'] end if attributes.key?(:'backplane') self.backplane = attributes[:'backplane'] end if attributes.key?(:'http_proxy_list') if (value = attributes[:'http_proxy_list']).is_a?(Array) self.http_proxy_list = value end end if attributes.key?(:'http_proxy_white_list') if (value = attributes[:'http_proxy_white_list']).is_a?(Array) self.http_proxy_white_list = value end end end |
Instance Attribute Details
#backplane ⇒ Object
Returns the value of attribute backplane.
52 53 54 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 52 def backplane @backplane end |
#external_address ⇒ Object
Returns the value of attribute external_address.
19 20 21 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 19 def external_address @external_address end |
#external_data_service_ip ⇒ Object
Returns the value of attribute external_data_service_ip.
21 22 23 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 21 def external_data_service_ip @external_data_service_ip end |
#external_subnet ⇒ Object
Cluster external subnet address.
24 25 26 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 24 def external_subnet @external_subnet end |
#fqdn ⇒ Object
Cluster fully qualified domain name. This is part of payload for cluster update operation only.
48 49 50 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 48 def fqdn @fqdn end |
#http_proxy_list ⇒ Object
List of HTTP Proxy server configuration needed to access a cluster which is hosted behind a HTTP Proxy to not reveal its identity.
55 56 57 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 55 def http_proxy_list @http_proxy_list end |
#http_proxy_white_list ⇒ Object
Targets HTTP traffic to which is exempted from going through the configured HTTP Proxy.
58 59 60 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 58 def http_proxy_white_list @http_proxy_white_list end |
#internal_subnet ⇒ Object
Cluster internal subnet address.
27 28 29 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 27 def internal_subnet @internal_subnet end |
#key_management_server_type ⇒ Object
Returns the value of attribute key_management_server_type.
50 51 52 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 50 def key_management_server_type @key_management_server_type end |
#management_server ⇒ Object
Returns the value of attribute management_server.
45 46 47 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 45 def management_server @management_server end |
#masquerading_ip ⇒ Object
Returns the value of attribute masquerading_ip.
40 41 42 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 40 def masquerading_ip @masquerading_ip end |
#masquerading_port ⇒ Object
The port to connect to the cluster when using masquerading IP.
43 44 45 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 43 def masquerading_port @masquerading_port end |
#name_server_ip_list ⇒ Object
List of name servers on a cluster. This is part of payload for both cluster create & update operations. For create operation, only ipv4 address / fqdn values are supported currently.
33 34 35 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 33 def name_server_ip_list @name_server_ip_list end |
#nfs_subnet_whitelist ⇒ Object
NFS subnet whitelist addresses. This is part of payload for cluster update operation only.
30 31 32 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 30 def nfs_subnet_whitelist @nfs_subnet_whitelist end |
#ntp_server_ip_list ⇒ Object
List of NTP servers on a cluster. This is part of payload for both cluster create & update operations. For create operation, only ipv4 address / fqdn values are supported currently.
36 37 38 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 36 def ntp_server_ip_list @ntp_server_ip_list end |
#smtp_server ⇒ Object
Returns the value of attribute smtp_server.
38 39 40 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 38 def smtp_server @smtp_server end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
105 106 107 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 105 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
110 111 112 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 110 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 83 def self.attribute_map { :'external_address' => :'externalAddress', :'external_data_service_ip' => :'externalDataServiceIp', :'external_subnet' => :'externalSubnet', :'internal_subnet' => :'internalSubnet', :'nfs_subnet_whitelist' => :'nfsSubnetWhitelist', :'name_server_ip_list' => :'nameServerIpList', :'ntp_server_ip_list' => :'ntpServerIpList', :'smtp_server' => :'smtpServer', :'masquerading_ip' => :'masqueradingIp', :'masquerading_port' => :'masqueradingPort', :'management_server' => :'managementServer', :'fqdn' => :'fqdn', :'key_management_server_type' => :'keyManagementServerType', :'backplane' => :'backplane', :'http_proxy_list' => :'httpProxyList', :'http_proxy_white_list' => :'httpProxyWhiteList' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 447 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
137 138 139 140 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 137 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 115 def self.openapi_types { :'external_address' => :'CommonV10ConfigIPAddress', :'external_data_service_ip' => :'CommonV10ConfigIPAddress', :'external_subnet' => :'String', :'internal_subnet' => :'String', :'nfs_subnet_whitelist' => :'Array<String>', :'name_server_ip_list' => :'Array<CommonV10ConfigIPAddressOrFQDN>', :'ntp_server_ip_list' => :'Array<CommonV10ConfigIPAddressOrFQDN>', :'smtp_server' => :'ClustermgmtV40ConfigSmtpServerRef', :'masquerading_ip' => :'CommonV10ConfigIPAddress', :'masquerading_port' => :'Integer', :'management_server' => :'ClustermgmtV40ConfigManagementServerRef', :'fqdn' => :'String', :'key_management_server_type' => :'ClustermgmtV40ConfigKeyManagementServerType', :'backplane' => :'ClustermgmtV40ConfigBackplaneNetworkParams', :'http_proxy_list' => :'Array<ClustermgmtV40ConfigHttpProxyConfig>', :'http_proxy_white_list' => :'Array<ClustermgmtV40ConfigHttpProxyWhiteListConfig>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 411 def ==(o) return true if self.equal?(o) self.class == o.class && external_address == o.external_address && external_data_service_ip == o.external_data_service_ip && external_subnet == o.external_subnet && internal_subnet == o.internal_subnet && nfs_subnet_whitelist == o.nfs_subnet_whitelist && name_server_ip_list == o.name_server_ip_list && ntp_server_ip_list == o.ntp_server_ip_list && smtp_server == o.smtp_server && masquerading_ip == o.masquerading_ip && masquerading_port == o.masquerading_port && management_server == o.management_server && fqdn == o.fqdn && key_management_server_type == o.key_management_server_type && backplane == o.backplane && http_proxy_list == o.http_proxy_list && http_proxy_white_list == o.http_proxy_white_list end |
#eql?(o) ⇒ Boolean
434 435 436 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 434 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
440 441 442 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 440 def hash [external_address, external_data_service_ip, external_subnet, internal_subnet, nfs_subnet_whitelist, name_server_ip_list, ntp_server_ip_list, smtp_server, masquerading_ip, masquerading_port, management_server, fqdn, key_management_server_type, backplane, http_proxy_list, http_proxy_white_list].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 235 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length > 1024 invalid_properties.push('invalid value for "nfs_subnet_whitelist", number of items must be less than or equal to 1024.') end if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length < 0 invalid_properties.push('invalid value for "nfs_subnet_whitelist", number of items must be greater than or equal to 0.') end if !@name_server_ip_list.nil? && @name_server_ip_list.length > 1024 invalid_properties.push('invalid value for "name_server_ip_list", number of items must be less than or equal to 1024.') end if !@name_server_ip_list.nil? && @name_server_ip_list.length < 0 invalid_properties.push('invalid value for "name_server_ip_list", number of items must be greater than or equal to 0.') end if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length > 1024 invalid_properties.push('invalid value for "ntp_server_ip_list", number of items must be less than or equal to 1024.') end if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length < 0 invalid_properties.push('invalid value for "ntp_server_ip_list", number of items must be greater than or equal to 0.') end pattern = Regexp.new(/^([a-z0-9]+(-[a-z0-9]+)*\.)+([a-z0-9]+(-[a-z0-9]+)*){1,63}$/) if !@fqdn.nil? && @fqdn !~ pattern invalid_properties.push("invalid value for \"fqdn\", must conform to the pattern #{pattern}.") end if !@http_proxy_list.nil? && @http_proxy_list.length > 1 invalid_properties.push('invalid value for "http_proxy_list", number of items must be less than or equal to 1.') end if !@http_proxy_list.nil? && @http_proxy_list.length < 0 invalid_properties.push('invalid value for "http_proxy_list", number of items must be greater than or equal to 0.') end if !@http_proxy_white_list.nil? && @http_proxy_white_list.length > 1000 invalid_properties.push('invalid value for "http_proxy_white_list", number of items must be less than or equal to 1000.') end if !@http_proxy_white_list.nil? && @http_proxy_white_list.length < 0 invalid_properties.push('invalid value for "http_proxy_white_list", number of items must be greater than or equal to 0.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 469 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_cluster_network_reference.rb', line 288 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length > 1024 return false if !@nfs_subnet_whitelist.nil? && @nfs_subnet_whitelist.length < 0 return false if !@name_server_ip_list.nil? && @name_server_ip_list.length > 1024 return false if !@name_server_ip_list.nil? && @name_server_ip_list.length < 0 return false if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length > 1024 return false if !@ntp_server_ip_list.nil? && @ntp_server_ip_list.length < 0 return false if !@fqdn.nil? && @fqdn !~ Regexp.new(/^([a-z0-9]+(-[a-z0-9]+)*\.)+([a-z0-9]+(-[a-z0-9]+)*){1,63}$/) return false if !@http_proxy_list.nil? && @http_proxy_list.length > 1 return false if !@http_proxy_list.nil? && @http_proxy_list.length < 0 return false if !@http_proxy_white_list.nil? && @http_proxy_white_list.length > 1000 return false if !@http_proxy_white_list.nil? && @http_proxy_white_list.length < 0 true end |