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.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +4 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/README.md +7 -1
- data/fog-vsphere.gemspec +2 -1
- data/lib/fog-vsphere.rb +1 -0
- data/lib/fog/bin/vsphere.rb +1 -1
- data/lib/fog/vsphere.rb +2 -4
- data/lib/fog/vsphere/compute.rb +23 -6
- data/lib/fog/vsphere/models/compute/cdrom.rb +2 -2
- data/lib/fog/vsphere/models/compute/cdroms.rb +3 -3
- data/lib/fog/vsphere/models/compute/cluster.rb +2 -2
- data/lib/fog/vsphere/models/compute/clusters.rb +3 -3
- data/lib/fog/vsphere/models/compute/customfield.rb +2 -2
- data/lib/fog/vsphere/models/compute/customfields.rb +3 -3
- data/lib/fog/vsphere/models/compute/customvalue.rb +2 -2
- data/lib/fog/vsphere/models/compute/customvalues.rb +5 -5
- data/lib/fog/vsphere/models/compute/datacenter.rb +2 -2
- data/lib/fog/vsphere/models/compute/datacenters.rb +3 -3
- data/lib/fog/vsphere/models/compute/datastore.rb +2 -2
- data/lib/fog/vsphere/models/compute/datastores.rb +3 -3
- data/lib/fog/vsphere/models/compute/folder.rb +2 -2
- data/lib/fog/vsphere/models/compute/folders.rb +3 -3
- data/lib/fog/vsphere/models/compute/host.rb +2 -2
- data/lib/fog/vsphere/models/compute/hosts.rb +4 -4
- data/lib/fog/vsphere/models/compute/interface.rb +2 -2
- data/lib/fog/vsphere/models/compute/interfaces.rb +8 -8
- data/lib/fog/vsphere/models/compute/interfacetype.rb +2 -2
- data/lib/fog/vsphere/models/compute/interfacetypes.rb +5 -5
- data/lib/fog/vsphere/models/compute/network.rb +2 -2
- data/lib/fog/vsphere/models/compute/networks.rb +3 -3
- data/lib/fog/vsphere/models/compute/process.rb +2 -2
- data/lib/fog/vsphere/models/compute/resource_pool.rb +2 -2
- data/lib/fog/vsphere/models/compute/resource_pools.rb +3 -3
- data/lib/fog/vsphere/models/compute/rule.rb +2 -2
- data/lib/fog/vsphere/models/compute/rules.rb +4 -4
- data/lib/fog/vsphere/models/compute/scsicontroller.rb +2 -2
- data/lib/fog/vsphere/models/compute/server.rb +6 -6
- data/lib/fog/vsphere/models/compute/servers.rb +4 -4
- data/lib/fog/vsphere/models/compute/servertype.rb +2 -2
- data/lib/fog/vsphere/models/compute/servertypes.rb +4 -4
- data/lib/fog/vsphere/models/compute/snapshot.rb +2 -2
- data/lib/fog/vsphere/models/compute/snapshots.rb +3 -3
- data/lib/fog/vsphere/models/compute/storage_pod.rb +2 -2
- data/lib/fog/vsphere/models/compute/storage_pods.rb +3 -3
- data/lib/fog/vsphere/models/compute/template.rb +2 -2
- data/lib/fog/vsphere/models/compute/templates.rb +3 -3
- data/lib/fog/vsphere/models/compute/ticket.rb +2 -2
- data/lib/fog/vsphere/models/compute/tickets.rb +4 -4
- data/lib/fog/vsphere/models/compute/volume.rb +3 -3
- data/lib/fog/vsphere/models/compute/volumes.rb +5 -5
- data/lib/fog/vsphere/requests/compute/cloudinit_to_customspec.rb +2 -2
- data/lib/fog/vsphere/requests/compute/create_folder.rb +2 -2
- data/lib/fog/vsphere/requests/compute/create_group.rb +2 -2
- data/lib/fog/vsphere/requests/compute/create_rule.rb +2 -2
- data/lib/fog/vsphere/requests/compute/create_vm.rb +2 -2
- data/lib/fog/vsphere/requests/compute/current_time.rb +2 -2
- data/lib/fog/vsphere/requests/compute/destroy_group.rb +2 -2
- data/lib/fog/vsphere/requests/compute/destroy_rule.rb +2 -2
- data/lib/fog/vsphere/requests/compute/folder_destroy.rb +2 -2
- data/lib/fog/vsphere/requests/compute/get_cluster.rb +5 -4
- data/lib/fog/vsphere/requests/compute/get_compute_resource.rb +3 -3
- data/lib/fog/vsphere/requests/compute/get_datacenter.rb +4 -4
- data/lib/fog/vsphere/requests/compute/get_datastore.rb +3 -3
- data/lib/fog/vsphere/requests/compute/get_folder.rb +6 -6
- data/lib/fog/vsphere/requests/compute/get_host.rb +3 -3
- data/lib/fog/vsphere/requests/compute/get_interface_type.rb +3 -3
- data/lib/fog/vsphere/requests/compute/get_network.rb +4 -4
- data/lib/fog/vsphere/requests/compute/get_resource_pool.rb +3 -3
- data/lib/fog/vsphere/requests/compute/get_server_type.rb +5 -5
- data/lib/fog/vsphere/requests/compute/get_storage_pod.rb +3 -3
- data/lib/fog/vsphere/requests/compute/get_template.rb +2 -2
- data/lib/fog/vsphere/requests/compute/get_virtual_machine.rb +4 -4
- data/lib/fog/vsphere/requests/compute/get_vm_first_scsi_controller.rb +3 -3
- data/lib/fog/vsphere/requests/compute/host_finish_maintenance.rb +2 -2
- data/lib/fog/vsphere/requests/compute/host_shutdown.rb +2 -2
- data/lib/fog/vsphere/requests/compute/host_start_maintenance.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_child_snapshots.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_clusters.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_compute_resources.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_customfields.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_datacenters.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_datastores.rb +4 -4
- data/lib/fog/vsphere/requests/compute/list_folders.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_groups.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_hosts.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_interface_types.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_networks.rb +4 -4
- data/lib/fog/vsphere/requests/compute/list_processes.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_resource_pools.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_rules.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_server_types.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_storage_pods.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_templates.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_virtual_machines.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_vm_cdroms.rb +3 -3
- data/lib/fog/vsphere/requests/compute/list_vm_customvalues.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_vm_interfaces.rb +3 -3
- data/lib/fog/vsphere/requests/compute/list_vm_scsi_controllers.rb +4 -4
- data/lib/fog/vsphere/requests/compute/list_vm_snapshots.rb +2 -2
- data/lib/fog/vsphere/requests/compute/list_vm_volumes.rb +2 -2
- data/lib/fog/vsphere/requests/compute/modify_vm_cdrom.rb +2 -2
- data/lib/fog/vsphere/requests/compute/modify_vm_controller.rb +2 -2
- data/lib/fog/vsphere/requests/compute/modify_vm_interface.rb +4 -4
- data/lib/fog/vsphere/requests/compute/modify_vm_volume.rb +2 -2
- data/lib/fog/vsphere/requests/compute/revert_to_snapshot.rb +2 -2
- data/lib/fog/vsphere/requests/compute/set_vm_customvalue.rb +2 -2
- data/lib/fog/vsphere/requests/compute/update_vm.rb +2 -2
- data/lib/fog/vsphere/requests/compute/upload_iso.rb +4 -4
- data/lib/fog/vsphere/requests/compute/vm_acquire_ticket.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_clone.rb +11 -8
- data/lib/fog/vsphere/requests/compute/vm_config_vnc.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_destroy.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_execute.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_migrate.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_power_off.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_power_on.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_reboot.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_reconfig_cdrom.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_reconfig_cpus.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_reconfig_hardware.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_reconfig_memory.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_reconfig_volumes.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_relocate.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_remove_snapshot.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_rename.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_revert_snapshot.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_suspend.rb +2 -2
- data/lib/fog/vsphere/requests/compute/vm_take_snapshot.rb +2 -2
- data/lib/fog/vsphere/version.rb +1 -1
- data/tests/helper.rb +3 -0
- data/tests/models/compute/cluster_tests.rb +3 -3
- data/tests/models/compute/hosts_tests.rb +1 -1
- data/tests/models/compute/rules_tests.rb +1 -1
- data/tests/models/compute/server_tests.rb +4 -4
- data/tests/models/compute/server_unit_tests.rb +1 -1
- data/tests/models/compute/servers_tests.rb +1 -1
- data/tests/models/compute/tickets_tests.rb +1 -1
- data/tests/requests/compute/get_network_tests.rb +23 -15
- data/tests/requests/compute/revert_to_snapshot_tests.rb +1 -1
- data/tests/requests/compute/update_vm_tests.rb +1 -1
- data/tests/requests/compute/vm_clone_tests.rb +10 -5
- metadata +26 -5
@@ -1,10 +1,10 @@
|
|
1
1
|
module Fog
|
2
|
-
module
|
3
|
-
class
|
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::
|
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::
|
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
|
3
|
-
class
|
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::
|
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
|
3
|
-
class
|
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::
|
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::
|
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
|
3
|
-
class
|
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::
|
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
|
3
|
-
class
|
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::
|
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.
|
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::
|
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::
|
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
|
3
|
-
class
|
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::
|
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
|
3
|
-
class
|
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::
|
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
|
3
|
-
class
|
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::
|
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)
|
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
|
3
|
-
class
|
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::
|
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
|
3
|
-
class
|
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::
|
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::
|
15
|
+
raise(Fog::Vsphere::Compute::NotFound) unless types
|
16
16
|
types = types.select { |servertype| servertype.id == id }.first
|
17
|
-
raise(Fog::Compute::
|
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
|
3
|
-
class
|
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::
|
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
|
3
|
-
class
|
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::
|
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::
|
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
|
4
|
-
class
|
3
|
+
module Vsphere
|
4
|
+
class Compute
|
5
5
|
class Real
|
6
6
|
def get_vm_first_scsi_controller(vm_id)
|
7
|
-
Fog::Compute::
|
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
|
3
|
-
class
|
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::
|
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::
|
92
|
+
raise(Fog::Vsphere::Compute::NotFound)
|
93
93
|
end
|
94
94
|
end
|
95
95
|
end
|