Skip to content

Commit 1c47f36

Browse files
author
Daan Hoogland
committed
Revert "python3: Migrate Marvin and smoketests to python3 (apache#4727)"
This reverts commit a1f825e.
1 parent a8cfb77 commit 1c47f36

File tree

239 files changed

+12189
-12125
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+12189
-12125
lines changed

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6
1+
system

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jdk:
2525
- openjdk11
2626

2727
python:
28-
- "3.9"
28+
- "2.7"
2929

3030
node_js:
3131
- 12

debian/cloudstack-marvin.postinst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@
1919

2020
set -e
2121

22-
python3 -m pip install --upgrade pip
23-
python3 -m pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
22+
pip install --upgrade http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df
23+
pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz

debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Description: The CloudStack documentation
4949

5050
Package: cloudstack-marvin
5151
Architecture: all
52-
Depends: ${misc:Depends}, python3-pip, python3-dev, libffi-dev
52+
Depends: ${misc:Depends}, python-pip, python-dev, libffi-dev
5353
Description: The CloudStack Marvin library
5454

5555
Package: cloudstack-integration-tests

packaging/centos7/cloud.spec

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ BuildRequires: /usr/bin/mkisofs
4848
BuildRequires: mysql-connector-python
4949
BuildRequires: maven => 3.0.0
5050
BuildRequires: python-setuptools
51-
BuildRequires: python3
52-
BuildRequires: python3-pip
53-
BuildRequires: python3-setuptools
5451
BuildRequires: wget
5552
BuildRequires: nodejs
5653

@@ -156,9 +153,6 @@ Apache CloudStack command line interface
156153

157154
%package marvin
158155
Summary: Apache CloudStack Marvin library
159-
Requires: python3
160-
Requires: python3-devel
161-
Requires: python3-pip
162156
Requires: python-pip
163157
Requires: gcc
164158
Requires: python-devel
@@ -424,8 +418,6 @@ fi
424418
# Install mysql-connector-python
425419
pip3 install %{_datadir}/%{name}-management/setup/wheel/six-1.15.0-py2.py3-none-any.whl %{_datadir}/%{name}-management/setup/wheel/setuptools-47.3.1-py3-none-any.whl %{_datadir}/%{name}-management/setup/wheel/protobuf-3.12.2-cp36-cp36m-manylinux1_x86_64.whl %{_datadir}/%{name}-management/setup/wheel/mysql_connector_python-8.0.20-cp36-cp36m-manylinux1_x86_64.whl
426420

427-
pip3 install urllib3
428-
429421
/usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true
430422

431423
grep -s -q "db.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties" || sed -i -e "\$adb.cloud.driver=jdbc:mysql" "%{_sysconfdir}/%{name}/management/db.properties"
@@ -522,9 +514,6 @@ fi
522514
%post marvin
523515
pip install --upgrade https://files.pythonhosted.org/packages/ca/ea/1e2553b088bad2f9fa8120c2624f797b2d7450d3b61bb492d29c72e3d3c2/mysql_connector_python-8.0.20-cp27-cp27mu-manylinux1_x86_64.whl
524516
pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
525-
pip3 install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
526-
pip3 install --upgrade nose
527-
pip3 install --upgrade urllib3
528517

529518
#No default permission as the permission setup is complex
530519
%files management

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,6 @@
974974
<exclude>**/*.md</exclude>
975975
<exclude>.java-version</exclude>
976976
<exclude>.python-version</exclude>
977-
<exclude>systemvm/.pythen-version</exclude>
978977
<exclude>.idea/</exclude>
979978
<exclude>.metadata/**</exclude>
980979
<exclude>.git/**</exclude>

systemvm/test/runtests.sh

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,32 +18,27 @@
1818

1919
# requires netaddr
2020

21-
which python
22-
python --version
23-
2421
export PYTHONPATH="../debian/opt/cloud/bin/"
2522
export PYTHONDONTWRITEBYTECODE=False
2623

2724
echo "Running pycodestyle to check systemvm/python code for errors"
28-
python -m pycodestyle --max-line-length=179 *py
29-
python -m pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
25+
pycodestyle --max-line-length=179 *py
26+
pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
3027
if [ $? -gt 0 ]
3128
then
3229
echo "pycodestyle failed, please check your code"
3330
exit 1
3431
fi
3532

3633
echo "Running pylint to check systemvm/python code for errors"
37-
python --version
38-
pylint --version
39-
pylint --disable=R,C,W,E *.py
40-
pylint --disable=R,C,W,E `find ../debian -name \*.py`
34+
pylint --disable=R,C,W *.py
35+
pylint --disable=R,C,W `find ../debian -name \*.py`
4136
if [ $? -gt 0 ]
4237
then
4338
echo "pylint failed, please check your code"
4439
exit 1
4540
fi
4641

4742
echo "Running systemvm/python unit tests"
48-
nosetests2.7 .
43+
nosetests .
4944
exit $?

test/integration/component/cpu_limits/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
16-
# under the License.
16+
# under the License.

test/integration/component/find_hosts_for_migration.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"""
2020
#Import Local Modules
2121
from nose.plugins.attrib import attr
22-
from marvin.cloudstackTestCase import cloudstackTestCase
23-
import unittest
22+
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
2423
from marvin.cloudstackAPI import (migrateVirtualMachine,
2524
prepareHostForMaintenance,
2625
cancelHostMaintenance,
@@ -271,4 +270,4 @@ def test_01_find_hosts_for_migration(self):
271270

272271
self.assertTrue(notSuitableHost is not None, "notsuitablehost should not be None")
273272
self.debug("Suitable Hosts: %s" % suitableHost)
274-
self.debug("Not suitable Hosts: %s" % notSuitableHost)
273+
self.debug("Not suitable Hosts: %s" % notSuitableHost)

test/integration/component/maint/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@
1818
"""
1919
Tests that put hosts, zones, resources in to maintenance mode are here.
2020
These will have to be run sequentiall when resources are available so as not disrupt other tests
21-
"""
21+
"""

0 commit comments

Comments
 (0)