Class: Fog::Compute::AzureRM::VirtualMachineExtensions

Inherits:
Fog::Collection
  • Object
show all
Defined in:
lib/fog/azurerm/models/compute/virtual_machine_extensions.rb

Overview

This class gives the implementation for get for virtual machine extension

Instance Method Summary collapse

Instance Method Details

#allObject



10
11
12
13
14
15
16
17
# File 'lib/fog/azurerm/models/compute/virtual_machine_extensions.rb', line 10

def all
  requires :resource_group, :vm_name
  vm_extensions = []
  service.get_virtual_machine(resource_group, vm_name).resources.compact.each do |extension|
    vm_extensions << Fog::Compute::AzureRM::VirtualMachineExtension.parse(extension)
  end
  load(vm_extensions)
end

#check_vm_extension_exists(resource_group_name, virtual_machine_name, vm_extension_name) ⇒ Object



25
26
27
# File 'lib/fog/azurerm/models/compute/virtual_machine_extensions.rb', line 25

def check_vm_extension_exists(resource_group_name, virtual_machine_name, vm_extension_name)
  service.check_vm_extension_exists(resource_group_name, virtual_machine_name, vm_extension_name)
end

#get(resource_group_name, virtual_machine_name, vm_extension_name) ⇒ Object



19
20
21
22
23
# File 'lib/fog/azurerm/models/compute/virtual_machine_extensions.rb', line 19

def get(resource_group_name, virtual_machine_name, vm_extension_name)
  vm_extension = service.get_vm_extension(resource_group_name, virtual_machine_name, vm_extension_name)
  vm_extension_fog = Fog::Compute::AzureRM::VirtualMachineExtension.new(service: service)
  vm_extension_fog.merge_attributes(Fog::Compute::AzureRM::VirtualMachineExtension.parse(vm_extension))
end