Sha256: bb0115cd8554836428eafef5edfd663554ef014b3417985ffecb7da7c6539208

Contents?: true

Size: 1014 Bytes

Versions: 1

Compression:

Stored size: 1014 Bytes

Contents

module Fog
  module Compute
    class AzureRM
      # This class gives the implementation for get for virtual machine extension
      class VirtualMachineExtensions < Fog::Collection
        model VirtualMachineExtension
        attribute :resource_group
        attribute :vm_name

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

        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_obj = VirtualMachineExtension.new(service: service)
          vm_extension_obj.merge_attributes(VirtualMachineExtension.parse(vm_extension))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fog-azure-rm-0.1.0 lib/fog/azurerm/models/compute/virtual_machine_extensions.rb