aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorParth Yadav <parth.yadav@ramanujan.du.ac.in>2020-12-01 02:16:35 +0530
committerParth Yadav <parth.yadav@ramanujan.du.ac.in>2020-12-01 02:17:48 +0530
commitf2aba340057a67a3b159aae36427bc60f49fd832 (patch)
treeef0d744fb0e310304005f7e2657904f9d6449461
parente0a327b8e02c9202732752cbb14ca4900c49bc52 (diff)
Update Documentation
Signed-off-by: Parth Yadav<parthyadav3105@gmail.com> Change-Id: I8d1f0fab022b54c26001cb78318340472d4023d2
-rw-r--r--docs/index.rst7
-rw-r--r--docs/state/development/design/index.rst0
-rw-r--r--docs/state/development/index.rst47
-rw-r--r--docs/state/development/overview/index.rst0
-rw-r--r--docs/state/development/result-api-architecture.png (renamed from docs/state/development/overview/result-api-architecture.png)bin24756 -> 24756 bytes
-rw-r--r--docs/state/development/result_api.rst (renamed from docs/state/development/overview/result_api.rst)0
-rw-r--r--docs/state/development/settings.rst (renamed from docs/state/development/overview/settings.rst)6
-rw-r--r--docs/state/user/userguide.rst22
8 files changed, 79 insertions, 3 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 5c7f35b..d2388cd 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -16,6 +16,7 @@ OPNFV CIRV-SDV
sdvconfig/developer/devguide
sdvconfig/user/configguide
sdvconfig/user/userguide
- state/development/design/index
- state/development/overview/settings
- state/development/overview/result_api
+ state/user/userguide
+ state/development/index
+ state/development/result_api
+ state/development/settings
diff --git a/docs/state/development/design/index.rst b/docs/state/development/design/index.rst
deleted file mode 100644
index e69de29..0000000
--- a/docs/state/development/design/index.rst
+++ /dev/null
diff --git a/docs/state/development/index.rst b/docs/state/development/index.rst
new file mode 100644
index 0000000..7d1881f
--- /dev/null
+++ b/docs/state/development/index.rst
@@ -0,0 +1,47 @@
+=========================
+SDVState Developer Guide
+=========================
+
+The Top-level directory of consists following flies:
+
+.. code-block:: bash
+
+ sdvstate
+ ├── core
+ ├── settings
+ ├── tools
+ ├── validator
+ ├── state
+ ├── server
+ └── dockerfile
+
+``state`` is the entry point of the SDVState testing tool.
+
+``validator`` consists of different implementations of sdvstate tool. For example, one implementation can be for validation of Airship while others can validate TripleO, Kuberef and so on.
+
+``tools`` consists of any third party utilities code or other tools utilites maintained by the project.
+
+``settings`` consists of a bunch of yaml files with default configuration parameters used by SDVState tool. These settings can be overridden by the user in their conf-file. Precedence of settings loaded by SDVState tool: ``cli > env > conf-file > settings-dir``. Have a look at :doc:`settings tool <settings>` to see how settings are managed across SDVState tool.
+
+``core`` consists of all other code used to build the SDVState tool itself like displaying Reports, loading PDFs, etc..
+
+Managing Results
+^^^^^^^^^^^^^^^^
+SDVState maintains result-api module for managing results of checks. Located at ``sdvstate/tools/result_api``. Have a look at :doc:`Result API documentation <result_api>`
+
+Result of every check should have the format:
+
+.. code-block:: bash
+
+ {
+ "case_name": "name_of_check",
+ "category": "storage",
+ "criteria": "pass",
+ "details": { .. any number of values ..}
+ }
+
+Where criteria must be either ``pass`` or ``fail``. While ``details`` can have any value or values related to results. All four keys are mandatory while reporting the results of individual checks.
+
+All results are stored in ``results.json`` file which consists an array of check results.
+
+Note one of the result items in an array is the overall result which consists summary of all checks. It also consists of other details and matches the format of TestAPI of OPNFV. These are also the values that are exported to TestAPI by the tool. \ No newline at end of file
diff --git a/docs/state/development/overview/index.rst b/docs/state/development/overview/index.rst
deleted file mode 100644
index e69de29..0000000
--- a/docs/state/development/overview/index.rst
+++ /dev/null
diff --git a/docs/state/development/overview/result-api-architecture.png b/docs/state/development/result-api-architecture.png
index e464187..e464187 100644
--- a/docs/state/development/overview/result-api-architecture.png
+++ b/docs/state/development/result-api-architecture.png
Binary files differ
diff --git a/docs/state/development/overview/result_api.rst b/docs/state/development/result_api.rst
index 6412c7d..6412c7d 100644
--- a/docs/state/development/overview/result_api.rst
+++ b/docs/state/development/result_api.rst
diff --git a/docs/state/development/overview/settings.rst b/docs/state/development/settings.rst
index 29068c5..806a29a 100644
--- a/docs/state/development/overview/settings.rst
+++ b/docs/state/development/settings.rst
@@ -36,3 +36,9 @@ all it’s sub-directory recursively in ascending order, hence if a
configuration item exists in more than one file, then the setting in the
file that occurs in the last read file will have high precedence and
overwrite previous values. .
+
+
+Managing Settings
+^^^^^^^^^^^^^^^^^
+- Get ``value`` of ``key`` using ``settings.getValue(key)``
+- Set ``key, value`` using ``settings.setValue(key, value)`` \ No newline at end of file
diff --git a/docs/state/user/userguide.rst b/docs/state/user/userguide.rst
new file mode 100644
index 0000000..ef95584
--- /dev/null
+++ b/docs/state/user/userguide.rst
@@ -0,0 +1,22 @@
+====================
+SDVState User Guide
+====================
+
+Currently, SDVState supports validation of Airship 1.7. Before running checks you need two files:
+ - kubeconfig file which gives access to clusterAPI of Airship cluster.
+ - PDF(Pod Descriptor File) of the current Airship deployment.
+
+Create a config file of SDVState using the above files as values. Look at example conf-file at sdv/docker/sdvstate/example/state.yml
+
+To run checks use command:
+
+ ``./state --conf-file state.yml``
+
+The checks should complete in 11-14~ seconds.
+
+After running checks, you can find all results at ``/tmp`` directory by default.
+
+SDVState uses default settings stored at sdv/docker/sdvstate/settings. We can override default settings by adding those in our conf-file.
+
+To view help and all available options with the SDVState tool check help command:
+ ``./state --help`` \ No newline at end of file