mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-14 19:57:50 +00:00
More of the service data retrieval api
More progress is made toward the goal
This commit is contained in:
parent
fa11fb54cb
commit
c9959d4082
@ -823,6 +823,8 @@ def iterate_queue(numworkers, passvalues, strip=False):
|
||||
if nv == 'theend':
|
||||
completions += 1
|
||||
else:
|
||||
if isinstance(nv, Exception):
|
||||
raise nv
|
||||
if strip and not isinstance(nv, console.Console):
|
||||
nv.strip_node(strip)
|
||||
yield nv
|
||||
|
@ -31,7 +31,7 @@ updatepool = eventlet.greenpool.GreenPool(256)
|
||||
|
||||
|
||||
def execupdate(handler, filename, updateobj, type):
|
||||
if not os.path.exists(filename):
|
||||
if type != 'ffdc' and not os.path.exists(filename):
|
||||
errstr = '{0} does not appear to exist on {1}'.format(
|
||||
filename, socket.gethostname())
|
||||
updateobj.handle_progress({'phase': 'error', 'progress': 0.0,
|
||||
|
@ -422,6 +422,8 @@ def get_input_message(path, operation, inputdata, nodes=None, multinode=False,
|
||||
return DetachMedia(path, nodes, inputdata)
|
||||
elif '/'.join(path).startswith('media/') and inputdata:
|
||||
return InputMedia(path, nodes, inputdata)
|
||||
elif '/'.join(path).startswith('support/servicedata') and inputdata:
|
||||
return InputMedia(path, nodes, inputdata)
|
||||
elif inputdata:
|
||||
raise exc.InvalidArgumentException(
|
||||
'No known input handler for request')
|
||||
|
@ -1148,7 +1148,7 @@ def retrieve(nodes, element, configmanager, inputdata):
|
||||
element, 'mediaupload')
|
||||
elif '/'.join(element).startswith('support/servicedata'):
|
||||
return firmwaremanager.list_updates(nodes, configmanager.tenant,
|
||||
element, 'mediaupload')
|
||||
element, 'ffdc')
|
||||
else:
|
||||
return perform_requests('read', nodes, element, configmanager, inputdata)
|
||||
|
||||
@ -1160,5 +1160,8 @@ def delete(nodes, element, configmanager, inputdata):
|
||||
elif '/'.join(element).startswith('media/uploads'):
|
||||
return firmwaremanager.remove_updates(nodes, configmanager.tenant,
|
||||
element, type='mediaupload')
|
||||
elif '/'.join(element).startswith('support/servicedata'):
|
||||
return firmwaremanager.remove_updates(nodes, configmanager.tenant,
|
||||
element, type='ffdc')
|
||||
return perform_requests(
|
||||
'delete', nodes, element, configmanager, inputdata)
|
||||
|
Loading…
x
Reference in New Issue
Block a user