morpheus-cli 8.0.1 → 8.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/lib/morpheus/cli/cli_command.rb +18 -3
- data/lib/morpheus/cli/commands/clusters.rb +48 -11
- data/lib/morpheus/cli/commands/hosts.rb +9 -3
- data/lib/morpheus/cli/commands/instances.rb +17 -3
- data/lib/morpheus/cli/commands/library_cluster_layouts_command.rb +1 -1
- data/lib/morpheus/cli/commands/shell.rb +18 -39
- data/lib/morpheus/cli/commands/virtual_images.rb +71 -17
- data/lib/morpheus/cli/mixins/execution_request_helper.rb +1 -1
- data/lib/morpheus/cli/mixins/provisioning_helper.rb +535 -324
- data/lib/morpheus/cli/version.rb +1 -1
- data/test/cli/auth_test.rb +6 -0
- data/test/cli/roles_test.rb +15 -2
- data/test/test_case.rb +1 -0
- metadata +2 -2
data/lib/morpheus/cli/version.rb
CHANGED
data/test/cli/auth_test.rb
CHANGED
@@ -54,6 +54,12 @@ class MorpheusTest::AuthTest < MorpheusTest::TestCase
|
|
54
54
|
assert_execute %(instances list)
|
55
55
|
end
|
56
56
|
end
|
57
|
+
# test bug where this failed when combined with --dry-run option
|
58
|
+
without_authentication do
|
59
|
+
with_input @config.username, @config.password_decrypted do
|
60
|
+
assert_execute %(instances list -d)
|
61
|
+
end
|
62
|
+
end
|
57
63
|
end
|
58
64
|
|
59
65
|
def test_login_adhoc
|
data/test/cli/roles_test.rb
CHANGED
@@ -7,9 +7,22 @@ class MorpheusTest::RolesTest < MorpheusTest::TestCase
|
|
7
7
|
assert_execute %(roles list "System Admin")
|
8
8
|
end
|
9
9
|
|
10
|
+
# def test_roles_get_system_admin
|
11
|
+
# assert_execute %(roles get "System Admin")
|
12
|
+
# assert_execute %(roles get "System Admin" --permissions)
|
13
|
+
# end
|
14
|
+
|
10
15
|
def test_roles_get
|
11
|
-
|
12
|
-
|
16
|
+
# role = client.roles.list({})['roles'][0]
|
17
|
+
role = client.roles.list({})['roles'].find {|r| r['authority'] !~ /\A\d+\Z/}
|
18
|
+
if role
|
19
|
+
assert_execute %(roles get "#{role['id']}")
|
20
|
+
name_arg = role['authority']
|
21
|
+
assert_execute %(roles get "#{escape_arg name_arg}")
|
22
|
+
assert_execute %(roles get "#{escape_arg name_arg}" --permissions)
|
23
|
+
else
|
24
|
+
puts "No role found, unable to execute test `#{__method__}`"
|
25
|
+
end
|
13
26
|
end
|
14
27
|
|
15
28
|
def test_roles_list_permissions
|
data/test/test_case.rb
CHANGED
@@ -87,6 +87,7 @@ module MorpheusTest
|
|
87
87
|
# assert_execute("foobar", exit:1, "Expected unknown command to fail")
|
88
88
|
#
|
89
89
|
def assert_execute(cmd, opts = {}, failure_message = nil)
|
90
|
+
#Morpheus::Logging::DarkPrinter.puts(cmd)
|
90
91
|
opts = opts.is_a?(String) ? {failure_message:opts} : (opts || {})
|
91
92
|
result = terminal.execute(cmd)
|
92
93
|
assert_command_result(result, opts, failure_message)
|
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: 8.0.
|
4
|
+
version: 8.0.2
|
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:
|
14
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: public_suffix
|