Various fixes to tests

- Configuration fixes in Security groups and Egress rules
- Fixing white spaces in component test suite
This commit is contained in:
Prasanna Santhanam 2012-07-06 16:50:20 +05:30
parent a725fdc3ab
commit b433b1afa6
18 changed files with 1176 additions and 1113 deletions

View File

@ -78,7 +78,7 @@ class Services:
"ostypeid": 'aaf6e8c9-b609-441d-9ebd-b4eaa030a275',
"url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2",
"hypervisor": 'XenServer',
"format" : 'VHD',
"format": 'VHD',
"isfeatured": True,
"ispublic": True,
"isextractable": True,
@ -87,7 +87,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode":'advanced'
"mode": 'advanced'
}
@ -372,6 +372,7 @@ class TestRemoveUserFromAccount(cloudstackTestCase):
"Check state of VMs associated with account"
)
return
@unittest.skip("Open Questions")
def test_02_remove_all_users(self):
"""Test Remove both users from the account
@ -695,6 +696,7 @@ class TestServiceOfferingSiblings(cloudstackTestCase):
)
return
@unittest.skip("Open Questions")
class TestServiceOfferingHierarchy(cloudstackTestCase):
@ -821,6 +823,7 @@ class TestServiceOfferingHierarchy(cloudstackTestCase):
)
return
@unittest.skip("Open Questions")
class TesttemplateHierarchy(cloudstackTestCase):
@ -959,6 +962,7 @@ class TesttemplateHierarchy(cloudstackTestCase):
)
return
class TestAddVmToSubDomain(cloudstackTestCase):
@classmethod
@ -1037,8 +1041,9 @@ class TestAddVmToSubDomain(cloudstackTestCase):
def tearDownClass(cls):
try:
#Clean up, terminate the created resources
cleanup_resources(cls.api_client,cls._cleanup)
cleanup_resources(cls.api_client, cls._cleanup)
except Exception as e:
raise Exception("Warning: Exception during cleanup : %s" % e)
return
@ -1056,7 +1061,6 @@ class TestAddVmToSubDomain(cloudstackTestCase):
raise Exception("Warning: Exception during cleanup : %s" % e)
return
def test_01_add_vm_to_subdomain(self):
""" Test Sub domain allowed to launch VM when a Domain level zone is
created"""

View File

@ -26,6 +26,7 @@ from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
from marvin.remoteSSHClient import remoteSSHClient
class Services:
"""Test Services
"""
@ -78,11 +79,11 @@ class Services:
"templatefilter": 'self',
"url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2",
"hypervisor": 'XenServer',
"format" : 'VHD',
"format": 'VHD',
"isfeatured": True,
"ispublic": True,
"isextractable": True,
"passwordenabled":True,
"passwordenabled": True,
},
"paths": {
"mount_dir": "/mnt/tmp",
@ -98,7 +99,7 @@ class Services:
},
"ostypeid": '144f66aa-7f74-4cfe-9799-80cc21439cb3',
# Cent OS 5.3 (64 bit)
"sleep":60,
"sleep": 60,
"mode": 'advanced',
# Networking mode, Advanced, Basic
}
@ -312,7 +313,7 @@ class TestSnapshots(cloudstackTestCase):
None,
"Check Volume list Length"
)
self.assertEqual (
self.assertEqual(
volumes[0].id,
volume_from_snapshot.id,
"Check Volume in the List Volumes"
@ -524,7 +525,7 @@ class TestTemplate(cloudstackTestCase):
)
self.debug("Deployed VM with ID: %s " % virtual_machine.id)
self.assertEqual(
hasattr(virtual_machine,"password"),
hasattr(virtual_machine, "password"),
True,
"Check if the deployed VM returned a password"
)
@ -909,7 +910,6 @@ class TestRouterRestart(cloudstackTestCase):
self.apiclient = self.testClient.getApiClient()
return
def test_01_restart_network_cleanup(self):
"""TS_BUG_008-Test restart network
"""

View File

@ -37,7 +37,7 @@ class Services:
def __init__(self):
self.services = {
"disk_offering":{
"disk_offering": {
"displaytext": "Small",
"name": "Small",
"disksize": 1
@ -110,6 +110,7 @@ class Services:
"protocol": 'TCP',
"startport": 22,
"endport": 22,
"cidrlist": '0.0.0.0/0'
},
"mgmt_server": {
"username": "root",
@ -120,7 +121,7 @@ class Services:
# CentOS 5.3 (64-bit)
"sleep": 60,
"timeout": 10,
"mode":'basic',
"mode": 'basic',
# Networking mode: Basic or Advanced
}
@ -1038,7 +1039,7 @@ class TestRevokeEgressRule(cloudstackTestCase):
result = security_group.revokeEgress(
self.apiclient,
id = ssh_egress_rule["ruleid"]
id=ssh_egress_rule["ruleid"]
)
self.debug("Revoke egress rule result: %s" % result)
@ -1965,6 +1966,7 @@ class TestStartStopVMWithEgressRule(cloudstackTestCase):
)
return
@unittest.skip("Valid bug- ID: CS-12647")
class TestInvalidParametersForEgress(cloudstackTestCase):
@ -2329,12 +2331,12 @@ class TestEgressAfterHostMaintainance(cloudstackTestCase):
)
vm = vms[0]
self.debug("Enabling host maintainance for ID: %s" % host.id)
self.debug("Enabling host maintainance for ID: %s" % vm.hostid)
cmd = prepareHostForMaintenance.prepareHostForMaintenanceCmd()
cmd.id = vm.hostid
self.apiclient.prepareHostForMaintenance(cmd)
self.debug("Canceling host maintainance for ID: %s" % host.id)
self.debug("Canceling host maintainance for ID: %s" % vm.hostid)
cmd = cancelHostMaintenance.cancelHostMaintenanceCmd()
cmd.id = vm.hostid
self.apiclient.cancelHostMaintenance(cmd)

View File

@ -62,7 +62,7 @@ class Services:
"publicport": 22,
"protocol": "TCP"
},
"fw_rule":{
"fw_rule": {
"startport": 1,
"endport": 6000,
"cidr": '55.55.0.0/11',
@ -86,7 +86,7 @@ class Services:
"ostypeid": '946b031b-0e10-4f4a-a3fc-d212ae2ea07f',
"url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2",
"hypervisor": 'XenServer',
"format" : 'VHD',
"format": 'VHD',
"isfeatured": True,
"ispublic": True,
"isextractable": True,
@ -96,7 +96,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 100,
"mode":'advanced'
"mode": 'advanced'
}

View File

@ -57,7 +57,7 @@ class Services:
"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
"traffictype": 'GUEST',
"availability": 'Optional',
"serviceProviderList" : {
"serviceProviderList": {
"Dhcp": 'VirtualRouter',
"Dns": 'VirtualRouter',
"SourceNat": 'VirtualRouter',
@ -76,7 +76,7 @@ class Services:
"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat',
"traffictype": 'GUEST',
"availability": 'Optional',
"serviceProviderList" : {
"serviceProviderList": {
"Dhcp": 'VirtualRouter',
"Dns": 'VirtualRouter',
"SourceNat": 'VirtualRouter',
@ -118,7 +118,7 @@ class Services:
"publicport": 66,
"protocol": "TCP"
},
"fw_rule":{
"fw_rule": {
"startport": 1,
"endport": 6000,
"cidr": '55.55.0.0/11',
@ -140,7 +140,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode":'advanced'
"mode": 'advanced'
}
@ -809,7 +809,6 @@ class TestNOWithNetscaler(cloudstackTestCase):
# address for different public port ranges.
# 9. On source NAT ipaddress, we should NOT be allowed to Enable VPN.
# Create a network offering with all virtual router services enabled
self.debug(
"Creating n/w offering with all services in VR & conserve mode:ON"
@ -1080,7 +1079,6 @@ class TestNOWithNetscaler(cloudstackTestCase):
# address for different public port ranges.
# 9. On source NAT ipaddress, we should be allowed to Enable VPN.
# Create a network offering with all virtual router services enabled
self.debug(
"Creating n/w offering with all services in VR & conserve mode:ON"

View File

@ -89,7 +89,7 @@ class Services:
"ostypeid": 'f9b709f2-e0fc-4c0f-80f1-b0494168f58d',
"url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2",
"hypervisor": 'XenServer',
"format" : 'VHD',
"format": 'VHD',
"isfeatured": True,
"ispublic": True,
"isextractable": True,
@ -107,7 +107,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode":'advanced'
"mode": 'advanced'
}
@ -169,11 +169,14 @@ class TestUserProjectCreation(cloudstackTestCase):
raise Exception("Warning: Exception during cleanup : %s" % e)
return
def test_01_admin_project_creation(self):
"""Test create project as a domain admin and domain user
"""
<<<<<<< HEAD
=======
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Check if 'allow.user.create.projects' configuration is true
# 2. Create a Project as domain admin
@ -263,6 +266,7 @@ class TestUserProjectCreation(cloudstackTestCase):
"Check list project response returns a valid project"
)
return
@unittest.skip("Known bug-able to create project as a domain user")
def test_02_user_project_creation(self):
"""Test create project as a domain admin and domain user
@ -390,10 +394,13 @@ class TestProjectInviteRequired(cloudstackTestCase):
raise Exception("Warning: Exception during cleanup : %s" % e)
return
def test_03_add_user_to_project(self):
"""Add user to project when 'project.invite.required' is false"""
<<<<<<< HEAD
=======
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following:
# 1. Create a Project
# 2. Add users to the project. Verify user is added to project
@ -1148,6 +1155,7 @@ class TestProjectInviteRequired(cloudstackTestCase):
"Check for a valid list accounts response"
)
return
@unittest.skip("Requires SMPT configs")
def test_09_invite_to_project_by_email(self):
"""Test invite user to project by email"""

View File

@ -25,6 +25,7 @@ from integration.lib.base import *
from integration.lib.common import *
import datetime
class Services:
"""Test Resource Limits Services
"""
@ -300,6 +301,7 @@ class TestProjectLimits(cloudstackTestCase):
projectid=project.id
)
return
@unittest.skip("No provision for updating resource limits from account through API")
def test_02_project_limits_normal_user(self):
""" Test project limits
@ -589,7 +591,11 @@ class TestResourceLimitsProject(cloudstackTestCase):
def test_04_publicip_per_project(self):
"""Test Public IP limit per project
"""
<<<<<<< HEAD
=======
tags = ["advanced", "eip", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. set max no of IPs per project to 2.
# 2. Create an account in this domain
@ -800,8 +806,13 @@ class TestResourceLimitsProject(cloudstackTestCase):
def test_07_templates_per_project(self):
"""Test Templates limit per project
"""
<<<<<<< HEAD
# Validate the following
=======
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
# Validate the following
>>>>>>> 6d17e21... This commit has following fixes:
# 1. set max no of templates per project to 1.
# 2. Create a template in this project. Both template should be in
# ready state

View File

@ -26,6 +26,7 @@ from integration.lib.common import *
from marvin.remoteSSHClient import remoteSSHClient
import datetime
class Services:
"""Test Resource creation Services
"""
@ -382,7 +383,11 @@ class TestNetwork(cloudstackTestCase):
def test_03_network_create(self):
""" Test create network in project
"""
<<<<<<< HEAD
=======
tags = ["advanced", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Create a project.
# 2. Add virtual/direct network resource to the project. User shared
@ -428,7 +433,7 @@ class TestNetwork(cloudstackTestCase):
projectid=project.id
)
self.debug("Created network with ID: %s" % network.id)
networks= Network.list(
networks = Network.list(
self.apiclient,
projectid=project.id,
listall=True
@ -586,8 +591,13 @@ class TestTemplates(cloudstackTestCase):
def test_04_public_template_use_in_project(self):
"""Test Templates creation in projects
"""
<<<<<<< HEAD
# Validate the following
=======
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
# Validate the following
>>>>>>> 6d17e21... This commit has following fixes:
# 1. Create a project
# 2. Verify Public templates can be used without any restriction
# 3. Verify that template created in project can be used in project
@ -645,8 +655,13 @@ class TestTemplates(cloudstackTestCase):
def test_05_use_private_template_in_project(self):
"""Test use of private template in a project
"""
<<<<<<< HEAD
# Validate the following
=======
tags = ["advanced", "basic", "sg", "eip", "advancedns"]
# Validate the following
>>>>>>> 6d17e21... This commit has following fixes:
# 1. Create a project
# 2. Verify that in order to use somebodys Private template for vm
# creation in the project, permission to use the template has to
@ -964,7 +979,11 @@ class TestPublicIpAddress(cloudstackTestCase):
def test_07_associate_public_ip(self):
"""Test associate public IP within the project
"""
<<<<<<< HEAD
=======
tags = ["advanced", "eip", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Create a project
# 2. Add some public Ips to the project

View File

@ -26,6 +26,7 @@ from integration.lib.common import *
from marvin.remoteSSHClient import remoteSSHClient
import datetime
class Services:
"""Test Snapshots Services
"""
@ -107,7 +108,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode":'advanced'
"mode": 'advanced'
}
@ -1077,7 +1078,11 @@ class TestLBRuleUsage(cloudstackTestCase):
def test_01_lb_usage(self):
"""Test Create/Delete a LB rule and verify correct usage is recorded
"""
<<<<<<< HEAD
=======
tags = ["advanced", "eip", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Acquire a IP for this account. lb.rule.create event is registered
# for this account in cloud.usage_event table
@ -1435,7 +1440,11 @@ class TestNatRuleUsage(cloudstackTestCase):
def test_01_nat_usage(self):
"""Test Create/Delete a PF rule and verify correct usage is recorded
"""
<<<<<<< HEAD
=======
tags = ["advanced", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Acquire a IP for this account
# 2. Create a PF rule on the IP associated with this account.
@ -1618,7 +1627,11 @@ class TestVpnUsage(cloudstackTestCase):
def test_01_vpn_usage(self):
"""Test Create/Delete a VPN and verify correct usage is recorded
"""
<<<<<<< HEAD
=======
tags = ["advanced", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Enable VPN for this IP. vpn.add.user event is registered for this
# account in cloud.usage_event table

View File

@ -95,7 +95,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode":'advanced'
"mode": 'advanced'
}
@ -443,7 +443,7 @@ class TestCrossDomainAccountAdd(cloudstackTestCase):
"Check project name from list response"
)
self.debug("Adding user: %s from domain: %s to project: %s" %(
self.debug("Adding user: %s from domain: %s to project: %s" % (
self.user.account.name,
self.user.account.domainid,
project.id
@ -576,6 +576,7 @@ class TestDeleteAccountWithProject(cloudstackTestCase):
self.account.account.name)
return
@unittest.skip("Deleting domain doesn't cleanup account")
class TestDeleteDomainWithProject(cloudstackTestCase):

View File

@ -25,6 +25,7 @@ from integration.lib.base import *
from integration.lib.common import *
import datetime
class Services:
"""Test Resource Limits Services
"""
@ -81,6 +82,7 @@ class Services:
"mode": 'advanced',
}
class TestResourceLimitsAccount(cloudstackTestCase):
@classmethod
@ -153,7 +155,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
def test_01_vm_per_account(self):
"""Test VM limit per account
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Set user_vm=1 limit for account 1.
@ -246,7 +248,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
def test_02_publicip_per_account(self):
"""Test Public IP limit per account
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Set Public_IP= 2 limit for account 1.
@ -389,7 +391,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
def test_03_snapshots_per_account(self):
"""Test Snapshot limit per account
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Set snapshot= 2 limit for account 1.
@ -545,7 +547,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
def test_04_volumes_per_account(self):
"""Test Volumes limit per account
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Set volumes=2 limit for account 1.
@ -687,7 +689,7 @@ class TestResourceLimitsAccount(cloudstackTestCase):
def test_05_templates_per_account(self):
"""Test Templates limit per account
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Set templates=1 limit for account 1.
@ -917,7 +919,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
def test_01_vm_per_domain(self):
"""Test VM limit per domain
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Set max VM per domain to 2
@ -983,7 +985,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
def test_01_publicip_per_domain(self):
"""Test Public IP limit per domain
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. set max no of IPs per domain to 2.
@ -1053,7 +1055,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
def test_03_snapshots_per_domain(self):
"""Test Snapshot limit per domain
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. set max no of snapshots per domain to 1.
@ -1136,7 +1138,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
def test_04_volumes_per_domain(self):
"""Test Volumes limit per domain
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. set max no of volume per domain to 1.
@ -1189,7 +1191,7 @@ class TestResourceLimitsDomain(cloudstackTestCase):
def test_05_templates_per_domain(self):
"""Test Templates limit per domain
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. set max no of templates per domain to 2.
@ -1335,7 +1337,7 @@ class TestResources(cloudstackTestCase):
def test_01_zones(self):
"""Check the status of zones"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. List zones
@ -1361,7 +1363,7 @@ class TestResources(cloudstackTestCase):
def test_02_pods(self):
"""Check the status of pods"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. List pods
@ -1387,7 +1389,7 @@ class TestResources(cloudstackTestCase):
def test_03_clusters(self):
"""Check the status of clusters"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. List clusters
@ -1413,7 +1415,7 @@ class TestResources(cloudstackTestCase):
def test_04_hosts(self):
"""Check the status of hosts"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. List hosts with type=Routing
@ -1440,7 +1442,7 @@ class TestResources(cloudstackTestCase):
def test_05_storage_pools(self):
"""Check the status of Storage pools"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. List storage pools for the zone
@ -1466,7 +1468,7 @@ class TestResources(cloudstackTestCase):
def test_06_secondary_storage(self):
"""Check the status of secondary storage"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. List secondary storage

View File

@ -82,7 +82,7 @@ class Services:
"publicport": 2222,
"protocol": 'TCP',
},
"fw_rule":{
"fw_rule": {
"startport": 1,
"endport": 6000,
"cidr": '55.55.0.0/11',
@ -436,7 +436,7 @@ class TestRouterServices(cloudstackTestCase):
)
self.debug("network.gc.wait: %s" % gcwait[0].value)
total_wait = int(gcinterval[0].value) + int (gcwait[0].value)
total_wait = int(gcinterval[0].value) + int(gcwait[0].value)
# Router is stopped after (network.gc.interval *2) time. Wait for
# (network.gc.interval+network.gc.wait) * 2 for moving router to 'Stopped'
time.sleep(total_wait * 2)
@ -580,7 +580,6 @@ class TestRouterServices(cloudstackTestCase):
return
class TestRouterStopCreatePF(cloudstackTestCase):
@classmethod
@ -791,6 +790,7 @@ class TestRouterStopCreatePF(cloudstackTestCase):
)
return
class TestRouterStopCreateLB(cloudstackTestCase):
@classmethod
@ -1223,4 +1223,3 @@ class TestRouterStopCreateFW(cloudstackTestCase):
"Check public IP address"
)
return

View File

@ -37,7 +37,7 @@ class Services:
def __init__(self):
self.services = {
"disk_offering":{
"disk_offering": {
"displaytext": "Small",
"name": "Small",
"disksize": 1
@ -93,7 +93,7 @@ class Services:
# CentOS 5.3 (64-bit)
"sleep": 60,
"timeout": 10,
"mode":'basic',
"mode": 'basic',
# Networking mode: Basic or Advanced
}
@ -767,7 +767,7 @@ class TestDhcpOnlyRouter(cloudstackTestCase):
zoneid=router.zoneid,
type='Routing',
state='Up',
virtualmachineid=self.virtual_machine.id
id=router.hostid
)
self.assertEqual(
isinstance(hosts, list),
@ -1534,7 +1534,7 @@ class TestIngressRule(cloudstackTestCase):
result = security_group.revoke(
self.apiclient,
id = icmp_rule["ruleid"]
id=icmp_rule["ruleid"]
)
self.debug("Revoke ingress rule result: %s" % result)

View File

@ -25,6 +25,7 @@ from integration.lib.base import *
from integration.lib.common import *
from marvin.remoteSSHClient import remoteSSHClient
class Services:
"""Test Snapshots Services
"""
@ -96,7 +97,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode" : 'advanced', # Networking mode: Advanced, Basic
"mode": 'advanced', # Networking mode: Advanced, Basic
}
@ -165,7 +166,7 @@ class TestCreateVMsnapshotTemplate(cloudstackTestCase):
def test_01_createVM_snapshotTemplate(self):
"""Test create VM, Snapshot and Template
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Deploy VM using default template, small service offering
# and small data disk offering.
@ -473,7 +474,7 @@ class TestAccountSnapshotClean(cloudstackTestCase):
def test_02_accountSnapshotClean(self):
"""Test snapshot cleanup after account deletion
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. listAccounts API should list out the newly created account
# 2. listVirtualMachines() command should return the deployed VM.
@ -804,7 +805,7 @@ class TestSnapshotDetachedDisk(cloudstackTestCase):
def test_03_snapshot_detachedDisk(self):
"""Test snapshot from detached disk
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. login in VM and write some data on data disk(use fdisk to
# partition datadisk,fdisk /dev/sdb, and make filesystem using
@ -1076,7 +1077,7 @@ class TestSnapshotLimit(cloudstackTestCase):
def test_04_snapshot_limit(self):
"""Test snapshot limit in snapshot policies
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Perform hourly recurring snapshot on the root disk of VM and keep
# the maxsnapshots as 1
@ -1328,7 +1329,7 @@ class TestSnapshotEvents(cloudstackTestCase):
def test_05_snapshot_events(self):
"""Test snapshot events
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Perform snapshot on the root disk of this VM and check the events/alerts.
# 2. delete the snapshots and check the events/alerts

View File

@ -73,13 +73,13 @@ class Services:
"templates": {
# Configs for different Template formats
# For Eg. raw image, zip etc
0:{
0: {
"displaytext": "Public Template",
"name": "Public template",
"ostypeid": '5776c0d2-f331-42db-ba3a-29f1f8319bc9',
"url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2",
"hypervisor": 'XenServer',
"format" : 'VHD',
"format": 'VHD',
"isfeatured": True,
"ispublic": True,
"isextractable": True,
@ -162,7 +162,7 @@ class TestCreateTemplate(cloudstackTestCase):
def test_01_create_template(self):
"""Test create public & private template
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following:
# 1. Upload a templates in raw img format. Create a Vm instances from
# raw img template.
@ -331,7 +331,7 @@ class TestTemplates(cloudstackTestCase):
raise Exception("List volumes failed.")
time.sleep(5)
timeout = timeout -1
timeout = timeout - 1
cls.volume = list_volume[0]
@ -378,7 +378,7 @@ class TestTemplates(cloudstackTestCase):
def test_01_create_template_volume(self):
"""Test Create template from volume
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following:
# 1. Deploy new VM using the template created from Volume
@ -417,7 +417,7 @@ class TestTemplates(cloudstackTestCase):
def test_02_copy_template(self):
"""Test for copy template from one zone to another"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. copy template should be successful and
@ -476,7 +476,7 @@ class TestTemplates(cloudstackTestCase):
def test_03_delete_template(self):
"""Test Delete template
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following:
# 1. Create a template and verify it is shown in list templates response
@ -531,7 +531,7 @@ class TestTemplates(cloudstackTestCase):
def test_04_template_from_snapshot(self):
"""Create Template from snapshot
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 2. Snapshot the Root disk

View File

@ -26,6 +26,7 @@ from integration.lib.common import *
from marvin.remoteSSHClient import remoteSSHClient
import datetime
class Services:
"""Test Snapshots Services
"""
@ -103,7 +104,7 @@ class Services:
# Cent OS 5.3 (64 bit)
"sleep": 60,
"timeout": 10,
"mode":'advanced'
"mode": 'advanced'
}
@ -1318,7 +1319,11 @@ class TestNatRuleUsage(cloudstackTestCase):
def test_01_nat_usage(self):
"""Test Create/Delete a PF rule and verify correct usage is recorded
"""
<<<<<<< HEAD
=======
tags = ["advanced", "advancedns"]
>>>>>>> 6d17e21... This commit has following fixes:
# Validate the following
# 1. Acquire a IP for this account
# 2. Create a PF rule on the IP associated with this account.

View File

@ -143,7 +143,7 @@ class TestAttachVolume(cloudstackTestCase):
def test_01_volume_attach(self):
"""Test Attach volumes (max capacity)
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Deploy a vm and create 5 data disk
# 2. Attach all the created Volume to the vm.
@ -295,7 +295,7 @@ class TestAttachVolume(cloudstackTestCase):
def test_02_volume_attach_max(self):
"""Test attach volumes (more than max) to an instance
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Attach one more data volume to VM (Already 5 attached)
@ -426,7 +426,7 @@ class TestAttachDetachVolume(cloudstackTestCase):
def test_01_volume_attach_detach(self):
"""Test Volume attach/detach to VM (5 data volumes)
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Deploy a vm and create 5 data disk
@ -674,7 +674,7 @@ class TestAttachVolumeISO(cloudstackTestCase):
def test_01_volume_iso_attach(self):
"""Test Volumes and ISO attach
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Create and attach 5 data volumes to VM
@ -870,7 +870,7 @@ class TestVolumes(cloudstackTestCase):
def test_01_attach_volume(self):
"""Attach a created Volume to a Running VM
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Create a data volume.
# 2. List Volumes should not have vmname and virtualmachineid fields in
@ -954,7 +954,7 @@ class TestVolumes(cloudstackTestCase):
def test_02_detach_volume(self):
"""Detach a Volume attached to a VM
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. Data disk should be detached from instance
@ -1002,7 +1002,7 @@ class TestVolumes(cloudstackTestCase):
def test_03_delete_detached_volume(self):
"""Delete a Volume unattached to an VM
"""
tags = ["advanced","advancedns"]
tags = ["advanced", "advancedns"]
# Validate the following
# 1. volume should be deleted successfully and listVolume should not
# contain the deleted volume details.