morpheus-cli 2.9.0 → 2.9.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/morpheus/cli/cli_command.rb +5 -0
- data/lib/morpheus/cli/instances.rb +15 -1
- data/lib/morpheus/cli/version.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dec4e335f8dbe9738af2c44aa04ccac1a5198a6b
|
4
|
+
data.tar.gz: be24bb1560580e737e0c578fb2473281ed5b264b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1fe7f96629f0c9556777f7e74ac8f17dc34f5a500cd8b152813e6314b10de5a8ee0f76245b4a1a0688c5b02cdd211b182dbce91ddbd1517fd0a2df2ae9e5dafe
|
7
|
+
data.tar.gz: f72692a39db7fb5b37a09a9921821fabb8e78b5c3e6dae9ca2348b01b7d53e80ac0a4958a72d939744b26e50b48fd8a721b39107dbe5a60f40154e2dd0ca8e86
|
@@ -104,6 +104,11 @@ module Morpheus
|
|
104
104
|
opts.on('-j','--json', "JSON Output") do |json|
|
105
105
|
options[:json] = true
|
106
106
|
end
|
107
|
+
|
108
|
+
when :dry_run
|
109
|
+
opts.on('-d','--dry-run', "Dry Run, print json without making the actual request.") do |json|
|
110
|
+
options[:dry_run] = true
|
111
|
+
end
|
107
112
|
|
108
113
|
else
|
109
114
|
raise "Unknown common_option key: #{option_key}"
|
@@ -108,7 +108,7 @@ class Morpheus::Cli::Instances
|
|
108
108
|
opts.on( '-c', '--cloud CLOUD', "Cloud" ) do |val|
|
109
109
|
options[:cloud] = val
|
110
110
|
end
|
111
|
-
build_common_options(opts, options, [:options, :json, :remote])
|
111
|
+
build_common_options(opts, options, [:options, :json, :dry_run, :remote])
|
112
112
|
|
113
113
|
end
|
114
114
|
|
@@ -227,6 +227,20 @@ class Morpheus::Cli::Instances
|
|
227
227
|
payload[:servicePlanOptions] = {}
|
228
228
|
|
229
229
|
begin
|
230
|
+
if options[:dry_run]
|
231
|
+
print "\n" ,cyan, bold, "DRY RUN\n","==================", "\n\n", reset
|
232
|
+
print cyan
|
233
|
+
print "Request: ", "\n"
|
234
|
+
print reset
|
235
|
+
print "POST #{@appliance_url}/api/instances", "\n\n"
|
236
|
+
print cyan
|
237
|
+
print "JSON: ", "\n"
|
238
|
+
print reset
|
239
|
+
print JSON.pretty_generate(payload)
|
240
|
+
print "\n"
|
241
|
+
print reset
|
242
|
+
return
|
243
|
+
end
|
230
244
|
json_response = @instances_interface.create(payload)
|
231
245
|
if options[:json]
|
232
246
|
print JSON.pretty_generate(json_response)
|
data/lib/morpheus/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: morpheus-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Estes
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2017-01-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|