mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 21:27:10 +09:00
feature #3826: listconfig configurable with env
Env variable ONE_LISTCONF, can be overridden with --listconf
This commit is contained in:
1 parent
c0ae441f10
commit
ffae98ac0a
1 file changed
+7
-2
@@ -329,10 +329,15 @@ module CLIHelper
|
||||
|
||||
default = config.delete(:default)
|
||||
default_conf = config.delete(:default_conf) || {}
|
||||
listconf = options[:listconf]
|
||||
|
||||
listconf = default_conf[options[:listconf].to_sym]
|
||||
listconf = default_conf[listconf.to_sym] if listconf
|
||||
|
||||
if options[:listconf] && listconf
|
||||
if !listconf && ENV['ONE_LISTCONF']
|
||||
listconf = default_conf[ENV['ONE_LISTCONF'].to_sym]
|
||||
end
|
||||
|
||||
if listconf
|
||||
@default_columns = listconf
|
||||
else
|
||||
@default_columns = default unless default.empty?
|
||||
|
||||
Reference in new issue
Block a user