diff options
author | Ethan Lynn <xuanlangjian@gmail.com> | 2019-09-06 13:42:16 +0800 |
---|---|---|
committer | Ethan Lynn <xuanlangjian@gmail.com> | 2019-09-06 16:46:26 +0800 |
commit | f8eb83d7f0f406d79aede856b92fbc5a0461d1c3 (patch) | |
tree | 67dee8d66f4d246fcd5b43f00d03b700dfd263e0 | |
parent | 32982a84a29b62716f9d5d93a209c0db9f086467 (diff) |
Drop python 2 support
Use python3 as default python version
Change-Id: I82c95b7ae21ef0bc2a4bdca2536e35affbc5c9f5
Issue-ID: MULTICLOUD-706
Signed-off-by: Ethan Lynn <xuanlangjian@gmail.com>
-rwxr-xr-x | sonar.sh | 2 | ||||
-rw-r--r-- | vio/docker/Dockerfile | 4 | ||||
-rw-r--r-- | vio/requirements.txt | 10 | ||||
-rwxr-xr-x | vio/sonar.sh | 2 | ||||
-rw-r--r-- | vio/tox.ini | 14 |
5 files changed, 17 insertions, 15 deletions
@@ -53,7 +53,7 @@ run_tox_test() DIR=$(echo "$TOXINI" | rev | cut -f2- -d'/' | rev) cd "${CURDIR}/${DIR}" rm -rf ./venv-tox ./.tox - virtualenv ./venv-tox + virtualenv ./venv-tox --python=python3 source ./venv-tox/bin/activate pip install --upgrade pip pip install --upgrade tox argparse diff --git a/vio/docker/Dockerfile b/vio/docker/Dockerfile index 2bd40aa..9af63cf 100644 --- a/vio/docker/Dockerfile +++ b/vio/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2-alpine +FROM python:3-alpine ENV MSB_ADDR "127.0.0.1" ENV MSB_PORT "80" @@ -20,7 +20,7 @@ RUN apk update && \ wget -q -O multicloud-vio.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.multicloud.openstack.vmware&a=multicloud-openstack-vmware&v=1.4.1-SNAPSHOT&e=zip' && \ unzip multicloud-vio.zip && \ rm -rf multicloud-vio.zip && \ - pip install -r /opt/vio/requirements.txt && \ + pip3 install -r /opt/vio/requirements.txt && \ mkdir -p /var/log/onap/multicloud/vio && \ chmod a+rw /var/log/onap/multicloud/vio && \ chown onap:onap -R /opt/vio/ && \ diff --git a/vio/requirements.txt b/vio/requirements.txt index f5b5cb5..3fa9c4a 100644 --- a/vio/requirements.txt +++ b/vio/requirements.txt @@ -1,9 +1,9 @@ # rest framework -Django==1.9.13 -djangorestframework==3.6.4 +# Django==1.9.13 +# djangorestframework==3.6.4 -# Django==2.2.4 -# djangorestframework==3.10.3 +Django==2.2.4 +djangorestframework==3.10.3 # redis cache # redis==2.10.5 @@ -22,7 +22,7 @@ os-client-config==1.29.0 python-cinderclient==3.5.0 # for onap logging -onappylog>=1.0.8 +onappylog>=1.0.9 # for event oslo_messaging diff --git a/vio/sonar.sh b/vio/sonar.sh index 941f1a9..60d8490 100755 --- a/vio/sonar.sh +++ b/vio/sonar.sh @@ -52,7 +52,7 @@ run_tox_test() DIR=$(echo "$TOXINI" | rev | cut -f2- -d'/' | rev) cd "${CURDIR}/${DIR}" rm -rf ./venv-tox ./.tox - virtualenv ./venv-tox + virtualenv ./venv-tox --python=python3 source ./venv-tox/bin/activate pip install --upgrade pip pip install --upgrade tox argparse diff --git a/vio/tox.ini b/vio/tox.ini index 8fd499e..b4ff684 100644 --- a/vio/tox.ini +++ b/vio/tox.ini @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. [tox] -envlist = py27,py36,pep8 +envlist = py36,pep8 skipsdist = true [tox:jenkins] @@ -24,20 +24,22 @@ deps = commands = /usr/bin/find . -type f -name "*.py[c|o]" -delete - python manage.py test vio + {basepython} manage.py test vio [testenv:pep8] +basepython = python3 deps=flake8 commands=flake8 -[testenv:py27] -commands = - {[testenv]commands} +# [testenv:py36] +# commands = +# {[testenv]commands} [testenv:cover] +basepython = python3.6 setenv= DJANGO_SETTINGS_MODULE = vio.settings-cover commands = coverage erase {[testenv]commands} - coverage xml -i
\ No newline at end of file + coverage xml -i |