From 46e009afabccca33ed9f61686b33b344adc5aeab Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Tue, 13 Aug 2019 23:55:50 -0700 Subject: [PATCH] Docs updates --- docs/administration-faq.rst | 28 ++++++++++++++++++++++++++++ docs/api-reference.rst | 9 +++++++++ docs/index.rst | 1 + docs/installation-guide.rst | 3 ++- 4 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 docs/administration-faq.rst diff --git a/docs/administration-faq.rst b/docs/administration-faq.rst new file mode 100644 index 0000000..1cb3bca --- /dev/null +++ b/docs/administration-faq.rst @@ -0,0 +1,28 @@ +.. _administration-faq: + +Administration FAQ +================== + +.. topic:: Duplicate log entries when using log() function + + Because GenieACS uses a full fledged scripting language for device + configuration, the only way to guarantee that it has satisfied the 'desired + state' is by repeatedly executing the script until there's no more + discrepancies with the current device state. Though it may seem like this + will cause duplicate requests going to the device, this isn't actually the + case because device configuration are stated declaratively and that the + scripts themselves are pure functions in the context of a session (e.g. + Date.now() always returns the same value within the session). + + To illustrate further, consider following script: + + .. code:: javascript + + declare("Device.param", null, {value: 1}); + commit(); + declare("Device.param", null, {value: 2}); + + This will set the value of the 'Device.param' to 1, then to 2. Then as the + script is run again the value is set back to 1 and so on. A stable state will + never be reached so GenieACS will execute the script a few times until it + gives up and throws a fault. diff --git a/docs/api-reference.rst b/docs/api-reference.rst index 282e4aa..5c61206 100644 --- a/docs/api-reference.rst +++ b/docs/api-reference.rst @@ -415,6 +415,15 @@ parameterValues key. For example: -X POST \ --data '{"name":"addObject","objectName":"InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection"}' +``deleteObject`` +~~~~~~~~~~~~~~~~ + +.. code:: bash + + curl -i 'http://localhost:7557/devices/00236a-SR552n-SR552NA084%252D0003269/tasks?timeout=3000&connection_request' \ + -X POST \ + --data '{"name":"deleteObject","objectName":"InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1"}' + ``reboot`` ~~~~~~~~~~ diff --git a/docs/index.rst b/docs/index.rst index cf1c75e..580e8c9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,7 @@ Welcome to GenieACS's documentation! provisions virtual-parameters + administration-faq .. raw:: latex diff --git a/docs/installation-guide.rst b/docs/installation-guide.rst index 6de8243..9a09fca 100644 --- a/docs/installation-guide.rst +++ b/docs/installation-guide.rst @@ -73,6 +73,7 @@ Configure systemd GENIEACS_FS_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-fs-access.log GENIEACS_UI_ACCESS_LOG_FILE=/var/log/genieacs/genieacs-ui-access.log GENIEACS_DEBUG_FILE=/var/log/genieacs/genieacs-debug.yaml + GENIEACS_EXT_DIR=/opt/genieacs/ext GENIEACS_UI_JWT_SECRET=secret Set file ownership and permissions: @@ -82,7 +83,7 @@ Configure systemd sudo chown genieacs:genieacs /opt/genieacs/genieacs.env sudo chmod 600 /opt/genieacs/genieacs.env -.. topic:: Create logs directory +.. topic:: Create logs directory .. code:: bash