From a1589e75358558eada7ffc2efc7e3fa7160d233e Mon Sep 17 00:00:00 2001 From: Georgios Andreadis Date: Mon, 25 Sep 2017 13:50:49 +0200 Subject: Reformat codebase and fix spelling errors --- opendc/api/v1/experiments/experimentId/endpoint.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'opendc/api/v1/experiments/experimentId/endpoint.py') diff --git a/opendc/api/v1/experiments/experimentId/endpoint.py b/opendc/api/v1/experiments/experimentId/endpoint.py index 3bdd30d2..59e0e0fe 100644 --- a/opendc/api/v1/experiments/experimentId/endpoint.py +++ b/opendc/api/v1/experiments/experimentId/endpoint.py @@ -1,13 +1,14 @@ from opendc.models.experiment import Experiment -from opendc.util import database, exceptions +from opendc.util import exceptions from opendc.util.rest import Response + def GET(request): """Get this Experiment.""" try: request.check_required_parameters( - path = { + path={ 'experimentId': 'int' } ) @@ -39,6 +40,7 @@ def GET(request): experiment.to_JSON() ) + def PUT(request): """Update this Experiment's Path, Trace, Scheduler, and/or name.""" @@ -46,10 +48,10 @@ def PUT(request): try: request.check_required_parameters( - path = { + path={ 'experimentId': 'int' }, - body = { + body={ 'experiment': { 'pathId': 'int', 'traceId': 'int', @@ -97,6 +99,7 @@ def PUT(request): experiment.to_JSON() ) + def DELETE(request): """Delete this Experiment.""" @@ -104,7 +107,7 @@ def DELETE(request): try: request.check_required_parameters( - path = { + path={ 'experimentId': 'int' } ) -- cgit v1.2.3