Class: Azure::Armrest::VirtualMachine
- Defined in:
- lib/azure/armrest/model/base_model.rb,
lib/azure/armrest/model/virtual_machine.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from BaseModel
#resource_group, #response_code, #response_headers, #subscription_id
Instance Method Summary collapse
-
#managed_disk? ⇒ Boolean
Indicates whether the VM is backed by a managed disk or a regular storage account.
-
#operating_system ⇒ Object
(also: #os)
The operating system for the image, e.g.
-
#size ⇒ Object
(also: #flavor)
Returns the size (aka series) for the VM, e.g.
Methods inherited from BaseModel
#==, #[], #[]=, #eql?, #initialize, #pretty_print, #to_h, #to_hash, #to_json, #to_s, #to_str
Constructor Details
This class inherits a constructor from Azure::Armrest::BaseModel
Instance Method Details
#managed_disk? ⇒ Boolean
Indicates whether the VM is backed by a managed disk or a regular storage account.
7 8 9 10 |
# File 'lib/azure/armrest/model/virtual_machine.rb', line 7 def managed_disk? check_for_model_view('managed_disk?') properties.storage_profile.os_disk.try(:managed_disk) ? true : false end |
#operating_system ⇒ Object Also known as: os
The operating system for the image, e.g. “Linux” or “Windows”.
23 24 25 26 |
# File 'lib/azure/armrest/model/virtual_machine.rb', line 23 def check_for_model_view('operating_sytem') properties.storage_profile.os_disk.os_type end |
#size ⇒ Object Also known as: flavor
Returns the size (aka series) for the VM, e.g. “Standard_A0”.
14 15 16 17 |
# File 'lib/azure/armrest/model/virtual_machine.rb', line 14 def size check_for_model_view('size') properties.hardware_profile.vm_size end |