From: peusterm Date: Mon, 21 Mar 2016 14:45:58 +0000 (+0100) Subject: Standalone mode is working again. X-Git-Tag: v3.1~159^2^2 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=92237dc0bc0a724210453c2e10445f8d6f68b06c;p=osm%2Fvim-emu.git Standalone mode is working again. --- 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