morpheus-cli 5.4.4 → 5.4.4.1
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/commands/instances.rb +14 -3
- data/lib/morpheus/cli/mixins/secondary_rest_command.rb +10 -4
- 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: e7982ab3b4bcc7849f28a571df308c6bc8d588fbb5748b29f1b2589cb92fbf64
|
4
|
+
data.tar.gz: 49d643efdf4b181a7a4ba35325159fd33edb4c5330c4de6a0e136184a5f4a0fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f3f440b1b50e57d8de2a6f85f33f626be9c055da36df2574b1cc951cbab7a8ba632ff83da1c618a322c06ece0002f4c889ee5c4157cee8d3aea1c876de213c
|
7
|
+
data.tar.gz: 3a3ce759067f652d0e3552e92d53c92e931dfa3122fc857cc7a889212fb197e5417bfd275e4853b83fc08404ed950bff0fcf73cc28cdc55667d32ea7404ca467
|
data/Dockerfile
CHANGED
@@ -4403,9 +4403,20 @@ EOT
|
|
4403
4403
|
#if instance['layout']['provisionTypeCode'] == 'vmware'
|
4404
4404
|
if provision_type && provision_type["hasFolders"]
|
4405
4405
|
if payload['zoneFolder'].nil?
|
4406
|
-
|
4407
|
-
|
4408
|
-
|
4406
|
+
# vmwareFolders moved from /api/options/vmwareFolders to /api/options/vmware/vmwareFolders
|
4407
|
+
folder_prompt = nil
|
4408
|
+
begin
|
4409
|
+
folder_prompt = Morpheus::Cli::OptionTypes.prompt([{'fieldName' => 'zoneFolder', 'type' => 'select', 'optionSource' => 'vmwareFolders', 'optionSourceType' => 'vmware', 'fieldLabel' => 'Folder', 'description' => "Folder externalId or '/' to use the root folder", 'required' => true}], options[:options], @api_client, {siteId: instance['group']['id'], zoneId: instance['cloud']['id']})
|
4410
|
+
rescue RestClient::Exception => e
|
4411
|
+
Morpheus::Logging::DarkPrinter.puts "Failed to load folder options" if Morpheus::Logging.debug?
|
4412
|
+
begin
|
4413
|
+
folder_prompt = Morpheus::Cli::OptionTypes.prompt([{'fieldName' => 'zoneFolder', 'type' => 'select', 'optionSource' => 'vmwareFolders', 'fieldLabel' => 'Folder', 'description' => "Folder externalId or '/' to use the root folder", 'required' => true}], options[:options], @api_client, {siteId: instance['group']['id'], zoneId: instance['cloud']['id']})
|
4414
|
+
rescue RestClient::Exception => e2
|
4415
|
+
Morpheus::Logging::DarkPrinter.puts "Failed to load folder options from alternative endpoint too" if Morpheus::Logging.debug?
|
4416
|
+
end
|
4417
|
+
end
|
4418
|
+
if folder_prompt && folder_prompt['zoneFolder'].to_s != ''
|
4419
|
+
payload['zoneFolder'] = folder_prompt['zoneFolder']
|
4409
4420
|
end
|
4410
4421
|
end
|
4411
4422
|
end
|
@@ -495,10 +495,16 @@ EOT
|
|
495
495
|
return
|
496
496
|
end
|
497
497
|
json_response = rest_interface.create(parent_id, payload)
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
498
|
+
if json_response['success']
|
499
|
+
render_response(json_response, options, rest_object_key) do
|
500
|
+
record = json_response[rest_object_key]
|
501
|
+
print_green_success "Added #{rest_label.downcase} #{record['name'] || record['id']}"
|
502
|
+
return _get(parent_id, record["id"], {}, options)
|
503
|
+
end
|
504
|
+
else
|
505
|
+
print red
|
506
|
+
print json_response['msg']
|
507
|
+
print "\n"
|
502
508
|
end
|
503
509
|
return 0, nil
|
504
510
|
end
|
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: 5.4.4
|
4
|
+
version: 5.4.4.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: 2022-03-
|
14
|
+
date: 2022-03-11 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|