Sha256: cd9f3728a87d9df127bb22ec53bacf5d6e51210d77ec1c19c4c358f81a9412a1

Contents?: true

Size: 1.11 KB

Versions: 13

Compression:

Stored size: 1.11 KB

Contents

require 'fog/core/model'

module Fog
  module Compute
    class XenServer

      class Host < Fog::Model
        # API Reference here:
        # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=host
        
        identity :reference
        
        attribute :name,              :aliases => :name_label
        attribute :uuid
        attribute :address
        attribute :allowed_operations
        attribute :enabled
        attribute :hostname
        attribute :metrics
        attribute :name_description
        attribute :other_config
        attribute :__pbds,            :aliases => :PBDs
        attribute :__pifs,            :aliases => :PIFs
        attribute :__resident_vms,      :aliases => :resident_VMs
        
        def pifs
          __pifs.collect { |pif| connection.pifs.get pif }
        end

        def pbds
          __pbds.collect { |pbd| connection.pbds.get pbd }
        end

        def resident_servers
          __resident_vms.collect { |ref| connection.servers.get ref }
        end

        def resident_vms
          resident_servers
        end

      end
      
    end
  end
end

Version data entries

13 entries across 13 versions & 7 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/xenserver/models/compute/host.rb
fog-nirvanix-1.8.1 lib/fog/xenserver/models/compute/host.rb
fog-parser-fix-1.6.1 lib/fog/xenserver/models/compute/host.rb
fog-test-again-1.6.0 lib/fog/xenserver/models/compute/host.rb
fog-parser-fix-1.6.0 lib/fog/xenserver/models/compute/host.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/xenserver/models/compute/host.rb
fog-sgonyea-1.8.1 lib/fog/xenserver/models/compute/host.rb
fog-1.8.0 lib/fog/xenserver/models/compute/host.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/xenserver/models/compute/host.rb
fog-1.7.0 lib/fog/xenserver/models/compute/host.rb
fog-1.6.0 lib/fog/xenserver/models/compute/host.rb
fog-1.5.0 lib/fog/xenserver/models/compute/host.rb
fog-1.4.0 lib/fog/xenserver/models/compute/host.rb