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.



162
163
164
165
166
167
168
# File 'lib/fog/xenserver/compute.rb', line 162

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

Class Method Details

.dataObject



150
151
152
153
154
# File 'lib/fog/xenserver/compute.rb', line 150

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

.reset_data(keys = data.keys) ⇒ Object



156
157
158
159
160
# File 'lib/fog/xenserver/compute.rb', line 156

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



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

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

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



31
32
33
# File 'lib/fog/xenserver/requests/compute/create_network.rb', line 31

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

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



114
115
116
# File 'lib/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/fog/xenserver/requests/compute/create_server.rb', line 118

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



52
53
54
55
56
57
58
59
60
61
62
# File 'lib/fog/xenserver/requests/compute/create_sr.rb', line 52

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



29
30
31
# File 'lib/fog/xenserver/requests/compute/create_vbd.rb', line 29

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

#create_vdi(ref) ⇒ Object



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

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

#create_vif(vm_ref, network_ref) ⇒ Object



46
47
48
# File 'lib/fog/xenserver/requests/compute/create_vif.rb', line 46

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

#create_vlan(pif_ref, vlan_id, network_ref) ⇒ Object



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

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

#destroy_network(ref) ⇒ Object



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

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

#destroy_serverObject



11
12
13
# File 'lib/fog/xenserver/requests/compute/destroy_server.rb', line 11

def destroy_server()
  Fog::Mock.not_implemented
end

#destroy_sr(sr_ref) ⇒ Object



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

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

#destroy_vdiObject



11
12
13
# File 'lib/fog/xenserver/requests/compute/destroy_vdi.rb', line 11

def destroy_vdi()
  Fog::Mock.not_implemented
end

#destroy_vifObject



11
12
13
# File 'lib/fog/xenserver/requests/compute/destroy_vif.rb', line 11

def destroy_vif()
  Fog::Mock.not_implemented
end

#destroy_vlan(ref) ⇒ Object



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

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

#disable_host(ref) ⇒ Object



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

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

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



11
12
13
# File 'lib/fog/xenserver/requests/compute/eject_vbd.rb', line 11

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

#enable_host(ref) ⇒ Object



16
17
18
# File 'lib/fog/xenserver/requests/compute/enable_host.rb', line 16

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

#get_record_by_refObject



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

def get_record_by_ref
  Fog::Mock.not_implemented
end

#get_vmsObject



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

def get_vms
  Fog::Mock.not_implemented
end

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



11
12
13
# File 'lib/fog/xenserver/requests/compute/insert_vbd.rb', line 11

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

#provision_server(ref) ⇒ Object



11
12
13
# File 'lib/fog/xenserver/requests/compute/provision_server.rb', line 11

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

#reboot_host(ref) ⇒ Object



11
12
13
# File 'lib/fog/xenserver/requests/compute/reboot_host.rb', line 11

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

#reboot_server(ref, stype) ⇒ Object



11
12
13
# File 'lib/fog/xenserver/requests/compute/reboot_server.rb', line 11

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

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



11
12
13
# File 'lib/fog/xenserver/requests/compute/scan_sr.rb', line 11

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

#set_affinity(uuid) ⇒ Object



13
14
15
# File 'lib/fog/xenserver/requests/compute/set_affinity.rb', line 13

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

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



13
14
15
# File 'lib/fog/xenserver/requests/compute/set_attribute.rb', line 13

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

#shutdown_host(ref) ⇒ Object



11
12
13
# File 'lib/fog/xenserver/requests/compute/shutdown_host.rb', line 11

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

#shutdown_server(vm_ref) ⇒ Object



11
12
13
# File 'lib/fog/xenserver/requests/compute/shutdown_server.rb', line 11

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

#snapshot_revertObject



11
12
13
# File 'lib/fog/xenserver/requests/compute/snapshot_revert.rb', line 11

def snapshot_revert()
  Fog::Mock.not_implemented
end

#snapshot_serverObject



11
12
13
# File 'lib/fog/xenserver/requests/compute/snapshot_server.rb', line 11

def snapshot_server()
  Fog::Mock.not_implemented
end

#start_server(vm_ref) ⇒ Object



11
12
13
# File 'lib/fog/xenserver/requests/compute/start_server.rb', line 11

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

#start_vm(vm_ref) ⇒ Object



13
14
15
# File 'lib/fog/xenserver/requests/compute/start_vm.rb', line 13

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

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



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

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

#unplug_pbd(ref) ⇒ Object



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

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

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



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

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