mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[vcloud|compute] only require template name for tests.
This commit is contained in:
parent
4cb93026c4
commit
131af32295
1 changed files with 9 additions and 1 deletions
|
@ -2,7 +2,15 @@ class Vcloud
|
|||
module Compute
|
||||
module TestSupport
|
||||
def self.template
|
||||
ENV['VCLOUD_TEMPLATE'] || raise('Specify VApp template URI in VCLOUD_TEMPLATE env var')
|
||||
begin
|
||||
template_name = ENV['VCLOUD_TEMPLATE']
|
||||
raise unless template_name
|
||||
uri = Vcloud.catalogs.first.catalog_items.select {|ci| ci.name == template_name }[0].href
|
||||
raise unless uri
|
||||
rescue
|
||||
raise('Specify VApp template name in VCLOUD_TEMPLATE env var')
|
||||
end
|
||||
uri
|
||||
end
|
||||
end
|
||||
module Formats
|
||||
|
|
Loading…
Add table
Reference in a new issue