pyfarm.master.api.agent_updates module

Agent Updates

The API allows access to agent update packages, possibly through redirects

class pyfarm.master.api.agent_updates.AgentUpdatesAPI[source]

Bases: flask.views.MethodView

get(version)[source]

A GET to this endpoint will return the update package as a zip file the specified version

GET /api/v1/agents/updates/<string:version> HTTP/1.1

Request

PUT /api/v1/agents/updates/1.2.3 HTTP/1.1
Accept: application/zip

Response

HTTP/1.1 200 OK
Content-Type: application/zip

<binary data>
Statuscode 200:The update file was found and is returned
Statuscode 301:The update can be found under a different URL
Statuscode 400:there was something wrong with the request (such as an invalid version number specified or the mime type not being application/zip)
methods = ['GET', 'PUT']
put(version)[source]

A PUT to this endpoint will upload a new version of pyfarm-agent to be used for agent auto-updates. The update must be a zip file.

PUT /api/v1/agents/updates/<string:version> HTTP/1.1

Request

PUT /api/v1/agents/updates/1.2.3 HTTP/1.1
Content-Type: application/zip

<binary data>

Response

HTTP/1.1 200 OK
Content-Type: application/json
Statuscode 201:The update was put in place
Statuscode 400:there was something wrong with the request (such as an invalid version number specified or the mime type not being application/zip)