morpheus-cli 6.2.1 → 6.2.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/service_catalog_interface.rb +6 -6
- data/lib/morpheus/cli/commands/catalog_item_types_command.rb +12 -10
- data/lib/morpheus/cli/commands/plugins.rb +1 -1
- data/lib/morpheus/cli/commands/remote.rb +1 -1
- data/lib/morpheus/cli/commands/service_catalog_command.rb +2 -2
- data/lib/morpheus/cli/commands/view.rb +1 -1
- data/lib/morpheus/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a11e083645c99cce105a6ee0a38ba60904debd213c3223f07e84a335a755b6a
|
4
|
+
data.tar.gz: 318bbfa3ecfa0b2533e29de1a8b773389cac8c7e36c4b75b71316bc1b860aef8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79c6bd2a41bbd7c5fc79dfecd769db385626eea40bcf1ca19d6d4021f0cc57404c8eab74bfc831013f55b0668a1cbce86b909d11b71723a9bfc1587b29beb6c4
|
7
|
+
data.tar.gz: 21973cfd06571448876862f243895dc2334f19f5c20355cff9224d4d1c319911776a7d60c93196b1d79e5e16c65b66b1179476b89816931b181bad7e98bbd3dc
|
data/Dockerfile
CHANGED
@@ -46,22 +46,22 @@ class Morpheus::ServiceCatalogInterface < Morpheus::APIClient
|
|
46
46
|
end
|
47
47
|
|
48
48
|
# update cart (set cart name)
|
49
|
-
def update_cart(
|
49
|
+
def update_cart(params, payload)
|
50
50
|
execute(method: :put, url: "#{base_path}/cart", params: params, payload: payload.to_json)
|
51
51
|
end
|
52
52
|
|
53
53
|
# validate a new item, can be used before before adding it
|
54
|
-
def validate_cart_item(
|
54
|
+
def validate_cart_item(params, payload)
|
55
55
|
execute(method: :post, url: "#{base_path}/cart/items/validate", params: params, payload: payload.to_json)
|
56
56
|
end
|
57
57
|
|
58
58
|
# add item to cart
|
59
|
-
def create_cart_item(
|
59
|
+
def create_cart_item(params, payload)
|
60
60
|
execute(method: :post, url: "#{base_path}/cart/items", params: params, payload: payload.to_json)
|
61
61
|
end
|
62
62
|
|
63
63
|
# update item in the cart
|
64
|
-
def update_cart_item(id,
|
64
|
+
def update_cart_item(id, params, payload)
|
65
65
|
validate_id!(id)
|
66
66
|
execute(method: :put, url: "#{base_path}/cart/items/#{id}", params: params, payload: payload.to_json)
|
67
67
|
end
|
@@ -73,7 +73,7 @@ class Morpheus::ServiceCatalogInterface < Morpheus::APIClient
|
|
73
73
|
end
|
74
74
|
|
75
75
|
# place order with cart
|
76
|
-
def checkout(
|
76
|
+
def checkout(params, payload)
|
77
77
|
execute(method: :post, url: "#{base_path}/checkout", params: params, payload: payload.to_json)
|
78
78
|
end
|
79
79
|
|
@@ -83,7 +83,7 @@ class Morpheus::ServiceCatalogInterface < Morpheus::APIClient
|
|
83
83
|
end
|
84
84
|
|
85
85
|
# create an order from scratch, without using a cart
|
86
|
-
def create_order(
|
86
|
+
def create_order(params, payload)
|
87
87
|
execute(method: :post, url: "#{base_path}/orders", params: params, payload: payload.to_json)
|
88
88
|
end
|
89
89
|
end
|
@@ -93,7 +93,7 @@ class Morpheus::Cli::CatalogItemTypesCommand
|
|
93
93
|
options = {}
|
94
94
|
optparse = Morpheus::Cli::OptionParser.new do |opts|
|
95
95
|
opts.banner = subcommand_usage("[type]")
|
96
|
-
opts.on( '-c', '--config', "Display raw config only.
|
96
|
+
opts.on( '-c', '--config', "Display raw config only." ) do
|
97
97
|
options[:show_config] = true
|
98
98
|
end
|
99
99
|
# opts.on('--no-config', "Do not display Config YAML." ) do
|
@@ -136,13 +136,17 @@ EOT
|
|
136
136
|
json_response = @catalog_item_types_interface.get(id, params)
|
137
137
|
end
|
138
138
|
catalog_item_type = json_response[catalog_item_type_object_key]
|
139
|
-
config = catalog_item_type['config'] || {}
|
140
139
|
# export just the config as json or yaml (default)
|
141
140
|
if options[:show_config]
|
141
|
+
if catalog_item_type['instanceSpec']
|
142
|
+
puts catalog_item_type['instanceSpec']
|
143
|
+
# print reset
|
144
|
+
return 0, nil
|
145
|
+
end
|
142
146
|
unless options[:json] || options[:yaml] || options[:csv]
|
143
|
-
options[:
|
147
|
+
options[:json] = true
|
144
148
|
end
|
145
|
-
return render_with_format(config, options)
|
149
|
+
return render_with_format(catalog_item_type['config'] || {}, options)
|
146
150
|
end
|
147
151
|
render_response(json_response, options, catalog_item_type_object_key) do
|
148
152
|
print_h1 "Catalog Item Type Details", [], options
|
@@ -172,11 +176,11 @@ EOT
|
|
172
176
|
item_type_code = catalog_item_type['type'].to_s.downcase
|
173
177
|
if options[:no_config] != true
|
174
178
|
if item_type_code == 'instance'
|
175
|
-
print_h2 "Config
|
176
|
-
|
179
|
+
print_h2 "Config JSON"
|
180
|
+
|
177
181
|
#print reset,(JSON.pretty_generate(config) rescue config),"\n",reset
|
178
182
|
#print reset,(as_yaml(config, options) rescue config),"\n",reset
|
179
|
-
config_string =
|
183
|
+
config_string = catalog_item_type['instanceSpec'] || (as_json(catalog_item_type['config'], options) rescue "")
|
180
184
|
config_lines = config_string.split("\n")
|
181
185
|
config_line_count = config_lines.size
|
182
186
|
max_lines = 10
|
@@ -191,9 +195,7 @@ EOT
|
|
191
195
|
config_string = config_string[4..-1]
|
192
196
|
end
|
193
197
|
print reset,config_string.chomp("\n"),"\n",reset
|
194
|
-
|
195
|
-
print reset,"(blank)","\n",reset
|
196
|
-
end
|
198
|
+
|
197
199
|
elsif item_type_code == 'blueprint' || item_type_code == 'apptemplate' || item_type_code == 'app'
|
198
200
|
print_h2 "App Spec"
|
199
201
|
if catalog_item_type['appSpec']
|
@@ -6,7 +6,7 @@ class Morpheus::Cli::PluginsCommand
|
|
6
6
|
|
7
7
|
set_command_name :plugins
|
8
8
|
set_command_description "View and manage plugins."
|
9
|
-
register_subcommands :list, :get, :upload, :update, :remove
|
9
|
+
register_subcommands :list, :get, :upload, :update, :remove #, :'check-updates'
|
10
10
|
|
11
11
|
# RestCommand settings
|
12
12
|
register_interfaces :plugins
|
@@ -759,7 +759,7 @@ EOT
|
|
759
759
|
end
|
760
760
|
build_common_options(opts, options, [:quiet])
|
761
761
|
opts.footer = <<-EOT
|
762
|
-
Clone remote appliance
|
762
|
+
Clone remote appliance configuration, including any existing credentials.
|
763
763
|
[remote] is required. This is the name of an existing remote.
|
764
764
|
[name] is optional. This is the name of the new remote that will be created.
|
765
765
|
EOT
|
@@ -871,7 +871,7 @@ EOT
|
|
871
871
|
|
872
872
|
@service_catalog_interface.setopts(options)
|
873
873
|
if options[:dry_run]
|
874
|
-
print_dry_run @service_catalog_interface.dry.checkout(payload)
|
874
|
+
print_dry_run @service_catalog_interface.dry.checkout(params, payload)
|
875
875
|
return
|
876
876
|
end
|
877
877
|
|
@@ -889,7 +889,7 @@ EOT
|
|
889
889
|
unless options[:yes] || Morpheus::Cli::OptionTypes.confirm("Are you sure you want to checkout and place an order?")
|
890
890
|
return 9, "aborted command"
|
891
891
|
end
|
892
|
-
json_response = @service_catalog_interface.checkout(
|
892
|
+
json_response = @service_catalog_interface.checkout(params, payload)
|
893
893
|
render_response(json_response, options) do
|
894
894
|
print_green_success "Order placed"
|
895
895
|
# ok so this is delayed because list does not return all statuses right now..
|
@@ -34,7 +34,7 @@ View the remote appliance in a web browser.
|
|
34
34
|
[id] is optional. This is the resource name or id to be append to the path to load details of a specific object.
|
35
35
|
The [path] is matched against the #{prog_name} UI site map to find the best matching route.
|
36
36
|
Route matching is skipped if the path begins with a "/" or --absolute is used.
|
37
|
-
By default no authentication is
|
37
|
+
By default no authentication is done and the existing web browser session used.
|
38
38
|
The --login option will authenticate via the CLI access token and create a new browser session.
|
39
39
|
|
40
40
|
Examples:
|
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: 6.2.
|
4
|
+
version: 6.2.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: 2023-
|
14
|
+
date: 2023-09-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|