lib/manageiq/appliance_console/prompts.rb in manageiq-appliance_console-1.2.1 vs lib/manageiq/appliance_console/prompts.rb in manageiq-appliance_console-1.2.2

- old
+ new

@@ -72,9 +72,13 @@ def ask_for_ip(prompt, default, validate = IP_REGEXP, error_text = "a valid IP Address.", &block) just_ask(prompt, default, validate, error_text, &block) end + def ask_for_ip_or_none(prompt, default = nil) + ask_for_ip(prompt, default, Regexp.union(NONE_REGEXP, IP_REGEXP)).gsub(NONE_REGEXP, "") + end + def ask_for_ipv4(prompt, default) ask_for_ip(prompt, default, IPV4_REGEXP) end def ask_for_ipv4_or_none(prompt, default = nil)