morpheus-cli 2.9.0 → 2.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 812e393024472b2ee42ef0136aa373a8de3d85e3
4
- data.tar.gz: 8d2947e92d627e420f6e18c1349b92294d5f9999
3
+ metadata.gz: dec4e335f8dbe9738af2c44aa04ccac1a5198a6b
4
+ data.tar.gz: be24bb1560580e737e0c578fb2473281ed5b264b
5
5
  SHA512:
6
- metadata.gz: 4744303a2f1d76a3ed90c8ecf084729ed06ea0ee7b10360fd488bd27f903a1309f124008202378cffa27093bda79562123000a5ed63cede7dafae87c563240f1
7
- data.tar.gz: fcaa57787c5421fb1a12edac4c60907765b718b1f3516e8944c44bc91cf3f9e30bd0d8f1d1bc3ce91a29fa46116513b641ed516592e5eb5ee632adab4d17cb66
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)
@@ -1,5 +1,6 @@
1
+
1
2
  module Morpheus
2
3
  module Cli
3
- VERSION = "2.9.0"
4
+ VERSION = "2.9.3"
4
5
  end
5
6
  end
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.0
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: 2016-12-22 00:00:00.000000000 Z
13
+ date: 2017-01-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler