Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
marjo-luc committed Oct 8, 2024
1 parent bf59b3b commit f0affef
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions api/endpoints/algorithm.py
Original file line number Diff line number Diff line change
Expand Up @@ -552,5 +552,40 @@ def post(self):
return response_body


@ns.route('/processes')
class Processes(Resource):
def get(self):
"""
Request list of registered OGC processes.
:return:
"""
msg = "GET registered OGC processes endpoint not yet implemented."
return Response(
ogc.get_exception(type="FailedGetProcesses", origin_process="GetProcesses",
ex_message=msg,
status=status.HTTP_500_INTERNAL_SERVER_ERROR, mimetype='text/xml')


@api.doc(security='ApiKeyAuth')
@login_required()
def post(self):
"""
Register OGC process.
:return:
"""
resp_dict = {}
status_code = 200
ades_base = ADES_Base(app.config)
# Deploy a process
# Register a new algorithm
# TODO: see how this works with YAML body
req_vals = request.get_data()
proc_info = ades_base.deploy_proc(req_vals)
resp_dict = {"deploymentResult": {"processSummary": proc_info}}
status_code = 201
return resp_dict, status_code, {'ContentType':'application/json'}





0 comments on commit f0affef

Please sign in to comment.