diff --git a/lib/fog/xenserver/models/compute/host.rb b/lib/fog/xenserver/models/compute/host.rb index 9dbde6a56..acc50baea 100644 --- a/lib/fog/xenserver/models/compute/host.rb +++ b/lib/fog/xenserver/models/compute/host.rb @@ -7,9 +7,9 @@ module Fog 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 @@ -22,17 +22,17 @@ module Fog attribute :__pbds, :aliases => :PBDs attribute :__pifs, :aliases => :PIFs attribute :__resident_vms, :aliases => :resident_VMs - + def pifs - __pifs.collect { |pif| connection.pifs.get pif } + __pifs.collect { |pif| service.pifs.get pif } end def pbds - __pbds.collect { |pbd| connection.pbds.get pbd } + __pbds.collect { |pbd| service.pbds.get pbd } end def resident_servers - __resident_vms.collect { |ref| connection.servers.get ref } + __resident_vms.collect { |ref| service.servers.get ref } end def resident_vms @@ -41,7 +41,7 @@ module Fog def metrics return nil unless __metrics - rec = connection.get_record(__metrics, 'host_metrics' ) + rec = service.get_record(__metrics, 'host_metrics' ) Fog::Compute::XenServer::HostMetrics.new(rec) end @@ -107,7 +107,7 @@ module Fog end end - + end end end diff --git a/lib/fog/xenserver/models/compute/hosts.rb b/lib/fog/xenserver/models/compute/hosts.rb index 62822988d..4342b0415 100644 --- a/lib/fog/xenserver/models/compute/hosts.rb +++ b/lib/fog/xenserver/models/compute/hosts.rb @@ -4,26 +4,26 @@ require 'fog/xenserver/models/compute/host' module Fog module Compute class XenServer - + class Hosts < Fog::Collection - + model Fog::Compute::XenServer::Host - + def all(options={}) - data = connection.get_records 'host' + data = service.get_records 'host' load(data) end - + def get( host_ref ) - if host_ref && host = connection.get_record( host_ref, 'host' ) + if host_ref && host = service.get_record( host_ref, 'host' ) new(host) else nil end end - + end - + end end end diff --git a/lib/fog/xenserver/models/compute/network.rb b/lib/fog/xenserver/models/compute/network.rb index fb4f277fc..05eb8574f 100644 --- a/lib/fog/xenserver/models/compute/network.rb +++ b/lib/fog/xenserver/models/compute/network.rb @@ -3,15 +3,15 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class Network < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=network - + identity :reference - + attribute :uuid - attribute :__vifs, :aliases => :VIFs + attribute :__vifs, :aliases => :VIFs attribute :tags attribute :mtu, :aliases => :MTU attribute :bridge @@ -19,23 +19,23 @@ module Fog attribute :name, :aliases => :name_label attribute :other_config attribute :__pifs, :aliases => :PIFs - attribute :allowed_operations + attribute :allowed_operations attribute :current_operations attribute :blobs - + def refresh - data = connection.get_record( reference, 'network' ) + data = service.get_record( reference, 'network' ) merge_attributes( data ) true end - + # # Return the list of network related PIFs # def pifs p = [] __pifs.each do |pif| - p << connection.pifs.get(pif) + p << service.pifs.get(pif) end p end @@ -46,13 +46,13 @@ module Fog def vifs v = [] __vifs.each do |vif| - v << connection.vifs.get(vif) + v << service.vifs.get(vif) end v end end - + end end end diff --git a/lib/fog/xenserver/models/compute/networks.rb b/lib/fog/xenserver/models/compute/networks.rb index 90d2f4089..0048991fe 100644 --- a/lib/fog/xenserver/models/compute/networks.rb +++ b/lib/fog/xenserver/models/compute/networks.rb @@ -8,18 +8,18 @@ module Fog class Networks < Fog::Collection model Fog::Compute::XenServer::Network - + def initialize(attributes) super end def all(options = {}) - data = connection.get_records 'network' + data = service.get_records 'network' load(data) end def get( ref ) - if ref && obj = connection.get_record( ref, 'network' ) + if ref && obj = service.get_record( ref, 'network' ) new(obj) end rescue Fog::XenServer::NotFound diff --git a/lib/fog/xenserver/models/compute/pbd.rb b/lib/fog/xenserver/models/compute/pbd.rb index 7130c9103..ed96cfa3d 100644 --- a/lib/fog/xenserver/models/compute/pbd.rb +++ b/lib/fog/xenserver/models/compute/pbd.rb @@ -3,20 +3,20 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class PBD < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=PBD - + identity :reference - + attribute :uuid attribute :__host, :aliases => :host attribute :__sr, :aliases => :SR attribute :currently_attached def sr - connection.storage_repositories.get __sr + service.storage_repositories.get __sr end def storage_repository @@ -24,7 +24,7 @@ module Fog end def host - connection.hosts.get __host + service.hosts.get __host end def unplug @@ -32,7 +32,7 @@ module Fog end end - + end end end diff --git a/lib/fog/xenserver/models/compute/pbds.rb b/lib/fog/xenserver/models/compute/pbds.rb index 0c97907ac..de765a341 100644 --- a/lib/fog/xenserver/models/compute/pbds.rb +++ b/lib/fog/xenserver/models/compute/pbds.rb @@ -8,18 +8,18 @@ module Fog class Pbds < Fog::Collection model Fog::Compute::XenServer::PBD - + def initialize(attributes) super end def all(options = {}) - data = connection.get_records 'PBD' + data = service.get_records 'PBD' load(data) end def get( ref ) - if ref && obj = connection.get_record( ref, 'PBD' ) + if ref && obj = service.get_record( ref, 'PBD' ) new(obj) else nil diff --git a/lib/fog/xenserver/models/compute/pif.rb b/lib/fog/xenserver/models/compute/pif.rb index c3cb9654d..dfebda149 100644 --- a/lib/fog/xenserver/models/compute/pif.rb +++ b/lib/fog/xenserver/models/compute/pif.rb @@ -3,13 +3,13 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class PIF < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=PIF - + identity :reference - + attribute :uuid attribute :physical attribute :mac, :aliases => :MAC @@ -20,7 +20,7 @@ module Fog attribute :dns, :aliases => :DNS attribute :gateway attribute :ip, :aliases => :IP - attribute :ip_configuration_mode + attribute :ip_configuration_mode attribute :mtu, :aliases => :MTU attribute :__network, :aliases => :network attribute :netmask @@ -30,17 +30,17 @@ module Fog attribute :vlan, :aliases => :VLAN attribute :other_config attribute :__host, :aliases => :host - + def network - connection.networks.get __network + service.networks.get __network end def host - connection.hosts.get __host + service.hosts.get __host end - + end - + end end end diff --git a/lib/fog/xenserver/models/compute/pifs.rb b/lib/fog/xenserver/models/compute/pifs.rb index 448022de0..f7e8ae4ed 100644 --- a/lib/fog/xenserver/models/compute/pifs.rb +++ b/lib/fog/xenserver/models/compute/pifs.rb @@ -8,18 +8,18 @@ module Fog class Pifs < Fog::Collection model Fog::Compute::XenServer::PIF - + def initialize(attributes) super end def all(options = {}) - data = connection.get_records 'PIF' + data = service.get_records 'PIF' load(data) end def get( ref ) - if ref && obj = connection.get_record( ref, 'PIF' ) + if ref && obj = service.get_record( ref, 'PIF' ) new(obj) end rescue Fog::XenServer::NotFound diff --git a/lib/fog/xenserver/models/compute/pool.rb b/lib/fog/xenserver/models/compute/pool.rb index a9c580d0e..dd5a78159 100644 --- a/lib/fog/xenserver/models/compute/pool.rb +++ b/lib/fog/xenserver/models/compute/pool.rb @@ -3,27 +3,27 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class Pool < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=pool - + identity :reference - + attribute :uuid attribute :name, :aliases => :name_label attribute :description, :aliases => :name_description attribute :__default_sr, :aliases => :default_SR attribute :__master, :aliases => :master - attribute :tags + attribute :tags attribute :restrictions attribute :ha_enabled attribute :vswitch_controller attribute :__suspend_image_sr, :aliases => :suspend_image_SR - + def default_sr - connection.storage_repositories.get __default_sr + service.storage_repositories.get __default_sr end def default_sr=(sr) @@ -44,7 +44,7 @@ module Fog end def master - connection.hosts.get __master + service.hosts.get __master end def set_attribute(name, *val) @@ -56,7 +56,7 @@ module Fog end end - + end end end diff --git a/lib/fog/xenserver/models/compute/pools.rb b/lib/fog/xenserver/models/compute/pools.rb index 5caeff634..c39c0740c 100644 --- a/lib/fog/xenserver/models/compute/pools.rb +++ b/lib/fog/xenserver/models/compute/pools.rb @@ -8,18 +8,18 @@ module Fog class Pools < Fog::Collection model Fog::Compute::XenServer::Pool - + def initialize(attributes) super end def all(options = {}) - data = connection.get_records 'pool' + data = service.get_records 'pool' load(data) end def get( pool_ref ) - if pool_ref && pool = connection.get_record( pool_ref, 'pool' ) + if pool_ref && pool = service.get_record( pool_ref, 'pool' ) new(pool) else nil diff --git a/lib/fog/xenserver/models/compute/server.rb b/lib/fog/xenserver/models/compute/server.rb index fc2a7439f..dba41b960 100644 --- a/lib/fog/xenserver/models/compute/server.rb +++ b/lib/fog/xenserver/models/compute/server.rb @@ -7,9 +7,9 @@ module Fog class Server < Fog::Compute::Server # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VM - + identity :reference - + attribute :uuid attribute :name, :aliases => :name_label attribute :__affinity, :aliases => :affinity @@ -56,11 +56,11 @@ module Fog end def vbds - __vbds.collect {|vbd| connection.vbds.get vbd } + __vbds.collect {|vbd| service.vbds.get vbd } end def affinity - connection.hosts.get __affinity + service.hosts.get __affinity end def destroy @@ -74,26 +74,26 @@ module Fog if vbd.vdi.allowed_operations.include?("destroy") end end - connection.destroy_server( reference ) + service.destroy_server( reference ) true end def set_attribute(name, *val) - data = connection.set_attribute( 'VM', reference, name, *val ) + data = service.set_attribute( 'VM', reference, name, *val ) # Do not reload automatically for performance reasons # We can set multiple attributes at the same time and # then reload manually #reload end - + def refresh - data = connection.get_record( reference, 'VM' ) + data = service.get_record( reference, 'VM' ) merge_attributes( data ) true end def vifs - __vifs.collect { |vif| connection.vifs.get vif } + __vifs.collect { |vif| service.vifs.get vif } end # associations @@ -102,44 +102,44 @@ module Fog end def resident_on - connection.hosts.get __resident_on + service.hosts.get __resident_on end - + # # This is not always present in XenServer VMs # Guest needs XenTools installed to report this AFAIK def guest_metrics return nil unless __guest_metrics - rec = connection.get_record( __guest_metrics, 'VM_guest_metrics' ) + rec = service.get_record( __guest_metrics, 'VM_guest_metrics' ) Fog::Compute::XenServer::GuestMetrics.new(rec) end def tools_installed? !guest_metrics.nil? end - + def home_hypervisor - connection.hosts.first + service.hosts.first end - + def mac_address networks.first.MAC end - + def running? reload power_state == "Running" end - + def halted? reload power_state == "Halted" end - + # operations def start return false if running? - connection.start_server( reference ) + service.start_server( reference ) true end @@ -149,25 +149,25 @@ module Fog if params[:auto_start].nil? auto_start = true else - auto_start = params[:auto_start] + auto_start = params[:auto_start] end if template_name - attr = connection.get_record( - connection.create_server( name, template_name, nets, :auto_start => auto_start), + attr = service.get_record( + service.create_server( name, template_name, nets, :auto_start => auto_start), 'VM' ) else - attr = connection.get_record( - connection.create_server_raw(attributes), + attr = service.get_record( + service.create_server_raw(attributes), 'VM' ) end - merge_attributes attr + merge_attributes attr true end def reboot(stype = 'clean') - connection.reboot_server(reference, stype) + service.reboot_server(reference, stype) true end @@ -181,7 +181,7 @@ module Fog def stop(stype = 'clean') return false if !running? - connection.shutdown_server( reference, stype ) + service.shutdown_server( reference, stype ) wait_for { power_state == 'Halted' } true end @@ -195,12 +195,12 @@ module Fog end def provision - connection.provision_server reference + service.provision_server reference end # def snapshot # requires :reference, :name_label - # data = connection.snapshot_server(@reference, @name_label) + # data = service.snapshot_server(@reference, @name_label) # merge_attributes(data.body) # true # end diff --git a/lib/fog/xenserver/models/compute/servers.rb b/lib/fog/xenserver/models/compute/servers.rb index 345a5ae45..cd3e4f93e 100644 --- a/lib/fog/xenserver/models/compute/servers.rb +++ b/lib/fog/xenserver/models/compute/servers.rb @@ -10,7 +10,7 @@ module Fog model Fog::Compute::XenServer::Server def templates - data = connection.get_records 'VM' + data = service.get_records 'VM' data.delete_if do |vm| !vm[:is_a_template] end @@ -18,15 +18,15 @@ module Fog end def custom_templates - data = connection.get_records 'VM' + data = service.get_records 'VM' data.delete_if do |vm| - !vm[:is_a_template] or !vm[:other_config]['default_template'].nil? + !vm[:is_a_template] or !vm[:other_config]['default_template'].nil? end load(data) end - + def builtin_templates - data = connection.get_records 'VM' + data = service.get_records 'VM' data.delete_if do |vm| !vm[:is_a_template] or vm[:other_config]['default_template'].nil? end @@ -34,7 +34,7 @@ module Fog end def all(options = {}) - data = connection.get_records 'VM' + data = service.get_records 'VM' # Exclude templates data.delete_if { |vm| vm[:is_control_domain] or vm[:is_a_template] } data.delete_if { |vm| vm[:is_a_snapshot] and !options[:include_snapshots] } @@ -44,12 +44,12 @@ module Fog end def get_by_name( name ) - ref = connection.get_vm_by_name( name ) + ref = service.get_vm_by_name( name ) get ref end def get( vm_ref ) - if vm_ref && vm = connection.get_record( vm_ref, 'VM' ) + if vm_ref && vm = service.get_record( vm_ref, 'VM' ) new(vm) end rescue Fog::XenServer::NotFound diff --git a/lib/fog/xenserver/models/compute/storage_repositories.rb b/lib/fog/xenserver/models/compute/storage_repositories.rb index 4b23087a0..e3be7b940 100644 --- a/lib/fog/xenserver/models/compute/storage_repositories.rb +++ b/lib/fog/xenserver/models/compute/storage_repositories.rb @@ -10,14 +10,14 @@ module Fog model Fog::Compute::XenServer::StorageRepository def all - data = connection.get_records 'SR' + data = service.get_records 'SR' #data.delete_if {|sr| sr[:shared].eql?(false)} #data.delete_if {|sr| sr[:content_type].eql?('iso')} load(data) end def get( sr_ref ) - if sr_ref && sr = connection.get_record( sr_ref, 'SR' ) + if sr_ref && sr = service.get_record( sr_ref, 'SR' ) new(sr) else nil diff --git a/lib/fog/xenserver/models/compute/storage_repository.rb b/lib/fog/xenserver/models/compute/storage_repository.rb index 89e6eebeb..5422950ce 100644 --- a/lib/fog/xenserver/models/compute/storage_repository.rb +++ b/lib/fog/xenserver/models/compute/storage_repository.rb @@ -3,13 +3,13 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class StorageRepository < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=SR - + identity :reference - + attribute :name, :aliases => :name_label attribute :description, :aliases => :name_description attribute :uuid @@ -26,17 +26,17 @@ module Fog attribute :physical_utilisation attribute :sm_config attribute :virtual_allocation - + def vdis - __vdis.collect { |vdi| connection.vdis.get vdi } + __vdis.collect { |vdi| service.vdis.get vdi } end - + def pbds - __pbds.collect { |pbd| connection.pbds.get pbd } + __pbds.collect { |pbd| service.pbds.get pbd } end def scan - connection.scan_sr reference + service.scan_sr reference reload end @@ -84,7 +84,7 @@ module Fog end end - + end end end diff --git a/lib/fog/xenserver/models/compute/vbd.rb b/lib/fog/xenserver/models/compute/vbd.rb index 4611e9e37..9fa22470f 100644 --- a/lib/fog/xenserver/models/compute/vbd.rb +++ b/lib/fog/xenserver/models/compute/vbd.rb @@ -3,13 +3,13 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class VBD < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VBD - + identity :reference - + attribute :uuid attribute :currently_attached attribute :allowed_operations @@ -23,7 +23,7 @@ module Fog attribute :userdevice attribute :empty attribute :type - attribute :mode + attribute :mode attribute :storage_lock attribute :runtime_properties attribute :unpluggable @@ -38,36 +38,36 @@ module Fog # May return nil # def vdi - connection.vdis.get __vdi + service.vdis.get __vdi end # # TODO: May it return nil? # def server - connection.servers.get __vm + service.servers.get __vm end def save requires :vdi, :server - ref = connection.create_vbd attributes[:server], attributes[:vdi], attributes - merge_attributes connection.vbds.get(ref).attributes + ref = service.create_vbd attributes[:server], attributes[:vdi], attributes + merge_attributes service.vbds.get(ref).attributes end def unplug - connection.unplug_vbd reference + service.unplug_vbd reference end def unplug_force - connection.unplug_force_vbd reference + service.unplug_force_vbd reference end - + def eject - connection.eject_vbd reference + service.eject_vbd reference end - + def insert(vdi) - connection.insert_vbd reference, vdi.reference + service.insert_vbd reference, vdi.reference end # @@ -79,12 +79,12 @@ module Fog # def metrics return nil unless currently_attached - rec = connection.get_record( __metrics, 'VBD_metrics' ) + rec = service.get_record( __metrics, 'VBD_metrics' ) Fog::Compute::XenServer::VbdMetrics.new(rec) end end - + end end end diff --git a/lib/fog/xenserver/models/compute/vbds.rb b/lib/fog/xenserver/models/compute/vbds.rb index 13e5295f4..0e9eb9505 100644 --- a/lib/fog/xenserver/models/compute/vbds.rb +++ b/lib/fog/xenserver/models/compute/vbds.rb @@ -8,18 +8,18 @@ module Fog class Vbds < Fog::Collection model Fog::Compute::XenServer::VBD - + def initialize(attributes) super end def all(options = {}) - data = connection.get_records 'VBD' + data = service.get_records 'VBD' load(data) end def get( vbd_ref ) - if vbd_ref && vbd = connection.get_record( vbd_ref, 'VBD' ) + if vbd_ref && vbd = service.get_record( vbd_ref, 'VBD' ) new(vbd) end rescue Fog::XenServer::NotFound diff --git a/lib/fog/xenserver/models/compute/vdi.rb b/lib/fog/xenserver/models/compute/vdi.rb index 9f05a88d8..da3f3e964 100644 --- a/lib/fog/xenserver/models/compute/vdi.rb +++ b/lib/fog/xenserver/models/compute/vdi.rb @@ -3,13 +3,13 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class VDI < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VDI - + identity :reference - + attribute :uuid attribute :is_a_snapshot attribute :name, :aliases => :name_label @@ -34,10 +34,10 @@ module Fog attribute :on_boot attribute :sm_config attribute :snapshot_time - attribute :__snapshots, :aliases => :snapshots + attribute :__snapshots, :aliases => :snapshots attribute :__snapshot_of, :aliases => :snapshot_of attribute :xenstore_data - + # # Default VDI type is system # Default size 8GB @@ -50,45 +50,45 @@ module Fog self.read_only ||= false unless attributes[:read_only] self.sharable ||= false unless attributes[:sharable] self.other_config ||= {} unless attributes[:other_config] - super + super end - + def set_attribute(name, *val) - data = connection.set_attribute( 'VDI', reference, name, *val ) + data = service.set_attribute( 'VDI', reference, name, *val ) end def snapshot_of - connection.vdis.get __sr + service.vdis.get __sr end def parent - connection.vdis.get __parent + service.vdis.get __parent end def snapshots __snapshots.collect do |ref| - connection.vdis.get ref + service.vdis.get ref end end def vbds __vbds.collect do |ref| - connection.vbds.get ref + service.vbds.get ref end end def save requires :name, :storage_repository - ref = connection.create_vdi attributes - merge_attributes connection.vdis.get(ref).attributes + ref = service.create_vdi attributes + merge_attributes service.vdis.get(ref).attributes end def destroy - connection.destroy_vdi reference + service.destroy_vdi reference end def storage_repository - connection.storage_repositories.get __sr + service.storage_repositories.get __sr end def sr @@ -96,7 +96,7 @@ module Fog end end - + end end end diff --git a/lib/fog/xenserver/models/compute/vdis.rb b/lib/fog/xenserver/models/compute/vdis.rb index af1182bbe..abe8f7317 100644 --- a/lib/fog/xenserver/models/compute/vdis.rb +++ b/lib/fog/xenserver/models/compute/vdis.rb @@ -8,14 +8,14 @@ module Fog class Vdis < Fog::Collection model Fog::Compute::XenServer::VDI - + def all(options = {}) - data = connection.get_records 'VDI' + data = service.get_records 'VDI' load(data) end def get( vdi_ref ) - if vdi_ref && vdi = connection.get_record( vdi_ref, 'VDI' ) + if vdi_ref && vdi = service.get_record( vdi_ref, 'VDI' ) new(vdi) end rescue Fog::XenServer::NotFound diff --git a/lib/fog/xenserver/models/compute/vif.rb b/lib/fog/xenserver/models/compute/vif.rb index 6c5f7618c..7b83a1f8f 100644 --- a/lib/fog/xenserver/models/compute/vif.rb +++ b/lib/fog/xenserver/models/compute/vif.rb @@ -3,13 +3,13 @@ require 'fog/core/model' module Fog module Compute class XenServer - + class VIF < Fog::Model # API Reference here: # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VIF - + identity :reference - + attribute :mac, :aliases => :MAC attribute :uuid attribute :allowed_operations @@ -22,30 +22,30 @@ module Fog attribute :status_code attribute :status_detail attribute :__vm, :aliases => :VM - + def destroy - connection.destroy_vif reference + service.destroy_vif reference end def network - connection.networks.get __network + service.networks.get __network end def server - connection.servers.get __vm + service.servers.get __vm end def save requires :server raise ArgumentError.new('network is required for this operation') \ unless attributes[:__network] - ref = connection.create_vif attributes[:server], attributes[:__network] - merge_attributes connection.vifs.get(ref).attributes + ref = service.create_vif attributes[:server], attributes[:__network] + merge_attributes service.vifs.get(ref).attributes end end - + end end end diff --git a/lib/fog/xenserver/models/compute/vifs.rb b/lib/fog/xenserver/models/compute/vifs.rb index d7e6821dd..1b95551e5 100644 --- a/lib/fog/xenserver/models/compute/vifs.rb +++ b/lib/fog/xenserver/models/compute/vifs.rb @@ -8,14 +8,14 @@ module Fog class Vifs < Fog::Collection model Fog::Compute::XenServer::VIF - + def all(options = {}) - data = connection.get_records 'VIF' + data = service.get_records 'VIF' load(data) end def get( ref ) - if ref && obj = connection.get_record( ref, 'VIF' ) + if ref && obj = service.get_record( ref, 'VIF' ) new(obj) end rescue Fog::XenServer::NotFound