Use python3 for CSITs 99/121599/10
authorarkadiusz.adamski <aadamski@est.tech>
Mon, 24 May 2021 11:50:40 +0000 (12:50 +0100)
committerarkadiusz.adamski <aadamski@est.tech>
Wed, 2 Jun 2021 16:08:11 +0000 (17:08 +0100)
- use python3 and pip3 in scripts
- update robot-framework-http library, so it can use python3
- update selenium2library, so it can use python3

Issue-ID: POLICY-3092
Signed-off-by: arkadiusz.adamski <aadamski@est.tech>
Change-Id: I5a6a4fe43e54366859049e1d43bbce599dacd14e

csit/apex-pdp/plans/setup.sh
csit/api/plans/setup.sh
csit/distribution/plans/setup.sh
csit/drools-applications/plans/setup.sh
csit/drools-pdp/plans/setup.sh
csit/include-raw-integration-install-robotframework.sh [new file with mode: 0644]
csit/pap/plans/setup.sh
csit/prepare-csit.sh
csit/pylibs.txt [new file with mode: 0644]
csit/run-project-csit.sh
csit/xacml-pdp/plans/setup.sh

index ee8709d..89f780a 100644 (file)
@@ -4,6 +4,7 @@
 #
 #  Modifications copyright (c) 2019 Nordix Foundation.
 #  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
+#  Modification Copyright 2021. Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,9 +23,9 @@
 source ${SCRIPTS}/get-branch-mariadb.sh
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 sudo apt-get -y install libxml2-utils
 
index 65d71e9..28d08b7 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+# Modification Copyright 2021. Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,9 +22,9 @@
 source ${SCRIPTS}/get-branch-mariadb.sh
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 
 sudo apt-get -y install libxml2-utils
index 664cb69..54ee68f 100644 (file)
@@ -4,6 +4,7 @@
 #
 #  Modifications copyright (c) 2019 Nordix Foundation.
 #  Modifications Copyright (C) 2020-2021 AT&T Intellectual Property.
+#  Modification Copyright 2021. Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -22,9 +23,9 @@
 source ${SCRIPTS}/get-branch-mariadb.sh
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 sudo apt-get -y install libxml2-utils
 
index 02d854c..f8ca632 100755 (executable)
@@ -2,6 +2,7 @@
 #
 # ===========LICENSE_START====================================================
 #  Copyright (C) 2019-2021 AT&T Intellectual Property. All rights reserved.
+#  Modification Copyright 2021. Nordix Foundation.
 # ============================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,9 +20,9 @@
 source ${SCRIPTS}/get-branch-mariadb.sh
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 sudo apt-get -y install libxml2-utils
 
index 003f21b..3f3624f 100755 (executable)
@@ -1,6 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
 # Copyright 2017-2021 AT&T Intellectual Property. All rights reserved.
+#  Modification Copyright 2021. Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,9 +22,9 @@ source ${SCRIPTS}/get-branch-mariadb.sh
 # OS upgrades
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 sudo apt-get -y install libxml2-utils
 
diff --git a/csit/include-raw-integration-install-robotframework.sh b/csit/include-raw-integration-install-robotframework.sh
new file mode 100644 (file)
index 0000000..65b838b
--- /dev/null
@@ -0,0 +1,34 @@
+#!/bin/bash
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2015 The Linux Foundation and others.
+# Modification Copyright 2021. Nordix Foundation.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+# vim: sw=4 ts=4 sts=4 et ft=sh :
+
+ROBOT_VENV="/tmp/v/robot"
+echo ROBOT_VENV="${ROBOT_VENV}" >> "${WORKSPACE}/env.properties"
+
+echo "Python version is: $(python3 --version)"
+
+# The --system-site-packages parameter allows us to pick up system level
+# installed packages. This allows us to bake matplotlib which takes very long
+# to install into the image.
+python3 -m venv "${ROBOT_VENV}"
+
+source "${ROBOT_VENV}/bin/activate"
+
+set -exu
+
+# Make sure pip3 itself us up-to-date.
+python3 -m pip3 install --upgrade pip3
+
+echo "Installing Python Requirements"
+python3 -m pip3 install -r pylibs.txt
+odltools -V
+pip3 freeze
index d53edc1..97cdb30 100644 (file)
@@ -2,6 +2,7 @@
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2019 Nordix Foundation.
 #  Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
+#  Modification Copyright 2021. Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -21,9 +22,9 @@
 source ${SCRIPTS}/get-branch-mariadb.sh
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 sudo apt-get -y install libxml2-utils
 bash ${SCRIPTS}/get-models-examples.sh
index 018a9b5..d9c6f55 100755 (executable)
@@ -2,6 +2,7 @@
 #
 # Copyright 2019 © Samsung Electronics Co., Ltd.
 # Modification Copyright 2021 © AT&T Intellectual Property.
+# Modification Copyright 2021. Nordix Foundation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -39,12 +40,10 @@ elif [ ! -d /tmp/ci-management ]; then
     source /tmp/ci-management/jjb/integration/include-raw-integration-install-robotframework.sh
 fi
 
-# install required Robot libraries
-pip install robotframework-selenium2library==1.8.0 robotframework-extendedselenium2library==0.9.1
 
 # install eteutils
 mkdir -p ${ROBOT_VENV}/src/onap
 rm -rf ${ROBOT_VENV}/src/onap/testsuite
-pip install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
+pip3 install --upgrade --extra-index-url="https://nexus3.onap.org/repository/PyPi.staging/simple" 'robotframework-onap==0.5.1.*' --pre
 
-pip freeze
+pip3 freeze
diff --git a/csit/pylibs.txt b/csit/pylibs.txt
new file mode 100644 (file)
index 0000000..d6250db
--- /dev/null
@@ -0,0 +1,27 @@
+docker-py
+ipaddr
+netaddr
+netifaces
+pyhocon
+requests
+robotframework-httplibrary
+robotframework-requests
+robotframework-selenium2library
+robotframework-extendedselenium2library
+robotframework-sshlibrary
+scapy
+# Module jsonpath is needed by current AAA idmlite suite.
+jsonpath-rw
+# Modules for longevity framework robot library
+elasticsearch
+elasticsearch-dsl
+# Module for pyangbind used by lispflowmapping project
+pyangbind
+# Module for iso8601 datetime format
+isodate
+# Module for TemplatedRequests.robot library
+jmespath
+# Module for backup-restore support library
+jsonpatch
+# odltools for extra debugging
+odltools
index 6f7a847..87d8b8b 100755 (executable)
@@ -3,6 +3,7 @@
 # Copyright 2016-2017 Huawei Technologies Co., Ltd.
 # Modification Copyright 2019 © Samsung Electronics Co., Ltd.
 # Modification Copyright 2021 © AT&T Intellectual Property.
+# Modification Copyright 2021. Nordix Foundation.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -192,7 +193,7 @@ SUITES=$( xargs -a testplan.txt )
 echo ROBOT_VARIABLES="${ROBOT_VARIABLES}"
 echo "Starting Robot test suites ${SUITES} ..."
 relax_set
-python -m robot.run -N ${PROJECT} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${SUITES}
+python3 -m robot.run -N ${PROJECT} -v WORKSPACE:/tmp ${ROBOT_VARIABLES} ${SUITES}
 RESULT=$?
 load_set
 echo "RESULT: ${RESULT}"
index 21d8821..cf369ab 100644 (file)
@@ -1,6 +1,7 @@
 #!/bin/bash
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2020-2021 AT&T Intellectual Property. All rights reserved.
+#  Modification Copyright 2021. Nordix Foundation.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -19,9 +20,9 @@
 source ${SCRIPTS}/get-branch-mariadb.sh
 
 echo "Uninstall docker-py and reinstall docker."
-pip uninstall -y docker-py
-pip uninstall -y docker
-pip install -U docker==2.7.0
+pip3 uninstall -y docker-py
+pip3 uninstall -y docker
+pip3 install -U docker
 
 sudo apt-get -y install libxml2-utils
 bash ${SCRIPTS}/get-models-examples.sh