2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-04-17 18:49:32 +00:00

Merge pull request #44 from jjohnson42/master

Merge fixes in prep for 1.2.0 tag
This commit is contained in:
Jarrod Johnson 2015-10-19 15:25:11 -04:00
commit a83583a56d
4 changed files with 15 additions and 11 deletions

View File

@ -74,13 +74,13 @@ for rsp in func('/noderange/{0}/events/hardware/log'.format(noderange)):
sys.stderr.write(rsp['error'] + '\n')
exitcode |= rsp['errorcode']
if 'databynode' in rsp:
nodedata = rsp['databynode']
for node in nodedata:
thisdata = nodedata[node]
nodedata = rsp['databynode']
for node in nodedata:
thisdata = nodedata[node]
if 'error' in thisdata:
sys.stderr.write('{0}: {1}\n'.format(node, thisdata['error']))
exitcode |= 1
if 'events' in thisdata:
if 'events' in thisdata:
evtdata = thisdata['events']
for evt in evtdata:
print '{0}: {1}'.format(node, format_event(evt))

View File

@ -42,6 +42,10 @@ exitcode = 0
if len(args) > 1:
seenattributes = set([])
for res in session.read('/noderange/{0}/attributes/all'.format(noderange)):
if 'error' in res:
sys.stderr.write(res['error'] + '\n')
exitcode = 1
continue
for node in res['databynode']:
for attr in res['databynode'][node]:
seenattributes.add(attr)
@ -71,11 +75,11 @@ if len(args) > 1:
if blamedata:
attrout += ' (' + ', '.join(blamedata) + ')'
print attrout
for attr in args[1:]:
if attr not in seenattributes:
sys.stderr.write('Error: {0} not a valid attribute\n'.format(attr))
exitcode = 1
if not exitcode:
for attr in args[1:]:
if attr not in seenattributes:
sys.stderr.write('Error: {0} not a valid attribute\n'.format(attr))
exitcode = 1
else:
for res in session.read(nodelist):
if 'error' in res:

View File

@ -7,6 +7,6 @@ setup(
author_email='jjohnson2@lenovo.com',
url='http://xcat.sf.net/',
packages=['confluent'],
scripts=['bin/confetty', 'bin/nodeconsole', 'bin/nodehealth', 'bin/nodeidentify', 'bin/nodelist', 'bin/nodepower', 'bin/nodesensors', 'bin/nodesetboot'],
scripts=['bin/confetty', 'bin/nodeconsole', 'bin/nodeeventlog', 'bin/nodehealth', 'bin/nodeidentify', 'bin/nodelist', 'bin/nodepower', 'bin/nodesensors', 'bin/nodesetboot'],
data_files=[('/etc/profile.d', ['confluent_env.sh'])],
)

View File

@ -58,7 +58,7 @@ def hex2bin(hexstring):
return bytearray(bytedata)
def simplify_name(name):
return name.lower().replace(' ', '_')
return name.lower().replace(' ', '_').replace('/', '-')
def sanitize_invdata(indata):