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,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 destroy_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 destroy_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 folder_destroy(path, datacenter_name)
6
6
  folder = get_raw_vmfolder(path, datacenter_name)
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_cluster(name, datacenter_name)
6
6
  cluster = get_raw_cluster(name, datacenter_name)
7
- raise(Fog::Compute::Vsphere::NotFound) unless cluster
7
+ raise(Fog::Vsphere::Compute::NotFound) unless cluster
8
8
  cluster_attributes(cluster, datacenter_name)
9
9
  end
10
10
 
@@ -23,8 +23,9 @@ module Fog
23
23
  class Mock
24
24
  def get_cluster(name, datacenter_name)
25
25
  data[:clusters].find { |c| c[:name] == name && c[:datacenter] == datacenter_name } ||
26
- raise(Fog::Compute::Vsphere::NotFound)
26
+ raise(Fog::Vsphere::Compute::NotFound)
27
27
  end
28
+ alias get_raw_cluster get_cluster
28
29
  end
29
30
  end
30
31
  end
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_compute_resource(name, datacenter_name)
6
6
  compute_resource = get_raw_compute_resource(name, datacenter_name)
7
- raise(Fog::Compute::Vsphere::NotFound) unless compute_resource
7
+ raise(Fog::Vsphere::Compute::NotFound) unless compute_resource
8
8
  compute_resource_attributes(compute_resource, datacenter_name)
9
9
  end
10
10
 
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_datacenter(name)
6
6
  dc = find_raw_datacenter(name)
7
- raise(Fog::Compute::Vsphere::NotFound) unless dc
7
+ raise(Fog::Vsphere::Compute::NotFound) unless dc
8
8
  { name: dc.name, status: dc.overallStatus, path: raw_getpathmo(dc) }
9
9
  end
10
10
 
@@ -23,7 +23,7 @@ module Fog
23
23
  class Mock
24
24
  def get_datacenter(name)
25
25
  dc = data[:datacenters][name]
26
- raise(Fog::Compute::Vsphere::NotFound) unless dc
26
+ raise(Fog::Vsphere::Compute::NotFound) unless dc
27
27
  dc
28
28
  end
29
29
  end
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_datastore(name, datacenter_name)
6
6
  datastore = list_datastores(datacenter: datacenter_name).detect { |ds| ds[:name] == name }
7
- raise(Fog::Compute::Vsphere::NotFound) unless datastore
7
+ raise(Fog::Vsphere::Compute::NotFound) unless datastore
8
8
  datastore
9
9
  end
10
10
 
@@ -1,12 +1,12 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_folder(path, datacenter_name, type = nil)
6
6
  type ||= 'vm'
7
7
  # Cycle through all types of folders.
8
8
  folder = get_raw_folder(path, datacenter_name, type)
9
- raise(Fog::Compute::Vsphere::NotFound) unless folder
9
+ raise(Fog::Vsphere::Compute::NotFound) unless folder
10
10
  folder_attributes(folder, datacenter_name)
11
11
  end
12
12
 
@@ -23,7 +23,7 @@ module Fog
23
23
  end
24
24
 
25
25
  valid_types = %w[vm network datastore host]
26
- raise ArgumentError, "#{type} is unknown" if type.blank?
26
+ raise ArgumentError, "#{type} is unknown" if type.nil? || type.empty?
27
27
  raise "Invalid type (#{type}). Must be one of #{valid_types.join(', ')} " unless valid_types.include?(type.to_s)
28
28
  meth = "#{type}Folder"
29
29
  dc_root_folder = dc.send(meth)
@@ -40,7 +40,7 @@ module Fog
40
40
  # VIM::Folder#inventory since that returns _all_ managed objects of
41
41
  # a certain type _and_ their properties.
42
42
  sub = last_returned_folder.find(sub_folder, RbVmomi::VIM::Folder)
43
- raise Fog::Compute::Vsphere::NotFound, "Could not descend into #{sub_folder}. Please check your path. #{path}" unless sub
43
+ raise Fog::Vsphere::Compute::NotFound, "Could not descend into #{sub_folder}. Please check your path. #{path}" unless sub
44
44
  sub
45
45
  end
46
46
  end
@@ -75,7 +75,7 @@ module Fog
75
75
  class Mock
76
76
  def get_folder(path, datacenter_name, _type = nil)
77
77
  data[:folders].values.find { |f| (f['datacenter'] == datacenter_name) && f['path'].end_with?(path) } ||
78
- raise(Fog::Compute::Vsphere::NotFound)
78
+ raise(Fog::Vsphere::Compute::NotFound)
79
79
  end
80
80
  end
81
81
  end
@@ -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 get_host(name, cluster_name, datacenter_name)
6
6
  get_raw_host(name, cluster_name, datacenter_name)
@@ -11,7 +11,7 @@ module Fog
11
11
  def get_raw_host(name, cluster_name, datacenter_name)
12
12
  cluster = get_raw_cluster(cluster_name, datacenter_name)
13
13
  cluster.host.find { |host| host.name == name } ||
14
- raise(Fog::Compute::Vsphere::NotFound, "no such host #{name}")
14
+ raise(Fog::Vsphere::Compute::NotFound, "no such host #{name}")
15
15
  end
16
16
  end
17
17
  end
@@ -1,12 +1,12 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_interface_type(id, servertype, datacenter, _filter = {})
6
6
  interfacetype = list_interface_types(filters = { id: id,
7
7
  datacenter: datacenter,
8
8
  servertype: servertype.id }).first
9
- raise(Fog::Compute::Vsphere::NotFound) unless interfacetype
9
+ raise(Fog::Vsphere::Compute::NotFound) unless interfacetype
10
10
  interfacetype
11
11
  end
12
12
  end
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_network(name, datacenter_name)
6
6
  network = get_raw_network(name, datacenter_name)
7
- raise(Fog::Compute::Vsphere::NotFound) unless network
7
+ raise(Fog::Vsphere::Compute::NotFound) unless network
8
8
  network_attributes(network, datacenter_name)
9
9
  end
10
10
 
@@ -33,7 +33,7 @@ module Fog
33
33
  end
34
34
  when :dvs
35
35
  # the first distributed virtual switch will do - selected by network - gives control to vsphere
36
- proc { |n| (n.name == name || n.key == name) && (n.class.to_s == 'DistributedVirtualPortgroup') }
36
+ proc { |n| n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && (n.name == name || n.key == name) }
37
37
  else
38
38
  # the first matching network will do, seems like the non-distributed networks come first
39
39
  proc { |n| (n.name == name || (n.is_a?(RbVmomi::VIM::DistributedVirtualPortgroup) && n.key == name)) }
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_resource_pool(name, cluster_name, datacenter_name)
6
6
  resource_pool = get_raw_resource_pool(name, cluster_name, datacenter_name)
7
- raise(Fog::Compute::Vsphere::NotFound) unless resource_pool
7
+ raise(Fog::Vsphere::Compute::NotFound) unless resource_pool
8
8
  resource_pool_attributes(resource_pool, cluster_name, datacenter_name)
9
9
  end
10
10
 
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_server_type(id, datacenter, _filter = {})
6
6
  server_type = get_raw_server_type(id, datacenter)
7
- raise(Fog::Compute::Vsphere::NotFound) unless server_type
7
+ raise(Fog::Vsphere::Compute::NotFound) unless server_type
8
8
  server_type_attributes(server_type, datacenter)
9
9
  end
10
10
 
@@ -12,9 +12,9 @@ module Fog
12
12
 
13
13
  def get_raw_server_type(id, datacenter, _filter = {})
14
14
  types = raw_server_types(datacenter)
15
- raise(Fog::Compute::Vsphere::NotFound) unless types
15
+ raise(Fog::Vsphere::Compute::NotFound) unless types
16
16
  types = types.select { |servertype| servertype.id == id }.first
17
- raise(Fog::Compute::Vsphere::NotFound) unless types
17
+ raise(Fog::Vsphere::Compute::NotFound) unless types
18
18
  types
19
19
  end
20
20
  end
@@ -1,10 +1,10 @@
1
1
  module Fog
2
- module Compute
3
- class Vsphere
2
+ module Vsphere
3
+ class Compute
4
4
  class Real
5
5
  def get_storage_pod(name, datacenter_name)
6
6
  storage_pod = list_storage_pods(datacenter: datacenter_name).detect { |pod| pod[:name] == name }
7
- raise(Fog::Compute::Vsphere::NotFound) unless storage_pod
7
+ raise(Fog::Vsphere::Compute::NotFound) unless storage_pod
8
8
  storage_pod
9
9
  end
10
10
 
@@ -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 get_template(id, datacenter_name = nil)
6
6
  convert_vm_mob_ref_to_attr_hash(get_vm_ref(id, datacenter_name))
@@ -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 get_virtual_machine(id, datacenter_name = nil, folder = nil, recursive = false)
6
6
  # The larger the VM list the longer it will take if not searching based on UUID.
@@ -25,7 +25,7 @@ module Fog
25
25
  raw_datacenters.map { |d| get_vm_by_name(id, d['name'], folder, recursive) }.compact.first
26
26
  end
27
27
  end
28
- vm ? vm : raise(Fog::Compute::Vsphere::NotFound, "#{id} was not found")
28
+ vm ? vm : raise(Fog::Vsphere::Compute::NotFound, "#{id} was not found")
29
29
  end
30
30
 
31
31
  def get_vm_by_name(name, dc, folder, recursive)
@@ -67,7 +67,7 @@ module Fog
67
67
  # try to find based on VM name. May need to handle the path of the VM
68
68
  list_virtual_machines('name' => id, 'datacenter' => datacenter_name).first
69
69
  end
70
- vm ? vm : raise(Fog::Compute::Vsphere::NotFound, "#{id} was not found")
70
+ vm ? vm : raise(Fog::Vsphere::Compute::NotFound, "#{id} was not found")
71
71
  end
72
72
  end
73
73
  end
@@ -1,10 +1,10 @@
1
1
 
2
2
  module Fog
3
- module Compute
4
- class Vsphere
3
+ module Vsphere
4
+ class Compute
5
5
  class Real
6
6
  def get_vm_first_scsi_controller(vm_id)
7
- Fog::Compute::Vsphere::SCSIController.new(get_vm_first_scsi_controller_raw(vm_id))
7
+ Fog::Vsphere::Compute::SCSIController.new(get_vm_first_scsi_controller_raw(vm_id))
8
8
  end
9
9
 
10
10
  def get_vm_first_scsi_controller_raw(vm_id)
@@ -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 host_finish_maintenance(name, cluster_name, datacenter_name, timeout = 0)
6
6
  host_ref = get_host(name, cluster_name, datacenter_name)
@@ -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 host_shutdown(name, cluster_name, datacenter_name, force = false)
6
6
  host_ref = get_host(name, cluster_name, datacenter_name)
@@ -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 host_start_maintenance(name, cluster_name, datacenter_name, timeout = 0, evacuate_powered_off_vms = false)
6
6
  host_ref = get_host(name, cluster_name, datacenter_name)
@@ -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 list_child_snapshots(snapshot, opts = {})
6
6
  normalized_snapshot = Hash === snapshot ?
@@ -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 list_clusters(filters = {})
6
6
  datacenter_name = filters[:datacenter] if filters.key? :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 list_compute_resources(filters = {})
6
6
  datacenter_name = filters[: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 list_customfields
6
6
  connection.serviceContent.customFieldsManager.field.map do |customfield|
@@ -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 list_datacenters(_filters = {})
6
6
  raw_datacenters.map do |dc|
@@ -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 list_datastores(filters = {})
6
6
  datacenter_name = filters[:datacenter]
@@ -86,10 +86,10 @@ module Fog
86
86
  cluster_name = filters.fetch(:cluster, nil)
87
87
  if cluster_name.nil?
88
88
  data[:datastores].values.select { |d| d['datacenter'] == datacenter_name } ||
89
- raise(Fog::Compute::Vsphere::NotFound)
89
+ raise(Fog::Vsphere::Compute::NotFound)
90
90
  else
91
91
  data[:datastores].values.select { |d| d['datacenter'] == datacenter_name && d['cluster'].include?(cluster_name) } ||
92
- raise(Fog::Compute::Vsphere::NotFound)
92
+ raise(Fog::Vsphere::Compute::NotFound)
93
93
  end
94
94
  end
95
95
  end
@@ -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
  # Grabs all sub folders within a given path folder.
6
6
  #
@@ -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 list_groups(filters = {})
6
6
  cluster = get_raw_cluster(filters[:cluster], filters[:datacenter])
@@ -1,7 +1,7 @@
1
1
  # rubocop:disable Lint/RescueWithoutErrorClass
2
2
  module Fog
3
- module Compute
4
- class Vsphere
3
+ module Vsphere
4
+ class Compute
5
5
  class Real
6
6
  def list_hosts(filters = {})
7
7
  cluster = get_raw_cluster(filters[:cluster], filters[:datacenter])