mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-26 11:30:23 +00:00
commit
5388f497d4
@ -515,6 +515,8 @@ def _assemble_json(responses, resource, url, extension):
|
||||
haldata = rsp.raw()
|
||||
for hk in haldata.iterkeys():
|
||||
if 'href' in haldata[hk]:
|
||||
if isinstance(haldata[hk]['href'], int):
|
||||
haldata[hk]['href'] = str(haldata[hk]['href'])
|
||||
haldata[hk]['href'] += extension
|
||||
if hk in links:
|
||||
if isinstance(links[hk], list):
|
||||
|
@ -326,7 +326,7 @@ def get_input_message(path, operation, inputdata, nodes=None, multinode=False):
|
||||
elif path == ['events', 'hardware', 'decode']:
|
||||
return InputAlertData(path, inputdata, nodes)
|
||||
elif (path[:3] == ['configuration', 'management_controller', 'users'] and
|
||||
operation != 'retrieve'):
|
||||
operation != 'retrieve' and operation != 'delete'):
|
||||
return InputCredential(path, inputdata, nodes)
|
||||
elif inputdata:
|
||||
raise exc.InvalidArgumentException()
|
||||
|
@ -436,7 +436,7 @@ class IpmiHandler(object):
|
||||
privilege_level=user['privilege_level'])
|
||||
# A list of users
|
||||
for user in self.ipmicmd.get_users(channel=1):
|
||||
self.output.put(msg.ChildCollection(user))
|
||||
self.output.put(msg.ChildCollection(user, candelete=True))
|
||||
return
|
||||
elif len(self.element) == 4:
|
||||
user = int(self.element[-1])
|
||||
@ -700,3 +700,8 @@ def update(nodes, element, configmanager, inputdata):
|
||||
def retrieve(nodes, element, configmanager, inputdata):
|
||||
initthread()
|
||||
return perform_requests('read', nodes, element, configmanager, inputdata)
|
||||
|
||||
def delete(nodes, element, configmanager, inputdata):
|
||||
initthread()
|
||||
return perform_requests(
|
||||
'delete', nodes, element, configmanager, inputdata)
|
||||
|
Loading…
Reference in New Issue
Block a user