Class: Fog::Compute::AzureRM::Servers
- Inherits:
-
Fog::Collection
- Object
- Fog::Collection
- Fog::Compute::AzureRM::Servers
- Defined in:
- lib/fog/azurerm/models/compute/servers.rb
Overview
This class is giving implementation of all/list, and get for Server.
Instance Method Summary collapse
Instance Method Details
#all ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/fog/azurerm/models/compute/servers.rb', line 13 def all requires :resource_group virtual_machines = [] service.list_virtual_machines(resource_group).each do |vm| virtual_machines << Fog::Compute::AzureRM::Server.parse(vm) end load(virtual_machines) end |
#get(resource_group_name, virtual_machine_name) ⇒ Object
22 23 24 25 26 |
# File 'lib/fog/azurerm/models/compute/servers.rb', line 22 def get(resource_group_name, virtual_machine_name) storage_account = service.get_virtual_machine(resource_group_name, virtual_machine_name) storage_account_obj = Fog::Compute::AzureRM::Server.new(service: service) storage_account_obj.merge_attributes(Fog::Compute::AzureRM::Server.parse(storage_account)) end |