morpheus-cli 5.5.1.4 → 5.5.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/api_client.rb +25 -0
- data/lib/morpheus/api/archive_buckets_interface.rb +1 -1
- data/lib/morpheus/api/body_io.rb +22 -0
- data/lib/morpheus/api/catalog_item_types_interface.rb +5 -1
- data/lib/morpheus/api/clients_interface.rb +41 -0
- data/lib/morpheus/api/clouds_interface.rb +21 -0
- data/lib/morpheus/api/instances_interface.rb +8 -1
- data/lib/morpheus/api/integrations_interface.rb +30 -0
- data/lib/morpheus/api/library_instance_types_interface.rb +15 -3
- data/lib/morpheus/api/network_pool_server_types_interface.rb +9 -0
- data/lib/morpheus/api/plugins_interface.rb +22 -0
- data/lib/morpheus/api/roles_interface.rb +20 -1
- data/lib/morpheus/api/security_package_types_interface.rb +9 -0
- data/lib/morpheus/api/security_packages_interface.rb +9 -0
- data/lib/morpheus/api/security_scans_interface.rb +9 -0
- data/lib/morpheus/api/servers_interface.rb +17 -17
- data/lib/morpheus/api/storage_providers_interface.rb +1 -1
- data/lib/morpheus/api/virtual_images_interface.rb +1 -23
- data/lib/morpheus/cli/cli_command.rb +81 -7
- data/lib/morpheus/cli/commands/apps.rb +28 -2
- data/lib/morpheus/cli/commands/archives_command.rb +2 -2
- data/lib/morpheus/cli/commands/blueprints_command.rb +16 -0
- data/lib/morpheus/cli/commands/catalog_item_types_command.rb +34 -2
- data/lib/morpheus/cli/commands/clients_command.rb +338 -0
- data/lib/morpheus/cli/commands/clouds.rb +127 -1
- data/lib/morpheus/cli/commands/clusters.rb +42 -12
- data/lib/morpheus/cli/commands/curl_command.rb +114 -135
- data/lib/morpheus/cli/commands/hosts.rb +108 -11
- data/lib/morpheus/cli/commands/instances.rb +115 -14
- data/lib/morpheus/cli/commands/integrations_command.rb +215 -4
- data/lib/morpheus/cli/commands/invoices_command.rb +20 -11
- data/lib/morpheus/cli/commands/jobs_command.rb +299 -190
- data/lib/morpheus/cli/commands/library_cluster_layouts_command.rb +16 -2
- data/lib/morpheus/cli/commands/library_container_scripts_command.rb +14 -0
- data/lib/morpheus/cli/commands/library_container_templates_command.rb +131 -48
- data/lib/morpheus/cli/commands/library_container_types_command.rb +17 -4
- data/lib/morpheus/cli/commands/library_instance_types_command.rb +85 -7
- data/lib/morpheus/cli/commands/library_layouts_command.rb +32 -1
- data/lib/morpheus/cli/commands/library_option_lists_command.rb +30 -18
- data/lib/morpheus/cli/commands/library_option_types_command.rb +31 -14
- data/lib/morpheus/cli/commands/library_spec_templates_command.rb +14 -0
- data/lib/morpheus/cli/commands/library_upgrades_command.rb +2 -2
- data/lib/morpheus/cli/commands/network_pool_server_types.rb +20 -0
- data/lib/morpheus/cli/commands/network_pool_servers_command.rb +55 -158
- data/lib/morpheus/cli/commands/network_pools_command.rb +49 -23
- data/lib/morpheus/cli/commands/networks_command.rb +262 -45
- data/lib/morpheus/cli/commands/plugins.rb +213 -0
- data/lib/morpheus/cli/commands/price_sets_command.rb +40 -10
- data/lib/morpheus/cli/commands/prices_command.rb +17 -5
- data/lib/morpheus/cli/commands/processes_command.rb +2 -1
- data/lib/morpheus/cli/commands/remote.rb +7 -10
- data/lib/morpheus/cli/commands/roles.rb +924 -335
- data/lib/morpheus/cli/commands/search_command.rb +2 -0
- data/lib/morpheus/cli/commands/security_groups.rb +72 -84
- data/lib/morpheus/cli/commands/security_package_types.rb +32 -0
- data/lib/morpheus/cli/commands/security_packages.rb +84 -0
- data/lib/morpheus/cli/commands/security_scans.rb +107 -0
- data/lib/morpheus/cli/commands/service_plans_command.rb +16 -14
- data/lib/morpheus/cli/commands/subnets_command.rb +15 -1
- data/lib/morpheus/cli/commands/tasks.rb +34 -1
- data/lib/morpheus/cli/commands/tenants_command.rb +1 -1
- data/lib/morpheus/cli/commands/user_settings_command.rb +11 -2
- data/lib/morpheus/cli/commands/users.rb +50 -9
- data/lib/morpheus/cli/commands/virtual_images.rb +14 -0
- data/lib/morpheus/cli/commands/workflows.rb +14 -0
- data/lib/morpheus/cli/mixins/accounts_helper.rb +6 -5
- data/lib/morpheus/cli/mixins/infrastructure_helper.rb +79 -0
- data/lib/morpheus/cli/mixins/jobs_helper.rb +4 -5
- data/lib/morpheus/cli/mixins/library_helper.rb +2 -0
- data/lib/morpheus/cli/mixins/logs_helper.rb +3 -0
- data/lib/morpheus/cli/mixins/monitoring_helper.rb +1 -1
- data/lib/morpheus/cli/mixins/print_helper.rb +29 -4
- data/lib/morpheus/cli/mixins/provisioning_helper.rb +38 -9
- data/lib/morpheus/cli/mixins/rest_command.rb +106 -8
- data/lib/morpheus/cli/mixins/secondary_rest_command.rb +6 -2
- data/lib/morpheus/cli/option_types.rb +94 -25
- data/lib/morpheus/cli/version.rb +1 -1
- data/lib/morpheus/formatters.rb +10 -1
- metadata +15 -2
|
@@ -124,6 +124,9 @@ class Morpheus::Cli::InvoicesCommand
|
|
|
124
124
|
opts.on('--sigdig DIGITS', "Significant digits when rounding cost values for display as currency. Default is 2. eg. $3.50") do |val|
|
|
125
125
|
options[:sigdig] = val.to_i
|
|
126
126
|
end
|
|
127
|
+
opts.on('--test-count VALUE', "Test if value matches the total number of results found and exit with error code 3 if not.") do |val|
|
|
128
|
+
options[:test_count] = val.to_i
|
|
129
|
+
end
|
|
127
130
|
build_standard_list_options(opts, options)
|
|
128
131
|
opts.footer = "List invoices."
|
|
129
132
|
end
|
|
@@ -355,6 +358,10 @@ class Morpheus::Cli::InvoicesCommand
|
|
|
355
358
|
end
|
|
356
359
|
print reset,"\n"
|
|
357
360
|
end
|
|
361
|
+
total_count = (json_response["meta"]["total"] rescue nil)
|
|
362
|
+
if options[:test_count] && options[:test_count] != total_count
|
|
363
|
+
return 3, "Test count failure. Expected #{options[:test_count]} and got #{total_count}"
|
|
364
|
+
end
|
|
358
365
|
return 0, nil
|
|
359
366
|
end
|
|
360
367
|
end
|
|
@@ -374,9 +381,12 @@ class Morpheus::Cli::InvoicesCommand
|
|
|
374
381
|
opts.on('--costs', '--costs', "Display Costs in addition to prices" ) do
|
|
375
382
|
options[:show_costs] = true
|
|
376
383
|
end
|
|
377
|
-
opts.on('--no-line-items', '--no-line-items', "Do not display line items.") do
|
|
384
|
+
opts.on('--no-line-items', '--no-line-items', "Do not display line items.") do
|
|
378
385
|
options[:hide_line_items] = true
|
|
379
386
|
end
|
|
387
|
+
opts.on('--max-line-items VALUE', 'String', "Max line items to load. Default is 1000.") do |val|
|
|
388
|
+
params['maxLineItems'] = val.to_i
|
|
389
|
+
end
|
|
380
390
|
opts.on('--sigdig DIGITS', "Significant digits when rounding cost values for display as currency. Default is 2. eg. $3.50") do |val|
|
|
381
391
|
options[:sigdig] = val.to_i
|
|
382
392
|
end
|
|
@@ -770,14 +780,13 @@ EOT
|
|
|
770
780
|
params['includeTotals'] = true
|
|
771
781
|
options[:show_invoice_totals] = true
|
|
772
782
|
end
|
|
773
|
-
opts.on('--totals-only', "View totals only") do |val|
|
|
774
|
-
params['includeTotals'] = true
|
|
775
|
-
options[:show_invoice_totals] = true
|
|
776
|
-
options[:totals_only] = true
|
|
777
|
-
end
|
|
778
783
|
opts.on('--sigdig DIGITS', "Significant digits when rounding cost values for display as currency. Default is 2. eg. $3.50") do |val|
|
|
779
784
|
options[:sigdig] = val.to_i
|
|
780
785
|
end
|
|
786
|
+
opts.on('--test-count VALUE', "Test if value matches the total number of results found and exit with error code 3 if not.") do |val|
|
|
787
|
+
options[:test_count] = val.to_i
|
|
788
|
+
end
|
|
789
|
+
opts.add_hidden_option('--test-count')
|
|
781
790
|
build_standard_list_options(opts, options)
|
|
782
791
|
opts.footer = "List invoice line items."
|
|
783
792
|
end
|
|
@@ -845,7 +854,7 @@ EOT
|
|
|
845
854
|
subtitles += parse_list_subtitles(options)
|
|
846
855
|
print_h1 title, subtitles
|
|
847
856
|
if line_items.empty?
|
|
848
|
-
print
|
|
857
|
+
print cyan,"No line items found.",reset,"\n"
|
|
849
858
|
else
|
|
850
859
|
# current_date = Time.now
|
|
851
860
|
# current_period = "#{current_date.year}#{current_date.month.to_s.rjust(2, '0')}"
|
|
@@ -914,11 +923,11 @@ EOT
|
|
|
914
923
|
end
|
|
915
924
|
print reset,"\n"
|
|
916
925
|
end
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
return 0, nil
|
|
926
|
+
total_count = (json_response["meta"]["total"] rescue nil)
|
|
927
|
+
if options[:test_count] && options[:test_count] != total_count
|
|
928
|
+
return 3, "Test count failure. Expected #{options[:test_count]} and got #{total_count}"
|
|
921
929
|
end
|
|
930
|
+
return 0, nil
|
|
922
931
|
end
|
|
923
932
|
|
|
924
933
|
def get_line_item(args)
|