diff --git a/confluent_client/bin/nodeconfig b/confluent_client/bin/nodeconfig index 3a74d1f2..40eecd3c 100755 --- a/confluent_client/bin/nodeconfig +++ b/confluent_client/bin/nodeconfig @@ -54,6 +54,12 @@ argparser.add_option('-d', '--detail', dest='detail', action='store_true', default=False, help='Provide verbose information as available, such as ' 'help text and possible valid values') +argparser.add_option('-e', '--extra', dest='extra', + action='store_true', default=False, + help='Access extra configuration. Extra configuration is generally ' + 'reserved for unpopular or redundant options that may be slow to ' + 'read. Notably the IMM category on Lenovo settings is considered ' + 'to be extra configuration') argparser.add_option('-x', '--exclude', dest='exclude', action='store_true', default=False, help='Treat positional arguments as items to not ' @@ -71,7 +77,7 @@ argparser.add_option('-r', '--restoredefault', default=False, argparser.add_option('-m', '--maxnodes', type='int', help='Specify a maximum number of ' 'nodes to configure, ' - 'prompting if over the threshold') + 'prompting if over the threshold') (options, args) = argparser.parse_args() cfgpaths = { @@ -279,6 +285,10 @@ else: 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) if printsys or options.exclude: if printsys == 'all': printsys = [] @@ -287,7 +297,6 @@ else: else: path = '/noderange/{0}/configuration/system/advanced'.format( noderange) - rcode = client.print_attrib_path(path, session, printsys, options) sys.exit(rcode) diff --git a/confluent_client/doc/man/nodeconfig.ronn b/confluent_client/doc/man/nodeconfig.ronn index d504fa5f..5bbdc30a 100644 --- a/confluent_client/doc/man/nodeconfig.ronn +++ b/confluent_client/doc/man/nodeconfig.ronn @@ -22,6 +22,11 @@ given as a node expression, as documented in the man page for nodeattribexpressi If combined with `-x`, will show all differing values except those indicated by `-x` +* `-e`, `--extra`: + Read settings that are generally not needed, but may be slow to retrieve. + Notably this includes the IMM category of Lenovo systems. The most popular + IMM settings are available through faster 'bmc' attributes. + * `-x`, `--exclude`: Rather than listing only the specified configuration parameters, list all attributes except for the specified ones diff --git a/confluent_server/confluent/core.py b/confluent_server/confluent/core.py index 7f60086a..fefa75ab 100644 --- a/confluent_server/confluent/core.py +++ b/confluent_server/confluent/core.py @@ -216,6 +216,10 @@ def _init_core(): 'pluginattrs': ['hardwaremanagement.method'], 'default': 'ipmi', }), + 'extra': PluginRoute({ + 'pluginattrs': ['hardwaremanagement.method'], + 'default': 'ipmi', + }), 'advanced': PluginRoute({ 'pluginattrs': ['hardwaremanagement.method'], 'default': 'ipmi', diff --git a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py index ef4d0b51..bbfb78be 100644 --- a/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py +++ b/confluent_server/confluent/plugins/hardwaremanagement/ipmi.py @@ -646,8 +646,10 @@ class IpmiHandler(object): return self.handle_ntp() elif self.element[1:4] == ['management_controller', 'extended', 'all']: return self.handle_bmcconfig() - elif self.element[1:4] == ['management_controller', 'extended', 'all']: + elif self.element[1:4] == ['management_controller', 'extended', 'advanced']: return self.handle_bmcconfig(True) + elif self.element[1:4] == ['management_controller', 'extended', 'extra']: + return self.handle_bmcconfig(True, extended=True) elif self.element[1:3] == ['system', 'all']: return self.handle_sysconfig() elif self.element[1:3] == ['system', 'advanced']: @@ -1412,12 +1414,12 @@ class IpmiHandler(object): 'Cannot read the "clear" resource') self.ipmicmd.clear_system_configuration() - def handle_bmcconfig(self, advanced=False): + def handle_bmcconfig(self, advanced=False, extended=False): if 'read' == self.op: try: self.output.put(msg.ConfigSet( self.node, - self.ipmicmd.get_bmc_configuration())) + self.ipmicmd.get_bmc_configuration(extended=extended))) except Exception as e: self.output.put( msg.ConfluentNodeError(self.node, str(e)))