fog-xenserver 0.0.1.alpha2 → 0.0.1.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.hound.yml +27 -0
- data/.travis.yml +19 -0
- data/CONTRIBUTING.md +6 -6
- data/Gemfile +1 -1
- data/LICENSE.md +1 -1
- data/README.md +3 -1
- data/Rakefile +10 -1
- data/fog-xenserver.gemspec +6 -4
- data/gemfiles/Gemfile.1.8.7 +7 -0
- data/gemfiles/Gemfile.1.9.2+ +6 -0
- data/lib/fog.rb +1 -1
- data/lib/fog/collection.rb +37 -0
- data/lib/fog/compute/xen_server.rb +132 -0
- data/lib/fog/compute/xen_server/mock.rb +27 -0
- data/lib/fog/compute/xen_server/models.rb +78 -0
- data/lib/fog/compute/xen_server/models/blob.rb +24 -0
- data/lib/fog/compute/xen_server/models/blobs.rb +11 -0
- data/lib/fog/compute/xen_server/models/bond.rb +26 -0
- data/lib/fog/compute/xen_server/models/bonds.rb +11 -0
- data/lib/fog/compute/xen_server/models/console.rb +23 -0
- data/lib/fog/compute/xen_server/models/consoles.rb +11 -0
- data/lib/fog/compute/xen_server/models/crash_dump.rb +22 -0
- data/lib/fog/compute/xen_server/models/crash_dumps.rb +11 -0
- data/lib/fog/compute/xen_server/models/dr_task.rb +20 -0
- data/lib/fog/compute/xen_server/models/dr_tasks.rb +11 -0
- data/lib/fog/compute/xen_server/models/gpu_group.rb +25 -0
- data/lib/fog/compute/xen_server/models/gpu_groups.rb +11 -0
- data/lib/fog/compute/xen_server/models/guest_metrics.rb +28 -0
- data/lib/fog/compute/xen_server/models/guests_metrics.rb +11 -0
- data/lib/fog/compute/xen_server/models/host.rb +121 -0
- data/lib/fog/compute/xen_server/models/host_cpu.rb +31 -0
- data/lib/fog/compute/xen_server/models/host_cpus.rb +11 -0
- data/lib/fog/compute/xen_server/models/host_crash_dump.rb +23 -0
- data/lib/fog/compute/xen_server/models/host_crash_dumps.rb +11 -0
- data/lib/fog/compute/xen_server/models/host_metrics.rb +28 -0
- data/lib/fog/compute/xen_server/models/host_patch.rb +28 -0
- data/lib/fog/compute/xen_server/models/host_patchs.rb +11 -0
- data/lib/fog/compute/xen_server/models/hosts.rb +11 -0
- data/lib/fog/compute/xen_server/models/hosts_metrics.rb +11 -0
- data/lib/fog/compute/xen_server/models/network.rb +65 -0
- data/lib/fog/compute/xen_server/models/networks.rb +11 -0
- data/lib/fog/compute/xen_server/models/pbd.rb +30 -0
- data/lib/fog/compute/xen_server/models/pbds.rb +11 -0
- data/lib/fog/compute/xen_server/models/pci.rb +25 -0
- data/lib/fog/compute/xen_server/models/pcis.rb +11 -0
- data/lib/fog/compute/xen_server/models/pgpu.rb +23 -0
- data/lib/fog/compute/xen_server/models/pgpus.rb +11 -0
- data/lib/fog/compute/xen_server/models/pif.rb +49 -0
- data/lib/fog/compute/xen_server/models/pif_metrics.rb +30 -0
- data/lib/fog/compute/xen_server/models/pifs.rb +11 -0
- data/lib/fog/compute/xen_server/models/pifs_metrics.rb +9 -0
- data/lib/fog/compute/xen_server/models/pool.rb +47 -0
- data/lib/fog/compute/xen_server/models/pool_patch.rb +27 -0
- data/lib/fog/compute/xen_server/models/pool_patchs.rb +11 -0
- data/lib/fog/compute/xen_server/models/pools.rb +11 -0
- data/lib/fog/compute/xen_server/models/role.rb +22 -0
- data/lib/fog/compute/xen_server/models/roles.rb +11 -0
- data/lib/fog/compute/xen_server/models/server.rb +203 -0
- data/lib/fog/compute/xen_server/models/server_appliance.rb +24 -0
- data/lib/fog/compute/xen_server/models/server_appliances.rb +11 -0
- data/lib/fog/compute/xen_server/models/server_metrics.rb +29 -0
- data/lib/fog/compute/xen_server/models/servers.rb +38 -0
- data/lib/fog/compute/xen_server/models/servers_metrics.rb +11 -0
- data/lib/fog/compute/xen_server/models/storage_manager.rb +30 -0
- data/lib/fog/compute/xen_server/models/storage_managers.rb +11 -0
- data/lib/fog/compute/xen_server/models/storage_repositories.rb +11 -0
- data/lib/fog/compute/xen_server/models/storage_repository.rb +77 -0
- data/lib/fog/compute/xen_server/models/tunnel.rb +23 -0
- data/lib/fog/compute/xen_server/models/tunnels.rb +11 -0
- data/lib/fog/compute/xen_server/models/vbd.rb +64 -0
- data/lib/fog/compute/xen_server/models/vbd_metrics.rb +27 -0
- data/lib/fog/compute/xen_server/models/vbds.rb +11 -0
- data/lib/fog/compute/xen_server/models/vbds_metrics.rb +11 -0
- data/lib/fog/compute/xen_server/models/vdi.rb +75 -0
- data/lib/fog/compute/xen_server/models/vdis.rb +11 -0
- data/lib/fog/compute/xen_server/models/vif.rb +53 -0
- data/lib/fog/compute/xen_server/models/vif_metrics.rb +22 -0
- data/lib/fog/compute/xen_server/models/vifs.rb +11 -0
- data/lib/fog/compute/xen_server/models/vifs_metrics.rb +11 -0
- data/lib/fog/compute/xen_server/models/vlan.rb +65 -0
- data/lib/fog/compute/xen_server/models/vlans.rb +11 -0
- data/lib/fog/compute/xen_server/models/vmpp.rb +38 -0
- data/lib/fog/compute/xen_server/models/vmpps.rb +11 -0
- data/lib/fog/compute/xen_server/models/vtpm.rb +21 -0
- data/lib/fog/compute/xen_server/models/vtpms.rb +11 -0
- data/lib/fog/compute/xen_server/real.rb +36 -0
- data/lib/fog/compute/xen_server/requests/builtin_templates.rb +21 -0
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/clone_server.rb +1 -5
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_network.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_server.rb +1 -14
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_sr.rb +1 -7
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_vbd.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_vdi.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_vif.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/create_vlan.rb +1 -6
- data/lib/fog/compute/xen_server/requests/custom_templates.rb +21 -0
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/destroy_network.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/destroy_server.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/destroy_sr.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/destroy_vdi.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/destroy_vif.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/destroy_vlan.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/disable_host.rb +1 -7
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/eject_vbd.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/enable_host.rb +1 -7
- data/lib/fog/compute/xen_server/requests/get_record.rb +41 -0
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/get_records.rb +1 -9
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/insert_vbd.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/provision_server.rb +1 -5
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/reboot_host.rb +2 -8
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/reboot_server.rb +2 -8
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/scan_sr.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/set_affinity.rb +1 -9
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/set_attribute.rb +1 -9
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/shutdown_host.rb +2 -8
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/shutdown_server.rb +2 -8
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/snapshot_revert.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/snapshot_server.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/start_server.rb +1 -7
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/start_vm.rb +2 -8
- data/lib/fog/compute/xen_server/requests/templates.rb +21 -0
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/unplug_pbd.rb +1 -6
- data/lib/fog/{xenserver/requests/compute → compute/xen_server/requests}/unplug_vbd.rb +1 -6
- data/lib/fog/model.rb +48 -0
- data/lib/fog/parsers/xen_server.rb +15 -0
- data/lib/fog/{xenserver/parser.rb → parsers/xen_server/base.rb} +1 -3
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_hosts.rb +1 -4
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_networks.rb +1 -4
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_pools.rb +1 -4
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_records.rb +1 -4
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_storage_repositories.rb +1 -4
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_vbds.rb +2 -5
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_vifs.rb +2 -5
- data/lib/fog/{xenserver/parsers → parsers/xen_server}/get_vms.rb +1 -5
- data/lib/fog/{xenserver/utilities.rb → utilities.rb} +0 -0
- data/lib/fog/{xenserver/core.rb → xen_server/connection.rb} +2 -40
- data/lib/fog/xen_server/invalid_login.rb +5 -0
- data/lib/fog/xen_server/nokogiri_stream_parser.rb +20 -0
- data/lib/fog/xen_server/not_found.rb +5 -0
- data/lib/fog/xen_server/request_failed.rb +5 -0
- data/lib/fog/xen_server/version.rb +5 -0
- data/lib/fog/xenserver.rb +27 -1
- data/lib/fog/xenserver/compute.rb +0 -176
- data/test/fog/compute/xen_server/models/blob_test.rb +40 -0
- data/test/fog/compute/xen_server/models/bond_test.rb +42 -0
- data/test/fog/compute/xen_server/models/console_test.rb +38 -0
- data/test/fog/compute/xen_server/models/crash_dump_test.rb +39 -0
- data/test/fog/compute/xen_server/models/dr_task_test.rb +35 -0
- data/test/fog/compute/xen_server/models/gpu_group_test.rb +45 -0
- data/test/fog/compute/xen_server/models/guest_metrics_test.rb +44 -0
- data/test/fog/compute/xen_server/models/host_cpu_test.rb +46 -0
- data/test/fog/compute/xen_server/models/host_crash_dump_test.rb +37 -0
- data/test/fog/compute/xen_server/models/host_metrics_test.rb +38 -0
- data/test/fog/compute/xen_server/models/host_patch_test.rb +45 -0
- data/test/fog/compute/xen_server/models/host_test.rb +102 -0
- data/test/fog/compute/xen_server/models/network_test.rb +51 -0
- data/test/fog/compute/xen_server/models/pbd_test.rb +40 -0
- data/test/fog/compute/xen_server/models/pci_test.rb +40 -0
- data/test/fog/compute/xen_server/models/pgpu_test.rb +41 -0
- data/test/fog/compute/xen_server/models/pif_metrics_test.rb +45 -0
- data/test/fog/compute/xen_server/models/pif_test.rb +81 -0
- data/test/fog/compute/xen_server/models/pool_patch_test.rb +43 -0
- data/test/fog/compute/xen_server/models/pool_test.rb +69 -0
- data/test/fog/compute/xen_server/models/role_test.rb +38 -0
- data/test/fog/compute/xen_server/models/server_appliance_test.rb +41 -0
- data/test/fog/compute/xen_server/models/server_metrics_test.rb +48 -0
- data/test/fog/compute/xen_server/models/server_test.rb +149 -0
- data/test/fog/compute/xen_server/models/storage_manger_test.rb +46 -0
- data/test/fog/compute/xen_server/models/storage_repository_test.rb +56 -0
- data/test/fog/compute/xen_server/models/tunnel_test.rb +40 -0
- data/test/fog/compute/xen_server/models/vbd_metrics_test.rb +37 -0
- data/test/fog/compute/xen_server/models/vbd_test.rb +58 -0
- data/test/fog/compute/xen_server/models/vdi_test.rb +71 -0
- data/test/fog/compute/xen_server/models/vif_metrics_test.rb +37 -0
- data/test/fog/compute/xen_server/models/vif_test.rb +59 -0
- data/test/fog/compute/xen_server/models/vlan_test.rb +40 -0
- data/test/fog/compute/xen_server/models/vmpp_test.rb +55 -0
- data/test/fog/compute/xen_server/models/vtpm_test.rb +36 -0
- data/test/minitest_helper.rb +28 -0
- metadata +239 -120
- data/lib/fog/compute.rb +0 -7
- data/lib/fog/xenserver/examples/README.md +0 -11
- data/lib/fog/xenserver/examples/chage_default_storage_repository.md +0 -99
- data/lib/fog/xenserver/examples/creating_servers.md +0 -168
- data/lib/fog/xenserver/examples/getting_started.md +0 -163
- data/lib/fog/xenserver/examples/networks-and-vlans.rb +0 -45
- data/lib/fog/xenserver/examples/storage_repositories.md +0 -94
- data/lib/fog/xenserver/models/compute/blob.rb +0 -22
- data/lib/fog/xenserver/models/compute/blobs.rb +0 -25
- data/lib/fog/xenserver/models/compute/bond.rb +0 -23
- data/lib/fog/xenserver/models/compute/bonds.rb +0 -25
- data/lib/fog/xenserver/models/compute/console.rb +0 -29
- data/lib/fog/xenserver/models/compute/consoles.rb +0 -25
- data/lib/fog/xenserver/models/compute/crash_dump.rb +0 -19
- data/lib/fog/xenserver/models/compute/crash_dumps.rb +0 -25
- data/lib/fog/xenserver/models/compute/dr_task.rb +0 -17
- data/lib/fog/xenserver/models/compute/dr_tasks.rb +0 -25
- data/lib/fog/xenserver/models/compute/gpu_group.rb +0 -22
- data/lib/fog/xenserver/models/compute/gpu_groups.rb +0 -25
- data/lib/fog/xenserver/models/compute/guest_metrics.rb +0 -29
- data/lib/fog/xenserver/models/compute/host.rb +0 -159
- data/lib/fog/xenserver/models/compute/host_cpu.rb +0 -38
- data/lib/fog/xenserver/models/compute/host_crash_dump.rb +0 -20
- data/lib/fog/xenserver/models/compute/host_crash_dumps.rb +0 -25
- data/lib/fog/xenserver/models/compute/host_metrics.rb +0 -29
- data/lib/fog/xenserver/models/compute/host_patch.rb +0 -25
- data/lib/fog/xenserver/models/compute/host_patchs.rb +0 -25
- data/lib/fog/xenserver/models/compute/hosts.rb +0 -29
- data/lib/fog/xenserver/models/compute/network.rb +0 -92
- data/lib/fog/xenserver/models/compute/networks.rb +0 -33
- data/lib/fog/xenserver/models/compute/pbd.rb +0 -40
- data/lib/fog/xenserver/models/compute/pbds.rb +0 -33
- data/lib/fog/xenserver/models/compute/pci.rb +0 -22
- data/lib/fog/xenserver/models/compute/pcis.rb +0 -25
- data/lib/fog/xenserver/models/compute/pgpu.rb +0 -20
- data/lib/fog/xenserver/models/compute/pgpus.rb +0 -25
- data/lib/fog/xenserver/models/compute/pif.rb +0 -57
- data/lib/fog/xenserver/models/compute/pif_metrics.rb +0 -28
- data/lib/fog/xenserver/models/compute/pifs.rb +0 -33
- data/lib/fog/xenserver/models/compute/pifs_metrics.rb +0 -25
- data/lib/fog/xenserver/models/compute/pool.rb +0 -79
- data/lib/fog/xenserver/models/compute/pool_patch.rb +0 -24
- data/lib/fog/xenserver/models/compute/pool_patchs.rb +0 -25
- data/lib/fog/xenserver/models/compute/pools.rb +0 -33
- data/lib/fog/xenserver/models/compute/role.rb +0 -19
- data/lib/fog/xenserver/models/compute/roles.rb +0 -25
- data/lib/fog/xenserver/models/compute/server.rb +0 -250
- data/lib/fog/xenserver/models/compute/server_appliance.rb +0 -21
- data/lib/fog/xenserver/models/compute/server_appliances.rb +0 -25
- data/lib/fog/xenserver/models/compute/servers.rb +0 -68
- data/lib/fog/xenserver/models/compute/storage_manager.rb +0 -28
- data/lib/fog/xenserver/models/compute/storage_managers.rb +0 -25
- data/lib/fog/xenserver/models/compute/storage_repositories.rb +0 -31
- data/lib/fog/xenserver/models/compute/storage_repository.rb +0 -93
- data/lib/fog/xenserver/models/compute/tunnel.rb +0 -20
- data/lib/fog/xenserver/models/compute/tunnels.rb +0 -25
- data/lib/fog/xenserver/models/compute/vbd.rb +0 -91
- data/lib/fog/xenserver/models/compute/vbd_metrics.rb +0 -27
- data/lib/fog/xenserver/models/compute/vbds.rb +0 -33
- data/lib/fog/xenserver/models/compute/vdi.rb +0 -105
- data/lib/fog/xenserver/models/compute/vdis.rb +0 -29
- data/lib/fog/xenserver/models/compute/vif.rb +0 -60
- data/lib/fog/xenserver/models/compute/vifs.rb +0 -29
- data/lib/fog/xenserver/models/compute/vlan.rb +0 -81
- data/lib/fog/xenserver/models/compute/vlans.rb +0 -39
- data/lib/fog/xenserver/models/compute/vmpp.rb +0 -35
- data/lib/fog/xenserver/models/compute/vmpps.rb +0 -25
- data/lib/fog/xenserver/models/compute/vtpm.rb +0 -18
- data/lib/fog/xenserver/models/compute/vtpms.rb +0 -25
- data/lib/fog/xenserver/requests/compute/get_record.rb +0 -29
- data/lib/fog/xenserver/version.rb +0 -5
@@ -0,0 +1,51 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Network do
|
4
|
+
let(:network_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Network
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Network
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
network_class.read_provider_class.must_equal('network')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
network_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 14 attributes' do
|
26
|
+
network_class.attributes.must_equal([ :reference,
|
27
|
+
:allowed_operations,
|
28
|
+
:blobs,
|
29
|
+
:bridge,
|
30
|
+
:current_operations,
|
31
|
+
:default_locking_mode,
|
32
|
+
:description,
|
33
|
+
:mtu,
|
34
|
+
:name,
|
35
|
+
:other_config,
|
36
|
+
:tags,
|
37
|
+
:uuid,
|
38
|
+
:__pifs,
|
39
|
+
:__vifs ])
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'should have 7 aliases' do
|
43
|
+
network_class.aliases.must_equal({ :VIFs => :__vifs,
|
44
|
+
:vifs => :__vifs,
|
45
|
+
:MTU => :mtu,
|
46
|
+
:name_description => :description,
|
47
|
+
:name_label => :name,
|
48
|
+
:PIFs => :__pifs,
|
49
|
+
:pifs => :__pifs })
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Pbd do
|
4
|
+
let(:pbd_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Pbd
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Pbd
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pbd_class.read_provider_class.must_equal('PBD')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pbd_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 7 attributes' do
|
26
|
+
pbd_class.attributes.must_equal([ :reference,
|
27
|
+
:currently_attached,
|
28
|
+
:device_config,
|
29
|
+
:other_config,
|
30
|
+
:uuid,
|
31
|
+
:__host,
|
32
|
+
:__sr ])
|
33
|
+
end
|
34
|
+
|
35
|
+
it 'should have 3 aliases' do
|
36
|
+
pbd_class.aliases.must_equal({ :host => :__host,
|
37
|
+
:SR => :__sr,
|
38
|
+
:sr => :__sr })
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Pci do
|
4
|
+
let(:pci_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Pci
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Pci
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pci_class.read_provider_class.must_equal('PCI')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pci_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 8 attributes' do
|
26
|
+
pci_class.attributes.must_equal([ :reference,
|
27
|
+
:device_name,
|
28
|
+
:other_config,
|
29
|
+
:pci_id,
|
30
|
+
:uuid,
|
31
|
+
:vendor_name,
|
32
|
+
:__dependencies,
|
33
|
+
:__host ])
|
34
|
+
end
|
35
|
+
|
36
|
+
it 'should have 2 aliases' do
|
37
|
+
pci_class.aliases.must_equal({ :dependencies => :__dependencies,
|
38
|
+
:host => :__host })
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Pgpu do
|
4
|
+
let(:pgpu_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Pgpu
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Pgpu
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pgpu_class.read_provider_class.must_equal('PGPU')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pgpu_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 6 attributes' do
|
26
|
+
pgpu_class.attributes.must_equal([ :reference,
|
27
|
+
:other_config,
|
28
|
+
:uuid,
|
29
|
+
:__gpu_group,
|
30
|
+
:__host,
|
31
|
+
:__pci ])
|
32
|
+
end
|
33
|
+
|
34
|
+
it 'should have 5 aliases' do
|
35
|
+
pgpu_class.aliases.must_equal({ :GPU_group => :__gpu_group,
|
36
|
+
:gpu_group => :__gpu_group,
|
37
|
+
:host => :__host,
|
38
|
+
:PCI => :__pci,
|
39
|
+
:pci => :__pci })
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::PifMetrics do
|
4
|
+
let(:pif_metrics_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::PifMetrics
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::PifMetrics
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pif_metrics_class.read_provider_class.must_equal('PIF_metrics')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pif_metrics_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 14 attributes' do
|
26
|
+
pif_metrics_class.attributes.must_equal([ :reference,
|
27
|
+
:carrier,
|
28
|
+
:device_id,
|
29
|
+
:device_name,
|
30
|
+
:duplex,
|
31
|
+
:io_read_kbs,
|
32
|
+
:io_write_kbs,
|
33
|
+
:last_updated,
|
34
|
+
:other_config,
|
35
|
+
:pci_bus_path,
|
36
|
+
:speed,
|
37
|
+
:uuid,
|
38
|
+
:vendor_id,
|
39
|
+
:vendor_name ])
|
40
|
+
end
|
41
|
+
|
42
|
+
it "shouldn't have aliases" do
|
43
|
+
pif_metrics_class.aliases.must_equal({})
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,81 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Pif do
|
4
|
+
let(:pif_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Pif
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Pif
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pif_class.read_provider_class.must_equal('PIF')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pif_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 32 attributes' do
|
26
|
+
pif_class.attributes.must_equal([ :reference,
|
27
|
+
:disallow_unplug,
|
28
|
+
:currently_attached,
|
29
|
+
:device,
|
30
|
+
:device_name,
|
31
|
+
:dns,
|
32
|
+
:gateway,
|
33
|
+
:ip,
|
34
|
+
:ip_configuration_mode,
|
35
|
+
:ipv6,
|
36
|
+
:ipv6_configuration_mode,
|
37
|
+
:ipv6_gateway,
|
38
|
+
:mac,
|
39
|
+
:management,
|
40
|
+
:mtu,
|
41
|
+
:netmask,
|
42
|
+
:other_config,
|
43
|
+
:physical,
|
44
|
+
:primary_address_type,
|
45
|
+
:status_code,
|
46
|
+
:status_detail,
|
47
|
+
:vlan,
|
48
|
+
:uuid,
|
49
|
+
:__bond_master_of,
|
50
|
+
:__bond_slave_of,
|
51
|
+
:__host,
|
52
|
+
:__metrics,
|
53
|
+
:__network,
|
54
|
+
:__tunnel_access_pif_of,
|
55
|
+
:__tunnel_transport_pif_of,
|
56
|
+
:__vlan_master_of,
|
57
|
+
:__vlan_slave_of ])
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'should have 19 aliases' do
|
61
|
+
pif_class.aliases.must_equal({ :bond_master_of => :__bond_master_of,
|
62
|
+
:bond_slave_of => :__bond_slave_of,
|
63
|
+
:MAC => :mac,
|
64
|
+
:DNS => :dns,
|
65
|
+
:IP => :ip,
|
66
|
+
:IPv6 => :ipv6,
|
67
|
+
:MTU => :mtu,
|
68
|
+
:network => :__network,
|
69
|
+
:metrics => :__metrics,
|
70
|
+
:tunnel_access_PIF_of => :__tunnel_access_pif_of,
|
71
|
+
:tunnel_access_pif_of => :__tunnel_access_pif_of,
|
72
|
+
:tunnel_transport_PIF_of => :__tunnel_transport_pif_of,
|
73
|
+
:tunnel_transport_pif_of => :__tunnel_transport_pif_of,
|
74
|
+
:VLAN => :vlan,
|
75
|
+
:VLAN_master_of => :__vlan_master_of,
|
76
|
+
:vlan_master_of => :__vlan_master_of,
|
77
|
+
:VLAN_slave_of => :__vlan_slave_of,
|
78
|
+
:vlan_slave_of => :__vlan_slave_of,
|
79
|
+
:host => :__host })
|
80
|
+
end
|
81
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::PoolPatch do
|
4
|
+
let(:pool_patch_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::PoolPatch
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::PoolPatch
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pool_patch_class.read_provider_class.must_equal('pool_patch')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pool_patch_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 10 attributes' do
|
26
|
+
pool_patch_class.attributes.must_equal([ :reference,
|
27
|
+
:after_apply_guidance,
|
28
|
+
:description,
|
29
|
+
:name,
|
30
|
+
:other_config,
|
31
|
+
:pool_applied,
|
32
|
+
:size,
|
33
|
+
:uuid,
|
34
|
+
:version,
|
35
|
+
:__host_patches ])
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'should have 3 aliases' do
|
39
|
+
pool_patch_class.aliases.must_equal({ :host_patches => :__host_patches,
|
40
|
+
:name_description => :description,
|
41
|
+
:name_label => :name })
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Pool do
|
4
|
+
let(:pool_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Pool
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Pool
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
pool_class.read_provider_class.must_equal('pool')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
pool_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 28 attributes' do
|
26
|
+
pool_class.attributes.must_equal([ :reference,
|
27
|
+
:blobs,
|
28
|
+
:description,
|
29
|
+
:gui_config,
|
30
|
+
:ha_allow_overcommit,
|
31
|
+
:ha_configuration,
|
32
|
+
:ha_enabled,
|
33
|
+
:ha_host_failures_to_tolerate,
|
34
|
+
:ha_overcommitted,
|
35
|
+
:ha_plan_exists_for,
|
36
|
+
:ha_statefiles,
|
37
|
+
:name,
|
38
|
+
:other_config,
|
39
|
+
:redo_log_enabled,
|
40
|
+
:redo_log_vdi,
|
41
|
+
:restrictions,
|
42
|
+
:tags,
|
43
|
+
:uuid,
|
44
|
+
:vswitch_controller,
|
45
|
+
:wlb_enabled,
|
46
|
+
:wlb_url,
|
47
|
+
:wlb_username,
|
48
|
+
:wlb_verify_cert,
|
49
|
+
:__crash_dump_sr,
|
50
|
+
:__default_sr,
|
51
|
+
:__master,
|
52
|
+
:__metadata_vdis,
|
53
|
+
:__suspend_image_sr ])
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should have 11 aliases' do
|
57
|
+
pool_class.aliases.must_equal({ :crash_dump_SR => :__crash_dump_sr,
|
58
|
+
:crash_dump_sr => :__crash_dump_sr,
|
59
|
+
:name_label => :name,
|
60
|
+
:name_description => :description,
|
61
|
+
:default_SR => :__default_sr,
|
62
|
+
:default_sr => :__default_sr,
|
63
|
+
:master => :__master,
|
64
|
+
:metadata_VDIs => :__metadata_vdis,
|
65
|
+
:metadata_vdis => :__metadata_vdis,
|
66
|
+
:suspend_image_SR => :__suspend_image_sr,
|
67
|
+
:suspend_image_sr => :__suspend_image_sr })
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'minitest_helper'
|
2
|
+
|
3
|
+
describe Fog::Compute::XenServer::Models::Role do
|
4
|
+
let(:role_class) do
|
5
|
+
class Fog::Compute::XenServer::Models::Role
|
6
|
+
def self.read_identity
|
7
|
+
instance_variable_get('@identity')
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.read_provider_class
|
11
|
+
instance_variable_get('@provider_class')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
Fog::Compute::XenServer::Models::Role
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should associate to a provider class' do
|
18
|
+
role_class.read_provider_class.must_equal('role')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should have an unique id' do
|
22
|
+
role_class.read_identity.must_equal(:reference)
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should have 5 attributes' do
|
26
|
+
role_class.attributes.must_equal([ :reference,
|
27
|
+
:description,
|
28
|
+
:name,
|
29
|
+
:uuid,
|
30
|
+
:__subroles ])
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should have 3 aliases' do
|
34
|
+
role_class.aliases.must_equal({ :name_description => :description,
|
35
|
+
:name_label => :name,
|
36
|
+
:subroles => :__subroles })
|
37
|
+
end
|
38
|
+
end
|