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

Inherits:
Object
  • Object
show all
Defined in:
lib/fog/xenserver/compute.rb,
lib/fog/xenserver/requests/compute/scan_sr.rb,
lib/fog/xenserver/requests/compute/start_vm.rb,
lib/fog/xenserver/requests/compute/create_sr.rb,
lib/fog/xenserver/requests/compute/eject_vbd.rb,
lib/fog/xenserver/requests/compute/create_vbd.rb,
lib/fog/xenserver/requests/compute/create_vdi.rb,
lib/fog/xenserver/requests/compute/create_vif.rb,
lib/fog/xenserver/requests/compute/destroy_sr.rb,
lib/fog/xenserver/requests/compute/get_record.rb,
lib/fog/xenserver/requests/compute/insert_vbd.rb,
lib/fog/xenserver/requests/compute/unplug_pbd.rb,
lib/fog/xenserver/requests/compute/unplug_vbd.rb,
lib/fog/xenserver/requests/compute/create_vlan.rb,
lib/fog/xenserver/requests/compute/destroy_vdi.rb,
lib/fog/xenserver/requests/compute/destroy_vif.rb,
lib/fog/xenserver/requests/compute/enable_host.rb,
lib/fog/xenserver/requests/compute/get_records.rb,
lib/fog/xenserver/requests/compute/reboot_host.rb,
lib/fog/xenserver/requests/compute/clone_server.rb,
lib/fog/xenserver/requests/compute/destroy_vlan.rb,
lib/fog/xenserver/requests/compute/disable_host.rb,
lib/fog/xenserver/requests/compute/set_affinity.rb,
lib/fog/xenserver/requests/compute/start_server.rb,
lib/fog/xenserver/requests/compute/create_server.rb,
lib/fog/xenserver/requests/compute/reboot_server.rb,
lib/fog/xenserver/requests/compute/set_attribute.rb,
lib/fog/xenserver/requests/compute/shutdown_host.rb,
lib/fog/xenserver/requests/compute/create_network.rb,
lib/fog/xenserver/requests/compute/destroy_server.rb,
lib/fog/xenserver/requests/compute/destroy_network.rb,
lib/fog/xenserver/requests/compute/shutdown_server.rb,
lib/fog/xenserver/requests/compute/snapshot_revert.rb,
lib/fog/xenserver/requests/compute/snapshot_server.rb,
lib/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.



128
129
130
131
132
133
134
# File 'lib/fog/xenserver/compute.rb', line 128

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



116
117
118
119
120
# File 'lib/fog/xenserver/compute.rb', line 116

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

.reset_data(keys = data.keys) ⇒ Object



122
123
124
125
126
# File 'lib/fog/xenserver/compute.rb', line 122

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/fog/xenserver/requests/compute/clone_server.rb', line 24

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

#create_network(name, description = '', config = {}) ⇒ Object



34
35
36
# File 'lib/fog/xenserver/requests/compute/create_network.rb', line 34

def create_network( name, description = '', config = {} )
  Fog::Mock.not_implemented
end

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



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

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

#create_server_raw(config = {}) ⇒ Object



122
123
124
# File 'lib/fog/xenserver/requests/compute/create_server.rb', line 122

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

#create_sr(host_ref, name_label, type, name_description = nil, device_config = {}, physical_size = '0', content_type = nil, shared = false, sm_config = {}) ⇒ Object



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/fog/xenserver/requests/compute/create_sr.rb', line 56

def create_sr( host_ref,
               name_label, 
               type,
               name_description = nil,
               device_config    = {}, 
               physical_size    = '0',
               content_type     = nil, 
               shared           = false, 
               sm_config        = {} )
  Fog::Mock.not_implemented
end

#create_vbd(config) ⇒ Object



32
33
34
# File 'lib/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/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/fog/xenserver/requests/compute/create_vif.rb', line 49

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

#create_vlan(pif_ref, vlan_id, network_ref) ⇒ Object



27
28
29
# File 'lib/fog/xenserver/requests/compute/create_vlan.rb', line 27

def create_vlan( pif_ref, vlan_id, network_ref )
  Fog::Mock.not_implemented
end

#destroy_network(ref) ⇒ Object



26
27
28
# File 'lib/fog/xenserver/requests/compute/destroy_network.rb', line 26

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

#destroy_serverObject



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

def destroy_server()
  Fog::Mock.not_implemented
end

#destroy_sr(sr_ref) ⇒ Object



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

def destroy_sr( sr_ref )
  Fog::Mock.not_implemented
end

#destroy_vdiObject



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

def destroy_vdi()
  Fog::Mock.not_implemented
end

#destroy_vifObject



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

def destroy_vif()
  Fog::Mock.not_implemented
end

#destroy_vlan(ref) ⇒ Object



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

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

#disable_host(ref) ⇒ Object



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

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

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



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

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

#enable_host(ref) ⇒ Object



20
21
22
# File 'lib/fog/xenserver/requests/compute/enable_host.rb', line 20

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

#get_record_by_refObject



21
22
23
# File 'lib/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/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/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/fog/xenserver/requests/compute/provision_server.rb', line 14

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

#reboot_host(ref) ⇒ Object



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

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

#reboot_server(ref, stype) ⇒ Object



15
16
17
# File 'lib/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/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/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/fog/xenserver/requests/compute/set_attribute.rb', line 17

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

#shutdown_host(ref) ⇒ Object



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

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

#shutdown_server(vm_ref) ⇒ Object



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

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

#snapshot_revertObject



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

def snapshot_revert()
  Fog::Mock.not_implemented
end

#snapshot_serverObject



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

def snapshot_server()
  Fog::Mock.not_implemented
end

#start_server(vm_ref) ⇒ Object



15
16
17
# File 'lib/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/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/fog/xenserver/requests/compute/unplug_vbd.rb', line 23

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

#unplug_pbd(ref) ⇒ Object



18
19
20
# File 'lib/fog/xenserver/requests/compute/unplug_pbd.rb', line 18

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

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



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

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