2
0
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:
Jarrod Johnson 2018-08-23 16:14:49 -04:00
parent fa11fb54cb
commit c9959d4082
4 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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,

View File

@ -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')

View File

@ -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)