Class: Fog::Compute::XenServer::Mock

Inherits:
Object
  • Object
show all
Defined in:
lib/rackspace-fog/xenserver/compute.rb,
lib/rackspace-fog/xenserver/requests/compute/scan_sr.rb,
lib/rackspace-fog/xenserver/requests/compute/start_vm.rb,
lib/rackspace-fog/xenserver/requests/compute/eject_vbd.rb,
lib/rackspace-fog/xenserver/requests/compute/create_vbd.rb,
lib/rackspace-fog/xenserver/requests/compute/create_vdi.rb,
lib/rackspace-fog/xenserver/requests/compute/create_vif.rb,
lib/rackspace-fog/xenserver/requests/compute/get_record.rb,
lib/rackspace-fog/xenserver/requests/compute/insert_vbd.rb,
lib/rackspace-fog/xenserver/requests/compute/unplug_vbd.rb,
lib/rackspace-fog/xenserver/requests/compute/destroy_vdi.rb,
lib/rackspace-fog/xenserver/requests/compute/destroy_vif.rb,
lib/rackspace-fog/xenserver/requests/compute/get_records.rb,
lib/rackspace-fog/xenserver/requests/compute/clone_server.rb,
lib/rackspace-fog/xenserver/requests/compute/set_affinity.rb,
lib/rackspace-fog/xenserver/requests/compute/start_server.rb,
lib/rackspace-fog/xenserver/requests/compute/create_server.rb,
lib/rackspace-fog/xenserver/requests/compute/reboot_server.rb,
lib/rackspace-fog/xenserver/requests/compute/set_attribute.rb,
lib/rackspace-fog/xenserver/requests/compute/destroy_server.rb,
lib/rackspace-fog/xenserver/requests/compute/shutdown_server.rb,
lib/rackspace-fog/xenserver/requests/compute/provision_server.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Mock

Returns a new instance of Mock.



109
110
111
112
113
114
115
# File 'lib/rackspace-fog/xenserver/compute.rb', line 109

def initialize(options={})
  @host        = options[:xenserver_pool_master]
  @username    = options[:xenserver_username]
  @password    = options[:xenserver_password]
  @connection  = Fog::Connection.new(@host)
  @connection.authenticate(@username, @password)
end

Class Method Details

.dataObject



97
98
99
100
101
# File 'lib/rackspace-fog/xenserver/compute.rb', line 97

def self.data
  @data ||= Hash.new do |hash, key|
    hash[key] = {}
  end
end

.reset_data(keys = data.keys) ⇒ Object



103
104
105
106
107
# File 'lib/rackspace-fog/xenserver/compute.rb', line 103

def self.reset_data(keys=data.keys)
  for key in [*keys]
    data.delete(key)
  end
end

Instance Method Details

#clone_server(server_name, template_ref) ⇒ Object



24
25
26
# File 'lib/rackspace-fog/xenserver/requests/compute/clone_server.rb', line 24

def clone_server( server_name, template_ref )
  Fog::Mock.not_implemented
end

#create_server(name_label, template = nil, network = nil, extra_args = {}) ⇒ Object



114
115
116
# File 'lib/rackspace-fog/xenserver/requests/compute/create_server.rb', line 114

def create_server( name_label, template = nil, network = nil, extra_args = {})
  Fog::Mock.not_implemented
end

#create_server_raw(config = {}) ⇒ Object



118
119
120
# File 'lib/rackspace-fog/xenserver/requests/compute/create_server.rb', line 118

def create_server_raw(config = {})
  Fog::Mock.not_implemented
end

#create_vbd(config) ⇒ Object



32
33
34
# File 'lib/rackspace-fog/xenserver/requests/compute/create_vbd.rb', line 32

def create_vbd( config )
  Fog::Mock.not_implemented
end

#create_vdi(ref) ⇒ Object



25
26
27
# File 'lib/rackspace-fog/xenserver/requests/compute/create_vdi.rb', line 25

def create_vdi( ref )
  Fog::Mock.not_implemented
end

#create_vif(vm_ref, network_ref) ⇒ Object



49
50
51
# File 'lib/rackspace-fog/xenserver/requests/compute/create_vif.rb', line 49

def create_vif( vm_ref, network_ref )
  Fog::Mock.not_implemented
end

#destroy_serverObject



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/destroy_server.rb', line 15

def destroy_server()
  Fog::Mock.not_implemented
end

#destroy_vdiObject



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/destroy_vdi.rb', line 15

def destroy_vdi()
  Fog::Mock.not_implemented
end

#destroy_vifObject



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/destroy_vif.rb', line 15

def destroy_vif()
  Fog::Mock.not_implemented
end

#eject_vbd(ref, extra_args = {}) ⇒ Object



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/eject_vbd.rb', line 15

def eject_vbd(ref, extra_args = {})
  Fog::Mock.not_implemented
end

#get_record_by_refObject



21
22
23
# File 'lib/rackspace-fog/xenserver/requests/compute/get_record.rb', line 21

def get_record_by_ref
  Fog::Mock.not_implemented
end

#get_vmsObject



22
23
24
# File 'lib/rackspace-fog/xenserver/requests/compute/get_records.rb', line 22

def get_vms
  Fog::Mock.not_implemented
end

#insert_vbd(ref, vdi_ref, extra_args = {}) ⇒ Object



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/insert_vbd.rb', line 15

def insert_vbd(ref, vdi_ref, extra_args = {})
  Fog::Mock.not_implemented
end

#provision_server(ref) ⇒ Object



14
15
16
# File 'lib/rackspace-fog/xenserver/requests/compute/provision_server.rb', line 14

def provision_server( ref )
  Fog::Mock.not_implemented
end

#reboot_server(ref, stype) ⇒ Object



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/reboot_server.rb', line 15

def reboot_server( ref, stype )
  Fog::Mock.not_implemented
end

#scan_sr(ref, extra_args = {}) ⇒ Object



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/scan_sr.rb', line 15

def scan_sr(ref, extra_args = {})
  Fog::Mock.not_implemented
end

#set_affinity(uuid) ⇒ Object



17
18
19
# File 'lib/rackspace-fog/xenserver/requests/compute/set_affinity.rb', line 17

def set_affinity( uuid )
  Fog::Mock.not_implemented
end

#set_attribute(klass, ref, attr_name, value) ⇒ Object



17
18
19
# File 'lib/rackspace-fog/xenserver/requests/compute/set_attribute.rb', line 17

def set_attribute( klass, ref, attr_name, value )
  Fog::Mock.not_implemented
end

#shutdown_server(vm_ref) ⇒ Object



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/shutdown_server.rb', line 15

def shutdown_server( vm_ref )
  Fog::Mock.not_implemented
end

#start_server(vm_ref) ⇒ Object



15
16
17
# File 'lib/rackspace-fog/xenserver/requests/compute/start_server.rb', line 15

def start_server( vm_ref )
  Fog::Mock.not_implemented
end

#start_vm(vm_ref) ⇒ Object



17
18
19
# File 'lib/rackspace-fog/xenserver/requests/compute/start_vm.rb', line 17

def start_vm( vm_ref )
  Fog::Mock.not_implemented
end

#unplug_force_vbd(ref, extra_args = {}) ⇒ Object



23
24
25
# File 'lib/rackspace-fog/xenserver/requests/compute/unplug_vbd.rb', line 23

def unplug_force_vbd(ref, extra_args = {})
  Fog::Mock.not_implemented
end

#unplug_vbd(ref, extra_args = {}) ⇒ Object



19
20
21
# File 'lib/rackspace-fog/xenserver/requests/compute/unplug_vbd.rb', line 19

def unplug_vbd(ref, extra_args = {})
  Fog::Mock.not_implemented
end