Sha256: e30a38eda0c037da5e14bd3e710fd035a5f9063ee7dd6bbb5d1c391c83949725

Contents?: true

Size: 820 Bytes

Versions: 45

Compression:

Stored size: 820 Bytes

Contents

module Fog
  module Compute
    class Vsphere
      class Customvalues < Fog::Collection
        autoload :Customvalue, File.expand_path('../customvalue', __FILE__)

        model Fog::Compute::Vsphere::Customvalue

        attr_accessor :vm

        def all(filters = {})
          requires :vm
          case vm
            when Fog::Compute::Vsphere::Server
              load service.list_vm_customvalues(vm.id)
            else
            raise 'customvalues should have vm'
          end
        end

        def get(key)
          requires :vm
          case vm
            when Fog::Compute::Vsphere::Server
              load service.list_vm_customvalues(vm.id)
            else
            raise 'customvalues should have vm'
          end.find { | cv | cv.key == key }
        end
     end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
fog-vsphere-1.7.0.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-2.1.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-2.1.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-2.0.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-2.0.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.13.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.13.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.12.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.11.3 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.11.2 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.11.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.11.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.10.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.9.2 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.9.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.9.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.8.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.7.1 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.7.0 lib/fog/vsphere/models/compute/customvalues.rb
fog-vsphere-1.6.0 lib/fog/vsphere/models/compute/customvalues.rb