Skip to content
Merged

Marvin3 #4727

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
277d9a2
2to3marvin
DaanHoogland Dec 14, 2020
3ef4bf4
2to3tests
DaanHoogland Dec 14, 2020
128e8e4
init and sign
DaanHoogland Dec 14, 2020
b26fd5e
explicit import of unittest
DaanHoogland Nov 26, 2020
dea5bbb
expect explicit exception
Dec 3, 2020
eac67c3
remove redundant member value
DaanHoogland Dec 9, 2020
68d1078
env run of python3
DaanHoogland Dec 15, 2020
be31f9a
travis on python 3
Dec 16, 2020
4ba5ef7
version3
Dec 16, 2020
128781e
urllib3
DaanHoogland Dec 17, 2020
8ea13ae
python3 output on code generator
Dec 22, 2020
23ef98c
call codegenerator with python3
Jan 22, 2021
6fc2718
add urllib3 to requirements in egg
Jan 22, 2021
5acbe8a
None check
Jan 26, 2021
3ea1ff6
travis scripts
Jan 26, 2021
a8b37d7
pyenv/travis alignment
Jan 27, 2021
0113381
pyton 3.9.1
Jan 27, 2021
b644072
pyenv the right/requested version
Feb 1, 2021
26c6a7e
python3 in marvin rpm
Feb 1, 2021
a9858ea
marvin deps on nose
Feb 2, 2021
749606b
pycodestyle2 and -lint2 in travis
Feb 4, 2021
38906c1
string checks in the nose plugin
Feb 4, 2021
e812d67
no decode on str in python3
Feb 5, 2021
943aa56
channel result decode
Feb 9, 2021
006f937
fix tags on test
Feb 9, 2021
e1be3f5
backquote error calling pyenv
Feb 9, 2021
c979087
run py checkers as modules
Feb 10, 2021
6cd80c7
remove nose-json
Feb 10, 2021
4a77e5b
travis prefered python version
DaanHoogland Feb 10, 2021
baa4d3d
travis container does not inherit before_install stuff??
Feb 10, 2021
3291c6f
travis container does not inherit pylint either
Feb 10, 2021
532db1b
separate python for systemvm (tests)
Feb 10, 2021
8b66304
version output in travis svm tests
Feb 10, 2021
189e553
certificates as bytes arrays
Feb 11, 2021
444e910
license exclude for pyenv
Feb 11, 2021
3dd53c4
start on tabs in component tests :'(
Feb 12, 2021
612a67c
mysql connector does not properly defend against index out of bounds
Feb 12, 2021
0dcb1fe
only fetchall for select statements
Feb 16, 2021
c1627de
awkward encode-decode of userdata
Feb 19, 2021
9023934
unittest method rename assertItemEqual to assertCountEqual
Feb 19, 2021
5406d6f
foutje bedank: None vs 0
Feb 19, 2021
4cc1f80
str() when str() due
Feb 22, 2021
21436d0
remove superfluent parentesis
Feb 22, 2021
96659c8
exception assert fix
Feb 22, 2021
395a302
2to3 artifact/remnance removed
Feb 22, 2021
0c27a33
inherritics
Feb 22, 2021
e9b5675
socketserver take bytes
Feb 22, 2021
f2ce7a4
cleanup of setup() (not sure why this would help)
Feb 23, 2021
2108211
cleanup of tearDown(Class)
Feb 23, 2021
f59905f
redundant braces removed
Feb 24, 2021
5326a40
retries on ssh verification
Feb 24, 2021
8d4976d
cleanup and feedback from internal version
Feb 24, 2021
7cd919a
reformat because of indentation problems
Feb 24, 2021
73465e9
pylint cmd debug
DaanHoogland Feb 25, 2021
c34d662
Update before_install.sh
DaanHoogland Feb 25, 2021
af79302
just to see
DaanHoogland Feb 25, 2021
7a61b1b
nose to install (from before_install)
Feb 25, 2021
d60ece5
setuptools upgrade
Feb 25, 2021
94e2dab
Change python version due to cryptography
GabrielBrascher Feb 25, 2021
9ea4e65
Upgrade pip
GabrielBrascher Feb 26, 2021
129dfd9
Revert python version change from 3.8 to 3.9
GabrielBrascher Feb 26, 2021
b71c6b5
cleanup and fix autoindent issues
Feb 26, 2021
8645e51
encodestring() instead of b64encode()
Feb 26, 2021
92627c3
remove false copy-block
Feb 26, 2021
205335a
endodestring can't consume a string, needs bytes
Feb 26, 2021
32c1c2a
message attribute not available on exception
Feb 26, 2021
a14dfd4
cleanup and indentation
Mar 1, 2021
f7dd470
rigorous cleanup discipline
Mar 1, 2021
f13f6ab
cleanup incosistent passing test
Mar 1, 2021
b01d6e0
another network for cleanup
Mar 2, 2021
f6a2ef8
another indentation issue identified
Mar 2, 2021
dbc2c41
cleanup, indent, taberrors
Mar 3, 2021
8115995
cleanup imports
Mar 3, 2021
bc5b3f3
test tag removed
Mar 3, 2021
1eda309
further cleanup of resource heavy test
Mar 4, 2021
06f85d6
cleanup hygiene
Mar 4, 2021
c919dd2
format and cleanup internal lb tests
Mar 9, 2021
3289ec5
cleanup of ip tests
Mar 9, 2021
9ea59e7
no importing of False in python3 (or in sensible code)
Mar 10, 2021
821b38c
syntax (suerfluent '.')
Mar 10, 2021
abea365
more cleanup for test_accounts
Mar 10, 2021
c5d1d36
disable pylint3 running on py2 code (needs addressing and reverting)
Mar 12, 2021
057d95e
fix delete test
Mar 12, 2021
7105c54
remove merge remnance
Mar 15, 2021
3ba579f
better try/except than with
Mar 15, 2021
efa4552
force py2 nosetests on vr scripts
Mar 16, 2021
837a7f3
disable nosetests on python2 code for now
Mar 16, 2021
207bfe0
try`n'hack python2/python3 mix in travis
Mar 17, 2021
6385262
ubuntu py3 deps for marvin
Mar 17, 2021
0001900
double python install
Mar 17, 2021
3bc5a5d
Fix issue at cloudstack-marvin.postinst by making it 'python3 -m pip …
GabrielBrascher Mar 17, 2021
88dd72a
explicit install python2
Mar 22, 2021
2f47ef2
Remove unnecessary mysql-connector-python installation with hardcoded…
GabrielBrascher Mar 22, 2021
e58c9d8
proper install
Mar 24, 2021
c59f0cd
py2 install in before
Mar 25, 2021
1824074
move acitvate outside runtests
Mar 25, 2021
ccd6883
activate called from specific version
Mar 25, 2021
7d350ec
travis py2+py3 run guidance
Apr 7, 2021
1bd5305
put back in requirements travis doesn't have
Apr 7, 2021
56ff6f1
test pyenv2 to install
rohityadavcloud Apr 9, 2021
4efdc24
pip1
Apr 10, 2021
d2dde16
remove pyenv from systemvm code
Apr 13, 2021
98df221
python versions before
Apr 14, 2021
1af0b6b
show explicitely
Apr 14, 2021
e08ac55
david's pip
Apr 21, 2021
cd27370
2.7
Apr 21, 2021
5c2169e
remove pyenv's preoccupation
Apr 21, 2021
5972368
local virtual env instead of in home
Apr 21, 2021
e666ecc
Revert "local virtual env instead of in home"
Apr 27, 2021
823a7e3
Revert "remove pyenv's preoccupation"
Apr 27, 2021
522fd6a
Revert "2.7"
Apr 27, 2021
3ab71e8
Revert "david's pip"
Apr 27, 2021
e4e5617
full disable of all systemvm related python installs
Apr 27, 2021
4d6e9f9
Queue
Apr 29, 2021
891cbd3
check for vmware hosts
Apr 29, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
system
3.6
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jdk:
- openjdk11

python:
- "2.7"
- "3.9"

node_js:
- 12
Expand Down
4 changes: 2 additions & 2 deletions debian/cloudstack-marvin.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@

set -e

pip install --upgrade http://cdn.mysql.com/Downloads/Connector-Python/mysql-connector-python-2.0.4.zip#md5=3df394d89300db95163f17c843ef49df
pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Description: The CloudStack documentation

Package: cloudstack-marvin
Architecture: all
Depends: ${misc:Depends}, python-pip, python-dev, libffi-dev
Depends: ${misc:Depends}, python3-pip, python3-dev, libffi-dev
Description: The CloudStack Marvin library

Package: cloudstack-integration-tests
Expand Down
11 changes: 11 additions & 0 deletions packaging/centos7/cloud.spec
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ BuildRequires: /usr/bin/mkisofs
BuildRequires: mysql-connector-python
BuildRequires: maven => 3.0.0
BuildRequires: python-setuptools
BuildRequires: python3
BuildRequires: python3-pip
BuildRequires: python3-setuptools
BuildRequires: wget
BuildRequires: nodejs

Expand Down Expand Up @@ -153,6 +156,9 @@ Apache CloudStack command line interface

%package marvin
Summary: Apache CloudStack Marvin library
Requires: python3
Requires: python3-devel
Requires: python3-pip
Requires: python-pip
Requires: gcc
Requires: python-devel
Expand Down Expand Up @@ -418,6 +424,8 @@ fi
# Install mysql-connector-python
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

pip3 install urllib3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DaanHoogland why do we need it for cloudstack-management pkg?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll double check, I think it's an indirect dependency, Also it is not packaged which is mayby not what we want , I would mean internet has to be available during install. I'll look into this.


/usr/bin/systemctl on cloudstack-management > /dev/null 2>&1 || true

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"
Expand Down Expand Up @@ -506,6 +514,9 @@ fi
%post marvin
pip install --upgrade https://files.pythonhosted.org/packages/ca/ea/1e2553b088bad2f9fa8120c2624f797b2d7450d3b61bb492d29c72e3d3c2/mysql_connector_python-8.0.20-cp27-cp27mu-manylinux1_x86_64.whl
pip install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
pip3 install --upgrade /usr/share/cloudstack-marvin/Marvin-*.tar.gz
pip3 install --upgrade nose
pip3 install --upgrade urllib3

#No default permission as the permission setup is complex
%files management
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@
<exclude>**/*.md</exclude>
<exclude>.java-version</exclude>
<exclude>.python-version</exclude>
<exclude>systemvm/.pythen-version</exclude>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes,m definitely, but also this file is not in use anymore.

<exclude>.idea/</exclude>
<exclude>.metadata/**</exclude>
<exclude>.git/**</exclude>
Expand Down
15 changes: 10 additions & 5 deletions systemvm/test/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,32 @@

# requires netaddr

which python
python --version

export PYTHONPATH="../debian/opt/cloud/bin/"
export PYTHONDONTWRITEBYTECODE=False

echo "Running pycodestyle to check systemvm/python code for errors"
pycodestyle --max-line-length=179 *py
pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
python -m pycodestyle --max-line-length=179 *py
python -m pycodestyle --max-line-length=179 --exclude=monitorServices.py,baremetal-vr.py,passwd_server_ip.py `find ../debian -name \*.py`
if [ $? -gt 0 ]
then
echo "pycodestyle failed, please check your code"
exit 1
fi

echo "Running pylint to check systemvm/python code for errors"
pylint --disable=R,C,W *.py
pylint --disable=R,C,W `find ../debian -name \*.py`
python --version
pylint --version
pylint --disable=R,C,W,E *.py
pylint --disable=R,C,W,E `find ../debian -name \*.py`
if [ $? -gt 0 ]
then
echo "pylint failed, please check your code"
exit 1
fi

echo "Running systemvm/python unit tests"
nosetests .
nosetests2.7 .
exit $?
2 changes: 1 addition & 1 deletion test/integration/component/cpu_limits/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# "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.
# under the License.
5 changes: 3 additions & 2 deletions test/integration/component/find_hosts_for_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.cloudstackAPI import (migrateVirtualMachine,
prepareHostForMaintenance,
cancelHostMaintenance,
Expand Down Expand Up @@ -270,4 +271,4 @@ def test_01_find_hosts_for_migration(self):

self.assertTrue(notSuitableHost is not None, "notsuitablehost should not be None")
self.debug("Suitable Hosts: %s" % suitableHost)
self.debug("Not suitable Hosts: %s" % notSuitableHost)
self.debug("Not suitable Hosts: %s" % notSuitableHost)
2 changes: 1 addition & 1 deletion test/integration/component/maint/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@
"""
Tests that put hosts, zones, resources in to maintenance mode are here.
These will have to be run sequentiall when resources are available so as not disrupt other tests
"""
"""
3 changes: 2 additions & 1 deletion test/integration/component/maint/test_bugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# under the License.

# Import Local Modules
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.cloudstackAPI import (updateStoragePool,
resizeVolume,
listCapacity,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# Test from the Marvin - Testing in Python wiki

# All tests inherit from cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest

# Import Integration Libraries

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.lib.utils import (validateList,
cleanup_resources,
random_gen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"""
# Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.lib.utils import (validateList,
cleanup_resources,
random_gen)
Expand Down
25 changes: 13 additions & 12 deletions test/integration/component/maint/test_escalation_templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
# specific language governing permissions and limitations
# under the License.

from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.lib.base import (Account,
Domain, Template, Configurations,VirtualMachine,Snapshot,ServiceOffering
)
Expand Down Expand Up @@ -161,7 +162,7 @@ def test_01_CS40139_listtemplate_with_different_pagesize(self):
account=self.account.name,
domainid=self.account.domainid)
status = validateList(listfirst500template)
self.assertEquals(
self.assertEqual(
PASS,
status[0],
"First 500 template list is empty")
Expand All @@ -173,7 +174,7 @@ def test_01_CS40139_listtemplate_with_different_pagesize(self):
account=self.account.name,
domainid=self.account.domainid)
status = validateList(listremainingtemplate)
self.assertEquals(
self.assertEqual(
PASS,
status[0],
"Next 500 template list is empty")
Expand All @@ -185,7 +186,7 @@ def test_01_CS40139_listtemplate_with_different_pagesize(self):
account=self.account.name,
domainid=self.account.domainid)
status = validateList(listalltemplate)
self.assertEquals(
self.assertEqual(
PASS,
status[0],
"entire template list is empty")
Expand Down Expand Up @@ -253,7 +254,7 @@ def test_02_template_permissions(self):
)
self.updateConfigurAndRestart("allow.public.user.templates", "true")
self.fail("Template creation passed for user")
except CloudstackAPIException as e:
except CloudstackAPIException as e:
self.assertRaises("Exception Raised : %s" % e)
# Register new public template as domain admin
# Exception should be raised for registering public template
Expand All @@ -268,7 +269,7 @@ def test_02_template_permissions(self):
)
self.updateConfigurAndRestart("allow.public.user.templates", "true")
self.fail("Template creation passed for domain admin")
except CloudstackAPIException as e:
except CloudstackAPIException as e:
self.assertRaises("Exception Raised : %s" % e)

if self.hypervisor.lower() in ['hyperv', 'lxc']:
Expand Down Expand Up @@ -314,7 +315,7 @@ def test_02_template_permissions(self):
)
self.updateConfigurAndRestart("allow.public.user.templates", "true")
self.fail("Template creation passed from snapshot for domain user")
except CloudstackAPIException as e:
except CloudstackAPIException as e:
self.assertRaises("Exception Raised : %s" % e)

VirtualMachine.stop(user_vm_created, self.user_api_client)
Expand All @@ -324,7 +325,7 @@ def test_02_template_permissions(self):
domainid=user_account.domainid,
state="Stopped")
status = validateList(list_stopped_vms_after)
self.assertEquals(
self.assertEqual(
PASS,
status[0],
"Stopped VM is not in Stopped state"
Expand All @@ -336,7 +337,7 @@ def test_02_template_permissions(self):
)
self.updateConfigurAndRestart("allow.public.user.templates", "true")
self.fail("Template creation passed from volume for domain user")
except CloudstackAPIException as e:
except CloudstackAPIException as e:
self.assertRaises("Exception Raised : %s" % e)

admin_vm_created = VirtualMachine.create(
Expand Down Expand Up @@ -378,7 +379,7 @@ def test_02_template_permissions(self):
)
self.updateConfigurAndRestart("allow.public.user.templates", "true")
self.fail("Template creation passed from snapshot for domain admin")
except CloudstackAPIException as e:
except CloudstackAPIException as e:
self.assertRaises("Exception Raised : %s" % e)

VirtualMachine.stop(admin_vm_created, self.admin_api_client)
Expand All @@ -388,7 +389,7 @@ def test_02_template_permissions(self):
domainid=self.account.domainid,
state="Stopped")
status = validateList(list_stopped_vms_after)
self.assertEquals(
self.assertEqual(
PASS,
status[0],
"Stopped VM is not in Stopped state"
Expand All @@ -400,7 +401,7 @@ def test_02_template_permissions(self):
)
self.updateConfigurAndRestart("allow.public.user.templates", "true")
self.fail("Template creation passed from volume for domain admin")
except CloudstackAPIException as e:
except CloudstackAPIException as e:
self.assertRaises("Exception Raised : %s" % e)

self.updateConfigurAndRestart("allow.public.user.templates", "true")
Expand Down
3 changes: 2 additions & 1 deletion test/integration/component/maint/test_escalations_hosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# Test from the Marvin - Testing in Python wiki

# All tests inherit from cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest

# Import Integration Libraries

Expand Down
3 changes: 2 additions & 1 deletion test/integration/component/maint/test_high_availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"""
# Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.cloudstackAPI import (prepareHostForMaintenance,
cancelHostMaintenance)
from marvin.lib.utils import cleanup_resources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.cloudstackAPI import (migrateVirtualMachine,
prepareHostForMaintenance,
cancelHostMaintenance)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.lib.base import (VirtualMachine,
NetworkOffering,
VpcOffering,
Expand Down
15 changes: 8 additions & 7 deletions test/integration/component/maint/test_multiple_ip_ranges.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# under the License.
""" Tests for Multiple IP Ranges feature
"""
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.lib.utils import cleanup_resources, get_process_status
from marvin.lib.base import (Account,
DiskOffering,
Expand Down Expand Up @@ -203,11 +204,11 @@ def setUp(self):
)
self.ip_range = list(
netaddr.iter_iprange(
unicode(
self.testdata["vlan_ip_range"]["startip"]), unicode(
str(
self.testdata["vlan_ip_range"]["startip"]), str(
self.testdata["vlan_ip_range"]["endip"])))
self.nic_ip = netaddr.IPAddress(
unicode(
str(
self.vm_response[0].nic[0].ipaddress))
self.debug("vm got {} as ip address".format(self.nic_ip))
self.assertIn(
Expand Down Expand Up @@ -281,11 +282,11 @@ def test_01_deploy_vm_in_new_cidr(self):
"""
self.ip_range = list(
netaddr.iter_iprange(
unicode(
self.testdata["vlan_ip_range"]["startip"]), unicode(
str(
self.testdata["vlan_ip_range"]["startip"]), str(
self.testdata["vlan_ip_range"]["endip"])))
self.nic_ip = netaddr.IPAddress(
unicode(
str(
self.vm_response[0].nic[0].ipaddress))
self.debug("vm got {} as ip address".format(self.nic_ip))
self.assertIn(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"""
#Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.cloudstackAPI import migrateSystemVm
from marvin.lib.utils import cleanup_resources
from marvin.lib.base import (Host,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
# under the License.

from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.lib.utils import cleanup_resources
from marvin.lib.base import (Account,
Host,
Expand Down
Loading