diff options
| author | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-25 13:50:49 +0200 |
|---|---|---|
| committer | Georgios Andreadis <g.andreadis@student.tudelft.nl> | 2017-09-25 13:50:49 +0200 |
| commit | a1589e75358558eada7ffc2efc7e3fa7160d233e (patch) | |
| tree | 7889a2364292cd8b90fe996da7907bebf200d3dc /opendc/api/v1/experiments/experimentId/endpoint.py | |
| parent | 1f34466d41ba01a3dd36b0866696367d397daf7e (diff) | |
Reformat codebase and fix spelling errors
Diffstat (limited to 'opendc/api/v1/experiments/experimentId/endpoint.py')
| -rw-r--r-- | opendc/api/v1/experiments/experimentId/endpoint.py | 13 |
1 files changed, 8 insertions, 5 deletions
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' } ) |
