morpheus-cli 3.3.2.1 → 3.3.2.2

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: 285ccc76f7accb168f7d4d141a0d22ef730d3583
4
- data.tar.gz: cf48f1bb80eb08f0ec528258155da0579dcf13ff
3
+ metadata.gz: 395b47e5e7178e1377738cc1364bcfa666708a19
4
+ data.tar.gz: abf52a23f3becfdaefe4dc1f2af6b5a54ccc2e40
5
5
  SHA512:
6
- metadata.gz: e23ba4299fc9168b661c9282f1ee0d454ceec9b7b235db42852651a24b14fa2737c13656b8d82a4e9fafaf469efcf526bf01182c634798d251aef30439200262
7
- data.tar.gz: 1c2791b3c9ab502483f650af94182fb3ef5c61991b6d7502526e35db5986b11e4fceb99737b0e0595d0368c25915c83ead3e29882453be67dc01cf73e0693fc0
6
+ metadata.gz: 48a81811c2be21dff84c9d973d4f46c5123e6b7ce278c855aeeabb77b4d0055f1ec6b566f307469173c014c4205e5e2178b03306b2f5c360a1a8a47b67e259d2
7
+ data.tar.gz: 3bf43c656b0c2d854a350b02ed655f7ed7e50e6e9accc65623bef0d0333f225add0c74c94c969ee3ddf4ec0a7f6943532058f416674c7fb91032e7a2ab7ccf62
@@ -265,18 +265,6 @@ class Morpheus::Cli::LibraryContainerScriptsCommand
265
265
  print_red_alert "File not found: #{full_filename}"
266
266
  exit 1
267
267
  end
268
- # use the filename as the name by default.
269
- if !params['name']
270
- params['name'] = File.basename(full_filename)
271
- end
272
- end
273
- opts.on('--file FILE', "File containing the script. This can be used instead --script" ) do |filename|
274
- if File.exists?(File.expand_path(filename))
275
- params['script'] = File.read(File.expand_path(filename))
276
- else
277
- print_red_alert "File not found: #{filename}"
278
- exit 1
279
- end
280
268
  end
281
269
  # opts.on('--enabled [on|off]', String, "Can be used to disable it") do |val|
282
270
  # options['enabled'] = !(val.to_s == 'off' || val.to_s == 'false')
@@ -164,6 +164,12 @@ class Morpheus::Cli::LibraryContainerTemplatesCommand
164
164
  opts.on('--name VALUE', String, "Name") do |val|
165
165
  params['name'] = val
166
166
  end
167
+ opts.on('--fileName VALUE', String, "File Name") do |val|
168
+ params['fileName'] = val
169
+ end
170
+ opts.on('--filePath VALUE', String, "File Path") do |val|
171
+ params['filePath'] = val
172
+ end
167
173
  # opts.on('--code VALUE', String, "Code") do |val|
168
174
  # params['code'] = val
169
175
  # end
@@ -179,6 +185,28 @@ class Morpheus::Cli::LibraryContainerTemplatesCommand
179
185
  # opts.on('--enabled [on|off]', String, "Can be used to disable it") do |val|
180
186
  # options['enabled'] = !(val.to_s == 'off' || val.to_s == 'false')
181
187
  # end
188
+ opts.on('--template TEXT', String, "Contents of the template.") do |val|
189
+ params['template'] = val
190
+ end
191
+ opts.on('--file FILE', "File containing the template. This can be used instead --template" ) do |filename|
192
+ full_filename = File.expand_path(filename)
193
+ if File.exists?(full_filename)
194
+ params['template'] = File.read(full_filename)
195
+ else
196
+ print_red_alert "File not found: #{full_filename}"
197
+ exit 1
198
+ end
199
+ # use the filename as the name by default.
200
+ if !params['name']
201
+ params['name'] = File.basename(full_filename)
202
+ end
203
+ if !params['fileName']
204
+ params['fileName'] = File.basename(full_filename)
205
+ end
206
+ # if !params['filePath']
207
+ # params['filePath'] = File.dirname(full_filename)
208
+ # end
209
+ end
182
210
  build_common_options(opts, options, [:options, :payload, :json, :dry_run, :remote, :quiet])
183
211
  opts.footer = "Create a new file template." + "\n" +
184
212
  "[name] is required and can be passed as --name instead."
@@ -233,6 +261,12 @@ class Morpheus::Cli::LibraryContainerTemplatesCommand
233
261
  opts.on('--name VALUE', String, "Name") do |val|
234
262
  params['name'] = val
235
263
  end
264
+ opts.on('--fileName VALUE', String, "File Name") do |val|
265
+ params['fileName'] = val
266
+ end
267
+ opts.on('--filePath VALUE', String, "File Path") do |val|
268
+ params['filePath'] = val
269
+ end
236
270
  # opts.on('--code VALUE', String, "Code") do |val|
237
271
  # params['code'] = val
238
272
  # end
@@ -246,6 +280,18 @@ class Morpheus::Cli::LibraryContainerTemplatesCommand
246
280
  # opts.on('--enabled [on|off]', String, "Can be used to disable it") do |val|
247
281
  # options['enabled'] = !(val.to_s == 'off' || val.to_s == 'false')
248
282
  # end
283
+ opts.on('--template TEXT', String, "Contents of the template.") do |val|
284
+ params['template'] = val
285
+ end
286
+ opts.on('--file FILE', "File containing the template. This can be used instead --template" ) do |filename|
287
+ full_filename = File.expand_path(filename)
288
+ if File.exists?(full_filename)
289
+ params['template'] = File.read(full_filename)
290
+ else
291
+ print_red_alert "File not found: #{full_filename}"
292
+ exit 1
293
+ end
294
+ end
249
295
  build_common_options(opts, options, [:options, :payload, :json, :dry_run, :remote, :quiet])
250
296
  opts.footer = "Update a file template." + "\n" +
251
297
  "[name] is required. This is the name or id of a file template."
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Morpheus
3
3
  module Cli
4
- VERSION = "3.3.2.1"
4
+ VERSION = "3.3.2.2"
5
5
  end
6
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: 3.3.2.1
4
+ version: 3.3.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Estes