2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 17:43:14 +00:00

Have console assume ipmi if no data given, like hardwaremanagement

This commit is contained in:
Jarrod Johnson 2014-02-22 19:28:41 -05:00
parent f6ed5b5e14
commit e236260c3b
3 changed files with 7 additions and 9 deletions

View File

@ -171,7 +171,10 @@ def do_command(command, server):
sys.exit(0)
elif argv[0] == "cd":
otarget = target
target = fullpath_target(argv[1], forcepath=True)
if len(argv) > 1:
target = fullpath_target(argv[1], forcepath=True)
else: # cd by itself, go 'home'
target = '/'
for res in send_request('retrieve', target, server):
if 'errorcode' in res:
exitcode = res['errorcode']

View File

@ -67,6 +67,7 @@ noderesources = {
'_console': {
'session': PluginRoute({
'pluginattrs': ['console.method', 'hardwaremanagement.method'],
'default': 'ipmi',
}),
},
'console': {

View File

@ -45,14 +45,8 @@ def retrieve_nodegroup(nodegroup, element, configmanager, inputdata):
desc = allattributes.node[attribute]['description']
except KeyError:
desc = 'Unknown'
if 'value' in currattr:
yield msg.Attributes(
kv={attribute: currattr['value']},
desc=desc)
elif 'expression' in currattr:
yield msg.Attributes(
kv={attribute: currattr['expression']},
desc=desc)
if 'value' in currattr or 'expression' in currattr:
yield msg.Attributes( kv={attribute: currattr}, desc=desc)
elif 'cryptvalue' in currattr:
yield msg.CryptedAttributes(
kv={attribute: currattr},