aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-07-02 11:11:32 +0200
committerMorgan Richomme <morgan.richomme@orange.com>2020-07-02 13:28:40 +0000
commitee1fc1603d774676e80bcef6c96946efa87965ce (patch)
treecc7e5022e4a83c38020b88c87120b41bfec191af
parent67cde9e0a9a7fc6b597881faf659e0699ff92878 (diff)
Create runtime setup for the script
Change-Id: I1a1207173b065c3b88b4b62e134c2fda33e0e6ec Issue-ID: INT-1642 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rwxr-xr-xtest/security/check_for_ingress_and_nodeports.py10
-rw-r--r--test/security/requirements.txt2
-rw-r--r--test/security/setup.py28
-rw-r--r--test/security/tox.ini9
4 files changed, 44 insertions, 5 deletions
diff --git a/test/security/check_for_ingress_and_nodeports.py b/test/security/check_for_ingress_and_nodeports.py
index f2b7be09e..e7950a0d7 100755
--- a/test/security/check_for_ingress_and_nodeports.py
+++ b/test/security/check_for_ingress_and_nodeports.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# COPYRIGHT NOTICE STARTS HERE
#
-# Copyright 2019 Samsung Electronics Co., Ltd.
+# Copyright 2020 Samsung Electronics Co., Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -25,13 +25,13 @@
# with self signed certificate (HTTPU).
# Verbose option retrives HTTP header and prints it for each service
#
-# Dependencies:
+# To setup runtime environment execute:
#
-# pip3 install kubernetes
-# pip3 install colorama
+# $ tox
+# $ source .tox/security/bin/activate
#
# Environment:
-# This script should be run on the local machine which has network access to the onap K8S cluster.
+# This script should be run on on a host with access to the Onap K8S cluster API.
# It requires k8s cluster config file on local machine.
#
# Example usage:
diff --git a/test/security/requirements.txt b/test/security/requirements.txt
new file mode 100644
index 000000000..8683da168
--- /dev/null
+++ b/test/security/requirements.txt
@@ -0,0 +1,2 @@
+kubernetes
+colorama
diff --git a/test/security/setup.py b/test/security/setup.py
new file mode 100644
index 000000000..7e71bda03
--- /dev/null
+++ b/test/security/setup.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+# COPYRIGHT NOTICE STARTS HERE
+#
+# Copyright 2020 Samsung Electronics Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# COPYRIGHT NOTICE ENDS HERE
+
+import setuptools
+
+setuptools.setup(
+ install_requires=[
+ 'kubernetes',
+ 'colorama'
+ ]
+)
diff --git a/test/security/tox.ini b/test/security/tox.ini
new file mode 100644
index 000000000..fde5cd49c
--- /dev/null
+++ b/test/security/tox.ini
@@ -0,0 +1,9 @@
+[tox]
+envlist = security
+skipsdist = True
+
+[testenv]
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:security]
+basepython = python3