fog-maestrodev 1.18.0.20131209091424 → 1.18.0.20131218202447
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/CONTRIBUTING.md +22 -0
- data/LICENSE.md +20 -0
- data/README.md +29 -42
- data/fog.gemspec +3 -3
- data/lib/fog/aws/compute.rb +1 -0
- data/lib/fog/aws/models/compute/subnet.rb +4 -0
- data/lib/fog/aws/models/compute/vpc.rb +5 -0
- data/lib/fog/aws/models/rds/server.rb +2 -0
- data/lib/fog/aws/models/storage/file.rb +2 -2
- data/lib/fog/aws/parsers/compute/assign_private_ip_addresses.rb +25 -0
- data/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb +60 -0
- data/lib/fog/aws/requests/compute/describe_subnets.rb +8 -0
- data/lib/fog/aws/requests/compute/describe_vpcs.rb +8 -0
- data/lib/fog/cloudstack.rb +1 -1
- data/lib/fog/core/connection.rb +1 -2
- data/lib/fog/core/hmac.rb +3 -3
- data/lib/fog/core/mock.rb +2 -2
- data/lib/fog/core/wait_for.rb +1 -1
- data/lib/fog/core/{timeout.rb → wait_for_defaults.rb} +10 -0
- data/lib/fog/core.rb +1 -1
- data/lib/fog/google/compute.rb +19 -11
- data/lib/fog/google/examples/create.rb +12 -1
- data/lib/fog/google/examples/eric-fail.rb +13 -2
- data/lib/fog/google/examples/image_create.rb +0 -1
- data/lib/fog/google/examples/launch_micro_instance.rb +1 -2
- data/lib/fog/google/examples/metadata.rb +14 -2
- data/lib/fog/google/examples/network.rb +13 -2
- data/lib/fog/google/models/compute/disk.rb +10 -8
- data/lib/fog/google/models/compute/image.rb +8 -3
- data/lib/fog/google/models/compute/server.rb +19 -4
- data/lib/fog/google/models/compute/servers.rb +25 -9
- data/lib/fog/google/requests/compute/insert_disk.rb +6 -3
- data/lib/fog/google/requests/compute/insert_image.rb +1 -5
- data/lib/fog/google/requests/compute/insert_server.rb +8 -21
- data/lib/fog/openstack/compute.rb +3 -0
- data/lib/fog/openstack/models/compute/host.rb +1 -0
- data/lib/fog/openstack/models/compute/security_group.rb +18 -4
- data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
- data/lib/fog/openstack/models/compute/security_group_rules.rb +22 -0
- data/lib/fog/openstack/network.rb +33 -3
- data/lib/fog/openstack/requests/compute/create_security_group.rb +3 -3
- data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -1
- data/lib/fog/openstack/requests/compute/create_server.rb +12 -5
- data/lib/fog/openstack/requests/compute/delete_security_group.rb +1 -1
- data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +2 -0
- data/lib/fog/openstack/requests/compute/get_security_group.rb +14 -24
- data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
- data/lib/fog/openstack/requests/compute/list_hosts.rb +3 -3
- data/lib/fog/openstack/volume.rb +3 -1
- data/lib/fog/rackspace/docs/auto_scale.md +9 -9
- data/lib/fog/rackspace/docs/getting_started.md +1 -0
- data/lib/fog/rackspace/docs/queues.md +312 -0
- data/lib/fog/vcloud_director/README.md +2 -0
- data/lib/fog/vcloud_director/compute.rb +78 -8
- data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +91 -0
- data/lib/fog/vcloud_director/generators/compute/vapp.rb +30 -0
- data/lib/fog/vcloud_director/models/compute/vm_customization.rb +2 -0
- data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +2 -0
- data/lib/fog/vcloud_director/requests/compute/delete_network.rb +64 -0
- data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +433 -333
- data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +3 -1
- data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +83 -0
- data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +1 -1
- data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +1 -0
- data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +37 -0
- data/lib/fog/vsphere/models/compute/server.rb +1 -1
- data/lib/fog/xenserver/compute.rb +35 -0
- data/lib/fog/xenserver/models/compute/blob.rb +22 -0
- data/lib/fog/xenserver/models/compute/blobs.rb +25 -0
- data/lib/fog/xenserver/models/compute/bond.rb +23 -0
- data/lib/fog/xenserver/models/compute/bonds.rb +25 -0
- data/lib/fog/xenserver/models/compute/console.rb +3 -1
- data/lib/fog/xenserver/models/compute/crash_dump.rb +19 -0
- data/lib/fog/xenserver/models/compute/crash_dumps.rb +25 -0
- data/lib/fog/xenserver/models/compute/dr_task.rb +17 -0
- data/lib/fog/xenserver/models/compute/dr_tasks.rb +25 -0
- data/lib/fog/xenserver/models/compute/gpu_group.rb +22 -0
- data/lib/fog/xenserver/models/compute/gpu_groups.rb +25 -0
- data/lib/fog/xenserver/models/compute/guest_metrics.rb +2 -1
- data/lib/fog/xenserver/models/compute/host.rb +41 -8
- data/lib/fog/xenserver/models/compute/host_cpu.rb +2 -1
- data/lib/fog/xenserver/models/compute/host_crash_dump.rb +20 -0
- data/lib/fog/xenserver/models/compute/host_crash_dumps.rb +25 -0
- data/lib/fog/xenserver/models/compute/host_metrics.rb +1 -1
- data/lib/fog/xenserver/models/compute/host_patch.rb +25 -0
- data/lib/fog/xenserver/models/compute/host_patchs.rb +25 -0
- data/lib/fog/xenserver/models/compute/network.rb +7 -6
- data/lib/fog/xenserver/models/compute/pbd.rb +3 -1
- data/lib/fog/xenserver/models/compute/pci.rb +22 -0
- data/lib/fog/xenserver/models/compute/pcis.rb +25 -0
- data/lib/fog/xenserver/models/compute/pgpu.rb +20 -0
- data/lib/fog/xenserver/models/compute/pgpus.rb +25 -0
- data/lib/fog/xenserver/models/compute/pif.rb +19 -8
- data/lib/fog/xenserver/models/compute/pif_metrics.rb +28 -0
- data/lib/fog/xenserver/models/compute/pifs_metrics.rb +25 -0
- data/lib/fog/xenserver/models/compute/pool.rb +18 -1
- data/lib/fog/xenserver/models/compute/pool_patch.rb +24 -0
- data/lib/fog/xenserver/models/compute/pool_patchs.rb +25 -0
- data/lib/fog/xenserver/models/compute/role.rb +19 -0
- data/lib/fog/xenserver/models/compute/roles.rb +25 -0
- data/lib/fog/xenserver/models/compute/server.rb +59 -26
- data/lib/fog/xenserver/models/compute/server_appliance.rb +21 -0
- data/lib/fog/xenserver/models/compute/server_appliances.rb +25 -0
- data/lib/fog/xenserver/models/compute/storage_manager.rb +28 -0
- data/lib/fog/xenserver/models/compute/storage_managers.rb +25 -0
- data/lib/fog/xenserver/models/compute/storage_repository.rb +4 -1
- data/lib/fog/xenserver/models/compute/tunnel.rb +20 -0
- data/lib/fog/xenserver/models/compute/tunnels.rb +25 -0
- data/lib/fog/xenserver/models/compute/vbd.rb +3 -2
- data/lib/fog/xenserver/models/compute/vbd_metrics.rb +1 -1
- data/lib/fog/xenserver/models/compute/vdi.rb +4 -1
- data/lib/fog/xenserver/models/compute/vif.rb +11 -2
- data/lib/fog/xenserver/models/compute/vlan.rb +2 -1
- data/lib/fog/xenserver/models/compute/vmpp.rb +35 -0
- data/lib/fog/xenserver/models/compute/vmpps.rb +25 -0
- data/lib/fog/xenserver/models/compute/vtpm.rb +18 -0
- data/lib/fog/xenserver/models/compute/vtpms.rb +25 -0
- data/tests/aws/requests/compute/assign_private_ip_tests.rb +52 -0
- data/tests/google/models/compute/servers_tests.rb +12 -1
- data/tests/google/requests/compute/image_tests.rb +0 -1
- data/tests/helpers/mock_helper.rb +1 -1
- data/tests/openstack/models/compute/security_group_tests.rb +54 -0
- data/tests/openstack/requests/compute/security_group_tests.rb +22 -20
- data/tests/openstack/requests/network/network_tests.rb +8 -8
- data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +17 -8
- data/tests/vcloud_director/requests/compute/network_tests.rb +25 -1
- data/tests/vcloud_director/requests/compute/query_tests.rb +67 -2
- metadata +125 -132
- checksums.yaml +0 -15
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class HostPatch < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_patch
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :applied
|
13
|
+
attribute :__host, :aliases => :host
|
14
|
+
attribute :description, :aliases => :name_description
|
15
|
+
attribute :name, :aliases => :name_label
|
16
|
+
attribute :other_config
|
17
|
+
attribute :__pool_patch, :aliases => :pool_patch
|
18
|
+
attribute :size
|
19
|
+
attribute :timestamp_applied
|
20
|
+
attribute :uuid
|
21
|
+
attribute :version
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/host_patch'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class HostPatchs < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::HostPatch
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'host_patch'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( host_patch_ref )
|
16
|
+
if host_patch_ref && host_patch = service.get_record( host_patch_ref, 'host_patch' )
|
17
|
+
new(host_patch)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -6,21 +6,22 @@ module Fog
|
|
6
6
|
|
7
7
|
class Network < Fog::Model
|
8
8
|
# API Reference here:
|
9
|
-
# http://docs.vmd.citrix.com/XenServer/
|
9
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=network
|
10
10
|
|
11
11
|
identity :reference
|
12
12
|
|
13
13
|
attribute :uuid
|
14
|
-
attribute :__vifs,
|
14
|
+
attribute :__vifs, :aliases => :VIFs
|
15
15
|
attribute :tags
|
16
|
-
attribute :mtu,
|
16
|
+
attribute :mtu, :aliases => :MTU
|
17
17
|
attribute :bridge
|
18
|
-
attribute :description,
|
19
|
-
attribute :name,
|
18
|
+
attribute :description, :aliases => :name_description
|
19
|
+
attribute :name, :aliases => :name_label
|
20
20
|
attribute :other_config
|
21
|
-
attribute :__pifs,
|
21
|
+
attribute :__pifs, :aliases => :PIFs
|
22
22
|
attribute :allowed_operations
|
23
23
|
attribute :current_operations
|
24
|
+
attribute :default_locking_mode
|
24
25
|
attribute :blobs
|
25
26
|
|
26
27
|
def refresh
|
@@ -6,7 +6,7 @@ module Fog
|
|
6
6
|
|
7
7
|
class PBD < Fog::Model
|
8
8
|
# API Reference here:
|
9
|
-
# http://docs.vmd.citrix.com/XenServer/
|
9
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PBD
|
10
10
|
|
11
11
|
identity :reference
|
12
12
|
|
@@ -14,6 +14,8 @@ module Fog
|
|
14
14
|
attribute :__host, :aliases => :host
|
15
15
|
attribute :__sr, :aliases => :SR
|
16
16
|
attribute :currently_attached
|
17
|
+
attribute :device_config
|
18
|
+
attribute :other_config
|
17
19
|
|
18
20
|
def sr
|
19
21
|
service.storage_repositories.get __sr
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class Pci < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PCI
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :__dependencies, :aliases => :dependencies
|
13
|
+
attribute :device_name
|
14
|
+
attribute :__host, :aliases => :host
|
15
|
+
attribute :other_config
|
16
|
+
attribute :pci_id
|
17
|
+
attribute :uuid
|
18
|
+
attribute :vendor_name
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/pci'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class Pcis < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::Pci
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'PCI'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( pci_ref )
|
16
|
+
if pci_ref && pci = service.get_record( pci_ref, 'PCI' )
|
17
|
+
new(pci)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class Pgpu < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PGPU
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :__gpu_group, :aliases => :GPU_group
|
13
|
+
attribute :__host, :aliases => :host
|
14
|
+
attribute :other_config
|
15
|
+
attribute :__pci, :aliases => :PCI
|
16
|
+
attribute :uuid
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/pgpu'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class Pgpus < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::Pgpu
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'PGPU'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( pgpu_ref )
|
16
|
+
if pgpu_ref && pgpu = service.get_record( pgpu_ref, 'PGPU' )
|
17
|
+
new(pgpu)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -6,30 +6,41 @@ module Fog
|
|
6
6
|
|
7
7
|
class PIF < Fog::Model
|
8
8
|
# API Reference here:
|
9
|
-
# http://docs.vmd.citrix.com/XenServer/
|
9
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PIF
|
10
10
|
|
11
11
|
identity :reference
|
12
12
|
|
13
13
|
attribute :uuid
|
14
|
+
attribute :__bond_master_of, :aliases => :bond_master_of
|
15
|
+
attribute :__bond_slave_of, :aliases => :bond_slave_of
|
16
|
+
attribute :disallow_unplug
|
14
17
|
attribute :physical
|
15
|
-
attribute :mac,
|
18
|
+
attribute :mac, :aliases => :MAC
|
16
19
|
attribute :currently_attached
|
17
20
|
attribute :device
|
18
21
|
attribute :device_name
|
19
22
|
attribute :metrics
|
20
|
-
attribute :dns,
|
23
|
+
attribute :dns, :aliases => :DNS
|
21
24
|
attribute :gateway
|
22
|
-
attribute :ip,
|
25
|
+
attribute :ip, :aliases => :IP
|
23
26
|
attribute :ip_configuration_mode
|
24
|
-
attribute :
|
25
|
-
attribute :
|
27
|
+
attribute :ipv6, :aliases => :IPv6
|
28
|
+
attribute :ipv6_configuration_mode
|
29
|
+
attribute :ipv6_gateway
|
30
|
+
attribute :mtu, :aliases => :MTU
|
31
|
+
attribute :__network, :aliases => :network
|
26
32
|
attribute :netmask
|
27
33
|
attribute :status_code
|
28
34
|
attribute :status_detail
|
29
35
|
attribute :management
|
30
|
-
attribute :
|
36
|
+
attribute :primary_address_type
|
37
|
+
attribute :__tunnel_access_pif_of, :aliases => :tunnel_access_PIF_of
|
38
|
+
attribute :__tunnel_transport_pif_of, :aliases => :tunnel_transport_PIF_of
|
39
|
+
attribute :vlan, :aliases => :VLAN
|
40
|
+
attribute :vlan_master_of, :aliases => :VLAN_master_of
|
41
|
+
attribute :vlan_slave_of, :aliases => :VLAN_slave_of
|
31
42
|
attribute :other_config
|
32
|
-
attribute :__host,
|
43
|
+
attribute :__host, :aliases => :host
|
33
44
|
|
34
45
|
def network
|
35
46
|
service.networks.get __network
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class PifMetrics < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=PIF_metrics
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :carrier
|
13
|
+
attribute :device_id
|
14
|
+
attribute :device_name
|
15
|
+
attribute :duplex
|
16
|
+
attribute :io_read_kbs
|
17
|
+
attribute :io_write_kbs
|
18
|
+
attribute :last_updated
|
19
|
+
attribute :other_config
|
20
|
+
attribute :pci_bus_path
|
21
|
+
attribute :speed
|
22
|
+
attribute :uuid
|
23
|
+
attribute :vendor_id
|
24
|
+
attribute :vendor_name
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/pif_metrics'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class PifsMetrics < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::PifMetrics
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'PIF_metrics'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( pif_metrics_ref )
|
16
|
+
if pif_metrics_ref && pif_metrics = service.get_record( pif_metrics_ref, 'PIF_metrics' )
|
17
|
+
new(pif_metrics)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -6,20 +6,37 @@ module Fog
|
|
6
6
|
|
7
7
|
class Pool < Fog::Model
|
8
8
|
# API Reference here:
|
9
|
-
# http://docs.vmd.citrix.com/XenServer/
|
9
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=pool
|
10
10
|
|
11
11
|
identity :reference
|
12
12
|
|
13
13
|
attribute :uuid
|
14
|
+
attribute :blobs
|
15
|
+
attribute :__crash_dump_sr, :aliases => :crash_dump_SR
|
14
16
|
attribute :name, :aliases => :name_label
|
15
17
|
attribute :description, :aliases => :name_description
|
16
18
|
attribute :__default_sr, :aliases => :default_SR
|
19
|
+
attribute :gui_config
|
20
|
+
attribute :ha_allow_overcommit
|
21
|
+
attribute :ha_configuration
|
17
22
|
attribute :__master, :aliases => :master
|
18
23
|
attribute :tags
|
19
24
|
attribute :restrictions
|
20
25
|
attribute :ha_enabled
|
26
|
+
attribute :ha_host_failures_to_tolerate
|
27
|
+
attribute :ha_overcommitted
|
28
|
+
attribute :ha_plan_exists_for
|
29
|
+
attribute :ha_statefiles
|
30
|
+
attribute :__metadata_vdis, :aliases => :metadata_VDIs
|
31
|
+
attribute :other_config
|
32
|
+
attribute :redo_log_enabled
|
33
|
+
attribute :redo_log_vdi
|
21
34
|
attribute :vswitch_controller
|
22
35
|
attribute :__suspend_image_sr, :aliases => :suspend_image_SR
|
36
|
+
attribute :wlb_enabled
|
37
|
+
attribute :wlb_url
|
38
|
+
attribute :wlb_username
|
39
|
+
attribute :wlb_verify_cert
|
23
40
|
|
24
41
|
|
25
42
|
def default_sr
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class PoolPatch < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=pool_patch
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :after_apply_guidance
|
13
|
+
attribute :__host_patches, :aliases => :host_patches
|
14
|
+
attribute :description, :aliases => :name_description
|
15
|
+
attribute :name, :aliases => :name_label
|
16
|
+
attribute :other_config
|
17
|
+
attribute :pool_applied
|
18
|
+
attribute :size
|
19
|
+
attribute :uuid
|
20
|
+
attribute :version
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/pool_patch'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class PoolPatchs < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::PoolPatch
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'pool_patch'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( pool_patch_ref )
|
16
|
+
if pool_patch_ref && pool_patch = service.get_record( pool_patch_ref, 'pool_patch' )
|
17
|
+
new(pool_patch)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class Role < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=role
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :description, :aliases => :name_description
|
13
|
+
attribute :name, :aliases => :name_label
|
14
|
+
attribute :__subroles, :aliases => :subroles
|
15
|
+
attribute :uuid
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/role'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class Roles < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::Role
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'role'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( role_ref )
|
16
|
+
if role_ref && role = service.get_record( role_ref, 'role' )
|
17
|
+
new(role)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -6,56 +6,89 @@ module Fog
|
|
6
6
|
|
7
7
|
class Server < Fog::Compute::Server
|
8
8
|
# API Reference here:
|
9
|
-
# http://docs.vmd.citrix.com/XenServer/
|
9
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM
|
10
10
|
|
11
11
|
identity :reference
|
12
12
|
|
13
13
|
attribute :uuid
|
14
|
-
attribute :name,
|
15
|
-
attribute :
|
14
|
+
attribute :name, :aliases => :name_label
|
15
|
+
attribute :description, :aliases => :name_description
|
16
|
+
attribute :__affinity, :aliases => :affinity
|
17
|
+
attribute :actions_after_crash
|
18
|
+
attribute :actions_after_reboot
|
19
|
+
attribute :actions_after_shutdown
|
16
20
|
attribute :allowed_operations
|
17
|
-
attribute :__consoles
|
21
|
+
attribute :__consoles, :aliases => :consoles
|
22
|
+
attribute :__attached_pcis, :aliases => :attached_PCIs
|
23
|
+
attribute :bios_strings
|
24
|
+
attribute :blobs
|
25
|
+
attribute :blocked_operations
|
26
|
+
attribute :__children, :aliases => :children
|
27
|
+
attribute :__crash_dumps, :aliases => :crash_dumps
|
28
|
+
attribute :current_operations
|
18
29
|
attribute :domarch
|
19
30
|
attribute :domid
|
31
|
+
attribute :generation_id
|
20
32
|
attribute :tags
|
21
|
-
attribute :__guest_metrics,
|
33
|
+
attribute :__guest_metrics, :aliases => :guest_metrics
|
34
|
+
attribute :ha_always_run
|
35
|
+
attribute :ha_restart_priority
|
22
36
|
attribute :is_a_snapshot
|
23
37
|
attribute :is_a_template
|
24
38
|
attribute :is_control_domain
|
39
|
+
attribute :is_snapshot_from_vmpp
|
40
|
+
attribute :last_boot_cpu_flags, :aliases => :last_boot_CPU_flags
|
41
|
+
attribute :last_booted_record
|
25
42
|
attribute :memory_dynamic_max
|
26
43
|
attribute :memory_dynamic_min
|
44
|
+
attribute :memory_overhead
|
27
45
|
attribute :memory_static_max
|
28
46
|
attribute :memory_static_min
|
29
47
|
attribute :memory_target
|
30
|
-
attribute :metrics
|
31
|
-
attribute :
|
48
|
+
attribute :__metrics, :aliases => :metrics
|
49
|
+
attribute :order
|
32
50
|
attribute :other_config
|
51
|
+
attribute :__parent, :aliases => :parent
|
52
|
+
attribute :platform
|
33
53
|
attribute :power_state
|
34
|
-
attribute :
|
35
|
-
attribute :
|
36
|
-
attribute :
|
37
|
-
attribute :
|
38
|
-
attribute :
|
39
|
-
attribute :
|
40
|
-
attribute :
|
54
|
+
attribute :protection_policy
|
55
|
+
attribute :pv_args, :aliases => :PV_args
|
56
|
+
attribute :pv_bootloader, :aliases => :PV_bootloader
|
57
|
+
attribute :pv_bootloader_args, :aliases => :PV_bootloader_args
|
58
|
+
attribute :pv_kernel, :aliases => :PV_kernel
|
59
|
+
attribute :pv_ramdisk, :aliases => :PV_ramdisk
|
60
|
+
attribute :pv_legacy_args, :aliases => :PV_legacy_args
|
61
|
+
attribute :recommendations
|
62
|
+
attribute :__resident_on, :aliases => :resident_on
|
63
|
+
attribute :shutdown_delay
|
64
|
+
attribute :snapshot_info
|
65
|
+
attribute :snapshot_metadata
|
66
|
+
attribute :__snapshot_of, :aliases => :snapshot_of
|
67
|
+
attribute :snapshot_time
|
68
|
+
attribute :start_delay
|
69
|
+
attribute :__suspend_sr, :aliases => :suspend_sr
|
70
|
+
attribute :__suspend_vdi, :aliases => :suspend_VDI
|
71
|
+
attribute :transportable_snapshot_id
|
72
|
+
attribute :user_version
|
73
|
+
attribute :version
|
74
|
+
attribute :__vgpus, :aliases => :VGPUs
|
75
|
+
attribute :__vtpms, :aliases => :VTPMs
|
76
|
+
attribute :xenstore_data
|
41
77
|
# Virtual Block Devices
|
42
|
-
attribute :__vbds,
|
78
|
+
attribute :__vbds, :aliases => :VBDs
|
43
79
|
# Virtual CPUs
|
44
|
-
attribute :vcpus_at_startup,
|
45
|
-
attribute :vcpus_max,
|
46
|
-
attribute :vcpus_params,
|
80
|
+
attribute :vcpus_at_startup, :aliases => :VCPUs_at_startup
|
81
|
+
attribute :vcpus_max, :aliases => :VCPUs_max
|
82
|
+
attribute :vcpus_params, :aliases => :VCPUs_params
|
47
83
|
# Virtual Interfaces (NIC)
|
48
|
-
attribute :__vifs,
|
84
|
+
attribute :__vifs, :aliases => :VIFs
|
49
85
|
attribute :template_name
|
50
|
-
attribute :hvm_boot_policy,
|
51
|
-
attribute :hvm_boot_params,
|
52
|
-
attribute :
|
86
|
+
attribute :hvm_boot_policy, :aliases => :HVM_boot_policy
|
87
|
+
attribute :hvm_boot_params, :aliases => :HVM_boot_params
|
88
|
+
attribute :hvm_shadow_multiplier, :aliases => :HVM_shadow_multiplier
|
89
|
+
attribute :pci_bus, :aliases => :PCI_bus
|
53
90
|
attribute :snapshots
|
54
91
|
|
55
|
-
def initialize(attributes={})
|
56
|
-
super
|
57
|
-
end
|
58
|
-
|
59
92
|
def vbds
|
60
93
|
__vbds.collect {|vbd| service.vbds.get vbd }
|
61
94
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class ServerAppliance < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM_appliance
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :allowed_operations
|
13
|
+
attribute :current_operations
|
14
|
+
attribute :description, :aliases => :name_description
|
15
|
+
attribute :name, :aliases => :name_label
|
16
|
+
attribute :uuid
|
17
|
+
attribute :__vms, :aliases => :VMs
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/server_appliance'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class ServerAppliances < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::ServerAppliance
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'VM_appliance'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( server_appliance_ref )
|
16
|
+
if server_appliance_ref && server_appliance = service.get_record( server_appliance_ref, 'VM_appliance' )
|
17
|
+
new(server_appliance)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'fog/core/model'
|
2
|
+
|
3
|
+
module Fog
|
4
|
+
module Compute
|
5
|
+
class XenServer
|
6
|
+
class StorageManager < Fog::Model
|
7
|
+
# API Reference here:
|
8
|
+
# http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=SM
|
9
|
+
|
10
|
+
identity :reference
|
11
|
+
|
12
|
+
attribute :capabilities
|
13
|
+
attribute :configuration
|
14
|
+
attribtue :copyright
|
15
|
+
attribute :driver_filename
|
16
|
+
attribute :features
|
17
|
+
attribute :description, :aliases => :name_description
|
18
|
+
attribute :name, :aliases => :name_label
|
19
|
+
attribute :other_config
|
20
|
+
attribute :required_api_version
|
21
|
+
attribute :type
|
22
|
+
attribute :uuid
|
23
|
+
attribute :vendor
|
24
|
+
attribute :version
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'fog/core/collection'
|
2
|
+
require 'fog/xenserver/models/compute/storage_manager'
|
3
|
+
|
4
|
+
module Fog
|
5
|
+
module Compute
|
6
|
+
class XenServer
|
7
|
+
class StorageManagers < Fog::Collection
|
8
|
+
model Fog::Compute::XenServer::StorageManager
|
9
|
+
|
10
|
+
def all(options={})
|
11
|
+
data = service.get_records 'SM'
|
12
|
+
load(data)
|
13
|
+
end
|
14
|
+
|
15
|
+
def get( sm_ref )
|
16
|
+
if sm_ref && sm = service.get_record( sm_ref, 'SM' )
|
17
|
+
new(sm)
|
18
|
+
else
|
19
|
+
nil
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|