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,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class HostMetrics < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_metrics
|
8
|
+
|
9
|
+
provider_class :host_metrics
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :last_updated
|
14
|
+
attribute :live
|
15
|
+
attribute :memory_free
|
16
|
+
attribute :memory_total
|
17
|
+
attribute :other_config
|
18
|
+
attribute :uuid
|
19
|
+
|
20
|
+
def initialize(attributes = {})
|
21
|
+
super
|
22
|
+
self.last_updated = attributes[:last_updated].to_time
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class HostPatch < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_patch
|
8
|
+
|
9
|
+
provider_class :host_patch
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :applied
|
14
|
+
attribute :description, :aliases => :name_description
|
15
|
+
attribute :name, :aliases => :name_label
|
16
|
+
attribute :other_config
|
17
|
+
attribute :size
|
18
|
+
attribute :timestamp_applied
|
19
|
+
attribute :uuid
|
20
|
+
attribute :version
|
21
|
+
|
22
|
+
has_one :host, :hosts
|
23
|
+
has_one :pool_patch, :pool_patchs
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class Network < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=network
|
8
|
+
|
9
|
+
provider_class :network
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :allowed_operations
|
14
|
+
attribute :blobs
|
15
|
+
attribute :bridge
|
16
|
+
attribute :current_operations
|
17
|
+
attribute :default_locking_mode
|
18
|
+
attribute :description, :aliases => :name_description
|
19
|
+
attribute :mtu, :aliases => :MTU
|
20
|
+
attribute :name, :aliases => :name_label
|
21
|
+
attribute :other_config
|
22
|
+
attribute :tags
|
23
|
+
attribute :uuid
|
24
|
+
|
25
|
+
has_many :pifs, :pifs, :aliases => :PIFs
|
26
|
+
has_many :vifs, :vifs, :aliases => :VIFs
|
27
|
+
|
28
|
+
# Creates a new network
|
29
|
+
#
|
30
|
+
# service = Fog::Compute[:xenserver]
|
31
|
+
#
|
32
|
+
# # create network 'foonet'
|
33
|
+
# net = service.networks.create :name => 'foonet',
|
34
|
+
# :description => 'test network'
|
35
|
+
#
|
36
|
+
# @return [Boolean]
|
37
|
+
#
|
38
|
+
def save
|
39
|
+
requires :name
|
40
|
+
ref = service.create_network name, attributes
|
41
|
+
data = service.get_record ref, 'network'
|
42
|
+
merge_attributes data
|
43
|
+
true
|
44
|
+
end
|
45
|
+
|
46
|
+
# Destroys a network
|
47
|
+
#
|
48
|
+
# service = Fog::Compute[:xenserver]
|
49
|
+
#
|
50
|
+
# # find network 'foonet' and destroy it
|
51
|
+
# net = service.networks.find { |net| net.name == 'foonet' }
|
52
|
+
# net.destroy
|
53
|
+
#
|
54
|
+
# @return [Boolean]
|
55
|
+
#
|
56
|
+
def destroy
|
57
|
+
requires :reference
|
58
|
+
service.destroy_network reference
|
59
|
+
true
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class Pbd < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PBD
|
8
|
+
|
9
|
+
provider_class :PBD
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :currently_attached
|
14
|
+
attribute :device_config
|
15
|
+
attribute :other_config
|
16
|
+
attribute :uuid
|
17
|
+
|
18
|
+
has_one :host, :hosts
|
19
|
+
has_one :sr, :storage_repositories, :aliases => :SR
|
20
|
+
|
21
|
+
alias_method :storage_repository, :sr
|
22
|
+
|
23
|
+
def unplug
|
24
|
+
service.unplug_pbd reference
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class Pci < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PCI
|
8
|
+
|
9
|
+
provider_class :PCI
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :device_name
|
14
|
+
attribute :other_config
|
15
|
+
attribute :pci_id
|
16
|
+
attribute :uuid
|
17
|
+
attribute :vendor_name
|
18
|
+
|
19
|
+
has_many :dependencies, :pcis
|
20
|
+
has_one :host, :hosts
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class Pgpu < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PGPU
|
8
|
+
|
9
|
+
provider_class :PGPU
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :other_config
|
14
|
+
attribute :uuid
|
15
|
+
|
16
|
+
has_one :gpu_group, :gpu_groups, :aliases => :GPU_group
|
17
|
+
has_one :host, :hosts
|
18
|
+
has_one :pci, :pcis, :aliases => :PCI
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class Pif < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PIF
|
8
|
+
|
9
|
+
provider_class :PIF
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :disallow_unplug
|
14
|
+
attribute :currently_attached
|
15
|
+
attribute :device
|
16
|
+
attribute :device_name
|
17
|
+
attribute :dns, :aliases => :DNS
|
18
|
+
attribute :gateway
|
19
|
+
attribute :ip, :aliases => :IP
|
20
|
+
attribute :ip_configuration_mode
|
21
|
+
attribute :ipv6, :aliases => :IPv6
|
22
|
+
attribute :ipv6_configuration_mode
|
23
|
+
attribute :ipv6_gateway
|
24
|
+
attribute :mac, :aliases => :MAC
|
25
|
+
attribute :management
|
26
|
+
attribute :mtu, :aliases => :MTU
|
27
|
+
attribute :netmask
|
28
|
+
attribute :other_config
|
29
|
+
attribute :physical
|
30
|
+
attribute :primary_address_type
|
31
|
+
attribute :status_code
|
32
|
+
attribute :status_detail
|
33
|
+
attribute :vlan, :aliases => :VLAN
|
34
|
+
attribute :uuid
|
35
|
+
|
36
|
+
has_one :bond_master_of, :bonds
|
37
|
+
has_one :bond_slave_of, :bonds
|
38
|
+
has_one :host, :hosts
|
39
|
+
has_one :metrics, :pif_metrics
|
40
|
+
has_one :network, :networks
|
41
|
+
has_one :tunnel_access_pif_of, :tunnels, :aliases => :tunnel_access_PIF_of
|
42
|
+
has_one :tunnel_transport_pif_of, :tunnels, :aliases => :tunnel_transport_PIF_of
|
43
|
+
has_one :vlan_master_of, :vlans, :aliases => :VLAN_master_of
|
44
|
+
has_one :vlan_slave_of, :vlans, :aliases => :VLAN_slave_of
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class PifMetrics < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PIF_metrics
|
8
|
+
|
9
|
+
provider_class :PIF_metrics
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :carrier
|
14
|
+
attribute :device_id
|
15
|
+
attribute :device_name
|
16
|
+
attribute :duplex
|
17
|
+
attribute :io_read_kbs
|
18
|
+
attribute :io_write_kbs
|
19
|
+
attribute :last_updated
|
20
|
+
attribute :other_config
|
21
|
+
attribute :pci_bus_path
|
22
|
+
attribute :speed
|
23
|
+
attribute :uuid
|
24
|
+
attribute :vendor_id
|
25
|
+
attribute :vendor_name
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
module Fog
|
2
|
+
module Compute
|
3
|
+
class XenServer
|
4
|
+
module Models
|
5
|
+
class Pool < Fog::Model
|
6
|
+
# API Reference here:
|
7
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=pool
|
8
|
+
|
9
|
+
provider_class :pool
|
10
|
+
|
11
|
+
identity :reference
|
12
|
+
|
13
|
+
attribute :blobs
|
14
|
+
attribute :description, :aliases => :name_description
|
15
|
+
attribute :gui_config
|
16
|
+
attribute :ha_allow_overcommit
|
17
|
+
attribute :ha_configuration
|
18
|
+
attribute :ha_enabled
|
19
|
+
attribute :ha_host_failures_to_tolerate
|
20
|
+
attribute :ha_overcommitted
|
21
|
+
attribute :ha_plan_exists_for
|
22
|
+
attribute :ha_statefiles
|
23
|
+
attribute :name, :aliases => :name_label
|
24
|
+
attribute :other_config
|
25
|
+
attribute :redo_log_enabled
|
26
|
+
attribute :redo_log_vdi
|
27
|
+
attribute :restrictions
|
28
|
+
attribute :tags
|
29
|
+
attribute :uuid
|
30
|
+
attribute :vswitch_controller
|
31
|
+
attribute :wlb_enabled
|
32
|
+
attribute :wlb_url
|
33
|
+
attribute :wlb_username
|
34
|
+
attribute :wlb_verify_cert
|
35
|
+
|
36
|
+
has_one :crash_dump_sr, :storage_repositories, :aliases => :crash_dump_SR
|
37
|
+
has_one :default_sr, :storage_repositories, :aliases => :default_SR
|
38
|
+
has_one :master, :hosts
|
39
|
+
has_many :metadata_vdis, :vdis, :aliases => :metadata_VDIs
|
40
|
+
has_one :suspend_image_sr, :storage_repositories, :aliases => :suspend_image_SR
|
41
|
+
|
42
|
+
alias_method :default_storage_repository, :default_sr
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|