mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[vsphere] Use find_raw_datacenter instead of get_raw_datacenter
find_raw_datacenter uses the cache of datacenters in list_datacenters, speeding it up. Calls to get_raw_datacenter if not cached
This commit is contained in:
parent
0e686b2740
commit
d7099162b3
2 changed files with 2 additions and 2 deletions
|
@ -11,7 +11,7 @@ module Fog
|
|||
protected
|
||||
|
||||
def get_raw_resource_pool(name, cluster_name, datacenter_name)
|
||||
dc = get_raw_datacenter(datacenter_name)
|
||||
dc = find_raw_datacenter(datacenter_name)
|
||||
cluster = dc.find_compute_resource(cluster_name)
|
||||
cluster.resourcePool.find name
|
||||
end
|
||||
|
|
|
@ -20,7 +20,7 @@ module Fog
|
|||
end
|
||||
|
||||
def find_datacenters name=nil
|
||||
name ? [get_raw_datacenter(name)] : raw_datacenters
|
||||
name ? [find_raw_datacenter(name)] : raw_datacenters
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue