morpheus-cli 4.1.2 → 4.1.3
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/lib/morpheus/cli/instances.rb +5 -4
- data/lib/morpheus/cli/option_types.rb +2 -2
- 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: b5b4dd8489e5b1b5ba7161972495bafb0267a735718da283fbfd9cb4c1013955
|
4
|
+
data.tar.gz: 9206c9bd953acc94ef919078f52136068e58716ccbf083abe4afa903ce0fd08c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 413a0d0b72fedc846244a85d06ba92792e6bbde16c27c8f8ce8aaaae7d5dab461640898c121d6bdeaf020640fa833306032a58e4ad3858726c8ee2e47d8244ac
|
7
|
+
data.tar.gz: aa77f2f657cb7a3842c696df46668b5416d29f703976ace1018dc8f726e9c79be2df9283f92c4099c86b3e4d27b9032e1a1a63a6b981bbeaf95b3a79ecc5adc7
|
@@ -3553,15 +3553,15 @@ private
|
|
3553
3553
|
def find_zone_by_name_or_id(group_id, val)
|
3554
3554
|
zone = nil
|
3555
3555
|
if val.to_s =~ /\A\d{1,}\Z/
|
3556
|
-
|
3557
|
-
zone =
|
3556
|
+
clouds = get_available_clouds(group_id)
|
3557
|
+
zone = clouds.find {|it| it['id'] == val.to_i }
|
3558
3558
|
if zone.nil?
|
3559
3559
|
print_red_alert "Cloud not found by id #{val}"
|
3560
3560
|
exit 1
|
3561
3561
|
end
|
3562
3562
|
else
|
3563
|
-
|
3564
|
-
zone =
|
3563
|
+
clouds = get_available_clouds(group_id)
|
3564
|
+
zone = clouds.find {|it| it['name'] == val.to_s }
|
3565
3565
|
if zone.nil?
|
3566
3566
|
print_red_alert "Cloud not found by name #{val}"
|
3567
3567
|
exit 1
|
@@ -3569,6 +3569,7 @@ private
|
|
3569
3569
|
end
|
3570
3570
|
return zone
|
3571
3571
|
end
|
3572
|
+
|
3572
3573
|
def find_host_by_id(id)
|
3573
3574
|
begin
|
3574
3575
|
json_response = @servers_interface.get(id.to_i)
|
@@ -339,13 +339,13 @@ module Morpheus
|
|
339
339
|
input = Readline.readline("#{option_type['fieldLabel']}#{option_type['fieldAddOn'] ? ('(' + option_type['fieldAddOn'] + ') ') : '' }#{!option_type['required'] ? ' (optional)' : ''}#{!default_value.to_s.empty? ? ' ['+default_value.to_s+']' : ''} ['?' for options]: ", false).to_s
|
340
340
|
input = input.chomp.strip
|
341
341
|
if input.empty? && default_value
|
342
|
-
input = default_value
|
342
|
+
input = default_value.to_s
|
343
343
|
end
|
344
344
|
select_option = select_options.find{|b| b['name'] == input || (!b['value'].nil? && b['value'].to_s == input) || (b['value'].nil? && input.empty?)}
|
345
345
|
if select_option
|
346
346
|
value = select_option['value']
|
347
347
|
set_last_select(select_option)
|
348
|
-
elsif !input.nil? && !input.empty?
|
348
|
+
elsif !input.nil? && !input.to_s.empty?
|
349
349
|
input = '?'
|
350
350
|
end
|
351
351
|
|
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: 4.1.
|
4
|
+
version: 4.1.3
|
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: 2019-10-
|
14
|
+
date: 2019-10-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|