Module: FogExtensions::AzureRM::Servers

Extended by:
ActiveSupport::Concern
Defined in:
app/models/concerns/fog_extensions/azurerm/servers.rb

Instance Method Summary collapse

Instance Method Details

#all_with_patched_arguments(_options = {}) ⇒ Object



11
12
13
# File 'app/models/concerns/fog_extensions/azurerm/servers.rb', line 11

def all_with_patched_arguments(_options = {})
  all_without_patched_arguments
end

#get_with_patched_arguments(uuid) ⇒ Object



15
16
17
18
19
20
# File 'app/models/concerns/fog_extensions/azurerm/servers.rb', line 15

def get_with_patched_arguments(uuid)
  raw_vm = service.list_all_vms.find { |vm| vm.name == uuid }
  virtual_machine_fog = Fog::Compute::AzureRM::Server.new(service: service)
  vm_hash = Fog::Compute::AzureRM::Server.parse(raw_vm)
  virtual_machine_fog.merge_attributes(vm_hash)
end