fog-vsphere 2.5.0 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (144) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +4 -0
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +9 -0
  5. data/README.md +7 -1
  6. data/fog-vsphere.gemspec +2 -1
  7. data/lib/fog-vsphere.rb +1 -0
  8. data/lib/fog/bin/vsphere.rb +1 -1
  9. data/lib/fog/vsphere.rb +2 -4
  10. data/lib/fog/vsphere/compute.rb +23 -6
  11. data/lib/fog/vsphere/models/compute/cdrom.rb +2 -2
  12. data/lib/fog/vsphere/models/compute/cdroms.rb +3 -3
  13. data/lib/fog/vsphere/models/compute/cluster.rb +2 -2
  14. data/lib/fog/vsphere/models/compute/clusters.rb +3 -3
  15. data/lib/fog/vsphere/models/compute/customfield.rb +2 -2
  16. data/lib/fog/vsphere/models/compute/customfields.rb +3 -3
  17. data/lib/fog/vsphere/models/compute/customvalue.rb +2 -2
  18. data/lib/fog/vsphere/models/compute/customvalues.rb +5 -5
  19. data/lib/fog/vsphere/models/compute/datacenter.rb +2 -2
  20. data/lib/fog/vsphere/models/compute/datacenters.rb +3 -3
  21. data/lib/fog/vsphere/models/compute/datastore.rb +2 -2
  22. data/lib/fog/vsphere/models/compute/datastores.rb +3 -3
  23. data/lib/fog/vsphere/models/compute/folder.rb +2 -2
  24. data/lib/fog/vsphere/models/compute/folders.rb +3 -3
  25. data/lib/fog/vsphere/models/compute/host.rb +2 -2
  26. data/lib/fog/vsphere/models/compute/hosts.rb +4 -4
  27. data/lib/fog/vsphere/models/compute/interface.rb +2 -2
  28. data/lib/fog/vsphere/models/compute/interfaces.rb +8 -8
  29. data/lib/fog/vsphere/models/compute/interfacetype.rb +2 -2
  30. data/lib/fog/vsphere/models/compute/interfacetypes.rb +5 -5
  31. data/lib/fog/vsphere/models/compute/network.rb +2 -2
  32. data/lib/fog/vsphere/models/compute/networks.rb +3 -3
  33. data/lib/fog/vsphere/models/compute/process.rb +2 -2
  34. data/lib/fog/vsphere/models/compute/resource_pool.rb +2 -2
  35. data/lib/fog/vsphere/models/compute/resource_pools.rb +3 -3
  36. data/lib/fog/vsphere/models/compute/rule.rb +2 -2
  37. data/lib/fog/vsphere/models/compute/rules.rb +4 -4
  38. data/lib/fog/vsphere/models/compute/scsicontroller.rb +2 -2
  39. data/lib/fog/vsphere/models/compute/server.rb +6 -6
  40. data/lib/fog/vsphere/models/compute/servers.rb +4 -4
  41. data/lib/fog/vsphere/models/compute/servertype.rb +2 -2
  42. data/lib/fog/vsphere/models/compute/servertypes.rb +4 -4
  43. data/lib/fog/vsphere/models/compute/snapshot.rb +2 -2
  44. data/lib/fog/vsphere/models/compute/snapshots.rb +3 -3
  45. data/lib/fog/vsphere/models/compute/storage_pod.rb +2 -2
  46. data/lib/fog/vsphere/models/compute/storage_pods.rb +3 -3
  47. data/lib/fog/vsphere/models/compute/template.rb +2 -2
  48. data/lib/fog/vsphere/models/compute/templates.rb +3 -3
  49. data/lib/fog/vsphere/models/compute/ticket.rb +2 -2
  50. data/lib/fog/vsphere/models/compute/tickets.rb +4 -4
  51. data/lib/fog/vsphere/models/compute/volume.rb +3 -3
  52. data/lib/fog/vsphere/models/compute/volumes.rb +5 -5
  53. data/lib/fog/vsphere/requests/compute/cloudinit_to_customspec.rb +2 -2
  54. data/lib/fog/vsphere/requests/compute/create_folder.rb +2 -2
  55. data/lib/fog/vsphere/requests/compute/create_group.rb +2 -2
  56. data/lib/fog/vsphere/requests/compute/create_rule.rb +2 -2
  57. data/lib/fog/vsphere/requests/compute/create_vm.rb +2 -2
  58. data/lib/fog/vsphere/requests/compute/current_time.rb +2 -2
  59. data/lib/fog/vsphere/requests/compute/destroy_group.rb +2 -2
  60. data/lib/fog/vsphere/requests/compute/destroy_rule.rb +2 -2
  61. data/lib/fog/vsphere/requests/compute/folder_destroy.rb +2 -2
  62. data/lib/fog/vsphere/requests/compute/get_cluster.rb +5 -4
  63. data/lib/fog/vsphere/requests/compute/get_compute_resource.rb +3 -3
  64. data/lib/fog/vsphere/requests/compute/get_datacenter.rb +4 -4
  65. data/lib/fog/vsphere/requests/compute/get_datastore.rb +3 -3
  66. data/lib/fog/vsphere/requests/compute/get_folder.rb +6 -6
  67. data/lib/fog/vsphere/requests/compute/get_host.rb +3 -3
  68. data/lib/fog/vsphere/requests/compute/get_interface_type.rb +3 -3
  69. data/lib/fog/vsphere/requests/compute/get_network.rb +4 -4
  70. data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +3 -3
  71. data/lib/fog/vsphere/requests/compute/get_server_type.rb +5 -5
  72. data/lib/fog/vsphere/requests/compute/get_storage_pod.rb +3 -3
  73. data/lib/fog/vsphere/requests/compute/get_template.rb +2 -2
  74. data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +4 -4
  75. data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +3 -3
  76. data/lib/fog/vsphere/requests/compute/host_finish_maintenance.rb +2 -2
  77. data/lib/fog/vsphere/requests/compute/host_shutdown.rb +2 -2
  78. data/lib/fog/vsphere/requests/compute/host_start_maintenance.rb +2 -2
  79. data/lib/fog/vsphere/requests/compute/list_child_snapshots.rb +2 -2
  80. data/lib/fog/vsphere/requests/compute/list_clusters.rb +2 -2
  81. data/lib/fog/vsphere/requests/compute/list_compute_resources.rb +2 -2
  82. data/lib/fog/vsphere/requests/compute/list_customfields.rb +2 -2
  83. data/lib/fog/vsphere/requests/compute/list_datacenters.rb +2 -2
  84. data/lib/fog/vsphere/requests/compute/list_datastores.rb +4 -4
  85. data/lib/fog/vsphere/requests/compute/list_folders.rb +2 -2
  86. data/lib/fog/vsphere/requests/compute/list_groups.rb +2 -2
  87. data/lib/fog/vsphere/requests/compute/list_hosts.rb +2 -2
  88. data/lib/fog/vsphere/requests/compute/list_interface_types.rb +2 -2
  89. data/lib/fog/vsphere/requests/compute/list_networks.rb +4 -4
  90. data/lib/fog/vsphere/requests/compute/list_processes.rb +2 -2
  91. data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +2 -2
  92. data/lib/fog/vsphere/requests/compute/list_rules.rb +2 -2
  93. data/lib/fog/vsphere/requests/compute/list_server_types.rb +2 -2
  94. data/lib/fog/vsphere/requests/compute/list_storage_pods.rb +2 -2
  95. data/lib/fog/vsphere/requests/compute/list_templates.rb +2 -2
  96. data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +2 -2
  97. data/lib/fog/vsphere/requests/compute/list_vm_cdroms.rb +3 -3
  98. data/lib/fog/vsphere/requests/compute/list_vm_customvalues.rb +2 -2
  99. data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +3 -3
  100. data/lib/fog/vsphere/requests/compute/list_vm_scsi_controllers.rb +4 -4
  101. data/lib/fog/vsphere/requests/compute/list_vm_snapshots.rb +2 -2
  102. data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +2 -2
  103. data/lib/fog/vsphere/requests/compute/modify_vm_cdrom.rb +2 -2
  104. data/lib/fog/vsphere/requests/compute/modify_vm_controller.rb +2 -2
  105. data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +4 -4
  106. data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +2 -2
  107. data/lib/fog/vsphere/requests/compute/revert_to_snapshot.rb +2 -2
  108. data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +2 -2
  109. data/lib/fog/vsphere/requests/compute/update_vm.rb +2 -2
  110. data/lib/fog/vsphere/requests/compute/upload_iso.rb +4 -4
  111. data/lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb +2 -2
  112. data/lib/fog/vsphere/requests/compute/vm_clone.rb +11 -8
  113. data/lib/fog/vsphere/requests/compute/vm_config_vnc.rb +2 -2
  114. data/lib/fog/vsphere/requests/compute/vm_destroy.rb +2 -2
  115. data/lib/fog/vsphere/requests/compute/vm_execute.rb +2 -2
  116. data/lib/fog/vsphere/requests/compute/vm_migrate.rb +2 -2
  117. data/lib/fog/vsphere/requests/compute/vm_power_off.rb +2 -2
  118. data/lib/fog/vsphere/requests/compute/vm_power_on.rb +2 -2
  119. data/lib/fog/vsphere/requests/compute/vm_reboot.rb +2 -2
  120. data/lib/fog/vsphere/requests/compute/vm_reconfig_cdrom.rb +2 -2
  121. data/lib/fog/vsphere/requests/compute/vm_reconfig_cpus.rb +2 -2
  122. data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +2 -2
  123. data/lib/fog/vsphere/requests/compute/vm_reconfig_memory.rb +2 -2
  124. data/lib/fog/vsphere/requests/compute/vm_reconfig_volumes.rb +2 -2
  125. data/lib/fog/vsphere/requests/compute/vm_relocate.rb +2 -2
  126. data/lib/fog/vsphere/requests/compute/vm_remove_snapshot.rb +2 -2
  127. data/lib/fog/vsphere/requests/compute/vm_rename.rb +2 -2
  128. data/lib/fog/vsphere/requests/compute/vm_revert_snapshot.rb +2 -2
  129. data/lib/fog/vsphere/requests/compute/vm_suspend.rb +2 -2
  130. data/lib/fog/vsphere/requests/compute/vm_take_snapshot.rb +2 -2
  131. data/lib/fog/vsphere/version.rb +1 -1
  132. data/tests/helper.rb +3 -0
  133. data/tests/models/compute/cluster_tests.rb +3 -3
  134. data/tests/models/compute/hosts_tests.rb +1 -1
  135. data/tests/models/compute/rules_tests.rb +1 -1
  136. data/tests/models/compute/server_tests.rb +4 -4
  137. data/tests/models/compute/server_unit_tests.rb +1 -1
  138. data/tests/models/compute/servers_tests.rb +1 -1
  139. data/tests/models/compute/tickets_tests.rb +1 -1
  140. data/tests/requests/compute/get_network_tests.rb +23 -15
  141. data/tests/requests/compute/revert_to_snapshot_tests.rb +1 -1
  142. data/tests/requests/compute/update_vm_tests.rb +1 -1
  143. data/tests/requests/compute/vm_clone_tests.rb +10 -5
  144. metadata +26 -5
@@ -1,17 +1,17 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Interfacetypes < Fog::Collection
5
5
  autoload :Interfacetype, File.expand_path('../interfacetype', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Interfacetype
7
+ model Fog::Vsphere::Compute::Interfacetype
8
8
  attr_accessor :datacenter
9
9
  attr_accessor :servertype
10
10
 
11
11
  def all(filters = {})
12
12
  requires :servertype
13
13
  case servertype
14
- when Fog::Compute::Vsphere::Servertype
14
+ when Fog::Vsphere::Compute::Servertype
15
15
  load service.list_interface_types(filters.merge(datacenter: datacenter,
16
16
  servertype: servertype.id))
17
17
  else
@@ -23,7 +23,7 @@ module Fog
23
23
  requires :servertype
24
24
  requires :datacenter
25
25
  new service.get_interface_type id, servertype, datacenter
26
- rescue Fog::Compute::Vsphere::NotFound
26
+ rescue Fog::Vsphere::Compute::NotFound
27
27
  nil
28
28
  end
29
29
  end
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Network < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Networks < Fog::Collection
5
5
  autoload :Network, File.expand_path('../network', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Network
7
+ model Fog::Vsphere::Compute::Network
8
8
  attr_accessor :datacenter, :cluster
9
9
 
10
10
  def all(filters = {})
@@ -1,8 +1,8 @@
1
1
  require 'fog/compute/models/server'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Vsphere
4
+ module Vsphere
5
+ class Compute
6
6
  class Process < Fog::Model
7
7
  attribute :cmd_line
8
8
  attribute :end_time
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class ResourcePool < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class ResourcePools < Fog::Collection
5
5
  autoload :ResourcePool, File.expand_path('../resource_pool', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::ResourcePool
7
+ model Fog::Vsphere::Compute::ResourcePool
8
8
  attr_accessor :datacenter, :cluster
9
9
 
10
10
  def all(filters = {})
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  # ClusterRuleInfo
5
5
  class Rule < Fog::Model
6
6
  identity :key
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Rules < Fog::Collection
5
5
  autoload :Rule, File.expand_path('../rule', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Rule
7
+ model Fog::Vsphere::Compute::Rule
8
8
  attribute :datacenter
9
9
  attribute :cluster
10
10
 
@@ -15,7 +15,7 @@ module Fog
15
15
 
16
16
  def get(key_or_name)
17
17
  all.find { |rule| [rule.key, rule.name].include? key_or_name } ||
18
- raise(Fog::Compute::Vsphere::NotFound, "no such rule #{key_or_name}")
18
+ raise(Fog::Vsphere::Compute::NotFound, "no such rule #{key_or_name}")
19
19
  end
20
20
 
21
21
  # Pass datacenter/cluster to every new rule
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class SCSIController < Fog::Model
5
5
  attribute :shared_bus
6
6
  attribute :type
@@ -1,8 +1,8 @@
1
1
  require 'fog/compute/models/server'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Vsphere
4
+ module Vsphere
5
+ class Compute
6
6
  class Server < Fog::Compute::Server
7
7
  extend Fog::Deprecation
8
8
  deprecate(:ipaddress, :public_ip_address)
@@ -219,7 +219,7 @@ module Fog
219
219
  end
220
220
 
221
221
  def interface_ready?(attrs)
222
- (attrs.is_a?(Hash) && attrs[:blocking]) || attrs.is_a?(Fog::Compute::Vsphere::Interface)
222
+ (attrs.is_a?(Hash) && attrs[:blocking]) || attrs.is_a?(Fog::Vsphere::Compute::Interface)
223
223
  end
224
224
 
225
225
  def add_interface(attrs)
@@ -365,16 +365,16 @@ module Fog
365
365
  def initialize_scsi_controllers
366
366
  if attributes[:scsi_controllers] && attributes[:scsi_controllers].is_a?(Array)
367
367
  attributes[:scsi_controllers].map! do |controller|
368
- controller.is_a?(Hash) ? Fog::Compute::Vsphere::SCSIController.new(controller) : controller
368
+ controller.is_a?(Hash) ? Fog::Vsphere::Compute::SCSIController.new(controller) : controller
369
369
  end
370
370
  elsif attributes[:scsi_controller] && attributes[:scsi_controller].is_a?(Hash)
371
371
  attributes[:scsi_controllers] = [
372
- Fog::Compute::Vsphere::SCSIController.new(attributes[:scsi_controller])
372
+ Fog::Vsphere::Compute::SCSIController.new(attributes[:scsi_controller])
373
373
  ]
374
374
  elsif attributes[:volumes] && attributes[:volumes].is_a?(Array) && !attributes[:volumes].empty?
375
375
  # Create a default scsi controller if there are any disks but no controller defined
376
376
  attributes[:scsi_controllers] = [
377
- Fog::Compute::Vsphere::SCSIController.new
377
+ Fog::Vsphere::Compute::SCSIController.new
378
378
  ]
379
379
  end
380
380
  end
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Servers < Fog::Collection
5
5
  autoload :Server, File.expand_path('../server', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Server
7
+ model Fog::Vsphere::Compute::Server
8
8
  attr_accessor :datacenter
9
9
  attr_accessor :network
10
10
  attr_accessor :cluster
@@ -29,7 +29,7 @@ module Fog
29
29
 
30
30
  def get(id, datacenter = nil)
31
31
  new service.get_virtual_machine id, datacenter, folder, recursive
32
- rescue Fog::Compute::Vsphere::NotFound
32
+ rescue Fog::Vsphere::Compute::NotFound
33
33
  nil
34
34
  end
35
35
 
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Servertype < Fog::Model
5
5
  identity :id
6
6
 
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Servertypes < Fog::Collection
5
5
  autoload :Servertype, File.expand_path('../servertype', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Servertype
7
+ model Fog::Vsphere::Compute::Servertype
8
8
  attr_accessor :datacenter, :id, :fullname
9
9
 
10
10
  def all(filters = {})
@@ -14,7 +14,7 @@ module Fog
14
14
  def get(id)
15
15
  requires :datacenter
16
16
  new service.get_server_type(id, datacenter)
17
- rescue Fog::Compute::Vsphere::NotFound
17
+ rescue Fog::Vsphere::Compute::NotFound
18
18
  nil
19
19
  end
20
20
  end
@@ -1,8 +1,8 @@
1
1
  require 'fog/compute/models/server'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Vsphere
4
+ module Vsphere
5
+ class Compute
6
6
  class Snapshot < Fog::Model
7
7
  identity :ref
8
8
  attribute :server_id
@@ -2,12 +2,12 @@ require 'fog/core/collection'
2
2
  require 'fog/vsphere/models/compute/snapshot'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Vsphere
5
+ module Vsphere
6
+ class Compute
7
7
  class Snapshots < Fog::Collection
8
8
  attribute :server_id, alias: :instance_uuid
9
9
  attribute :parent_snapshot
10
- model Fog::Compute::Vsphere::Snapshot
10
+ model Fog::Vsphere::Compute::Snapshot
11
11
 
12
12
  def all(filters = {})
13
13
  if parent_snapshot
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class StoragePod < Fog::Model
5
5
  identity :id
6
6
 
@@ -2,10 +2,10 @@ require 'fog/core/collection'
2
2
  require 'fog/vsphere/models/compute/storage_pod'
3
3
 
4
4
  module Fog
5
- module Compute
6
- class Vsphere
5
+ module Vsphere
6
+ class Compute
7
7
  class StoragePods < Fog::Collection
8
- model Fog::Compute::Vsphere::StoragePod
8
+ model Fog::Vsphere::Compute::StoragePod
9
9
  attribute :datacenter
10
10
 
11
11
  def all(filters = {})
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Template < Fog::Model
5
5
  identity :id
6
6
  attribute :name
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Templates < Fog::Collection
5
5
  autoload :Template, File.expand_path('../template', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Template
7
+ model Fog::Vsphere::Compute::Template
8
8
 
9
9
  def all(filters = {})
10
10
  load service.list_templates(filters)
@@ -1,8 +1,8 @@
1
1
  require 'fog/compute/models/server'
2
2
 
3
3
  module Fog
4
- module Compute
5
- class Vsphere
4
+ module Vsphere
5
+ class Compute
6
6
  class Ticket < Fog::Model
7
7
  attribute :server_id
8
8
 
@@ -1,16 +1,16 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Tickets < Fog::Collection
5
5
  autoload :Ticket, File.expand_path('../ticket', __FILE__)
6
6
 
7
- model Fog::Compute::Vsphere::Ticket
7
+ model Fog::Vsphere::Compute::Ticket
8
8
 
9
9
  attr_accessor :server
10
10
 
11
11
  def create(opts = {})
12
12
  requires :server
13
- raise 'server must be a Fog::Compute::Vsphere::Server' unless server.is_a?(Fog::Compute::Vsphere::Server)
13
+ raise 'server must be a Fog::Vsphere::Compute::Server' unless server.is_a?(Fog::Vsphere::Compute::Server)
14
14
  new(
15
15
  service.vm_acquire_ticket(
16
16
  opts.merge(
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Volume < Fog::Model
5
5
  DISK_SIZE_TO_GB = 1_048_576
6
6
  identity :id
@@ -64,7 +64,7 @@ module Fog
64
64
  created = server.volumes.all.find { |volume| volume.unit_number == self.unit_number }
65
65
 
66
66
  # example of "created" =>
67
- # <Fog::Compute::Vsphere::Volume
67
+ # <Fog::Vsphere::Compute::Volume
68
68
  # id="6000C295-576f-0e2d-5b70-c778cd108b3a",
69
69
  # datastore="datastore1",
70
70
  # storage_pod=nil,
@@ -1,20 +1,20 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Volumes < Fog::Collection
5
5
  autoload :Volume, File.expand_path('../volume', __FILE__)
6
6
 
7
7
  attribute :server_id
8
8
 
9
- model Fog::Compute::Vsphere::Volume
9
+ model Fog::Vsphere::Compute::Volume
10
10
 
11
11
  def all(_filters = {})
12
12
  requires :server_id
13
13
 
14
14
  case server
15
- when Fog::Compute::Vsphere::Server
15
+ when Fog::Vsphere::Compute::Server
16
16
  load service.list_vm_volumes(server.id)
17
- when Fog::Compute::Vsphere::Template
17
+ when Fog::Vsphere::Compute::Template
18
18
  load service.list_template_volumes(server.id)
19
19
  else
20
20
  raise 'volumes should have vm or template'
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def cloudinit_to_customspec(user_data)
6
6
  raise ArgumentError, "user_data can't be nil" if user_data.nil?
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def create_folder(datacenter, path, name)
6
6
  # Path cannot be nil but it can be an empty string
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def create_group(attributes = {})
6
6
  cluster = get_raw_cluster(attributes[:cluster], attributes[:datacenter])
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def create_rule(attributes = {})
6
6
  cluster = get_raw_cluster(attributes[:cluster], attributes[:datacenter])
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def create_vm(attributes = {})
6
6
  # build up vm configuration
@@ -1,6 +1,6 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def current_time
6
6
  current_time = connection.serviceInstance.CurrentTime