Create runtime setup for the script 63/109763/3
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Thu, 2 Jul 2020 09:11:32 +0000 (11:11 +0200)
committerMorgan Richomme <morgan.richomme@orange.com>
Thu, 2 Jul 2020 13:28:40 +0000 (13:28 +0000)
Change-Id: I1a1207173b065c3b88b4b62e134c2fda33e0e6ec
Issue-ID: INT-1642
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
test/security/check_for_ingress_and_nodeports.py
test/security/requirements.txt [new file with mode: 0644]
test/security/setup.py [new file with mode: 0644]
test/security/tox.ini [new file with mode: 0644]

index f2b7be0..e7950a0 100755 (executable)
@@ -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.
 # 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 (file)
index 0000000..8683da1
--- /dev/null
@@ -0,0 +1,2 @@
+kubernetes
+colorama
diff --git a/test/security/setup.py b/test/security/setup.py
new file mode 100644 (file)
index 0000000..7e71bda
--- /dev/null
@@ -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 (file)
index 0000000..fde5cd4
--- /dev/null
@@ -0,0 +1,9 @@
+[tox]
+envlist = security
+skipsdist = True
+
+[testenv]
+deps = -r{toxinidir}/requirements.txt
+
+[testenv:security]
+basepython = python3