summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/vm.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands/vm.rb')
-rw-r--r--lib/leap_cli/commands/vm.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/vm.rb b/lib/leap_cli/commands/vm.rb
index 790774f1..6f97dbce 100644
--- a/lib/leap_cli/commands/vm.rb
+++ b/lib/leap_cli/commands/vm.rb
@@ -415,7 +415,6 @@ module LeapCli; module Commands
config = manager.env.cloud
name = nil
if options[:mock]
- Fog.mock!
name = 'mock_aws'
config['mock_aws'] = {
"api" => "aws",
@@ -451,6 +450,10 @@ module LeapCli; module Commands
assert! entry['api'] == 'aws', "cloud.json: currently, only 'aws' is supported for `api`."
assert! entry['vendor'] == 'aws', "cloud.json: currently, only 'aws' is supported for `vendor`."
+ LeapCli::Cloud::check_dependencies!(entry)
+ if options[:mock]
+ Fog.mock!
+ end
return LeapCli::Cloud.new(name, entry, node)
end