From 92237dc0bc0a724210453c2e10445f8d6f68b06c Mon Sep 17 00:00:00 2001 From: peusterm Date: Mon, 21 Mar 2016 15:45:58 +0100 Subject: [PATCH] Standalone mode is working again. --- src/emuvim/api/sonata/README.md | 13 ++++++++++--- src/emuvim/api/sonata/dummygatekeeper.py | 6 +++--- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/src/emuvim/api/sonata/README.md b/src/emuvim/api/sonata/README.md index e3269aa..5fc1be0 100644 --- a/src/emuvim/api/sonata/README.md +++ b/src/emuvim/api/sonata/README.md @@ -10,6 +10,9 @@ * flask * flask_restful +## Run REST API in standalone mode (without emulator): +* `python src/emuvim/api/sonata/dummygatekeeper.py` + ## Run emulator example with active SONATA dummy gatekeeper: The example starts a small network with two data centers. @@ -92,6 +95,10 @@ _Note: This API should converge to the API of the original GK as much as possibl -## Run REST API in standalone mode (without emulator): -This is not working yet!!! -* `python src/emuvim/api/sonata/dummygatekeeper.py` \ No newline at end of file + + + +## Cleanup +The dummy GK will store some files in your tmp folder in order to fake "catalogues" and "repositories" etc. + +* ` sudo rm -r /tmp/son-dummy-gk/` \ No newline at end of file diff --git a/src/emuvim/api/sonata/dummygatekeeper.py b/src/emuvim/api/sonata/dummygatekeeper.py index 9cf93af..eda2b96 100644 --- a/src/emuvim/api/sonata/dummygatekeeper.py +++ b/src/emuvim/api/sonata/dummygatekeeper.py @@ -20,9 +20,9 @@ LOG = logging.getLogger("sonata-dummy-gatekeeper") LOG.setLevel(logging.DEBUG) logging.getLogger("werkzeug").setLevel(logging.WARNING) - -UPLOAD_FOLDER = "/tmp/son-dummy-gk/uploads/" -CATALOG_FOLDER = "/tmp/son-dummy-gk/catalog/" +GK_STORAGE = "/tmp/son-dummy-gk/" +UPLOAD_FOLDER = os.path.join(GK_STORAGE, "uploads/") +CATALOG_FOLDER = os.path.join(GK_STORAGE, "catalog/") # flag to indicate that we run without the emulator (only the bare API for integration testing) GK_STANDALONE_MODE = False -- 2.17.1