summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-12-09 13:07:37 +0100
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2020-12-09 13:07:46 +0100
commit8fcc3f4e331987d1e42222a4b88ef2f4dd114538 (patch)
treee6b73a9413602fd1b7c63c50ca16aba4648a2e43 /docs
parent347bcbb75a2728d3e2fe3cb7cf0af5e224f036fe (diff)
Add rest API description fo marketplace
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: I5c43bfc5545a466118cd6427a9aa9d3a02b2c90c Issue-ID: VNFSDK-700
Diffstat (limited to 'docs')
-rw-r--r--docs/files/VNFSDK-Marketplace-userguide-rest-api.rst64
-rw-r--r--docs/index.rst2
2 files changed, 65 insertions, 1 deletions
diff --git a/docs/files/VNFSDK-Marketplace-userguide-rest-api.rst b/docs/files/VNFSDK-Marketplace-userguide-rest-api.rst
new file mode 100644
index 0000000..d7c1e6e
--- /dev/null
+++ b/docs/files/VNFSDK-Marketplace-userguide-rest-api.rst
@@ -0,0 +1,64 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2020 Nokia.
+
+VNF SDK Marketplace User Guide for Rest API
+============================================
+
+The VNF SDK Marketplace expose rest API endpoints that allows validation of CSAR packages.
+
+**Parameters that need to be inserted are surrounded with {...}**.
+
+- CSAR Validation - use all rules
+
+Send and validate CSAR, against all active rules.
+If validation finish before timeout, result will be returned in json format.
+Otherwise *executionId*, that can be used for checking validation state in the future, will be returned.
+
+.. code-block::
+
+ curl --location --request POST 'http://{marketplace address}/onapapi/vnfsdk-marketplace/v1/vtp/executions' \
+ --header 'Content-Type: multipart/form-data' \
+ --form 'file=@"{path to csar file}"' \
+ --form 'executions="[{
+ \"scenario\": \"onap-dublin\",
+ \"testSuiteName\": \"validation\",
+ \"testCaseName\": \"csar-validate\",
+ \"parameters\": {
+ \"csar\": \"file://{csar file name}\",
+ \"pnf\":\"true\"
+ }
+ }]"'
+
+
+- CSAR Validation - use selected rules
+
+Send and validate CSAR, against selected rules.
+If validation finish before timeout, result will be returned in json format.
+Otherwise *executionId*, that can be used for checking validation state in the future, will be returned.
+
+.. code-block::
+
+ curl --location --request POST 'http://{marketplace address}/onapapi/vnfsdk-marketplace/v1/vtp/executions' \
+ --header 'Content-Type: multipart/form-data' \
+ --form 'file=@"{path to csar file}"' \
+ --form 'executions="[{
+ \"scenario\": \"onap-dublin\",
+ \"testSuiteName\": \"validation\",
+ \"testCaseName\": \"csar-validate\",
+ \"parameters\": {
+ \"csar\": \"file://{csar file name}\",
+ \"pnf\":\"true\",
+ \"rules\":\"{rules to be validated example:r130206,r816745}\"
+ }
+ }]"'
+
+
+- CSAR Validation - get results of validation
+
+Get result of CSAR validation connected with *executionId*.
+Returns result in json format.
+
+.. code-block::
+
+ curl --location --request GET 'http://{marketplace address}/onapapi/vnfsdk-marketplace/v1/vtp/executions?requestId={executionId}'
diff --git a/docs/index.rst b/docs/index.rst
index c5aa92e..c6286d5 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -29,7 +29,7 @@ User Guides
files/*Bundling*
files/VNFSDK-Marketplace-userguide-operators
files/VNFSDK-Marketplace-userguide-vendors
+ files/VNFSDK-Marketplace-userguide-rest-api.rst
files/Dovetail
files/VNFSDK-LFN-CVC
files/VNFSDK-Marketplace-userguide-installation
- \ No newline at end of file