morpheus-cli 8.0.0 → 8.0.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 +4 -4
- data/Dockerfile +1 -1
- data/lib/morpheus/api/appliance_settings_interface.rb +7 -0
- data/lib/morpheus/api/virtual_images_interface.rb +6 -0
- data/lib/morpheus/cli/cli_command.rb +18 -3
- data/lib/morpheus/cli/commands/appliance_settings_command.rb +21 -2
- data/lib/morpheus/cli/commands/apps.rb +1 -1
- data/lib/morpheus/cli/commands/clouds.rb +1 -1
- 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 +117 -13
- data/lib/morpheus/cli/mixins/execution_request_helper.rb +1 -1
- data/lib/morpheus/cli/mixins/print_helper.rb +4 -2
- data/lib/morpheus/cli/mixins/provisioning_helper.rb +542 -330
- 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
@@ -29,7 +29,7 @@ module Morpheus::Cli::ExecutionRequestHelper
|
|
29
29
|
# unless options[:quiet]
|
30
30
|
# print cyan, "Execution request has not yet finished. Refreshing every #{refresh_display_seconds} seconds...", "\n", reset
|
31
31
|
# end
|
32
|
-
while
|
32
|
+
while (options[:waiting_status] || ['new', 'pending']).include?(execution_request['status']) do
|
33
33
|
sleep(refresh_interval)
|
34
34
|
execution_request = execution_request_interface.get(execution_request_id)['executionRequest']
|
35
35
|
end
|
@@ -509,13 +509,15 @@ module Morpheus::Cli::PrintHelper
|
|
509
509
|
bars = []
|
510
510
|
percent = 0
|
511
511
|
percent_sigdig = opts[:percent_sigdig] || 2
|
512
|
-
if max_value.
|
512
|
+
if max_value.nil?
|
513
513
|
percent = 0
|
514
|
+
elsif max_value == 0
|
515
|
+
percent = used_value.to_f == 0 ? 0 : 100
|
514
516
|
else
|
515
517
|
percent = ((used_value.to_f / max_value.to_f) * 100)
|
516
518
|
end
|
517
519
|
unlimited_label = opts[:unlimited_label] || "n/a"
|
518
|
-
percent_label = (
|
520
|
+
percent_label = (max_value.nil? ? unlimited_label : "#{percent.round(percent_sigdig)}%").rjust(6, ' ')
|
519
521
|
bar_display = ""
|
520
522
|
if percent > 100
|
521
523
|
max_bars.times { bars << "|" }
|