morpheus-cli 3.3.2.1 → 3.3.2.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 395b47e5e7178e1377738cc1364bcfa666708a19
|
4
|
+
data.tar.gz: abf52a23f3becfdaefe4dc1f2af6b5a54ccc2e40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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."
|
data/lib/morpheus/cli/version.rb
CHANGED