Class: OCI::ContainerEngine::Models::VirtualNodePool
- Inherits:
-
Object
- Object
- OCI::ContainerEngine::Models::VirtualNodePool
- Defined in:
- lib/oci/container_engine/models/virtual_node_pool.rb
Overview
A pool of virtual nodes attached to a cluster.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_NEEDS_ATTENTION = 'NEEDS_ATTENTION'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#cluster_id ⇒ String
[Required] The cluster the virtual node pool is associated with.
-
#compartment_id ⇒ String
[Required] Compartment of the virtual node pool.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
[Required] Display name of the virtual node pool.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#id ⇒ String
[Required] The OCID of the virtual node pool.
-
#initial_virtual_node_labels ⇒ Array<OCI::ContainerEngine::Models::InitialVirtualNodeLabel>
Initial labels that will be added to the Kubernetes Virtual Node object when it registers.
-
#kubernetes_version ⇒ String
[Required] The version of Kubernetes running on the nodes in the node pool.
-
#lifecycle_details ⇒ String
Details about the state of the Virtual Node Pool.
-
#lifecycle_state ⇒ String
The state of the Virtual Node Pool.
-
#nsg_ids ⇒ Array<String>
List of network security group id's applied to the Virtual Node VNIC.
-
#placement_configurations ⇒ Array<OCI::ContainerEngine::Models::PlacementConfiguration>
[Required] The list of placement configurations which determines where Virtual Nodes will be provisioned across as it relates to the subnet and availability domains.
-
#pod_configuration ⇒ OCI::ContainerEngine::Models::PodConfiguration
The pod configuration for pods run on virtual nodes of this virtual node pool.
-
#size ⇒ Integer
The number of Virtual Nodes that should be in the Virtual Node Pool.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys.
-
#taints ⇒ Array<OCI::ContainerEngine::Models::Taint>
A taint is a collection of <key, value, effect>.
-
#time_created ⇒ DateTime
The time the virtual node pool was created.
-
#time_updated ⇒ DateTime
The time the virtual node pool was updated.
- #virtual_node_tags ⇒ OCI::ContainerEngine::Models::VirtualNodeTags
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ VirtualNodePool
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ VirtualNodePool
Initializes the object
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 232 233 234 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 285 286 287 288 289 290 291 292 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 185 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.cluster_id = attributes[:'clusterId'] if attributes[:'clusterId'] raise 'You cannot provide both :clusterId and :cluster_id' if attributes.key?(:'clusterId') && attributes.key?(:'cluster_id') self.cluster_id = attributes[:'cluster_id'] if attributes[:'cluster_id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.kubernetes_version = attributes[:'kubernetesVersion'] if attributes[:'kubernetesVersion'] raise 'You cannot provide both :kubernetesVersion and :kubernetes_version' if attributes.key?(:'kubernetesVersion') && attributes.key?(:'kubernetes_version') self.kubernetes_version = attributes[:'kubernetes_version'] if attributes[:'kubernetes_version'] self.initial_virtual_node_labels = attributes[:'initialVirtualNodeLabels'] if attributes[:'initialVirtualNodeLabels'] raise 'You cannot provide both :initialVirtualNodeLabels and :initial_virtual_node_labels' if attributes.key?(:'initialVirtualNodeLabels') && attributes.key?(:'initial_virtual_node_labels') self.initial_virtual_node_labels = attributes[:'initial_virtual_node_labels'] if attributes[:'initial_virtual_node_labels'] self.taints = attributes[:'taints'] if attributes[:'taints'] self.size = attributes[:'size'] if attributes[:'size'] self.placement_configurations = attributes[:'placementConfigurations'] if attributes[:'placementConfigurations'] raise 'You cannot provide both :placementConfigurations and :placement_configurations' if attributes.key?(:'placementConfigurations') && attributes.key?(:'placement_configurations') self.placement_configurations = attributes[:'placement_configurations'] if attributes[:'placement_configurations'] self.nsg_ids = attributes[:'nsgIds'] if attributes[:'nsgIds'] raise 'You cannot provide both :nsgIds and :nsg_ids' if attributes.key?(:'nsgIds') && attributes.key?(:'nsg_ids') self.nsg_ids = attributes[:'nsg_ids'] if attributes[:'nsg_ids'] self.pod_configuration = attributes[:'podConfiguration'] if attributes[:'podConfiguration'] raise 'You cannot provide both :podConfiguration and :pod_configuration' if attributes.key?(:'podConfiguration') && attributes.key?(:'pod_configuration') self.pod_configuration = attributes[:'pod_configuration'] if attributes[:'pod_configuration'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] self. = attributes[:'virtualNodeTags'] if attributes[:'virtualNodeTags'] raise 'You cannot provide both :virtualNodeTags and :virtual_node_tags' if attributes.key?(:'virtualNodeTags') && attributes.key?(:'virtual_node_tags') self. = attributes[:'virtual_node_tags'] if attributes[:'virtual_node_tags'] end |
Instance Attribute Details
#cluster_id ⇒ String
[Required] The cluster the virtual node pool is associated with. A virtual node pool can only be associated with one cluster.
33 34 35 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 33 def cluster_id @cluster_id end |
#compartment_id ⇒ String
[Required] Compartment of the virtual node pool.
29 30 31 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 29 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: {\"Operations\": {\"CostCenter\": \"42\"}}
95 96 97 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 95 def @defined_tags end |
#display_name ⇒ String
[Required] Display name of the virtual node pool. This is a non-unique value.
37 38 39 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 37 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example: {\"Department\": \"Finance\"}
88 89 90 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 88 def @freeform_tags end |
#id ⇒ String
[Required] The OCID of the virtual node pool.
25 26 27 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 25 def id @id end |
#initial_virtual_node_labels ⇒ Array<OCI::ContainerEngine::Models::InitialVirtualNodeLabel>
Initial labels that will be added to the Kubernetes Virtual Node object when it registers. This is the same as virtualNodePool resources.
45 46 47 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 45 def initial_virtual_node_labels @initial_virtual_node_labels end |
#kubernetes_version ⇒ String
[Required] The version of Kubernetes running on the nodes in the node pool.
41 42 43 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 41 def kubernetes_version @kubernetes_version end |
#lifecycle_details ⇒ String
Details about the state of the Virtual Node Pool.
73 74 75 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 73 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The state of the Virtual Node Pool.
69 70 71 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 69 def lifecycle_state @lifecycle_state end |
#nsg_ids ⇒ Array<String>
List of network security group id's applied to the Virtual Node VNIC.
61 62 63 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 61 def nsg_ids @nsg_ids end |
#placement_configurations ⇒ Array<OCI::ContainerEngine::Models::PlacementConfiguration>
[Required] The list of placement configurations which determines where Virtual Nodes will be provisioned across as it relates to the subnet and availability domains. The size attribute determines how many we evenly spread across these placement configurations
57 58 59 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 57 def placement_configurations @placement_configurations end |
#pod_configuration ⇒ OCI::ContainerEngine::Models::PodConfiguration
The pod configuration for pods run on virtual nodes of this virtual node pool.
65 66 67 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 65 def pod_configuration @pod_configuration end |
#size ⇒ Integer
The number of Virtual Nodes that should be in the Virtual Node Pool. The placement configurations determine where these virtual nodes are placed.
53 54 55 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 53 def size @size end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
Usage of system tag keys. These predefined keys are scoped to namespaces. Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
101 102 103 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 101 def @system_tags end |
#taints ⇒ Array<OCI::ContainerEngine::Models::Taint>
A taint is a collection of <key, value, effect>. These taints will be applied to the Virtual Nodes of this Virtual Node Pool for Kubernetes scheduling.
49 50 51 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 49 def taints @taints end |
#time_created ⇒ DateTime
The time the virtual node pool was created.
77 78 79 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 77 def time_created @time_created end |
#time_updated ⇒ DateTime
The time the virtual node pool was updated.
81 82 83 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 81 def time_updated @time_updated end |
#virtual_node_tags ⇒ OCI::ContainerEngine::Models::VirtualNodeTags
104 105 106 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 104 def @virtual_node_tags end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 107 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'cluster_id': :'clusterId', 'display_name': :'displayName', 'kubernetes_version': :'kubernetesVersion', 'initial_virtual_node_labels': :'initialVirtualNodeLabels', 'taints': :'taints', 'size': :'size', 'placement_configurations': :'placementConfigurations', 'nsg_ids': :'nsgIds', 'pod_configuration': :'podConfiguration', 'lifecycle_state': :'lifecycleState', 'lifecycle_details': :'lifecycleDetails', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'virtual_node_tags': :'virtualNodeTags' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 134 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'cluster_id': :'String', 'display_name': :'String', 'kubernetes_version': :'String', 'initial_virtual_node_labels': :'Array<OCI::ContainerEngine::Models::InitialVirtualNodeLabel>', 'taints': :'Array<OCI::ContainerEngine::Models::Taint>', 'size': :'Integer', 'placement_configurations': :'Array<OCI::ContainerEngine::Models::PlacementConfiguration>', 'nsg_ids': :'Array<String>', 'pod_configuration': :'OCI::ContainerEngine::Models::PodConfiguration', 'lifecycle_state': :'String', 'lifecycle_details': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'virtual_node_tags': :'OCI::ContainerEngine::Models::VirtualNodeTags' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 314 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && cluster_id == other.cluster_id && display_name == other.display_name && kubernetes_version == other.kubernetes_version && initial_virtual_node_labels == other.initial_virtual_node_labels && taints == other.taints && size == other.size && placement_configurations == other.placement_configurations && nsg_ids == other.nsg_ids && pod_configuration == other.pod_configuration && lifecycle_state == other.lifecycle_state && lifecycle_details == other.lifecycle_details && time_created == other.time_created && time_updated == other.time_updated && == other. && == other. && == other. && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 362 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
342 343 344 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 342 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
351 352 353 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 351 def hash [id, compartment_id, cluster_id, display_name, kubernetes_version, initial_virtual_node_labels, taints, size, placement_configurations, nsg_ids, pod_configuration, lifecycle_state, lifecycle_details, time_created, time_updated, , , , ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
395 396 397 398 399 400 401 402 403 404 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 395 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
389 390 391 |
# File 'lib/oci/container_engine/models/virtual_node_pool.rb', line 389 def to_s to_hash.to_s end |