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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acd0afd1ca263634b14096a02b1939be30393632
|
4
|
+
data.tar.gz: eb6e22787766fc16f3f4bef32f5699ea9fafd223
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cbfee8e5dac3866abefa1d248e5b0f3f132bbada4a9998d23dc2dee40bec141100e08797f45b4ee3602245ca86ade883fe43abb6ef35403289215f3c7710a94
|
7
|
+
data.tar.gz: 45faf83c18e7cffc641f8fa3053d2c4685b3c5b3882ac80b71a7124db4c391416504cdf2784a5bbceb3ebe7cac1e2f9ce635e9a2eeac9234239d0e04d94aa248
|
data/.hound.yml
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
StringLiterals:
|
2
|
+
EnforcedStyle: single_quotes
|
3
|
+
|
4
|
+
Style/InlineComment:
|
5
|
+
Enabled: true
|
6
|
+
|
7
|
+
Style/MethodCalledOnDoEndBlock:
|
8
|
+
Enabled: true
|
9
|
+
|
10
|
+
Style/HashSyntax:
|
11
|
+
EnforcedStyle: hash_rockets
|
12
|
+
|
13
|
+
Style/LineLength:
|
14
|
+
Max: 120
|
15
|
+
AllowURI: true
|
16
|
+
|
17
|
+
Style/SingleSpaceBeforeFirstArg:
|
18
|
+
Enabled: false
|
19
|
+
|
20
|
+
Style/SymbolArray:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Style/TrailingBlankLines:
|
24
|
+
Enabled: false
|
25
|
+
|
26
|
+
Style/TrailingWhitespace:
|
27
|
+
Enabled: false
|
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
matrix:
|
2
|
+
include:
|
3
|
+
- rvm: 1.8.7
|
4
|
+
gemfile: gemfiles/Gemfile.1.8.7
|
5
|
+
- rvm: 1.9.2
|
6
|
+
gemfile: gemfiles/Gemfile.1.9.2+
|
7
|
+
- rvm: 1.9.3
|
8
|
+
gemfile: gemfiles/Gemfile.1.9.2+
|
9
|
+
- rvm: 2.0.0
|
10
|
+
gemfile: gemfiles/Gemfile.1.9.2+
|
11
|
+
- rvm: 2.1.1
|
12
|
+
gemfile: gemfiles/Gemfile.1.9.2+
|
13
|
+
- rvm: ree
|
14
|
+
gemfile: gemfiles/Gemfile.1.8.7
|
15
|
+
- rvm: jruby
|
16
|
+
gemfile: gemfiles/Gemfile.1.9.2+
|
17
|
+
allow_failures:
|
18
|
+
- rvm: 1.8.7
|
19
|
+
- rvm: ree
|
data/CONTRIBUTING.md
CHANGED
@@ -5,14 +5,14 @@ New contributors are always welcome, when it doubt please ask questions. We stri
|
|
5
5
|
### Coding
|
6
6
|
|
7
7
|
* Pick a task:
|
8
|
-
* Offer feedback on open [pull requests](https://github.com/
|
9
|
-
* Review open [issues](https://github.com/
|
10
|
-
* [Create an issue](https://github.com/
|
8
|
+
* Offer feedback on open [pull requests](https://github.com/fog/fog-xenserver/pulls).
|
9
|
+
* Review open [issues](https://github.com/fog/fog-xenserver/issues) for things to help on.
|
10
|
+
* [Create an issue](https://github.com/fog/fog-xenserver/issues/new) to start a discussion on additions or features.
|
11
11
|
* Fork the project, add your changes and tests to cover them in a topic branch.
|
12
|
-
* Commit your changes and rebase against `
|
13
|
-
* [Submit a pull request](https://github.com/
|
12
|
+
* Commit your changes and rebase against `fog/fog-xenserver` to ensure everything is up to date.
|
13
|
+
* [Submit a pull request](https://github.com/fog/fog-xenserver/compare/)
|
14
14
|
|
15
15
|
### Non-Coding
|
16
16
|
|
17
|
-
* Offer feedback on open [issues](https://github.com/
|
17
|
+
* Offer feedback on open [issues](https://github.com/fog/fog-xenserver/issues).
|
18
18
|
* Organize or volunteer at events.
|
data/Gemfile
CHANGED
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2014-2014 [CONTRIBUTORS.md](https://github.com/
|
3
|
+
Copyright (c) 2014-2014 [CONTRIBUTORS.md](https://github.com/fog/fog-xenserver/blob/master/CONTRIBUTORS.md)
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
6
|
this software and associated documentation files (the "Software"), to deal in
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Fog::Xenserver
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/fog-xenserver.svg)](http://badge.fury.io/rb/fog-xenserver) [![Build Status](https://travis-ci.org/fog/fog-xenserver.svg)](https://travis-ci.org/fog/fog-xenserver) [![Dependency Status](https://gemnasium.com/fog/fog-xenserver.svg)](https://gemnasium.com/fog/fog-xenserver) [![Coverage Status](https://img.shields.io/coveralls/fog/fog-xenserver.svg)](https://coveralls.io/r/fog/fog-xenserver) [![Code Climate](https://codeclimate.com/github/fog/fog-xenserver.png)](https://codeclimate.com/github/fog/fog-xenserver) [![Stories in Ready](https://badge.waffle.io/fog/fog-xenserver.png?label=ready&title=Ready)](https://waffle.io/fog/fog-xenserver)
|
4
|
+
|
3
5
|
TODO: Write a gem description
|
4
6
|
|
5
7
|
## Installation
|
@@ -22,7 +24,7 @@ TODO: Write usage instructions here
|
|
22
24
|
|
23
25
|
## Contributing
|
24
26
|
|
25
|
-
1. Fork it ( https://github.com/
|
27
|
+
1. Fork it ( https://github.com/fog/fog-xenserver/fork )
|
26
28
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
29
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
30
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/Rakefile
CHANGED
@@ -1,2 +1,11 @@
|
|
1
|
-
require
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rake/testtask'
|
2
3
|
|
4
|
+
Rake::TestTask.new do |t|
|
5
|
+
t.libs.push %w(test)
|
6
|
+
t.test_files = FileList['test/**/*_test.rb']
|
7
|
+
t.verbose = true
|
8
|
+
end
|
9
|
+
|
10
|
+
desc 'Default Task'
|
11
|
+
task :default => [ :test ]
|
data/fog-xenserver.gemspec
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'fog/
|
4
|
+
require 'fog/xen_server/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'fog-xenserver'
|
8
|
-
spec.version = Fog::
|
8
|
+
spec.version = Fog::XenServer::VERSION
|
9
9
|
spec.authors = %q(Paulo Henrique Lopes Ribeiro)
|
10
10
|
spec.email = %q(plribeiro3000@gmail.com)
|
11
11
|
spec.description = %q{Module for the 'fog' gem to support XENSERVER.}
|
12
12
|
spec.summary = %q{This library can be used as a module for `fog` or as standalone provider
|
13
13
|
to use the XENSERVER in applications.}
|
14
|
-
spec.homepage = 'https://github.com/
|
14
|
+
spec.homepage = 'https://github.com/fog/fog-xenserver'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0")
|
@@ -22,5 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_dependency 'fog-core'
|
23
23
|
spec.add_dependency 'fog-xml'
|
24
24
|
spec.add_development_dependency 'rake'
|
25
|
-
spec.add_development_dependency '
|
25
|
+
spec.add_development_dependency 'minitest'
|
26
|
+
spec.add_development_dependency 'turn'
|
27
|
+
spec.add_development_dependency 'coveralls'
|
26
28
|
end
|
data/lib/fog.rb
CHANGED
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
class Collection
|
5
|
+
def all(options = {})
|
6
|
+
data = service.get_records model.provider_class
|
7
|
+
load(data)
|
8
|
+
end
|
9
|
+
|
10
|
+
def get(ref)
|
11
|
+
data = service.get_record(ref, model.provider_class)
|
12
|
+
new(data)
|
13
|
+
rescue Fog::XenServer::NotFound
|
14
|
+
nil
|
15
|
+
end
|
16
|
+
|
17
|
+
def get_by_name(name)
|
18
|
+
ref = service.get_by_name(name, model.provider_class)
|
19
|
+
return nil if ref.nil?
|
20
|
+
get(ref)
|
21
|
+
rescue Fog::XenServer::NotFound
|
22
|
+
nil
|
23
|
+
end
|
24
|
+
|
25
|
+
alias_method :find_by_name, :get_by_name
|
26
|
+
|
27
|
+
def get_by_uuid(uuid)
|
28
|
+
ref = service.get_by_uuid(uuid, model.provider_class)
|
29
|
+
return nil if ref.nil?
|
30
|
+
get(ref)
|
31
|
+
rescue Fog::XenServer::NotFound
|
32
|
+
nil
|
33
|
+
end
|
34
|
+
|
35
|
+
alias_method :find_by_uuid, :get_by_uuid
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
require 'fog/core'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer < Fog::Service
|
6
|
+
autoload :Models, 'fog/compute/xen_server/models'
|
7
|
+
autoload :Real, 'fog/compute/xen_server/real'
|
8
|
+
autoload :Mock, 'fog/compute/xen_server/mock'
|
9
|
+
|
10
|
+
requires :xenserver_username
|
11
|
+
requires :xenserver_password
|
12
|
+
requires :xenserver_url
|
13
|
+
recognizes :xenserver_defaults
|
14
|
+
recognizes :xenserver_timeout
|
15
|
+
|
16
|
+
model_path 'fog/compute/xen_server/models'
|
17
|
+
model :blob
|
18
|
+
collection :blobs
|
19
|
+
model :bond
|
20
|
+
collection :bonds
|
21
|
+
model :crash_dump
|
22
|
+
collection :crash_dumps
|
23
|
+
model :dr_task
|
24
|
+
collection :dr_tasks
|
25
|
+
model :gpu_group
|
26
|
+
collection :gpu_groups
|
27
|
+
model :host_crash_dump
|
28
|
+
collection :host_crash_dumps
|
29
|
+
model :host_patch
|
30
|
+
collection :host_patchs
|
31
|
+
model :pci
|
32
|
+
collection :pcis
|
33
|
+
model :pgpu
|
34
|
+
collection :pgpus
|
35
|
+
model :pif_metrics
|
36
|
+
collection :pifs_metrics
|
37
|
+
model :pool_patch
|
38
|
+
collection :pool_patchs
|
39
|
+
model :role
|
40
|
+
collection :roles
|
41
|
+
model :server
|
42
|
+
collection :servers
|
43
|
+
model :server_appliance
|
44
|
+
collection :server_appliances
|
45
|
+
model :storage_manager
|
46
|
+
collection :storage_managers
|
47
|
+
model :tunnel
|
48
|
+
collection :tunnels
|
49
|
+
model :vmpp
|
50
|
+
collection :vmpps
|
51
|
+
model :vtpm
|
52
|
+
collection :vtpms
|
53
|
+
model :host
|
54
|
+
collection :hosts
|
55
|
+
collection :vifs
|
56
|
+
model :vif
|
57
|
+
collection :storage_repositories
|
58
|
+
model :storage_repository
|
59
|
+
collection :pools
|
60
|
+
model :pool
|
61
|
+
collection :vbds
|
62
|
+
model :vbd
|
63
|
+
collection :vdis
|
64
|
+
model :vdi
|
65
|
+
collection :networks
|
66
|
+
model :network
|
67
|
+
collection :pifs
|
68
|
+
model :pif
|
69
|
+
collection :pbds
|
70
|
+
model :pbd
|
71
|
+
model :guest_metrics
|
72
|
+
collection :guests_metrics
|
73
|
+
model :server_metrics
|
74
|
+
collection :servers_metrics
|
75
|
+
model :vbd_metrics
|
76
|
+
collection :vbds_metrics
|
77
|
+
model :vif_metrics
|
78
|
+
collection :vifs_metrics
|
79
|
+
model :host_metrics
|
80
|
+
collection :hosts_metrics
|
81
|
+
model :host_cpu
|
82
|
+
collection :host_cpus
|
83
|
+
model :vlan
|
84
|
+
collection :vlans
|
85
|
+
model :console
|
86
|
+
collection :consoles
|
87
|
+
|
88
|
+
request_path 'fog/compute/xen_server/requests'
|
89
|
+
request :builtin_templates
|
90
|
+
request :create_server
|
91
|
+
request :create_vif
|
92
|
+
request :create_vdi
|
93
|
+
request :create_vbd
|
94
|
+
request :custom_templates
|
95
|
+
request :destroy_vif
|
96
|
+
request :clone_server
|
97
|
+
request :destroy_server
|
98
|
+
request :templates
|
99
|
+
request :unplug_vbd
|
100
|
+
request :eject_vbd
|
101
|
+
request :insert_vbd
|
102
|
+
request :destroy_vdi
|
103
|
+
request :shutdown_server
|
104
|
+
request :start_vm
|
105
|
+
request :start_server
|
106
|
+
request :get_record
|
107
|
+
request :get_records
|
108
|
+
request :set_affinity
|
109
|
+
request :set_attribute
|
110
|
+
request :reboot_server
|
111
|
+
request :provision_server
|
112
|
+
request :scan_sr
|
113
|
+
request :unplug_pbd
|
114
|
+
request :destroy_sr
|
115
|
+
request :create_sr
|
116
|
+
request :reboot_host
|
117
|
+
request :disable_host
|
118
|
+
request :enable_host
|
119
|
+
request :shutdown_host
|
120
|
+
request :create_network
|
121
|
+
request :destroy_network
|
122
|
+
request :create_vlan
|
123
|
+
request :destroy_vlan
|
124
|
+
request :snapshot_server
|
125
|
+
request :snapshot_revert
|
126
|
+
|
127
|
+
def self.const_missing(name)
|
128
|
+
Models.const_get(name)
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
class Mock
|
5
|
+
def self.data
|
6
|
+
@data ||= Hash.new do |hash, key|
|
7
|
+
hash[key] = {}
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.reset_data(keys=data.keys)
|
12
|
+
for key in [*keys]
|
13
|
+
data.delete(key)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def initialize(options={})
|
18
|
+
@host = options[:xenserver_pool_master]
|
19
|
+
@username = options[:xenserver_username]
|
20
|
+
@password = options[:xenserver_password]
|
21
|
+
@connection = Fog::XML::Connection.new(@host)
|
22
|
+
@connection.authenticate(@username, @password)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
autoload :Blob, 'fog/compute/xen_server/models/blob'
|
6
|
+
autoload :Blobs, 'fog/compute/xen_server/models/blobs'
|
7
|
+
autoload :Bond, 'fog/compute/xen_server/models/bond'
|
8
|
+
autoload :Bonds, 'fog/compute/xen_server/models/bonds'
|
9
|
+
autoload :Console, 'fog/compute/xen_server/models/console'
|
10
|
+
autoload :Consoles, 'fog/compute/xen_server/models/consoles'
|
11
|
+
autoload :CrashDump, 'fog/compute/xen_server/models/crash_dump'
|
12
|
+
autoload :CrashDumps, 'fog/compute/xen_server/models/crash_dumps'
|
13
|
+
autoload :DrTask, 'fog/compute/xen_server/models/dr_task'
|
14
|
+
autoload :DrTasks, 'fog/compute/xen_server/models/dr_tasks'
|
15
|
+
autoload :GpuGroup, 'fog/compute/xen_server/models/gpu_group'
|
16
|
+
autoload :GpuGroups, 'fog/compute/xen_server/models/gpu_groups'
|
17
|
+
autoload :GuestMetrics, 'fog/compute/xen_server/models/guest_metrics'
|
18
|
+
autoload :Host, 'fog/compute/xen_server/models/host'
|
19
|
+
autoload :HostCpu, 'fog/compute/xen_server/models/host_cpu'
|
20
|
+
autoload :HostCpus, 'fog/compute/xen_server/models/host_cpus'
|
21
|
+
autoload :HostCrashDump, 'fog/compute/xen_server/models/host_crash_dump'
|
22
|
+
autoload :HostCrashDumps, 'fog/compute/xen_server/models/host_crash_dumps'
|
23
|
+
autoload :HostMetrics, 'fog/compute/xen_server/models/host_metrics'
|
24
|
+
autoload :HostPatch, 'fog/compute/xen_server/models/host_patch'
|
25
|
+
autoload :HostPatchs, 'fog/compute/xen_server/models/host_patchs'
|
26
|
+
autoload :Hosts, 'fog/compute/xen_server/models/hosts'
|
27
|
+
autoload :HostsMetrics, 'fog/compute/xen_server/models/hosts_metrics'
|
28
|
+
autoload :Model, 'fog/compute/xen_server/models/model'
|
29
|
+
autoload :Network, 'fog/compute/xen_server/models/network'
|
30
|
+
autoload :Networks, 'fog/compute/xen_server/models/networks'
|
31
|
+
autoload :Pbd, 'fog/compute/xen_server/models/pbd'
|
32
|
+
autoload :Pbds, 'fog/compute/xen_server/models/pbds'
|
33
|
+
autoload :Pci, 'fog/compute/xen_server/models/pci'
|
34
|
+
autoload :Pcis, 'fog/compute/xen_server/models/pcis'
|
35
|
+
autoload :Pgpu, 'fog/compute/xen_server/models/pgpu'
|
36
|
+
autoload :Pgpus, 'fog/compute/xen_server/models/pgpus'
|
37
|
+
autoload :Pif, 'fog/compute/xen_server/models/pif'
|
38
|
+
autoload :PifMetrics, 'fog/compute/xen_server/models/pif_metrics'
|
39
|
+
autoload :Pifs, 'fog/compute/xen_server/models/pifs'
|
40
|
+
autoload :PifsMetrics, 'fog/compute/xen_server/models/pifs_metrics'
|
41
|
+
autoload :Pool, 'fog/compute/xen_server/models/pool'
|
42
|
+
autoload :PoolPatch, 'fog/compute/xen_server/models/pool_patch'
|
43
|
+
autoload :PoolPatchs, 'fog/compute/xen_server/models/pool_patchs'
|
44
|
+
autoload :Pools, 'fog/compute/xen_server/models/pools'
|
45
|
+
autoload :Role, 'fog/compute/xen_server/models/role'
|
46
|
+
autoload :Roles, 'fog/compute/xen_server/models/roles'
|
47
|
+
autoload :Server, 'fog/compute/xen_server/models/server'
|
48
|
+
autoload :ServerAppliance, 'fog/compute/xen_server/models/server_appliance'
|
49
|
+
autoload :ServerAppliances, 'fog/compute/xen_server/models/server_appliances'
|
50
|
+
autoload :ServerMetrics, 'fog/compute/xen_server/models/server_metrics'
|
51
|
+
autoload :ServersMetrics, 'fog/compute/xen_server/models/servers_metrics'
|
52
|
+
autoload :Servers, 'fog/compute/xen_server/models/servers'
|
53
|
+
autoload :StorageManager, 'fog/compute/xen_server/models/storage_manager'
|
54
|
+
autoload :StorageManagers, 'fog/compute/xen_server/models/storage_managers'
|
55
|
+
autoload :StorageRepositories, 'fog/compute/xen_server/models/storage_repositories'
|
56
|
+
autoload :StorageRepository, 'fog/compute/xen_server/models/storage_repository'
|
57
|
+
autoload :Tunnel, 'fog/compute/xen_server/models/tunnel'
|
58
|
+
autoload :Tunnels, 'fog/compute/xen_server/models/tunnels'
|
59
|
+
autoload :Vbd, 'fog/compute/xen_server/models/vbd'
|
60
|
+
autoload :VbdMetrics, 'fog/compute/xen_server/models/vbd_metrics'
|
61
|
+
autoload :Vbds, 'fog/compute/xen_server/models/vbds'
|
62
|
+
autoload :VbdsMetrics, 'fog/compute/xen_server/models/vbds_metrics'
|
63
|
+
autoload :Vdi, 'fog/compute/xen_server/models/vdi'
|
64
|
+
autoload :Vdis, 'fog/compute/xen_server/models/vdis'
|
65
|
+
autoload :Vif, 'fog/compute/xen_server/models/vif'
|
66
|
+
autoload :VifMetrics, 'fog/compute/xen_server/models/vif_metrics'
|
67
|
+
autoload :Vifs, 'fog/compute/xen_server/models/vifs'
|
68
|
+
autoload :VifsMetrics, 'fog/compute/xen_server/models/vifs_metrics'
|
69
|
+
autoload :Vlan, 'fog/compute/xen_server/models/vlan'
|
70
|
+
autoload :Vlans, 'fog/compute/xen_server/models/vlans'
|
71
|
+
autoload :Vmpp, 'fog/compute/xen_server/models/vmpp'
|
72
|
+
autoload :Vmpps, 'fog/compute/xen_server/models/vmpps'
|
73
|
+
autoload :Vtpm, 'fog/compute/xen_server/models/vtpm'
|
74
|
+
autoload :Vtpms, 'fog/compute/xen_server/models/vtpms'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|