3c265aaa04a7e9e367cbcc5c6e7ce7d7bb6cca0a
[releng.git] / utils / test / testapi / htmlize / prepare.sh
1 #!/bin/bash
2
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7
8 #Creating virtual environment
9 virtualenv testapi_venv
10 source testapi_venv/bin/activate
11
12 # Install Pre-requisites
13 pip install requests
14
15 # Swgger Codegen Tool
16 url="http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar"
17
18 #Check for jar file locally and in the repo
19 if [ ! -f swagger-codegen-cli.jar ];
20 then
21     wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar -O swagger-codegen-cli.jar
22 fi
23
24 # Start OPNFV Test API Server
25 cd utils/test/testapi/
26 pip install -r requirements.txt
27 ./install.sh
28 opnfv-testapi -c ../../../testapi_venv/etc/opnfv_testapi/config.ini &
29
30 deactivate