morpheus-cli 3.4.1 → 3.4.1.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a8eae139abcd5b680608c7316af97006dd0445
|
4
|
+
data.tar.gz: 6f49e6037ac110032a8e35ac0923e01f4b1666c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9ce121ef8455783c9d74bd2405b63fdb321db8ec9938a9767f13400d49c37cf75ee47939127a5755e690d7e90808b394435d84fbf7869386c1c3d4b02eddbbf
|
7
|
+
data.tar.gz: 1a0ee4756032f37ce30dcbd5dbfb67ec3b201ec9b84a9b985999305cedeb5acd825810b6a6a60a7fe70fad717ff44e827574d64e1cc6f2f2425fca0463f2874e
|
@@ -39,6 +39,13 @@ class Morpheus::PackagesInterface < Morpheus::APIClient
|
|
39
39
|
execute(opts)
|
40
40
|
end
|
41
41
|
|
42
|
+
def install_file(package_file, params={})
|
43
|
+
url = "#{@base_url}/api/packages/install-file"
|
44
|
+
headers = { :params => params, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/octet-stream'}
|
45
|
+
payload = package_file
|
46
|
+
execute(method: :post, url: url, headers: headers, payload: payload, timeout: 36000)
|
47
|
+
end
|
48
|
+
|
42
49
|
def update(id, payload)
|
43
50
|
url = "#{@base_url}/api/packages/update/#{id}"
|
44
51
|
headers = { :params => {}, :authorization => "Bearer #{@access_token}", 'Content-Type' => 'application/json' }
|
@@ -173,7 +173,8 @@ class Morpheus::Cli::LibraryPackagesCommand
|
|
173
173
|
outfile = nil
|
174
174
|
do_overwrite = false
|
175
175
|
do_mkdir = false
|
176
|
-
|
176
|
+
do_unzip = false
|
177
|
+
do_open = false
|
177
178
|
open_prog = nil
|
178
179
|
optparse = Morpheus::Cli::OptionParser.new do |opts|
|
179
180
|
opts.banner = subcommand_usage("[instance-type]")
|
@@ -221,8 +222,12 @@ class Morpheus::Cli::LibraryPackagesCommand
|
|
221
222
|
do_overwrite = true
|
222
223
|
do_mkdir = true
|
223
224
|
end
|
225
|
+
opts.on( '--unzip', "Unzip the package to a directory with the same name." ) do
|
226
|
+
do_unzip = true
|
227
|
+
end
|
224
228
|
opts.on( '--open [PROG]', String, "Unzip the package and open the expanded directory with the specified program." ) do |val|
|
225
|
-
|
229
|
+
do_unzip = true
|
230
|
+
do_open = true
|
226
231
|
if !val.to_s.empty?
|
227
232
|
open_prog = val.to_s
|
228
233
|
else
|
@@ -318,7 +323,7 @@ class Morpheus::Cli::LibraryPackagesCommand
|
|
318
323
|
print green + "SUCCESS" + reset + "\n"
|
319
324
|
end
|
320
325
|
|
321
|
-
if
|
326
|
+
if do_unzip
|
322
327
|
package_dir = File.join(File.dirname(outfile), File.basename(outfile).sub(/\.morpkg\Z/, ''))
|
323
328
|
if File.exists?(package_dir)
|
324
329
|
print cyan,"Deleting existing directory #{package_dir}",reset,"\n"
|
@@ -326,7 +331,9 @@ class Morpheus::Cli::LibraryPackagesCommand
|
|
326
331
|
end
|
327
332
|
print cyan,"Unzipping to #{package_dir}",reset,"\n"
|
328
333
|
system("unzip '#{outfile}' -d '#{package_dir}' > /dev/null 2>&1")
|
329
|
-
|
334
|
+
if do_open
|
335
|
+
system("#{open_prog} '#{package_dir}'")
|
336
|
+
end
|
330
337
|
end
|
331
338
|
|
332
339
|
return 0
|
@@ -826,7 +826,7 @@ class Morpheus::Cli::PoliciesCommand
|
|
826
826
|
|
827
827
|
def format_tenants(accounts)
|
828
828
|
if accounts && accounts.size > 0
|
829
|
-
accounts = accounts.sort {|
|
829
|
+
accounts = accounts.sort {|a,b| a['name'] <=> b['name'] }.uniq {|it| it['id'] }
|
830
830
|
account_ids = accounts.collect {|it| it['id'] }
|
831
831
|
account_names = accounts.collect {|it| it['name'] }
|
832
832
|
"(#{account_ids.join(',')}) #{account_names.join(',')}"
|
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: 3.4.1
|
4
|
+
version: 3.4.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Estes
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-06-
|
14
|
+
date: 2018-06-18 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|