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.
Files changed (133) hide show
  1. data/.gitignore +1 -0
  2. data/CONTRIBUTING.md +22 -0
  3. data/LICENSE.md +20 -0
  4. data/README.md +29 -42
  5. data/fog.gemspec +3 -3
  6. data/lib/fog/aws/compute.rb +1 -0
  7. data/lib/fog/aws/models/compute/subnet.rb +4 -0
  8. data/lib/fog/aws/models/compute/vpc.rb +5 -0
  9. data/lib/fog/aws/models/rds/server.rb +2 -0
  10. data/lib/fog/aws/models/storage/file.rb +2 -2
  11. data/lib/fog/aws/parsers/compute/assign_private_ip_addresses.rb +25 -0
  12. data/lib/fog/aws/requests/compute/assign_private_ip_addresses.rb +60 -0
  13. data/lib/fog/aws/requests/compute/describe_subnets.rb +8 -0
  14. data/lib/fog/aws/requests/compute/describe_vpcs.rb +8 -0
  15. data/lib/fog/cloudstack.rb +1 -1
  16. data/lib/fog/core/connection.rb +1 -2
  17. data/lib/fog/core/hmac.rb +3 -3
  18. data/lib/fog/core/mock.rb +2 -2
  19. data/lib/fog/core/wait_for.rb +1 -1
  20. data/lib/fog/core/{timeout.rb → wait_for_defaults.rb} +10 -0
  21. data/lib/fog/core.rb +1 -1
  22. data/lib/fog/google/compute.rb +19 -11
  23. data/lib/fog/google/examples/create.rb +12 -1
  24. data/lib/fog/google/examples/eric-fail.rb +13 -2
  25. data/lib/fog/google/examples/image_create.rb +0 -1
  26. data/lib/fog/google/examples/launch_micro_instance.rb +1 -2
  27. data/lib/fog/google/examples/metadata.rb +14 -2
  28. data/lib/fog/google/examples/network.rb +13 -2
  29. data/lib/fog/google/models/compute/disk.rb +10 -8
  30. data/lib/fog/google/models/compute/image.rb +8 -3
  31. data/lib/fog/google/models/compute/server.rb +19 -4
  32. data/lib/fog/google/models/compute/servers.rb +25 -9
  33. data/lib/fog/google/requests/compute/insert_disk.rb +6 -3
  34. data/lib/fog/google/requests/compute/insert_image.rb +1 -5
  35. data/lib/fog/google/requests/compute/insert_server.rb +8 -21
  36. data/lib/fog/openstack/compute.rb +3 -0
  37. data/lib/fog/openstack/models/compute/host.rb +1 -0
  38. data/lib/fog/openstack/models/compute/security_group.rb +18 -4
  39. data/lib/fog/openstack/models/compute/security_group_rule.rb +32 -0
  40. data/lib/fog/openstack/models/compute/security_group_rules.rb +22 -0
  41. data/lib/fog/openstack/network.rb +33 -3
  42. data/lib/fog/openstack/requests/compute/create_security_group.rb +3 -3
  43. data/lib/fog/openstack/requests/compute/create_security_group_rule.rb +1 -1
  44. data/lib/fog/openstack/requests/compute/create_server.rb +12 -5
  45. data/lib/fog/openstack/requests/compute/delete_security_group.rb +1 -1
  46. data/lib/fog/openstack/requests/compute/delete_security_group_rule.rb +2 -0
  47. data/lib/fog/openstack/requests/compute/get_security_group.rb +14 -24
  48. data/lib/fog/openstack/requests/compute/get_security_group_rule.rb +38 -0
  49. data/lib/fog/openstack/requests/compute/list_hosts.rb +3 -3
  50. data/lib/fog/openstack/volume.rb +3 -1
  51. data/lib/fog/rackspace/docs/auto_scale.md +9 -9
  52. data/lib/fog/rackspace/docs/getting_started.md +1 -0
  53. data/lib/fog/rackspace/docs/queues.md +312 -0
  54. data/lib/fog/vcloud_director/README.md +2 -0
  55. data/lib/fog/vcloud_director/compute.rb +78 -8
  56. data/lib/fog/vcloud_director/generators/compute/org_vdc_network.rb +91 -0
  57. data/lib/fog/vcloud_director/generators/compute/vapp.rb +30 -0
  58. data/lib/fog/vcloud_director/models/compute/vm_customization.rb +2 -0
  59. data/lib/fog/vcloud_director/parsers/compute/vm_customization.rb +2 -0
  60. data/lib/fog/vcloud_director/requests/compute/delete_network.rb +64 -0
  61. data/lib/fog/vcloud_director/requests/compute/get_execute_query.rb +433 -333
  62. data/lib/fog/vcloud_director/requests/compute/get_vapp_metadata.rb +3 -1
  63. data/lib/fog/vcloud_director/requests/compute/post_attach_disk.rb +1 -1
  64. data/lib/fog/vcloud_director/requests/compute/post_create_org_vdc_network.rb +83 -0
  65. data/lib/fog/vcloud_director/requests/compute/post_detach_disk.rb +1 -1
  66. data/lib/fog/vcloud_director/requests/compute/post_eject_cd_rom.rb +1 -1
  67. data/lib/fog/vcloud_director/requests/compute/post_insert_cd_rom.rb +1 -1
  68. data/lib/fog/vcloud_director/requests/compute/put_guest_customization_section_vapp.rb +1 -0
  69. data/lib/fog/vcloud_director/requests/compute/put_vapp_name_and_description.rb +37 -0
  70. data/lib/fog/vsphere/models/compute/server.rb +1 -1
  71. data/lib/fog/xenserver/compute.rb +35 -0
  72. data/lib/fog/xenserver/models/compute/blob.rb +22 -0
  73. data/lib/fog/xenserver/models/compute/blobs.rb +25 -0
  74. data/lib/fog/xenserver/models/compute/bond.rb +23 -0
  75. data/lib/fog/xenserver/models/compute/bonds.rb +25 -0
  76. data/lib/fog/xenserver/models/compute/console.rb +3 -1
  77. data/lib/fog/xenserver/models/compute/crash_dump.rb +19 -0
  78. data/lib/fog/xenserver/models/compute/crash_dumps.rb +25 -0
  79. data/lib/fog/xenserver/models/compute/dr_task.rb +17 -0
  80. data/lib/fog/xenserver/models/compute/dr_tasks.rb +25 -0
  81. data/lib/fog/xenserver/models/compute/gpu_group.rb +22 -0
  82. data/lib/fog/xenserver/models/compute/gpu_groups.rb +25 -0
  83. data/lib/fog/xenserver/models/compute/guest_metrics.rb +2 -1
  84. data/lib/fog/xenserver/models/compute/host.rb +41 -8
  85. data/lib/fog/xenserver/models/compute/host_cpu.rb +2 -1
  86. data/lib/fog/xenserver/models/compute/host_crash_dump.rb +20 -0
  87. data/lib/fog/xenserver/models/compute/host_crash_dumps.rb +25 -0
  88. data/lib/fog/xenserver/models/compute/host_metrics.rb +1 -1
  89. data/lib/fog/xenserver/models/compute/host_patch.rb +25 -0
  90. data/lib/fog/xenserver/models/compute/host_patchs.rb +25 -0
  91. data/lib/fog/xenserver/models/compute/network.rb +7 -6
  92. data/lib/fog/xenserver/models/compute/pbd.rb +3 -1
  93. data/lib/fog/xenserver/models/compute/pci.rb +22 -0
  94. data/lib/fog/xenserver/models/compute/pcis.rb +25 -0
  95. data/lib/fog/xenserver/models/compute/pgpu.rb +20 -0
  96. data/lib/fog/xenserver/models/compute/pgpus.rb +25 -0
  97. data/lib/fog/xenserver/models/compute/pif.rb +19 -8
  98. data/lib/fog/xenserver/models/compute/pif_metrics.rb +28 -0
  99. data/lib/fog/xenserver/models/compute/pifs_metrics.rb +25 -0
  100. data/lib/fog/xenserver/models/compute/pool.rb +18 -1
  101. data/lib/fog/xenserver/models/compute/pool_patch.rb +24 -0
  102. data/lib/fog/xenserver/models/compute/pool_patchs.rb +25 -0
  103. data/lib/fog/xenserver/models/compute/role.rb +19 -0
  104. data/lib/fog/xenserver/models/compute/roles.rb +25 -0
  105. data/lib/fog/xenserver/models/compute/server.rb +59 -26
  106. data/lib/fog/xenserver/models/compute/server_appliance.rb +21 -0
  107. data/lib/fog/xenserver/models/compute/server_appliances.rb +25 -0
  108. data/lib/fog/xenserver/models/compute/storage_manager.rb +28 -0
  109. data/lib/fog/xenserver/models/compute/storage_managers.rb +25 -0
  110. data/lib/fog/xenserver/models/compute/storage_repository.rb +4 -1
  111. data/lib/fog/xenserver/models/compute/tunnel.rb +20 -0
  112. data/lib/fog/xenserver/models/compute/tunnels.rb +25 -0
  113. data/lib/fog/xenserver/models/compute/vbd.rb +3 -2
  114. data/lib/fog/xenserver/models/compute/vbd_metrics.rb +1 -1
  115. data/lib/fog/xenserver/models/compute/vdi.rb +4 -1
  116. data/lib/fog/xenserver/models/compute/vif.rb +11 -2
  117. data/lib/fog/xenserver/models/compute/vlan.rb +2 -1
  118. data/lib/fog/xenserver/models/compute/vmpp.rb +35 -0
  119. data/lib/fog/xenserver/models/compute/vmpps.rb +25 -0
  120. data/lib/fog/xenserver/models/compute/vtpm.rb +18 -0
  121. data/lib/fog/xenserver/models/compute/vtpms.rb +25 -0
  122. data/tests/aws/requests/compute/assign_private_ip_tests.rb +52 -0
  123. data/tests/google/models/compute/servers_tests.rb +12 -1
  124. data/tests/google/requests/compute/image_tests.rb +0 -1
  125. data/tests/helpers/mock_helper.rb +1 -1
  126. data/tests/openstack/models/compute/security_group_tests.rb +54 -0
  127. data/tests/openstack/requests/compute/security_group_tests.rb +22 -20
  128. data/tests/openstack/requests/network/network_tests.rb +8 -8
  129. data/tests/vcloud_director/requests/compute/edge_gateway_tests.rb +17 -8
  130. data/tests/vcloud_director/requests/compute/network_tests.rb +25 -1
  131. data/tests/vcloud_director/requests/compute/query_tests.rb +67 -2
  132. metadata +125 -132
  133. checksums.yaml +0 -15
@@ -11,13 +11,15 @@ module Fog
11
11
  # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/GET-VAppMetadata.html
12
12
  # @since vCloud API version 1.5
13
13
  def get_vapp_metadata(id)
14
- request(
14
+ response = request(
15
15
  :expects => 200,
16
16
  :idempotent => true,
17
17
  :method => 'GET',
18
18
  :parser => Fog::ToHashDocument.new,
19
19
  :path => "vApp/#{id}/metadata/"
20
20
  )
21
+ ensure_list! response.body, :MetadataEntry
22
+ response
21
23
  end
22
24
  end
23
25
  end
@@ -26,7 +26,7 @@ module Fog
26
26
  :xmlns => 'http://www.vmware.com/vcloud/v1.5'
27
27
  }
28
28
  DiskAttachOrDetachParams(attrs) {
29
- Disk(:href => "#{@end_point}disk/#{media_id}")
29
+ Disk(:href => "#{end_point}disk/#{disk_id}")
30
30
  if options.key?(:BusNumber)
31
31
  BusNumber options[:BusNumber]
32
32
  end
@@ -0,0 +1,83 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+
6
+ require 'fog/vcloud_director/generators/compute/org_vdc_network'
7
+
8
+ # Create an Org vDC network.
9
+ #
10
+ # This operation is asynchronous and returns a task that you can
11
+ # monitor to track the progress of the request.
12
+ #
13
+ # Produce media type(s):
14
+ # application/vnd.vmware.vcloud.orgVdcNetwork+xml
15
+ # Output type:
16
+ # OrgVdcNetworkType
17
+ #
18
+ # @param [String] vdc_id Object identifier of the vDC
19
+ # @param [String] name The name of the entity.
20
+ # @param [Hash] options
21
+ # @option options [String] :Description Optional description.
22
+ # @option options [Hash] :Configuration Network configuration.
23
+ # @option options [Hash] :EdgeGateway EdgeGateway that connects this
24
+ # Org vDC network. Applicable only for routed networks.
25
+ # @option options [Hash] :ServiceConfig Specifies the service
26
+ # configuration for an isolated Org vDC networks.
27
+ # @option options [Boolean] :IsShared True if this network is shared
28
+ # to multiple Org vDCs.
29
+ # * :Configuration<~Hash>: NetworkConfigurationType
30
+ # * :IpScopes<~Hash>:
31
+ # * :IpScope<~Hash>:
32
+ # * :IsInherited<~Boolean>: ?
33
+ # * :Gateway<~String>: IP address of gw
34
+ # * :Netmask<~String>: Subnet mask of network
35
+ # * :Dns1<~String>: Primary DNS server.
36
+ # * :Dns2<~String>: Secondary DNS server.
37
+ # * :DnsSuffix<~String>: DNS suffix.
38
+ # * :IsEnabled<~String>: Indicates if subnet is enabled or not.
39
+ # Default value is True.
40
+ # * :IpRanges<~Array>: IP ranges used for static pool allocation
41
+ # in the network. Array of Hashes of:
42
+ # * :StartAddress - start IP in range
43
+ # * :EndAddress - end IP in range
44
+ # * :EdgeGateway<~Hash>: EdgeGateway that connects this Org vDC
45
+ # network. Applicable only for routed networks.
46
+ # * :ServiceConfig<~Hash>: Specifies the service configuration for an
47
+ # isolated network
48
+ #
49
+ # @return [Excon::Response]
50
+ # * body<~Hash>:
51
+ #
52
+ # @see http://pubs.vmware.com/vcd-51/topic/com.vmware.vcloud.api.reference.doc_51/doc/operations/POST-CreateOrgVdcNetwork.html
53
+ # @since vCloud API version 5.1
54
+ def post_create_org_vdc_network(vdc_id, name, options={})
55
+
56
+ body = Fog::Generators::Compute::VcloudDirector::OrgVdcNetwork.new(options.merge(:name => name)).generate_xml
57
+
58
+ request(
59
+ :body => body,
60
+ :expects => 201,
61
+ :headers => {'Content-Type' => 'application/vnd.vmware.vcloud.orgVdcNetwork+xml'},
62
+ :method => 'POST',
63
+ :parser => Fog::ToHashDocument.new,
64
+ :path => "admin/vdc/#{vdc_id}/networks"
65
+ )
66
+
67
+ end
68
+ end
69
+
70
+ class Mock
71
+
72
+ def post_create_org_vdc_network(vdc_id, name, options={})
73
+ unless data[:vdcs][vdc_id]
74
+ raise Fog::Compute::VcloudDirector::Forbidden.new(
75
+ "No access to entity \"(com.vmware.vcloud.entity.vdc:#{vdc_id})\"."
76
+ )
77
+ end
78
+
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -20,7 +20,7 @@ module Fog
20
20
  :xmlns => 'http://www.vmware.com/vcloud/v1.5'
21
21
  }
22
22
  DiskAttachOrDetachParams(attrs) {
23
- Disk(:href => "#{@end_point}disk/#{media_id}")
23
+ Disk(:href => "#{end_point}disk/#{disk_id}")
24
24
  }
25
25
  end.to_xml
26
26
 
@@ -20,7 +20,7 @@ module Fog
20
20
  :xmlns => 'http://www.vmware.com/vcloud/v1.5'
21
21
  }
22
22
  MediaInsertOrEjectParams(attrs) {
23
- Media(:href => "#{@end_point}media/#{media_id}")
23
+ Media(:href => "#{end_point}media/#{media_id}")
24
24
  }
25
25
  end.to_xml
26
26
 
@@ -20,7 +20,7 @@ module Fog
20
20
  :xmlns => 'http://www.vmware.com/vcloud/v1.5'
21
21
  }
22
22
  MediaInsertOrEjectParams(attrs) {
23
- Media(:href => "#{@end_point}media/#{media_id}")
23
+ Media(:href => "#{end_point}media/#{media_id}")
24
24
  }
25
25
  end.to_xml
26
26
 
@@ -62,6 +62,7 @@ module Fog
62
62
  :change_sid => :ChangeSid,
63
63
  :join_domain_enabled => :JoinDomainEnabled,
64
64
  :use_org_settings => :UseOrgSettings,
65
+ :admin_password => :AdminPassword,
65
66
  :admin_password_enabled => :AdminPasswordEnabled,
66
67
  :admin_password_auto => :AdminPasswordAuto,
67
68
  :reset_password_required => :ResetPasswordRequired,
@@ -0,0 +1,37 @@
1
+ module Fog
2
+ module Compute
3
+ class VcloudDirector
4
+ class Real
5
+
6
+ require 'fog/vcloud_director/generators/compute/vapp'
7
+
8
+ # Modify the name or description of a vApp.
9
+ #
10
+ # This operation is asynchronous and returns a task that you can monitor
11
+ # to track the progress of the request.
12
+ #
13
+ #
14
+ # @param [String] id Object identifier of the vApp.
15
+ # @param [String] name of the vApp.
16
+ # @param [Hash] options
17
+ # * :Description<~String>: - description to be assigned (optional)
18
+ # @return [Excon::Response]
19
+ # * body<~Hash>:
20
+ #
21
+ # @see http://pubs.vmware.com/vcd-55/topic/com.vmware.vcloud.api.reference.doc_55/doc/operations/PUT-VAppNameAndDescription.html
22
+ # @since vCloud API version 0.9
23
+ def put_vapp_name_and_description(id, name, options={})
24
+ body = Fog::Generators::Compute::VcloudDirector::Vapp.new(name, options).generate_xml
25
+ request(
26
+ :body => body,
27
+ :expects => 202,
28
+ :headers => {'Content-Type' => 'application/vnd.vmware.vcloud.vApp+xml'},
29
+ :method => 'PUT',
30
+ :parser => Fog::ToHashDocument.new,
31
+ :path => "vApp/#{id}"
32
+ )
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
@@ -255,7 +255,7 @@ module Fog
255
255
  :cpus => 1,
256
256
  # :corespersocket => 1,
257
257
  :memory_mb => 512,
258
- # :guest_id => 'otherGuest',
258
+ :guest_id => 'otherGuest',
259
259
  :path => '/'
260
260
  }
261
261
  end
@@ -12,10 +12,45 @@ module Fog
12
12
  requires :xenserver_password
13
13
  requires :xenserver_url
14
14
  recognizes :xenserver_defaults
15
+ recognizes :xenserver_timeout
15
16
 
16
17
  model_path 'fog/xenserver/models/compute'
18
+ model :blob
19
+ collection :blobs
20
+ model :bond
21
+ collection :bonds
22
+ model :crash_dump
23
+ collection :crash_dumps
24
+ model :dr_task
25
+ collection :dr_tasks
26
+ model :gpu_group
27
+ collection :gpu_groups
28
+ model :host_crash_dump
29
+ collection :host_crash_dumps
30
+ model :host_patch
31
+ collection :host_patchs
32
+ model :pci
33
+ collection :pcis
34
+ model :pgpu
35
+ collection :pgpus
36
+ model :pif_metrics
37
+ collection :pifs_metrics
38
+ model :pool_patch
39
+ collection :pool_patchs
40
+ model :role
41
+ collection :roles
17
42
  model :server
18
43
  collection :servers
44
+ model :server_appliance
45
+ collection :server_appliances
46
+ model :storage_manager
47
+ collection :storage_managers
48
+ model :tunnel
49
+ collection :tunnels
50
+ model :vmpp
51
+ collection :vmpps
52
+ model :vtpm
53
+ collection :vtpms
19
54
  model :host
20
55
  collection :hosts
21
56
  collection :vifs
@@ -0,0 +1,22 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class XenServer
6
+ class Blob < Fog::Model
7
+ # API Reference here:
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=blob
9
+
10
+ identity :reference
11
+
12
+ attribute :last_updated
13
+ attribute :mime_type
14
+ attribute :description, :aliases => :name_description
15
+ attribute :name, :aliases => :name_label
16
+ attribute :public
17
+ attribute :size
18
+ attribute :uuid
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/xenserver/models/compute/blob'
3
+
4
+ module Fog
5
+ module Compute
6
+ class XenServer
7
+ class Blobs < Fog::Collection
8
+ model Fog::Compute::XenServer::Blob
9
+
10
+ def all(options={})
11
+ data = service.get_records 'blob'
12
+ load(data)
13
+ end
14
+
15
+ def get( blob_ref )
16
+ if blob_ref && blob = service.get_record( blob_ref, 'blob' )
17
+ new(blob)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,23 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class XenServer
6
+ class Bond < Fog::Model
7
+ # API Reference here:
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=Bond
9
+
10
+ identity :reference
11
+
12
+ attribute :links_up
13
+ attribute :__master, :aliases => :master
14
+ attribute :mode
15
+ attribute :other_config
16
+ attribute :__primary_slave, :aliases => :primary_slave
17
+ attribute :properties
18
+ attribute :__slaves, :aliases => :slaves
19
+ attribute :uuid
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,25 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/xenserver/models/compute/bond'
3
+
4
+ module Fog
5
+ module Compute
6
+ class XenServer
7
+ class Bonds < Fog::Collection
8
+ model Fog::Compute::XenServer::Bond
9
+
10
+ def all(options={})
11
+ data = service.get_records 'Bond'
12
+ load(data)
13
+ end
14
+
15
+ def get( bond_ref )
16
+ if bond_ref && bond = service.get_record( bond_ref, 'Bond' )
17
+ new(bond)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -5,10 +5,12 @@ module Fog
5
5
  class XenServer
6
6
  class Console < Fog::Model
7
7
  # API Reference here:
8
- # http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=console
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=console
9
9
 
10
10
  identity :reference
11
+
11
12
  attribute :location
13
+ attribute :other_config
12
14
  attribute :protocol
13
15
  attribute :uuid
14
16
  attribute :__vm, aliases: :VM
@@ -0,0 +1,19 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class XenServer
6
+ class CrashDump < Fog::Model
7
+ # API Reference here:
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=crashdump
9
+
10
+ identity :reference
11
+
12
+ attribute :other_config
13
+ attribute :__vdi, :aliases => :VDI
14
+ attribute :__vm, :aliases => :VM
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/crash_dump'
3
+
4
+ module Fog
5
+ module Compute
6
+ class XenServer
7
+ class Bonds < Fog::Collection
8
+ model Fog::Compute::XenServer::CrashDump
9
+
10
+ def all(options={})
11
+ data = service.get_records 'crashdump'
12
+ load(data)
13
+ end
14
+
15
+ def get( crashdump_ref )
16
+ if crashdump_ref && crashdump = service.get_record( crashdump_ref, 'crashdump' )
17
+ new(crashdump)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,17 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class XenServer
6
+ class DrTask < Fog::Model
7
+ # API Reference here:
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=DR_task
9
+
10
+ identity :reference
11
+
12
+ attribute :__introduced_srs, :aliases => :introduced_SRs
13
+ attribute :uuid
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,25 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/xenserver/models/compute/dr_task'
3
+
4
+ module Fog
5
+ module Compute
6
+ class XenServer
7
+ class DrTasks < Fog::Collection
8
+ model Fog::Compute::XenServer::DrTask
9
+
10
+ def all(options={})
11
+ data = service.get_records 'DR_task'
12
+ load(data)
13
+ end
14
+
15
+ def get( dr_task_ref )
16
+ if dr_task_ref && dr_task = service.get_record( dr_task_ref, 'DR_task' )
17
+ new(dr_task)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,22 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class XenServer
6
+ class GpuGroup < Fog::Model
7
+ # API Reference here:
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=GPU_group
9
+
10
+ identity :reference
11
+
12
+ attribute :gpu_types, :aliases => :GPU_types
13
+ attribute :description, :aliases => :name_description
14
+ attribute :name, :aliases => :name_label
15
+ attribute :other_config
16
+ attribute :__pgpus, :aliases => :PGPUs
17
+ attribute :__vgpus, :aliases => :VGPUs
18
+ attribute :uuid
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,25 @@
1
+ require 'fog/core/collection'
2
+ require 'fog/xenserver/models/compute/gpu_group'
3
+
4
+ module Fog
5
+ module Compute
6
+ class XenServer
7
+ class GpuGroups < Fog::Collection
8
+ model Fog::Compute::XenServer::GpuGroup
9
+
10
+ def all(options={})
11
+ data = service.get_records 'GPU_group'
12
+ load(data)
13
+ end
14
+
15
+ def get( gpu_group_ref )
16
+ if gpu_group_ref && gpu_group = service.get_record( gpu_group_ref, 'GPU_group' )
17
+ new(gpu_group)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -6,11 +6,12 @@ module Fog
6
6
 
7
7
  class GuestMetrics < Fog::Model
8
8
  # API Reference here:
9
- # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VM_guest_metrics
9
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=VM_guest_metrics
10
10
 
11
11
  identity :reference
12
12
 
13
13
  attribute :uuid
14
+ attribute :disk
14
15
  attribute :last_updated
15
16
  attribute :live
16
17
  attribute :memory
@@ -6,23 +6,56 @@ module Fog
6
6
 
7
7
  class Host < Fog::Model
8
8
  # API Reference here:
9
- # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=host
9
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host
10
10
 
11
11
  identity :reference
12
12
 
13
- attribute :name, :aliases => :name_label
13
+ attribute :name, :aliases => :name_label
14
14
  attribute :uuid
15
15
  attribute :address
16
16
  attribute :allowed_operations
17
+ attribute :api_version_major, :aliases => :API_version_major
18
+ attribute :api_version_minor, :aliases => :API_version_minor
19
+ attribute :api_version_vendor, :aliases => :API_version_vendor
20
+ attribute :api_version_vendor_implementation, :aliases => :API_version_vendor_implementation
21
+ attribute :bios_strings
22
+ attribute :blobs
23
+ attribute :capabilities
24
+ attribute :chipset_info
25
+ attribute :cpu_configuration
26
+ attribute :cpu_info
27
+ attribute :__crash_dump_sr, :aliases => :crash_dump_sr
28
+ attribute :__crashdumps, :aliases => :crashdumps
29
+ attribute :current_operations
17
30
  attribute :enabled
31
+ attribute :external_auth_configuration
32
+ attribute :external_auth_service_name
33
+ attribute :external_auth_type
34
+ attribute :guest_vcpus_params, :aliases => :guest_VCPUs_params
35
+ attribute :ha_network_peers
36
+ attribute :ha_statefiles
18
37
  attribute :hostname
19
- attribute :__metrics, :aliases => :metrics
20
- attribute :name_description
38
+ attribute :license_params
39
+ attribute :license_server
40
+ attribute :__local_cache_sr, :aliases => :local_cache_sr
41
+ attribute :logging
42
+ attribute :memory_overhead
43
+ attribute :__metrics, :aliases => :metrics
44
+ attribute :description, :aliases => :name_description
21
45
  attribute :other_config
22
- attribute :__pbds, :aliases => :PBDs
23
- attribute :__pifs, :aliases => :PIFs
24
- attribute :__resident_vms, :aliases => :resident_VMs
25
- attribute :__host_cpus, :aliases => :host_CPUs
46
+ attribute :patches
47
+ attribute :__pbds, :aliases => :PBDs
48
+ attribute :__pcis, :aliases => :PCIs
49
+ attribute :__pgpus, :aliases => :PGPUs
50
+ attribute :__pifs, :aliases => :PIFs
51
+ attribute :power_on_config
52
+ attribute :power_on_mode
53
+ attribute :__resident_vms, :aliases => :resident_VMs
54
+ attribute :sched_policy
55
+ attribute :supported_bootloaders
56
+ attribute :suspend_image_sr
57
+ attribute :tags
58
+ attribute :__host_cpus, :aliases => :host_CPUs
26
59
  attribute :edition
27
60
  attribute :software_version
28
61
 
@@ -7,7 +7,7 @@ module Fog
7
7
  #
8
8
  # A physical CPU
9
9
  #
10
- # @see http://docs.vmd.citrix.com/XenServer/6.0.0/1.0/en_gb/api/?c=host_cpu
10
+ # @see http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_cpu
11
11
  #
12
12
  class HostCpu < Fog::Model
13
13
 
@@ -15,6 +15,7 @@ module Fog
15
15
 
16
16
  attribute :uuid
17
17
  attribute :family
18
+ attribute :features
18
19
  attribute :flags
19
20
  attribute :__host, :aliases => :host
20
21
  attribute :model
@@ -0,0 +1,20 @@
1
+ require 'fog/core/model'
2
+
3
+ module Fog
4
+ module Compute
5
+ class XenServer
6
+ class HostCrashDump < Fog::Model
7
+ # API Reference here:
8
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_crashdump
9
+
10
+ identity :reference
11
+
12
+ attribute :__host, :aliases => :host
13
+ attribute :other_config
14
+ attribute :size
15
+ attribute :timestamp
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/host_crash_dump'
3
+
4
+ module Fog
5
+ module Compute
6
+ class XenServer
7
+ class HostCrashDumps < Fog::Collection
8
+ model Fog::Compute::XenServer::HostCrashDump
9
+
10
+ def all(options={})
11
+ data = service.get_records 'host_crashdump'
12
+ load(data)
13
+ end
14
+
15
+ def get( host_crashdump_ref )
16
+ if host_crashdump_ref && host_crashdump = service.get_record( host_crashdump_ref, 'host_crashdump' )
17
+ new(host_crashdump)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -6,7 +6,7 @@ module Fog
6
6
 
7
7
  class HostMetrics < Fog::Model
8
8
  # API Reference here:
9
- # http://docs.vmd.citrix.com/XenServer/5.6.0/1.0/en_gb/api/?c=VM_host_metrics
9
+ # http://docs.vmd.citrix.com/XenServer/6.2.0/1.0/en_gb/api/?c=host_metrics
10
10
 
11
11
  identity :reference
12
12