From 91fa5bd1eb88c3d8d03e2025e8e6b3b76c433599 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 29 Jan 2020 14:20:56 -0500 Subject: [PATCH] Enhance nodeconfig treatment of IMM This makes the IMM attributes usable, but not intrusive. --- confluent_client/bin/nodeconfig | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/confluent_client/bin/nodeconfig b/confluent_client/bin/nodeconfig index 40eecd3c..6493c6e1 100755 --- a/confluent_client/bin/nodeconfig +++ b/confluent_client/bin/nodeconfig @@ -109,6 +109,7 @@ assignment = {} queryparms = {} printsys = [] printbmc = [] +printextbmc = [] printallbmc = False setsys = {} forceset = False @@ -183,11 +184,17 @@ def parse_config_line(arguments): del queryparms[path] except KeyError: pass - if not matchedparms: + if param.lower() == 'imm': + printextbmc.append(param) + options.extra = True + elif not matchedparms: printsys.append(param) elif param not in cfgpaths: if param.startswith('bmc.'): printbmc.append(param.replace('bmc.', '')) + elif param.lower().startswith('imm'): + options.extra = True + printextbmc.append(param) else: printsys.append(param) else: @@ -281,14 +288,15 @@ else: NullOpt(), queryparms[path]) if rc: sys.exit(rc) - if printbmc or printallbmc: - rcode = client.print_attrib_path( - '/noderange/{0}/configuration/management_controller/extended/all'.format(noderange), - session, printbmc, options, attrprefix='bmc.') + if printsys == 'all' or printextbmc or printbmc or printallbmc: + if printbmc or not printextbmc: + rcode = client.print_attrib_path( + '/noderange/{0}/configuration/management_controller/extended/all'.format(noderange), + session, printbmc, options, attrprefix='bmc.') if options.extra: rcode |= client.print_attrib_path( '/noderange/{0}/configuration/management_controller/extended/extra'.format(noderange), - session, printbmc, options) + session, printextbmc, options) if printsys or options.exclude: if printsys == 'all': printsys = []