Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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 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
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
# All tests inherit from cloudstack TestCase

from marvin.cloudstackTestCase import cloudstackTestCase
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from marvin.codes import FAILED, PASS
from marvin.lib.base import (Account,
VirtualMachine,
Expand Down
3 changes: 2 additions & 1 deletion test/integration/component/maint/testpath_vMotion_vmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
""" Test cases for Test Paths Storage Migration
"""
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,
validateList,
is_server_ssh_ready
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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 createVlanIpRange
from marvin.lib.utils import (validateList,
cleanup_resources)
Expand Down
5 changes: 3 additions & 2 deletions test/integration/component/test_add_remove_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@

# Import Local Modules
from nose.plugins.attrib import attr
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from ddt import ddt, data
from marvin.lib.base import (
Account,
Expand Down Expand Up @@ -1058,7 +1059,7 @@ def test_30_remove_nic_reattach(self):
networkids=[self.isolated_network.id, self.ntwk2.id, self.ntwk3.id]
)
self.assertIsNotNone(self.test_vm, "Failed to create vm with 3 nics")
map(lambda x: self.cleanup.append(x), [self.test_vm, self.ntwk2, self.ntwk3])
list(map(lambda x: self.cleanup.append(x), [self.test_vm, self.ntwk2, self.ntwk3]))
vm_res = VirtualMachine.list(
self.apiclient,
id=self.test_vm.id
Expand Down
7 changes: 4 additions & 3 deletions test/integration/component/test_advancedsg_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

""" P1 tests for networks in advanced zone with security groups
"""
from marvin.cloudstackTestCase import cloudstackTestCase, unittest
from marvin.cloudstackTestCase import cloudstackTestCase
import unittest
from ddt import ddt, data
from marvin.lib.base import (Zone,
ServiceOffering,
Expand Down Expand Up @@ -2162,7 +2163,7 @@ def test_34_DeployVM_in_SecondSGNetwork(self):
name=self.services["test_34_DeployVM_in_SecondSGNetwork"]["zone"]
)
status = validateList(zone_list)
self.assertEquals(status[0], PASS, "Failed to list the zones")
self.assertEqual(status[0], PASS, "Failed to list the zones")
count = 0
"""
In simulator environment default guest os template should be in ready state immediately after the ssvm is up.
Expand Down Expand Up @@ -2260,7 +2261,7 @@ def test_34_DeployVM_in_SecondSGNetwork(self):
)
#construct ip list using start and end ips in the network
for i in range(0,nwIPs):
ips_in_new_network.append(str(ip_gen.next()))
ips_in_new_network.append(str(next(ip_gen)))
if vm_ip not in ips_in_new_network:
self.fail("vm did not get the ip from new SG enabled shared network")
self.cleanup_vms.append(vm_2)
Expand Down
Loading