Class: Fog::Hyperv::Compute::Host

Inherits:
Model
  • Object
show all
Defined in:
lib/fog/hyperv/compute/models/host.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Model

#initialize, #merge_attributes

Methods included from ModelExtends

#collection

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_nameString (readonly)

Returns the FQDN of this host.

Returns:

  • (String)

    the FQDN of this host



12
# File 'lib/fog/hyperv/compute/models/host.rb', line 12

attribute :fully_qualified_domain_name

#logical_processor_countInteger (readonly)

Returns the number of logical CPUs on this host.

Returns:

  • (Integer)

    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_maximumString (readonly)

Returns the highest possible MAC address for VMs on this host.

Returns:

  • (String)

    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_minimumString (readonly)

Returns the lowest possible MAC address for VMs on this host.

Returns:

  • (String)

    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_migrationsString (readonly)

Returns the maximum number of simulatenous storage migrations on this host.

Returns:

  • (String)

    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_migrationsString (readonly)

Returns the maximum number of simulatenous VMM migrations on this host.

Returns:

  • (String)

    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_capacityInteger (readonly)

Returns the amount of memory on this host.

Returns:

  • (Integer)

    the amount of memory on this host



18
# File 'lib/fog/hyperv/compute/models/host.rb', line 18

attribute :memory_capacity, type: :integer

#nameString (readonly) Also known as: computer_name

Returns the name of the host.

Returns:

  • (String)

    the name of the host



7
# File 'lib/fog/hyperv/compute/models/host.rb', line 7

identity :name

#network_adaptersArray<NetworkAdapter> (readonly)

Returns the network adapters on this host.

Returns:



40
# File 'lib/fog/hyperv/compute/models/host.rb', line 40

collection :network_adapters

#secure_boot_templatesArray<String> (readonly)

Returns the available secure boot templates on this host.

Returns:

  • (Array<String>)

    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

#serversArray<Server> (readonly)

Returns the VMs running on this host.

Returns:

  • (Array<Server>)

    the VMs running on this host



43
# File 'lib/fog/hyperv/compute/models/host.rb', line 43

collection :servers

#switchesArray<Switch> (readonly)

Returns the network switches available on this host.

Returns:

  • (Array<Switch>)

    the network switches available on this host



46
# File 'lib/fog/hyperv/compute/models/host.rb', line 46

collection :switches

#virtual_hard_disk_pathString (readonly)

Returns the path where VHDs will be stored on this host.

Returns:

  • (String)

    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_pathString (readonly)

Returns the path where VMs will be stored on this host.

Returns:

  • (String)

    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

#reloadObject



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