Class: IbmCloudPower::PVMInstanceCreate
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- IbmCloudPower::PVMInstanceCreate
- Defined in:
- lib/ibm_cloud_power/models/pvm_instance_create.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#allow_remote_restart ⇒ Object
if set to false, automated remote restart is disabled for the VM.
-
#default_trusted_profile ⇒ Object
default IAM trusted profile to use for this virtual server instance.
-
#deployment_target ⇒ Object
The deployment of a dedicated host.
-
#deployment_type ⇒ Object
The custom deployment type.
-
#image_id ⇒ Object
Image ID of the image to use for the server.
-
#key_pair_name ⇒ Object
The name of the SSH key pair provided to the server for authenticating users (looked up in the tenant's list of keys).
-
#license_repository_capacity ⇒ Object
The VTL license repository capacity TiB value.
-
#memory ⇒ Object
Amount of memory allocated (in GiB).
-
#metadata_service ⇒ Object
The metadata service configuration.
-
#migratable ⇒ Object
(deprecated - replaced by pinPolicy) Indicates if the server is allowed to migrate between hosts.
-
#network_ids ⇒ Object
(deprecated - replaced by networks) List of Network IDs.
-
#networks ⇒ Object
The pvm instance networks information.
-
#pin_policy ⇒ Object
Returns the value of attribute pin_policy.
-
#placement_group ⇒ Object
The placement group for the server.
-
#preferred_processor_compatibility_mode ⇒ Object
processor compatibility mode.
-
#proc_type ⇒ Object
Processor type (dedicated, shared, capped).
-
#processors ⇒ Object
Number of processors allocated.
-
#replicant_affinity_policy ⇒ Object
Affinity policy for replicants being created; affinity for the same host, anti-affinity for different hosts, none for no preference.
-
#replicant_naming_scheme ⇒ Object
How to name the created vms.
-
#replicants ⇒ Object
Number of duplicate instances to create in this request.
-
#server_name ⇒ Object
Name of the server to create.
-
#shared_processor_pool ⇒ Object
The shared processor pool for server deployment.
-
#software_licenses ⇒ Object
The pvm instance Software Licenses.
-
#storage_affinity ⇒ Object
The storage affinity data; ignored if storagePool is provided; Only valid when you deploy one of the IBM supplied stock images.
-
#storage_connection ⇒ Object
The storage connection type.
-
#storage_pool ⇒ Object
Storage Pool for server deployment; if provided then storageAffinity will be ignored; Only valid when you deploy one of the IBM supplied stock images.
-
#storage_pool_affinity ⇒ Object
Indicates if all volumes attached to the PVMInstance must reside in the same storage pool.
-
#storage_type ⇒ Object
Storage type for server deployment; if storageType is not provided the storage type will default to 'tier3'.
-
#sys_type ⇒ Object
System type used to host the instance.
-
#user_data ⇒ Object
Cloud init user defined data; For FLS, only cloud-config user-data is supported and data must not be compressed or exceed 63K.
-
#user_tags ⇒ Object
List of user tags.
-
#virtual_cores ⇒ Object
The pvm instance virtual CPU information.
-
#virtual_serial_number ⇒ Object
Virtual Serial Number information.
-
#volume_ids ⇒ Object
List of volume IDs.
-
#vpmem_volumes ⇒ Object
The vPMEM volumes information.
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 = {}) ⇒ PVMInstanceCreate
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 = {}) ⇒ PVMInstanceCreate
Initializes the object
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 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 244 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `IbmCloudPower::PVMInstanceCreate` 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 `IbmCloudPower::PVMInstanceCreate`. 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?(:'allow_remote_restart') self.allow_remote_restart = attributes[:'allow_remote_restart'] else self.allow_remote_restart = true end if attributes.key?(:'default_trusted_profile') self.default_trusted_profile = attributes[:'default_trusted_profile'] end if attributes.key?(:'deployment_target') self.deployment_target = attributes[:'deployment_target'] end if attributes.key?(:'deployment_type') self.deployment_type = attributes[:'deployment_type'] end if attributes.key?(:'image_id') self.image_id = attributes[:'image_id'] else self.image_id = nil end if attributes.key?(:'key_pair_name') self.key_pair_name = attributes[:'key_pair_name'] end if attributes.key?(:'license_repository_capacity') self.license_repository_capacity = attributes[:'license_repository_capacity'] end if attributes.key?(:'memory') self.memory = attributes[:'memory'] else self.memory = nil end if attributes.key?(:'metadata_service') self. = attributes[:'metadata_service'] end if attributes.key?(:'migratable') self.migratable = attributes[:'migratable'] else self.migratable = true end if attributes.key?(:'network_ids') if (value = attributes[:'network_ids']).is_a?(Array) self.network_ids = value end end if attributes.key?(:'networks') if (value = attributes[:'networks']).is_a?(Array) self.networks = value end end if attributes.key?(:'pin_policy') self.pin_policy = attributes[:'pin_policy'] end if attributes.key?(:'placement_group') self.placement_group = attributes[:'placement_group'] end if attributes.key?(:'preferred_processor_compatibility_mode') self.preferred_processor_compatibility_mode = attributes[:'preferred_processor_compatibility_mode'] end if attributes.key?(:'proc_type') self.proc_type = attributes[:'proc_type'] else self.proc_type = 'dedicated' end if attributes.key?(:'processors') self.processors = attributes[:'processors'] else self.processors = nil end if attributes.key?(:'replicant_affinity_policy') self.replicant_affinity_policy = attributes[:'replicant_affinity_policy'] else self.replicant_affinity_policy = 'none' end if attributes.key?(:'replicant_naming_scheme') self.replicant_naming_scheme = attributes[:'replicant_naming_scheme'] else self.replicant_naming_scheme = 'suffix' end if attributes.key?(:'replicants') self.replicants = attributes[:'replicants'] end if attributes.key?(:'server_name') self.server_name = attributes[:'server_name'] else self.server_name = nil end if attributes.key?(:'shared_processor_pool') self.shared_processor_pool = attributes[:'shared_processor_pool'] end if attributes.key?(:'software_licenses') self.software_licenses = attributes[:'software_licenses'] end if attributes.key?(:'storage_affinity') self.storage_affinity = attributes[:'storage_affinity'] end if attributes.key?(:'storage_connection') self.storage_connection = attributes[:'storage_connection'] end if attributes.key?(:'storage_pool') self.storage_pool = attributes[:'storage_pool'] end if attributes.key?(:'storage_pool_affinity') self.storage_pool_affinity = attributes[:'storage_pool_affinity'] else self.storage_pool_affinity = true end if attributes.key?(:'storage_type') self.storage_type = attributes[:'storage_type'] end if attributes.key?(:'sys_type') self.sys_type = attributes[:'sys_type'] end if attributes.key?(:'user_data') self.user_data = attributes[:'user_data'] end if attributes.key?(:'user_tags') if (value = attributes[:'user_tags']).is_a?(Array) self. = value end end if attributes.key?(:'virtual_cores') self.virtual_cores = attributes[:'virtual_cores'] end if attributes.key?(:'virtual_serial_number') self.virtual_serial_number = attributes[:'virtual_serial_number'] end if attributes.key?(:'volume_ids') if (value = attributes[:'volume_ids']).is_a?(Array) self.volume_ids = value end end if attributes.key?(:'vpmem_volumes') if (value = attributes[:'vpmem_volumes']).is_a?(Array) self.vpmem_volumes = value end end end |
Instance Attribute Details
#allow_remote_restart ⇒ Object
if set to false, automated remote restart is disabled for the VM
19 20 21 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 19 def allow_remote_restart @allow_remote_restart end |
#default_trusted_profile ⇒ Object
default IAM trusted profile to use for this virtual server instance
22 23 24 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 22 def default_trusted_profile @default_trusted_profile end |
#deployment_target ⇒ Object
The deployment of a dedicated host
25 26 27 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 25 def deployment_target @deployment_target end |
#deployment_type ⇒ Object
The custom deployment type
28 29 30 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 28 def deployment_type @deployment_type end |
#image_id ⇒ Object
Image ID of the image to use for the server
31 32 33 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 31 def image_id @image_id end |
#key_pair_name ⇒ Object
The name of the SSH key pair provided to the server for authenticating users (looked up in the tenant's list of keys)
34 35 36 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 34 def key_pair_name @key_pair_name end |
#license_repository_capacity ⇒ Object
The VTL license repository capacity TiB value
37 38 39 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 37 def license_repository_capacity @license_repository_capacity end |
#memory ⇒ Object
Amount of memory allocated (in GiB)
40 41 42 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 40 def memory @memory end |
#metadata_service ⇒ Object
The metadata service configuration
43 44 45 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 43 def @metadata_service end |
#migratable ⇒ Object
(deprecated - replaced by pinPolicy) Indicates if the server is allowed to migrate between hosts
46 47 48 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 46 def migratable @migratable end |
#network_ids ⇒ Object
(deprecated - replaced by networks) List of Network IDs
49 50 51 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 49 def network_ids @network_ids end |
#networks ⇒ Object
The pvm instance networks information
52 53 54 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 52 def networks @networks end |
#pin_policy ⇒ Object
Returns the value of attribute pin_policy.
54 55 56 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 54 def pin_policy @pin_policy end |
#placement_group ⇒ Object
The placement group for the server
57 58 59 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 57 def placement_group @placement_group end |
#preferred_processor_compatibility_mode ⇒ Object
processor compatibility mode
60 61 62 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 60 def preferred_processor_compatibility_mode @preferred_processor_compatibility_mode end |
#proc_type ⇒ Object
Processor type (dedicated, shared, capped)
63 64 65 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 63 def proc_type @proc_type end |
#processors ⇒ Object
Number of processors allocated
66 67 68 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 66 def processors @processors end |
#replicant_affinity_policy ⇒ Object
Affinity policy for replicants being created; affinity for the same host, anti-affinity for different hosts, none for no preference
69 70 71 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 69 def replicant_affinity_policy @replicant_affinity_policy end |
#replicant_naming_scheme ⇒ Object
How to name the created vms
72 73 74 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 72 def replicant_naming_scheme @replicant_naming_scheme end |
#replicants ⇒ Object
Number of duplicate instances to create in this request
75 76 77 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 75 def replicants @replicants end |
#server_name ⇒ Object
Name of the server to create
78 79 80 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 78 def server_name @server_name end |
#shared_processor_pool ⇒ Object
The shared processor pool for server deployment
81 82 83 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 81 def shared_processor_pool @shared_processor_pool end |
#software_licenses ⇒ Object
The pvm instance Software Licenses
84 85 86 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 84 def software_licenses @software_licenses end |
#storage_affinity ⇒ Object
The storage affinity data; ignored if storagePool is provided; Only valid when you deploy one of the IBM supplied stock images. Storage pool for a custom image (an imported image or an image that is created from a PVMInstance capture) defaults to the storage pool the image was created in
87 88 89 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 87 def storage_affinity @storage_affinity end |
#storage_connection ⇒ Object
The storage connection type
90 91 92 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 90 def storage_connection @storage_connection end |
#storage_pool ⇒ Object
Storage Pool for server deployment; if provided then storageAffinity will be ignored; Only valid when you deploy one of the IBM supplied stock images. Storage pool for a custom image (an imported image or an image that is created from a PVMInstance capture) defaults to the storage pool the image was created in
93 94 95 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 93 def storage_pool @storage_pool end |
#storage_pool_affinity ⇒ Object
Indicates if all volumes attached to the PVMInstance must reside in the same storage pool. If set to false, volumes from any storage pool can be attached to the PVMInstance. This flag only impacts PVMInstance snapshot and capture operations. For capture, only volumes that reside in the same storage pool as the PVMInstance's boot volume can be included. For snapshots, all volumes included in the snapshot must reside in the same storage pool.
96 97 98 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 96 def storage_pool_affinity @storage_pool_affinity end |
#storage_type ⇒ Object
Storage type for server deployment; if storageType is not provided the storage type will default to 'tier3'.
99 100 101 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 99 def storage_type @storage_type end |
#sys_type ⇒ Object
System type used to host the instance
102 103 104 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 102 def sys_type @sys_type end |
#user_data ⇒ Object
Cloud init user defined data; For FLS, only cloud-config user-data is supported and data must not be compressed or exceed 63K
105 106 107 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 105 def user_data @user_data end |
#user_tags ⇒ Object
List of user tags
108 109 110 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 108 def @user_tags end |
#virtual_cores ⇒ Object
The pvm instance virtual CPU information
111 112 113 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 111 def virtual_cores @virtual_cores end |
#virtual_serial_number ⇒ Object
Virtual Serial Number information
114 115 116 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 114 def virtual_serial_number @virtual_serial_number end |
#volume_ids ⇒ Object
List of volume IDs
117 118 119 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 117 def volume_ids @volume_ids end |
#vpmem_volumes ⇒ Object
The vPMEM volumes information
120 121 122 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 120 def vpmem_volumes @vpmem_volumes end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
186 187 188 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 186 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
191 192 193 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 191 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 145 def self.attribute_map { :'allow_remote_restart' => :'allowRemoteRestart', :'default_trusted_profile' => :'defaultTrustedProfile', :'deployment_target' => :'deploymentTarget', :'deployment_type' => :'deploymentType', :'image_id' => :'imageID', :'key_pair_name' => :'keyPairName', :'license_repository_capacity' => :'licenseRepositoryCapacity', :'memory' => :'memory', :'metadata_service' => :'metadataService', :'migratable' => :'migratable', :'network_ids' => :'networkIDs', :'networks' => :'networks', :'pin_policy' => :'pinPolicy', :'placement_group' => :'placementGroup', :'preferred_processor_compatibility_mode' => :'preferredProcessorCompatibilityMode', :'proc_type' => :'procType', :'processors' => :'processors', :'replicant_affinity_policy' => :'replicantAffinityPolicy', :'replicant_naming_scheme' => :'replicantNamingScheme', :'replicants' => :'replicants', :'server_name' => :'serverName', :'shared_processor_pool' => :'sharedProcessorPool', :'software_licenses' => :'softwareLicenses', :'storage_affinity' => :'storageAffinity', :'storage_connection' => :'storageConnection', :'storage_pool' => :'storagePool', :'storage_pool_affinity' => :'storagePoolAffinity', :'storage_type' => :'storageType', :'sys_type' => :'sysType', :'user_data' => :'userData', :'user_tags' => :'userTags', :'virtual_cores' => :'virtualCores', :'virtual_serial_number' => :'virtualSerialNumber', :'volume_ids' => :'volumeIDs', :'vpmem_volumes' => :'vpmemVolumes' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 652 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
237 238 239 240 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 237 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 196 def self.openapi_types { :'allow_remote_restart' => :'Boolean', :'default_trusted_profile' => :'TrustedProfile', :'deployment_target' => :'DeploymentTarget', :'deployment_type' => :'String', :'image_id' => :'String', :'key_pair_name' => :'String', :'license_repository_capacity' => :'Integer', :'memory' => :'Float', :'metadata_service' => :'MetadataService', :'migratable' => :'Boolean', :'network_ids' => :'Array<String>', :'networks' => :'Array<PVMInstanceAddNetwork>', :'pin_policy' => :'PinPolicy', :'placement_group' => :'String', :'preferred_processor_compatibility_mode' => :'String', :'proc_type' => :'String', :'processors' => :'Float', :'replicant_affinity_policy' => :'String', :'replicant_naming_scheme' => :'String', :'replicants' => :'Float', :'server_name' => :'String', :'shared_processor_pool' => :'String', :'software_licenses' => :'SoftwareLicenses', :'storage_affinity' => :'StorageAffinity', :'storage_connection' => :'String', :'storage_pool' => :'String', :'storage_pool_affinity' => :'Boolean', :'storage_type' => :'String', :'sys_type' => :'String', :'user_data' => :'String', :'user_tags' => :'Array<String>', :'virtual_cores' => :'VirtualCores', :'virtual_serial_number' => :'CreateServerVirtualSerialNumber', :'volume_ids' => :'Array<String>', :'vpmem_volumes' => :'Array<VPMemVolumeCreate>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 597 def ==(o) return true if self.equal?(o) self.class == o.class && allow_remote_restart == o.allow_remote_restart && default_trusted_profile == o.default_trusted_profile && deployment_target == o.deployment_target && deployment_type == o.deployment_type && image_id == o.image_id && key_pair_name == o.key_pair_name && license_repository_capacity == o.license_repository_capacity && memory == o.memory && == o. && migratable == o.migratable && network_ids == o.network_ids && networks == o.networks && pin_policy == o.pin_policy && placement_group == o.placement_group && preferred_processor_compatibility_mode == o.preferred_processor_compatibility_mode && proc_type == o.proc_type && processors == o.processors && replicant_affinity_policy == o.replicant_affinity_policy && replicant_naming_scheme == o.replicant_naming_scheme && replicants == o.replicants && server_name == o.server_name && shared_processor_pool == o.shared_processor_pool && software_licenses == o.software_licenses && storage_affinity == o.storage_affinity && storage_connection == o.storage_connection && storage_pool == o.storage_pool && storage_pool_affinity == o.storage_pool_affinity && storage_type == o.storage_type && sys_type == o.sys_type && user_data == o.user_data && == o. && virtual_cores == o.virtual_cores && virtual_serial_number == o.virtual_serial_number && volume_ids == o.volume_ids && vpmem_volumes == o.vpmem_volumes end |
#eql?(o) ⇒ Boolean
639 640 641 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 639 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
645 646 647 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 645 def hash [allow_remote_restart, default_trusted_profile, deployment_target, deployment_type, image_id, key_pair_name, license_repository_capacity, memory, , migratable, network_ids, networks, pin_policy, placement_group, preferred_processor_compatibility_mode, proc_type, processors, replicant_affinity_policy, replicant_naming_scheme, replicants, server_name, shared_processor_pool, software_licenses, storage_affinity, storage_connection, storage_pool, storage_pool_affinity, storage_type, sys_type, user_data, , virtual_cores, virtual_serial_number, volume_ids, vpmem_volumes].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 431 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if @image_id.nil? invalid_properties.push('invalid value for "image_id", image_id cannot be nil.') end if @memory.nil? invalid_properties.push('invalid value for "memory", memory cannot be nil.') end if @proc_type.nil? invalid_properties.push('invalid value for "proc_type", proc_type cannot be nil.') end if @processors.nil? invalid_properties.push('invalid value for "processors", processors cannot be nil.') end if !@replicants.nil? && @replicants < 1 invalid_properties.push('invalid value for "replicants", must be greater than or equal to 1.') end if @server_name.nil? invalid_properties.push('invalid value for "server_name", server_name cannot be nil.') end if !@user_tags.nil? && @user_tags.length > 100 invalid_properties.push('invalid value for "user_tags", number of items must be less than or equal to 100.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
674 675 676 677 678 679 680 681 682 683 684 685 686 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 674 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
467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/ibm_cloud_power/models/pvm_instance_create.rb', line 467 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if @image_id.nil? return false if @memory.nil? return false if @proc_type.nil? proc_type_validator = EnumAttributeValidator.new('String', ["dedicated", "shared", "capped"]) return false unless proc_type_validator.valid?(@proc_type) return false if @processors.nil? replicant_affinity_policy_validator = EnumAttributeValidator.new('String', ["affinity", "anti-affinity", "none"]) return false unless replicant_affinity_policy_validator.valid?(@replicant_affinity_policy) replicant_naming_scheme_validator = EnumAttributeValidator.new('String', ["prefix", "suffix"]) return false unless replicant_naming_scheme_validator.valid?(@replicant_naming_scheme) return false if !@replicants.nil? && @replicants < 1 return false if @server_name.nil? storage_connection_validator = EnumAttributeValidator.new('String', ["vSCSI", "maxVolumeSupport"]) return false unless storage_connection_validator.valid?(@storage_connection) return false if !@user_tags.nil? && @user_tags.length > 100 true end |