Class: Fog::Hyperv::Compute::Host
- Defined in:
- lib/fog/hyperv/compute/models/host.rb
Instance Attribute Summary collapse
-
#fully_qualified_domain_name ⇒ String
readonly
The FQDN of this host.
-
#logical_processor_count ⇒ Integer
readonly
The number of logical CPUs on this host.
-
#mac_address_maximum ⇒ String
readonly
The highest possible MAC address for VMs on this host.
-
#mac_address_minimum ⇒ String
readonly
The lowest possible MAC address for VMs on this host.
-
#maximum_storage_migrations ⇒ String
readonly
The maximum number of simulatenous storage migrations on this host.
-
#maximum_virtual_machine_migrations ⇒ String
readonly
The maximum number of simulatenous VMM migrations on this host.
-
#memory_capacity ⇒ Integer
readonly
The amount of memory on this host.
-
#name ⇒ String
(also: #computer_name)
readonly
The name of the host.
-
#network_adapters ⇒ Array<NetworkAdapter>
readonly
The network adapters on this host.
-
#secure_boot_templates ⇒ Array<String>
readonly
The available secure boot templates on this host.
-
#servers ⇒ Array<Server>
readonly
The VMs running on this host.
-
#switches ⇒ Array<Switch>
readonly
The network switches available on this host.
-
#virtual_hard_disk_path ⇒ String
readonly
The path where VHDs will be stored on this host.
-
#virtual_machine_path ⇒ String
readonly
The path where VMs will be stored on this host.
Instance Method Summary collapse
Methods inherited from Model
#initialize, #merge_attributes
Methods included from ModelExtends
Methods included from ModelIncludes
#cluster, #computer, #dirty, #dirty?, #vm
Constructor Details
This class inherits a constructor from Fog::Hyperv::Model
Instance Attribute Details
#fully_qualified_domain_name ⇒ String (readonly)
Returns the FQDN of this host.
12 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 12 attribute :fully_qualified_domain_name |
#logical_processor_count ⇒ Integer (readonly)
Returns the number of logical CPUs on this host.
15 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 15 attribute :logical_processor_count, type: :integer |
#mac_address_maximum ⇒ String (readonly)
Returns the highest possible MAC address for VMs on this host.
24 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 24 attribute :mac_address_maximum |
#mac_address_minimum ⇒ String (readonly)
Returns the lowest possible MAC address for VMs on this host.
21 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 21 attribute :mac_address_minimum |
#maximum_storage_migrations ⇒ String (readonly)
Returns the maximum number of simulatenous storage migrations on this host.
27 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 27 attribute :maximum_storage_migrations, type: :integer |
#maximum_virtual_machine_migrations ⇒ String (readonly)
Returns the maximum number of simulatenous VMM migrations on this host.
30 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 30 attribute :maximum_virtual_machine_migrations, type: :integer |
#memory_capacity ⇒ Integer (readonly)
Returns the amount of memory on this host.
18 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 18 attribute :memory_capacity, type: :integer |
#name ⇒ String (readonly) Also known as: computer_name
Returns the name of the host.
7 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 7 identity :name |
#network_adapters ⇒ Array<NetworkAdapter> (readonly)
Returns the network adapters on this host.
40 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 40 collection :network_adapters |
#secure_boot_templates ⇒ Array<String> (readonly)
Returns the available secure boot templates on this host.
50 51 52 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 50 def secure_boot_templates service.get_vm_host_sbt(computer_name: name) end |
#servers ⇒ Array<Server> (readonly)
Returns the VMs running on this host.
43 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 43 collection :servers |
#switches ⇒ Array<Switch> (readonly)
Returns the network switches available on this host.
46 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 46 collection :switches |
#virtual_hard_disk_path ⇒ String (readonly)
Returns the path where VHDs will be stored on this host.
33 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 33 attribute :virtual_hard_disk_path |
#virtual_machine_path ⇒ String (readonly)
Returns the path where VMs will be stored on this host.
36 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 36 attribute :virtual_machine_path |
Instance Method Details
#reload ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/fog/hyperv/compute/models/host.rb', line 54 def reload requires :name data = service.get_vm_host( computer_name:, name: ) return unless data merge_attributes(data) end |