REST API - Pilots

iceprod.rest.handlers.pilots.setup(handler_cfg)[source]

Setup method for Pilots REST API.

Parameters:

handler_cfg (dict) – args to pass to the route

Returns:

routes, database, indexes

Return type:

dict

class iceprod.rest.handlers.pilots.MultiPilotsHandler(*args, **kwargs)[source]

Handle multi pilots requests.

async get()[source]

Get pilot entries.

Params (optional):

queue_host: queue_host to filter by queue_version: queue_version to filter by host: host to filter by version: version to filter by keys: | separated list of keys to return for each pilot

Returns:

{‘uuid’: {pilot_data}}

Return type:

dict

async post()[source]

Create a pilot entry.

Body should contain the pilot data.

Returns:

{‘result’: <pilot_id>}

Return type:

dict

class iceprod.rest.handlers.pilots.PilotsHandler(*args, **kwargs)[source]

Handle single pilot requests.

async get(pilot_id)[source]

Get a pilot entry.

Parameters:

pilot_id (str) – the pilot id

Returns:

pilot entry

Return type:

dict

async patch(pilot_id)[source]

Update a pilot entry.

Body should contain the pilot data to update. Note that this will perform a merge (not replace).

Parameters:

pilot_id (str) – the pilot id

Returns:

updated pilot entry

Return type:

dict

async delete(pilot_id)[source]

Delete a pilot entry.

Parameters:

pilot_id (str) – the pilot id

Returns:

empty dict

Return type:

dict