aboutsummaryrefslogtreecommitdiffstats
path: root/docs/integration-simulators.rst
diff options
context:
space:
mode:
authorIllia Halych <illia.halych@t-mobile.pl>2021-04-12 12:04:15 +0000
committerMorgan Richomme <morgan.richomme@orange.com>2021-04-21 14:49:23 +0000
commit87e526604b5817a8cc12ecfb2964a963c98dadcc (patch)
tree68371e51b7ad705c11f12fb537d64a3cfabeca39 /docs/integration-simulators.rst
parent8b9ac5e12217adb18d476eef573968a897dc1266 (diff)
Add instructions for the simulator wrapper
The instructions include samples for: 1. Deploying Helm release with a simulator 2. Starting the simulator via an API call 3. Undeploying the release Issue-ID: INT-1906 Signed-off-by: Illia Halych <illia.halych@t-mobile.pl> Change-Id: I6849df15ece2e2dee2cbc1aa6ee1114ca4cbcc00
Diffstat (limited to 'docs/integration-simulators.rst')
-rw-r--r--docs/integration-simulators.rst58
1 files changed, 55 insertions, 3 deletions
diff --git a/docs/integration-simulators.rst b/docs/integration-simulators.rst
index 2105d3fd0..7f6688f05 100644
--- a/docs/integration-simulators.rst
+++ b/docs/integration-simulators.rst
@@ -53,7 +53,59 @@ Helm Chart
It is recommended to create a helm chart in order to run the simulators.
-Start your simulator from pythonsdk
-...................................
+Wrapper for simulators
+......................
-TODO
+1. In order to deploy the Helm release with a simulator, place a YAML file
+describing the Helm release in src/onaptests/templates/helm_charts.
+
+ The structure of the YAML file should be like in the example below.
+ Dependencies contain all the charts that need to be pulled.
+
+ .. code-block:: YAML
+
+ # Helm release information
+ api_version: # API_VERSION
+ app_version: # APP_VERSION
+ chart_name: # SIMULATOR_NAME
+ version: # CHART_VERSION
+
+ # Helm charts that need to be pulled
+ dependencies:
+ - name: # SIMULATOR_NAME
+ version: # CHART_VERSION
+ repository: # URL
+ local_repo_name: # REPO_NAME
+
+2. Install the Helm release:
+
+ .. code-block:: Python
+
+ from onaptests.steps.wrapper.helm_charts import HelmChartStep
+
+ chart = HelmChartStep(
+ cleanup = BOOLEAN,
+ chart_info_file = YAML_FILE_NAME # name, not the path
+ )
+ chart.execute()
+
+3. Start the simulator via an API call:
+
+ .. code-block:: Python
+
+ start = SimulatorStartStep(
+ cleanup = BOOLEAN,
+ https = BOOLEAN,
+ host = HOSTNAME,
+ port = PORT,
+ endpoint = START_ENDPOINT, # if applicable
+ method = REQUEST_METHOD, # GET, POST etc.
+ data = PAYLOAD # {"json": {...}, ...}
+ )
+ start.execute()
+
+4. Undeploy the Helm release:
+
+ .. code-block:: Python
+
+ chart.cleanup()