git commit: updated refs/heads/4.2 to d50e6a5
Updated Branches: refs/heads/4.2 7e74851cc -> d50e6a5b3 CLOUDSTACK-702: Added tests for alias ip verifications on VR 1. Moved vm deployment code to setup and vm deletion code teadDown methods 2. Added two tests which would verify alias removal after last vm expunge in CIDR and alias status after VR reboot CLOUDSTACK-702: Test for verifying ip alias after VR stop start 1.Deploy vm in new cidr which will create ip alias on existing VR Stop,start VR and verify ip alias Conflicts: test/integration/component/maint/test_multiple_ip_ranges.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d50e6a5b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d50e6a5b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d50e6a5b Branch: refs/heads/4.2 Commit: d50e6a5b3ec63d1ff6dd4030ec2325c2bdb13307 Parents: 7e74851 Author: sanjeevneelarapu Authored: Mon Oct 21 20:21:11 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 25 14:26:23 2013 +0530 -- .../component/maint/test_multiple_ip_ranges.py | 557 --- 1 file changed, 353 insertions(+), 204 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d50e6a5b/test/integration/component/maint/test_multiple_ip_ranges.py -- diff --git a/test/integration/component/maint/test_multiple_ip_ranges.py b/test/integration/component/maint/test_multiple_ip_ranges.py index 3f0035e..dc8021b 100644 --- a/test/integration/component/maint/test_multiple_ip_ranges.py +++ b/test/integration/component/maint/test_multiple_ip_ranges.py @@ -22,9 +22,8 @@ from marvin.cloudstackException import cloudstackAPIException from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * -#from netaddr import * +# from netaddr import * import netaddr - from nose.plugins.attrib import attr class Services: @@ -45,8 +44,8 @@ class Services: "name": "Tiny Instance", "displaytext": "Tiny Instance", "cpunumber": 1, -"cpuspeed": 200,# in MHz -"memory": 256, # In MBs +"cpuspeed": 200, # in MHz +"memory": 256, # In MBs }, "disk_offering": { "displaytext": "Small Disk", @@ -129,7 +128,7 @@ class TestMultipleIpRanges(cloudstackTestCase): cls.id_list = [] for i in range(len(cls.ids)): cls.id_list.append(cls.ids[i][0]) -#Check if VR is already present in the setup +# Check if VR is already present in the setup vr_list = Router.list(cls.api_client, listall='true') cls.debug("vr list {}".format(vr_list)) if isinstance(vr_list, list) and len(vr_list) > 0: @@ -143,22 +142,26 @@ class TestMultipleIpRanges(cloudstackTestCase): cls.dbclient.execute( "update user_ip_address set allocated=now() where id = '%s';" % str(id) ) -#Add IP range in the new CIDR +# Add IP range in the new CIDR cls.services["vlan_ip_range"]["zoneid"] = cls.zone.id cls.services["vlan_ip_range"]["podid"] = cls.pod.id -#create new vlan ip range -cls.new_vlan = PublicIpRange.create(cls.api_client, cls.services["vlan_ip_range"]) -#Deploy vm in existing subnet if VR is not present +# create new vlan ip range +# Before creating ip range check the zone's network type +if cls.zone.networktype == 'Basic': +cls.new_vlan = PublicIpRange.create(cls.api_client, cls.services["vlan_ip_range"]) +else: +raise unittest.SkipTest("These tests can be run only on basic zone. So skipping the tests") +# Deploy vm in existing subnet if VR is not present if cls.vr_state is False : cls.vm_res = VirtualMachine.create( cls.api_client, cls.services["server_without_disk"], -templateid = cls.template.id, -
git commit: updated refs/heads/master to 2103068
Updated Branches: refs/heads/master a77435dab -> 210306881 CLOUDSTACK-702: Added tests for alias ip verifications on VR 1. Moved vm deployment code to setup and vm deletion code teadDown methods 2. Added two tests which would verify alias removal after last vm expunge in CIDR and alias status after VR reboot CLOUDSTACK-702: Test for verifying ip alias after VR stop start 1.Deploy vm in new cidr which will create ip alias on existing VR Stop,start VR and verify ip alias Conflicts: test/integration/component/maint/test_multiple_ip_ranges.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/21030688 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/21030688 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/21030688 Branch: refs/heads/master Commit: 2103068816d024cf090797168bfd309b031e3e1c Parents: a77435d Author: sanjeevneelarapu Authored: Mon Oct 21 20:21:11 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 25 14:29:19 2013 +0530 -- .../component/maint/test_multiple_ip_ranges.py | 557 --- 1 file changed, 353 insertions(+), 204 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/21030688/test/integration/component/maint/test_multiple_ip_ranges.py -- diff --git a/test/integration/component/maint/test_multiple_ip_ranges.py b/test/integration/component/maint/test_multiple_ip_ranges.py index 3f0035e..dc8021b 100644 --- a/test/integration/component/maint/test_multiple_ip_ranges.py +++ b/test/integration/component/maint/test_multiple_ip_ranges.py @@ -22,9 +22,8 @@ from marvin.cloudstackException import cloudstackAPIException from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * -#from netaddr import * +# from netaddr import * import netaddr - from nose.plugins.attrib import attr class Services: @@ -45,8 +44,8 @@ class Services: "name": "Tiny Instance", "displaytext": "Tiny Instance", "cpunumber": 1, -"cpuspeed": 200,# in MHz -"memory": 256, # In MBs +"cpuspeed": 200, # in MHz +"memory": 256, # In MBs }, "disk_offering": { "displaytext": "Small Disk", @@ -129,7 +128,7 @@ class TestMultipleIpRanges(cloudstackTestCase): cls.id_list = [] for i in range(len(cls.ids)): cls.id_list.append(cls.ids[i][0]) -#Check if VR is already present in the setup +# Check if VR is already present in the setup vr_list = Router.list(cls.api_client, listall='true') cls.debug("vr list {}".format(vr_list)) if isinstance(vr_list, list) and len(vr_list) > 0: @@ -143,22 +142,26 @@ class TestMultipleIpRanges(cloudstackTestCase): cls.dbclient.execute( "update user_ip_address set allocated=now() where id = '%s';" % str(id) ) -#Add IP range in the new CIDR +# Add IP range in the new CIDR cls.services["vlan_ip_range"]["zoneid"] = cls.zone.id cls.services["vlan_ip_range"]["podid"] = cls.pod.id -#create new vlan ip range -cls.new_vlan = PublicIpRange.create(cls.api_client, cls.services["vlan_ip_range"]) -#Deploy vm in existing subnet if VR is not present +# create new vlan ip range +# Before creating ip range check the zone's network type +if cls.zone.networktype == 'Basic': +cls.new_vlan = PublicIpRange.create(cls.api_client, cls.services["vlan_ip_range"]) +else: +raise unittest.SkipTest("These tests can be run only on basic zone. So skipping the tests") +# Deploy vm in existing subnet if VR is not present if cls.vr_state is False : cls.vm_res = VirtualMachine.create( cls.api_client, cls.services["server_without_disk"], -templateid = cls.template.id, -
git commit: updated refs/heads/4.2 to 3958095
Updated Branches: refs/heads/4.2 d50e6a5b3 -> 395809567 CLOUDSTACK-4691: Deleted host maintenance tests from this file Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/39580956 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/39580956 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/39580956 Branch: refs/heads/4.2 Commit: 3958095676874e652517270f683cf8c4ba852f41 Parents: d50e6a5 Author: SrikanteswaraRao Talluri Authored: Fri Oct 25 14:44:37 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 25 14:44:37 2013 +0530 -- test/integration/component/test_egress_rules.py | 207 --- 1 file changed, 207 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/39580956/test/integration/component/test_egress_rules.py -- diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py index 05b4544..f8e8e79 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -2149,211 +2149,4 @@ class TestInvalidParametersForEgress(cloudstackTestCase): return -class TestEgressAfterHostMaintenance(cloudstackTestCase): -def setUp(self): - -self.apiclient = self.testClient.getApiClient() -self.dbclient = self.testClient.getDbConnection() -self.cleanup = [] -return - -def tearDown(self): -try: -#Clean up, terminate the created templates -cleanup_resources(self.apiclient, self.cleanup) - -except Exception as e: -raise Exception("Warning: Exception during cleanup : %s" % e) -return - -@classmethod -def setUpClass(cls): -cls.services = Services().services -cls.api_client = super( - TestEgressAfterHostMaintenance, - cls - ).getClsTestClient().getApiClient() - -# Get Zone, Domain and templates -cls.domain = get_domain(cls.api_client, cls.services) -cls.zone = get_zone(cls.api_client, cls.services) -cls.services['mode'] = cls.zone.networktype -cls.pod = get_pod( - cls.api_client, - zoneid=cls.zone.id - ) - -template = get_template( -cls.api_client, -cls.zone.id, -cls.services["ostype"] -) -cls.services["domainid"] = cls.domain.id -cls.services["virtual_machine"]["zoneid"] = cls.zone.id -cls.services["virtual_machine"]["template"] = template.id - -cls.service_offering = ServiceOffering.create( -cls.api_client, -cls.services["service_offering"] -) -cls.account = Account.create( -cls.api_client, -cls.services["account"], -domainid=cls.domain.id -) -cls.services["account"] = cls.account.name -cls._cleanup = [ -cls.account, -cls.service_offering -] -return - -@classmethod -def tearDownClass(cls): -try: -#Cleanup resources used -cleanup_resources(cls.api_client, cls._cleanup) - -except Exception as e: -raise Exception("Warning: Exception during cleanup : %s" % e) - -return - -@attr(speed = "slow") -@attr(tags = ["sg", "eip", "maintenance"]) -def test_egress_after_host_maintenance(self): -"""Test maintenance case for egress -""" - -# Validate the following: -# 1. createaccount of type user -# 2. createsecuritygroup (ssh) for this account -# 3. authorizeSecurityGroupIngress to allow ssh access to the VM -# 4. authorizeSecurityGroupEgress to allow ssh access only out to -#CIDR: 0.0.0.0/0 -# 5. deployVirtualMachine into this security group (ssh) -# 6. deployed VM should be Running, ssh should be allowed into the VM -# 7. Enable maintenance mode for host, cance maintenance mode -# 8. User should be able to SSH into VM after maintainace - -security_group = SecurityGroup.create( -
git commit: updated refs/heads/master to da7d2fe
Updated Branches: refs/heads/master 210306881 -> da7d2fe4f CLOUDSTACK-4691: Deleted host maintenance tests from this file Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/da7d2fe4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/da7d2fe4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/da7d2fe4 Branch: refs/heads/master Commit: da7d2fe4f3676be7d159a1235a2434ef1f8b Parents: 2103068 Author: SrikanteswaraRao Talluri Authored: Fri Oct 25 14:44:37 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 25 14:47:11 2013 +0530 -- test/integration/component/test_egress_rules.py | 207 --- 1 file changed, 207 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/da7d2fe4/test/integration/component/test_egress_rules.py -- diff --git a/test/integration/component/test_egress_rules.py b/test/integration/component/test_egress_rules.py index 05b4544..f8e8e79 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -2149,211 +2149,4 @@ class TestInvalidParametersForEgress(cloudstackTestCase): return -class TestEgressAfterHostMaintenance(cloudstackTestCase): -def setUp(self): - -self.apiclient = self.testClient.getApiClient() -self.dbclient = self.testClient.getDbConnection() -self.cleanup = [] -return - -def tearDown(self): -try: -#Clean up, terminate the created templates -cleanup_resources(self.apiclient, self.cleanup) - -except Exception as e: -raise Exception("Warning: Exception during cleanup : %s" % e) -return - -@classmethod -def setUpClass(cls): -cls.services = Services().services -cls.api_client = super( - TestEgressAfterHostMaintenance, - cls - ).getClsTestClient().getApiClient() - -# Get Zone, Domain and templates -cls.domain = get_domain(cls.api_client, cls.services) -cls.zone = get_zone(cls.api_client, cls.services) -cls.services['mode'] = cls.zone.networktype -cls.pod = get_pod( - cls.api_client, - zoneid=cls.zone.id - ) - -template = get_template( -cls.api_client, -cls.zone.id, -cls.services["ostype"] -) -cls.services["domainid"] = cls.domain.id -cls.services["virtual_machine"]["zoneid"] = cls.zone.id -cls.services["virtual_machine"]["template"] = template.id - -cls.service_offering = ServiceOffering.create( -cls.api_client, -cls.services["service_offering"] -) -cls.account = Account.create( -cls.api_client, -cls.services["account"], -domainid=cls.domain.id -) -cls.services["account"] = cls.account.name -cls._cleanup = [ -cls.account, -cls.service_offering -] -return - -@classmethod -def tearDownClass(cls): -try: -#Cleanup resources used -cleanup_resources(cls.api_client, cls._cleanup) - -except Exception as e: -raise Exception("Warning: Exception during cleanup : %s" % e) - -return - -@attr(speed = "slow") -@attr(tags = ["sg", "eip", "maintenance"]) -def test_egress_after_host_maintenance(self): -"""Test maintenance case for egress -""" - -# Validate the following: -# 1. createaccount of type user -# 2. createsecuritygroup (ssh) for this account -# 3. authorizeSecurityGroupIngress to allow ssh access to the VM -# 4. authorizeSecurityGroupEgress to allow ssh access only out to -#CIDR: 0.0.0.0/0 -# 5. deployVirtualMachine into this security group (ssh) -# 6. deployed VM should be Running, ssh should be allowed into the VM -# 7. Enable maintenance mode for host, cance maintenance mode -# 8. User should be able to SSH into VM after maintainace - -security_group = Security
git commit: updated refs/heads/4.2 to c6ce74f
Updated Branches: refs/heads/4.2 e5c0de6a2 -> c6ce74fe6 CLOUDSTACK: 2238 - Automation - Adding non contiguous VLAN ranges feature test cases Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c6ce74fe Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c6ce74fe Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c6ce74fe Branch: refs/heads/4.2 Commit: c6ce74fe61ae463a964215ab892c6cb399909801 Parents: e5c0de6 Author: Gaurav Aradhye Authored: Tue Sep 24 02:30:22 2013 -0400 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 29 23:41:05 2013 +0530 -- .../component/test_non_contiguous_vlan.py | 446 +++ 1 file changed, 446 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c6ce74fe/test/integration/component/test_non_contiguous_vlan.py -- diff --git a/test/integration/component/test_non_contiguous_vlan.py b/test/integration/component/test_non_contiguous_vlan.py new file mode 100644 index 000..5ef1ec7 --- /dev/null +++ b/test/integration/component/test_non_contiguous_vlan.py @@ -0,0 +1,446 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + +""" P1 tests for Non contiguous VLAN ranges + +Test Plan: https://cwiki.apache.org/confluence/download/attachments/30760993/Non-Contiguous_VLAN_Ranges_TestPlan.xlsx + +Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-2238 + +Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Support+non-contiguous+VLAN+ranges +""" + +#Import local modules +from marvin.cloudstackTestCase import * +from marvin.cloudstackAPI import * +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.integration.lib.base import Account +from marvin.integration.lib.base import PhysicalNetwork +from marvin.integration.lib.common import * +from nose.plugins.attrib import attr + +class Services(): +def __init__(self): +self.services = { + +"vlan": { + "partial_range": ["",""], + "full_range": "", +}, +"account": { + "email": "t...@test.com", + "firstname": "Test", + "lastname": "User", + "username": "test", + # Random characters are appended in create account to + # ensure unique username generated each time + "password": "password", +}, +"virtual_machine": { + "displayname": "testserver", + "username": "root", # VM creds for SSH + "password": "password", + "ssh_port": 22, + "hypervisor": 'XenServer', + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', +}, +"service_offering": { + "name": "Tiny Instance", + "displaytext": "Tiny Instance", + "cpunumber": 1, + "cpuspeed": 100,# in MHz +
[1/2] git commit: updated refs/heads/master to 8a6694b
Updated Branches: refs/heads/master 9c57e137a -> 8a6694b39 Adding missing test cases: Snapshots Improvement Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1972d612 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1972d612 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1972d612 Branch: refs/heads/master Commit: 1972d6121db6bbc21e5db35ab9787f98ed10527e Parents: 9c57e13 Author: Gaurav Aradhye Authored: Wed Sep 18 00:33:03 2013 -0400 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 29 23:42:38 2013 +0530 -- .../component/test_snapshots_improvement.py | 693 +++ tools/marvin/marvin/asyncJobMgr.py | 4 +- 2 files changed, 695 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1972d612/test/integration/component/test_snapshots_improvement.py -- diff --git a/test/integration/component/test_snapshots_improvement.py b/test/integration/component/test_snapshots_improvement.py new file mode 100644 index 000..190db55 --- /dev/null +++ b/test/integration/component/test_snapshots_improvement.py @@ -0,0 +1,693 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + +""" P1 tests for Snapshots Improvements +""" +# Import Local Modules +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.integration.lib.utils import (random_gen) +from marvin.integration.lib.base import ( +Account, +ServiceOffering, +VirtualMachine, +Snapshot, +Template, +Volume, +DiskOffering +) +from marvin.integration.lib.common import (get_domain, +get_zone, +get_template, +cleanup_resources, +list_snapshots +) +from marvin.cloudstackAPI import (createSnapshot, + createVolume, + createTemplate, + listOsTypes, + stopVirtualMachine + ) +from marvin.integration.lib.utils import is_snapshot_on_nfs + + +class Services: +def __init__(self): +self.services = { +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 200,# in MHz +"memory": 256,# In MBs +}, + "service_offering2": { +"name": "Med Instance", +"displaytext": "Med Instance", +"cpunumber": 1, +"cpuspeed": 1000,# In MHz +"memory": 1024,# In MBs +}, +"disk_offering": { +"displaytext": "Small Disk", +"name": "Small Disk", +"disksize": 1, +
[2/2] git commit: updated refs/heads/master to 8a6694b
CLOUDSTACK: 2238 - Automation - Adding non contiguous VLAN ranges feature test cases Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8a6694b3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8a6694b3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8a6694b3 Branch: refs/heads/master Commit: 8a6694b396500897a3d5ce3f292864f2c5c2530f Parents: 1972d61 Author: Gaurav Aradhye Authored: Tue Sep 24 02:30:22 2013 -0400 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 29 23:44:06 2013 +0530 -- .../component/test_non_contiguous_vlan.py | 446 +++ 1 file changed, 446 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a6694b3/test/integration/component/test_non_contiguous_vlan.py -- diff --git a/test/integration/component/test_non_contiguous_vlan.py b/test/integration/component/test_non_contiguous_vlan.py new file mode 100644 index 000..5ef1ec7 --- /dev/null +++ b/test/integration/component/test_non_contiguous_vlan.py @@ -0,0 +1,446 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + +""" P1 tests for Non contiguous VLAN ranges + +Test Plan: https://cwiki.apache.org/confluence/download/attachments/30760993/Non-Contiguous_VLAN_Ranges_TestPlan.xlsx + +Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-2238 + +Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Support+non-contiguous+VLAN+ranges +""" + +#Import local modules +from marvin.cloudstackTestCase import * +from marvin.cloudstackAPI import * +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.integration.lib.base import Account +from marvin.integration.lib.base import PhysicalNetwork +from marvin.integration.lib.common import * +from nose.plugins.attrib import attr + +class Services(): +def __init__(self): +self.services = { + +"vlan": { + "partial_range": ["",""], + "full_range": "", +}, +"account": { + "email": "t...@test.com", + "firstname": "Test", + "lastname": "User", + "username": "test", + # Random characters are appended in create account to + # ensure unique username generated each time + "password": "password", +}, +"virtual_machine": { + "displayname": "testserver", + "username": "root", # VM creds for SSH + "password": "password", + "ssh_port": 22, + "hypervisor": 'XenServer', + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', +}, +"service_offering": { + "name": "Tiny Instance", + "displaytext": "Tiny Instance", + "cpunumber": 1, + "cpuspeed": 100,# in MHz + "memory": 128, # In MBs +
git commit: updated refs/heads/4.2 to e94ec6b
Updated Branches: refs/heads/4.2 c6ce74fe6 -> e94ec6b20 CLOUDSTACK-4772: modify the script to get_process_status for vmware deployment Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e94ec6b2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e94ec6b2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e94ec6b2 Branch: refs/heads/4.2 Commit: e94ec6b202e56fd7f9aa4e56146cc6d13b50db73 Parents: c6ce74f Author: SrikanteswaraRao Talluri Authored: Wed Oct 30 01:40:33 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 30 01:44:12 2013 +0530 -- test/integration/component/test_routers.py | 54 - test/integration/smoke/test_routers.py | 15 +++ 2 files changed, 42 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e94ec6b2/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index 396c54e..8706a1e 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -1110,7 +1110,7 @@ class TestRouterStopCreateFW(cloudstackTestCase): self.cleanup = [] return -@attr(tags = ["advanced", "advancedns"]) +@attr(tags = ["advanced", "advancedns","test"]) def test_01_RouterStopCreateFW(self): """Test router stop create Firewall rule """ @@ -1249,25 +1249,39 @@ class TestRouterStopCreateFW(cloudstackTestCase): "Check for list hosts response return valid data" ) host = hosts[0] +host.user, host.passwd = get_host_credentials(self.config, host.ipaddress) + # For DNS and DHCP check 'dnsmasq' process status -try: -host.user, host.passwd = get_host_credentials(self.config, host.ipaddress) -result = get_process_status( -host.ipaddress, -22, -host.user, -host.passwd, -router.linklocalip, -'iptables -t nat -L' -) -self.debug("iptables -t nat -L: %s" % result) -self.debug("Public IP: %s" % public_ip.ipaddress) -res = str(result) -self.assertEqual( -res.count(str(public_ip.ipaddress)), -1, -"Check public IP address" +if self.apiclient.hypervisor.lower() == 'vmware': + result = get_process_status( + self.apiclient.connection.mgtSvr, + 22, + self.apiclient.connection.user, + self.apiclient.connection.passwd, + router.linklocalip, + 'iptables -t nat -L', +hypervisor=self.apiclient.hypervisor + ) +else: +try: +result = get_process_status( +host.ipaddress, +22, +host.user, +host.passwd, +router.linklocalip, +'iptables -t nat -L' +) +except KeyError: +self.skipTest("Provide a marvin config file with host credentials to run %s" % self._testMethodName) + +self.debug("iptables -t nat -L: %s" % result) +self.debug("Public IP: %s" % public_ip.ipaddress) +res = str(result) +self.assertEqual( +res.count(str(public_ip.ipaddress)), +1, +"Check public IP address" ) -except KeyError: -self.skipTest("Provide a marvin config file with host credentials to run %s" % self._testMethodName) + return http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e94ec6b2/test/integration/smoke/test_routers.py -- diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index 0268666..0f32e27 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -201,16 +201,17 @@ class TestRouterServices(cloudstackTestCase): router.linklocalip,
git commit: updated refs/heads/master to 3223fcf
Updated Branches: refs/heads/master f1683d0ad -> 3223fcf67 CLOUDSTACK-4772: modify the script to get_process_status for vmware deployment Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3223fcf6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3223fcf6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3223fcf6 Branch: refs/heads/master Commit: 3223fcf672d0bf4cadc6cdfa1b92dbe04cad11f1 Parents: f1683d0 Author: SrikanteswaraRao Talluri Authored: Wed Oct 30 01:40:33 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 30 01:46:26 2013 +0530 -- test/integration/component/test_routers.py | 54 - test/integration/smoke/test_routers.py | 15 +++ 2 files changed, 42 insertions(+), 27 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3223fcf6/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index 396c54e..8706a1e 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -1110,7 +1110,7 @@ class TestRouterStopCreateFW(cloudstackTestCase): self.cleanup = [] return -@attr(tags = ["advanced", "advancedns"]) +@attr(tags = ["advanced", "advancedns","test"]) def test_01_RouterStopCreateFW(self): """Test router stop create Firewall rule """ @@ -1249,25 +1249,39 @@ class TestRouterStopCreateFW(cloudstackTestCase): "Check for list hosts response return valid data" ) host = hosts[0] +host.user, host.passwd = get_host_credentials(self.config, host.ipaddress) + # For DNS and DHCP check 'dnsmasq' process status -try: -host.user, host.passwd = get_host_credentials(self.config, host.ipaddress) -result = get_process_status( -host.ipaddress, -22, -host.user, -host.passwd, -router.linklocalip, -'iptables -t nat -L' -) -self.debug("iptables -t nat -L: %s" % result) -self.debug("Public IP: %s" % public_ip.ipaddress) -res = str(result) -self.assertEqual( -res.count(str(public_ip.ipaddress)), -1, -"Check public IP address" +if self.apiclient.hypervisor.lower() == 'vmware': + result = get_process_status( + self.apiclient.connection.mgtSvr, + 22, + self.apiclient.connection.user, + self.apiclient.connection.passwd, + router.linklocalip, + 'iptables -t nat -L', +hypervisor=self.apiclient.hypervisor + ) +else: +try: +result = get_process_status( +host.ipaddress, +22, +host.user, +host.passwd, +router.linklocalip, +'iptables -t nat -L' +) +except KeyError: +self.skipTest("Provide a marvin config file with host credentials to run %s" % self._testMethodName) + +self.debug("iptables -t nat -L: %s" % result) +self.debug("Public IP: %s" % public_ip.ipaddress) +res = str(result) +self.assertEqual( +res.count(str(public_ip.ipaddress)), +1, +"Check public IP address" ) -except KeyError: -self.skipTest("Provide a marvin config file with host credentials to run %s" % self._testMethodName) + return http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3223fcf6/test/integration/smoke/test_routers.py -- diff --git a/test/integration/smoke/test_routers.py b/test/integration/smoke/test_routers.py index 0268666..0f32e27 100644 --- a/test/integration/smoke/test_routers.py +++ b/test/integration/smoke/test_routers.py @@ -201,16 +201,17 @@ class TestRouterServices(cloudstackTestCase): router.linklocalip,
git commit: updated refs/heads/4.2 to b80242c
Updated Branches: refs/heads/4.2 6032a113a -> b80242c2d CLOUDSTACK-4772: remove test tag for the test test_01_RouterStopCreateFW Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b80242c2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b80242c2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b80242c2 Branch: refs/heads/4.2 Commit: b80242c2dcb7a81bd90218a3e8fb161b780c9f92 Parents: 6032a11 Author: SrikanteswaraRao Talluri Authored: Wed Oct 30 12:31:14 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 30 12:31:14 2013 +0530 -- test/integration/component/test_routers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b80242c2/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index 8706a1e..b41cc6f 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -1110,7 +1110,7 @@ class TestRouterStopCreateFW(cloudstackTestCase): self.cleanup = [] return -@attr(tags = ["advanced", "advancedns","test"]) +@attr(tags = ["advanced", "advancedns"]) def test_01_RouterStopCreateFW(self): """Test router stop create Firewall rule """
git commit: updated refs/heads/master to b13cc0d
Updated Branches: refs/heads/master 088ba84e8 -> b13cc0d02 CLOUDSTACK-4772: remove test tag for the test test_01_RouterStopCreateFW Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b13cc0d0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b13cc0d0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b13cc0d0 Branch: refs/heads/master Commit: b13cc0d027a869f1e8eb36df290ddaec1f8a8bb7 Parents: 088ba84 Author: SrikanteswaraRao Talluri Authored: Wed Oct 30 12:31:14 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 30 12:33:48 2013 +0530 -- test/integration/component/test_routers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b13cc0d0/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index 8706a1e..b41cc6f 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -1110,7 +1110,7 @@ class TestRouterStopCreateFW(cloudstackTestCase): self.cleanup = [] return -@attr(tags = ["advanced", "advancedns","test"]) +@attr(tags = ["advanced", "advancedns"]) def test_01_RouterStopCreateFW(self): """Test router stop create Firewall rule """
git commit: updated refs/heads/4.2 to 9bf3047
Updated Branches: refs/heads/4.2 d6420cd91 -> 9bf30479f CLOUDSTACK-2272: testscript validates the vmdeployment with userdata Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9bf30479 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9bf30479 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9bf30479 Branch: refs/heads/4.2 Commit: 9bf30479fc088a8d0dc8dafebbf9de5824287f81 Parents: d6420cd Author: suresh Authored: Sat Oct 12 13:28:55 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Nov 4 16:58:55 2013 +0530 -- .../component/test_deploy_vm_userdata_reg.py| 220 +++ 1 file changed, 220 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9bf30479/test/integration/component/test_deploy_vm_userdata_reg.py -- diff --git a/test/integration/component/test_deploy_vm_userdata_reg.py b/test/integration/component/test_deploy_vm_userdata_reg.py new file mode 100755 index 000..ca9179d --- /dev/null +++ b/test/integration/component/test_deploy_vm_userdata_reg.py @@ -0,0 +1,220 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + + +# this script will cover VMdeployment with Userdata tests + +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.integration.lib.base import * +from marvin.integration.lib.utils import * +from marvin.integration.lib.common import * +from nose.plugins.attrib import attr +from marvin import remoteSSHClient +import unittest +import random +import string + +_multiprocess_shared_ = True +import os + +class Services: +def __init__(self): +self.services = { +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +"password": "password", +}, +"virtual_machine": { +"displayname": "TesVM1", +"username": "root", +"password": "password", +"ssh_port": 22, +"hypervisor": 'XenServer', +"privateport": 22, +"publicport": 22, +"protocol": 'TCP', +}, +"ostype": 'CentOS 5.3 (64-bit)', +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100, +"memory": 256, +}, +} + + + + + +class TestDeployVmWithUserData(cloudstackTestCase): +"""Tests for UserData +""" + +@classmethod +def setUpClass(cls): +cls.apiClient = super(TestDeployVmWithUserData, cls).getClsTestClient().getApiClient() +cls.services = Services().services +cls.zone = get_zone(cls.apiClient, cls.services) +if cls.zone.localstorageenabled: +#For devcloud since localstroage is enabled +cls.services["service_offering"]["storagetype"] = "local" +cls.service_offering = ServiceOffering.create( +cls.apiClient, +cls.services["service_offering"] +) +cls.account = Account.create(cls.apiClient, services=cls.services["account"]) +cls.cleanup = [cls.account] +cls.template = get_template( +cls.apiClient, +cls.zone.id, +cls.services["ostype"] +) +# Generate userdata of 2500 bytes. This is larger th
git commit: updated refs/heads/master to f25354d
Updated Branches: refs/heads/master 269a4ef11 -> f25354dca CLOUDSTACK-2272: testscript validates the vmdeployment with userdata Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f25354dc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f25354dc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f25354dc Branch: refs/heads/master Commit: f25354dca11faa1450b677fa2eb1065a1da8aefd Parents: 269a4ef Author: suresh Authored: Sat Oct 12 13:28:55 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Nov 4 17:02:01 2013 +0530 -- .../component/test_deploy_vm_userdata_reg.py| 220 +++ 1 file changed, 220 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f25354dc/test/integration/component/test_deploy_vm_userdata_reg.py -- diff --git a/test/integration/component/test_deploy_vm_userdata_reg.py b/test/integration/component/test_deploy_vm_userdata_reg.py new file mode 100755 index 000..ca9179d --- /dev/null +++ b/test/integration/component/test_deploy_vm_userdata_reg.py @@ -0,0 +1,220 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + + +# this script will cover VMdeployment with Userdata tests + +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.integration.lib.base import * +from marvin.integration.lib.utils import * +from marvin.integration.lib.common import * +from nose.plugins.attrib import attr +from marvin import remoteSSHClient +import unittest +import random +import string + +_multiprocess_shared_ = True +import os + +class Services: +def __init__(self): +self.services = { +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +"password": "password", +}, +"virtual_machine": { +"displayname": "TesVM1", +"username": "root", +"password": "password", +"ssh_port": 22, +"hypervisor": 'XenServer', +"privateport": 22, +"publicport": 22, +"protocol": 'TCP', +}, +"ostype": 'CentOS 5.3 (64-bit)', +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100, +"memory": 256, +}, +} + + + + + +class TestDeployVmWithUserData(cloudstackTestCase): +"""Tests for UserData +""" + +@classmethod +def setUpClass(cls): +cls.apiClient = super(TestDeployVmWithUserData, cls).getClsTestClient().getApiClient() +cls.services = Services().services +cls.zone = get_zone(cls.apiClient, cls.services) +if cls.zone.localstorageenabled: +#For devcloud since localstroage is enabled +cls.services["service_offering"]["storagetype"] = "local" +cls.service_offering = ServiceOffering.create( +cls.apiClient, +cls.services["service_offering"] +) +cls.account = Account.create(cls.apiClient, services=cls.services["account"]) +cls.cleanup = [cls.account] +cls.template = get_template( +cls.apiClient, +cls.zone.id, +cls.services["ostype"] +) +
[1/6] CLOUDSTACK-4934: Rename Limit resources tests so that they have unique names.
Updated Branches: refs/heads/master db3252645 -> 5d6d14bc1 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5d6d14bc/test/integration/component/test_mm_project_limits.py -- diff --git a/test/integration/component/test_mm_project_limits.py b/test/integration/component/test_mm_project_limits.py new file mode 100644 index 000..1c0ed92 --- /dev/null +++ b/test/integration/component/test_mm_project_limits.py @@ -0,0 +1,350 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. +""" P1 tests for memory resource limits +""" +# Import Local Modules +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.integration.lib.base import ( +Account, +ServiceOffering, +VirtualMachine, +Domain, +Project +) +from marvin.integration.lib.common import (get_domain, +get_zone, +get_template, +cleanup_resources, + wait_for_cleanup, +find_suitable_host, +get_resource_type +) + +class Services: +"""Test memory resource limit services +""" + +def __init__(self): +self.services = { +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "resource", +# Random characters are appended for unique +# username +"password": "password", + }, + "service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100,# in MHz +"memory": 5120,# In MBs +}, +"virtual_machine": { +"displayname": "TestVM", +"username": "root", +"password": "password", +"ssh_port": 22, +"hypervisor": 'KVM', +"privateport": 22, +"publicport": 22, +"protocol": 'TCP', +}, + "network": { +"name": "Test Network", +"displaytext": "Test Network", +"netmask": '255.255.255.0' +}, + "project": { +"name": "Project", +"displaytext": "Test project", +}, + "domain": { +"name": "Domain", +}, +"ostype": 'CentOS 5.3 (64-bit)', +"sleep": 60, +"timeout": 10, +"mode": 'advanced', +# Networking mode: Advanced, Basic +} + +class TestProjectsMemoryLimits(cloudstackTestCase): + +@classmethod +def setUpClass(cls): +cls.api_client = super(TestProjectsMemoryLimits, + cls).getClsTestClient().getApiClient() +cls.services = Services().services +# Get Zone, Domain and templates +cls.domain = get_domain(cls.api_client, cls.services) +cls.z
git commit: updated refs/heads/master to 089f43a
Updated Branches: refs/heads/master ea2eafcd8 -> 089f43a1e Added fix for bug 5056. The fix contains fixes related to ssh library majorly. Complete description should be available under bug description. Signed-off-by: Santhosh Edukulla Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/089f43a1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/089f43a1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/089f43a1 Branch: refs/heads/master Commit: 089f43a1ebe32bbd7e71b58f1af7076b3324e725 Parents: ea2eafc Author: Santhosh Edukulla Authored: Wed Nov 6 22:41:38 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 15:21:13 2013 +0530 -- tools/marvin/marvin/codes.py | 2 + tools/marvin/marvin/integration/lib/utils.py | 17 ++- tools/marvin/marvin/remoteSSHClient.py | 150 -- 3 files changed, 127 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/089f43a1/tools/marvin/marvin/codes.py -- diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py index b6580d0..f409c7c 100644 --- a/tools/marvin/marvin/codes.py +++ b/tools/marvin/marvin/codes.py @@ -40,3 +40,5 @@ EMPTY_LIST = "EMPTY_LIST" FAIL = 0 PASS = 1 MATCH_NOT_FOUND = "ELEMENT NOT FOUND IN THE INPUT" +SUCCESS = "SUCCESS" +EXCEPTION_OCCURRED = "Exception Occurred" http://git-wip-us.apache.org/repos/asf/cloudstack/blob/089f43a1/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index 4d048f0..f5d7c5b 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -113,8 +113,16 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=10, timeout=30, keyPairFileLocation=None): -"""Return ssh handle else wait till sshd is running""" +def is_server_ssh_ready(ipaddress, port, username, password, retries=10, retryinterv=30, timeout=3.0, keyPairFileLocation=None): +''' +@Name: is_server_ssh_ready +@Input: timeout: tcp connection timeout flag, +others information need to be added +@Output:object for remoteSSHClient +Name of the function is little misnomer and is not + verifying anything as such mentioned +''' + try: ssh = remoteSSHClient( host=ipaddress, @@ -123,9 +131,10 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=10, timeout passwd=password, keyPairFileLocation=keyPairFileLocation, retries=retries, -delay=timeout) +delay=retryinterv, +timeout=timeout) except Exception, e: -raise Exception("Failed to bring up ssh service in time. Waited %ss. Error is %s" % (retries * timeout, e)) +raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, e)) else: return ssh http://git-wip-us.apache.org/repos/asf/cloudstack/blob/089f43a1/tools/marvin/marvin/remoteSSHClient.py -- diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py index fea9b12..19df16e 100644 --- a/tools/marvin/marvin/remoteSSHClient.py +++ b/tools/marvin/marvin/remoteSSHClient.py @@ -20,57 +20,48 @@ import time import cloudstackException import contextlib import logging +from marvin.codes import ( +SUCCESS, FAIL, INVALID_INPUT, EXCEPTION_OCCURRED +) from contextlib import closing class remoteSSHClient(object): +''' +Added timeout flag for ssh connect calls.Default to 3.0 seconds +''' def __init__(self, host, port, user, passwd, retries=10, delay=30, - log_lvl=logging.INFO, keyPairFileLocation=None): -self.host = host -self.port = port + log_lvl=logging.INFO, keyPairFiles=None, timeout=3.0): +self.host = None +self.port = 22 self.user = user self.passwd = passwd -self.keyPairFile = keyPairFileLocation +self.keyPairFiles = keyPairFiles self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.logger = logging.getLogger('
git commit: updated refs/heads/master to 3342a82
Updated Branches: refs/heads/master 089f43a1e -> 3342a82f3 Increasing the timeout values to 600 seconds from 300 seconds Timeout for ssh related test cases is increased based upon few test run observations where ssh is taking more time during restart scenarios as an example. We have done few changes to streamline ssh library. This is in addition to those to keep less ssh script issues Signed-off-by: Santhosh Edukulla Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3342a82f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3342a82f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3342a82f Branch: refs/heads/master Commit: 3342a82f39900f2ee733cb5d684d54992d14a413 Parents: 089f43a Author: Santhosh Edukulla Authored: Thu Nov 7 21:18:22 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 15:26:44 2013 +0530 -- tools/marvin/marvin/integration/lib/utils.py | 2 +- tools/marvin/marvin/remoteSSHClient.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3342a82f/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index f5d7c5b..58a9bf9 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -113,7 +113,7 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=10, retryinterv=30, timeout=3.0, keyPairFileLocation=None): +def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None): ''' @Name: is_server_ssh_ready @Input: timeout: tcp connection timeout flag, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3342a82f/tools/marvin/marvin/remoteSSHClient.py -- diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py index 19df16e..c9720e3 100644 --- a/tools/marvin/marvin/remoteSSHClient.py +++ b/tools/marvin/marvin/remoteSSHClient.py @@ -30,8 +30,8 @@ class remoteSSHClient(object): ''' Added timeout flag for ssh connect calls.Default to 3.0 seconds ''' -def __init__(self, host, port, user, passwd, retries=10, delay=30, - log_lvl=logging.INFO, keyPairFiles=None, timeout=3.0): +def __init__(self, host, port, user, passwd, retries=20, delay=30, + log_lvl=logging.INFO, keyPairFiles=None, timeout=10.0): self.host = None self.port = 22 self.user = user
[04/29] CLOUSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention Signed-off-by: SrikanteswaraRao Talluri
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/deployAndRun.py -- diff --git a/tools/marvin/build/lib/marvin/deployAndRun.py b/tools/marvin/build/lib/marvin/deployAndRun.py new file mode 100644 index 000..8a758a1 --- /dev/null +++ b/tools/marvin/build/lib/marvin/deployAndRun.py @@ -0,0 +1,96 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + +import deployDataCenter +import TestCaseExecuteEngine +import sys +from argparse import ArgumentParser +if __name__ == "__main__": + +parser = ArgumentParser() + +parser.add_argument("-d", "--directory", dest="testCaseFolder", +help="the test case directory") +parser.add_argument("-f", "--file", dest="module", +help="run tests in the given file") +parser.add_argument("-r", "--result", dest="result", +help="test result log file", default='/tmp/t.log') +parser.add_argument("-t", "--client", dest="testcaselog", +help="test case log file", default='/tmp/r.log') +parser.add_argument("-c", "--config", action="store", +default="./datacenterCfg", dest="config", +help="the path where the json config file generated,\ + by default is ./datacenterCfg") +parser.add_argument("-l", "--load", dest="load", action="store_true", +help="only load config, do not deploy,\ + it will only run testcase") +parser.add_argument("-n", "--num", dest="number", +help="how many times you want run the test case") + +options = parser.parse_args() + +testResultLogFile = None +if options.result is not None: +testResultLogFile = options.result + +testCaseLogFile = None +if options.testcaselog is not None: +testCaseLogFile = options.testcaselog +deploy = deployDataCenter.deployDataCenters(options.config) +if options.load: +deploy.loadCfg() +else: +deploy.deploy() +iterates = 1 +if options.number is not None: +if options.number == "loop": +iterates = sys.maxint +else: +try: +iterates = int(options.number) +except: +iterates = 1 + +if options.testCaseFolder is None: +if options.module is None: +parser.print_usage() +exit(1) +else: +n = 0 +while(n < iterates): +engine = \ +TestCaseExecuteEngine.TestCaseExecuteEngine( +deploy.testClient, +deploy.getCfg( +), +testCaseLogFile, +testResultLogFile) +engine.loadTestsFromFile(options.module) +engine.run() +n = n + 1 +else: +n = 0 +while(n < iterates): +engine = TestCaseExecuteEngine.TestCaseExecuteEngine( +deploy.testClient, +deploy.getCfg( +), +testCaseLogFile, +testResultLogFile) +engine.loadTestsFromDir(options.testCaseFolder) +engine.run() +n = n + 1 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/deployDataCenter.py -- diff --git a/tools/marvin/build/lib/marvin/deployDataCenter.py b/tools/marvin/build/lib/marvin/deployDataCenter.py new file mode 100644 index 000..beed8c8 --- /dev/null +++ b/tools/marvin/build/lib/marvin/deployDataCenter.py @@ -0,0 +1,625 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/
[01/29] CLOUSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention Signed-off-by: SrikanteswaraRao Talluri
Updated Branches: refs/heads/master 3342a82f3 -> ec00a6fb7 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/settings.py -- diff --git a/tools/marvin/build/lib/marvin/settings.py b/tools/marvin/build/lib/marvin/settings.py new file mode 100644 index 000..a31e182 --- /dev/null +++ b/tools/marvin/build/lib/marvin/settings.py @@ -0,0 +1,28 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + +# Settings for the XML test runner + +# Use this setting to choose between a verbose and a non-verbose output. +TEST_OUTPUT_VERBOSE = 2. + +# If your test methods contains docstrings, you can display such docstrings +# instead of display the test name (ex: module.TestCase.test_method). +# In order to use this feature, you have to enable verbose output by setting +# TEST_OUTPUT_VERBOSE = 2. + +TEST_OUTPUT_DESCRIPTIONS = True http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ec00a6fb/tools/marvin/build/lib/marvin/testSetupSuccess.py -- diff --git a/tools/marvin/build/lib/marvin/testSetupSuccess.py b/tools/marvin/build/lib/marvin/testSetupSuccess.py new file mode 100644 index 000..1701626 --- /dev/null +++ b/tools/marvin/build/lib/marvin/testSetupSuccess.py @@ -0,0 +1,98 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. + +import marvin +import unittest +from marvin.cloudstackTestCase import * +from marvin.cloudstackAPI import * +from time import sleep as delay + + +class TestSetupSuccess(cloudstackTestCase): +""" +Test to verify if the cloudstack is ready to launch tests upon +1. Verify that system VMs are up and running in all zones +2. Verify that built-in templates are Ready in all zones +""" +@classmethod +def setUpClass(cls): +testClient = super(TestSetupSuccess, cls).getClsTestClient() +cls.apiClient = testClient.getApiClient() + +zones = listZones.listZonesCmd() +cls.zones_list = cls.apiClient.listZones(zones) +cls.retry = 2 + +def test_systemVmReady(self): +""" +system VMs need to be ready and Running for each zone in cloudstack +""" +for z in self.zones_list: +retry = self.retry +while retry != 0: +self.debug("looking for system VMs in zone: %s, %s" % + (z.id, z.name)) +sysvms = listSystemVms.listSystemVmsCmd() +sysvms.zoneid = z.id +sysvms.state = 'Running' +sysvms_list = self.apiClient.listSystemVms(sysvms) +if sysvms_list is not None and len(sysvms_list) == 2: +assert len(sysvms_list) == 2 +self.debug("found %d system VMs running {%s}" % + (len(sysvms_list), sysvms_list)) +break +retry = retry - 1 +delay(60) # wait a minute for retry +self.assertNotEqual(retry, 0, +"system VMs not Running in zone %s" % +z.name) + +def test_templateBuiltInReady(self): +""" +built-in templates CentOS to be ready +""" +for z in self.zones_list: +retry = self.retry +while retry != 0: +self.debug("Looking for at least one ready builtin template
[01/29] Revert "CLOUSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention"
Updated Branches: refs/heads/master ec00a6fb7 -> 65b12f45b http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65b12f45/tools/marvin/build/lib/marvin/settings.py -- diff --git a/tools/marvin/build/lib/marvin/settings.py b/tools/marvin/build/lib/marvin/settings.py deleted file mode 100644 index a31e182..000 --- a/tools/marvin/build/lib/marvin/settings.py +++ /dev/null @@ -1,28 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "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. - -# Settings for the XML test runner - -# Use this setting to choose between a verbose and a non-verbose output. -TEST_OUTPUT_VERBOSE = 2. - -# If your test methods contains docstrings, you can display such docstrings -# instead of display the test name (ex: module.TestCase.test_method). -# In order to use this feature, you have to enable verbose output by setting -# TEST_OUTPUT_VERBOSE = 2. - -TEST_OUTPUT_DESCRIPTIONS = True http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65b12f45/tools/marvin/build/lib/marvin/testSetupSuccess.py -- diff --git a/tools/marvin/build/lib/marvin/testSetupSuccess.py b/tools/marvin/build/lib/marvin/testSetupSuccess.py deleted file mode 100644 index 1701626..000 --- a/tools/marvin/build/lib/marvin/testSetupSuccess.py +++ /dev/null @@ -1,98 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "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. - -import marvin -import unittest -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from time import sleep as delay - - -class TestSetupSuccess(cloudstackTestCase): -""" -Test to verify if the cloudstack is ready to launch tests upon -1. Verify that system VMs are up and running in all zones -2. Verify that built-in templates are Ready in all zones -""" -@classmethod -def setUpClass(cls): -testClient = super(TestSetupSuccess, cls).getClsTestClient() -cls.apiClient = testClient.getApiClient() - -zones = listZones.listZonesCmd() -cls.zones_list = cls.apiClient.listZones(zones) -cls.retry = 2 - -def test_systemVmReady(self): -""" -system VMs need to be ready and Running for each zone in cloudstack -""" -for z in self.zones_list: -retry = self.retry -while retry != 0: -self.debug("looking for system VMs in zone: %s, %s" % - (z.id, z.name)) -sysvms = listSystemVms.listSystemVmsCmd() -sysvms.zoneid = z.id -sysvms.state = 'Running' -sysvms_list = self.apiClient.listSystemVms(sysvms) -if sysvms_list is not None and len(sysvms_list) == 2: -assert len(sysvms_list) == 2 -self.debug("found %d system VMs running {%s}" % - (len(sysvms_list), sysvms_list)) -break -retry = retry - 1 -delay(60) # wait a minute for retry -self.assertNotEqual(retry, 0, -"system VMs not Running in zone %s" % -z.name) - -def test_templateBuiltInReady(self): -""" -built-in templates CentOS to be ready -""" -for z in self.zones_list: -retry = self.retry -while retry != 0: -self.debug("Looking for at least one ready builtin
[04/29] Revert "CLOUSTACK-5099: Utils.py-has-wrong-reference, cleaned it. As well added Uniform naming convention"
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65b12f45/tools/marvin/build/lib/marvin/deployAndRun.py -- diff --git a/tools/marvin/build/lib/marvin/deployAndRun.py b/tools/marvin/build/lib/marvin/deployAndRun.py deleted file mode 100644 index 8a758a1..000 --- a/tools/marvin/build/lib/marvin/deployAndRun.py +++ /dev/null @@ -1,96 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "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. - -import deployDataCenter -import TestCaseExecuteEngine -import sys -from argparse import ArgumentParser -if __name__ == "__main__": - -parser = ArgumentParser() - -parser.add_argument("-d", "--directory", dest="testCaseFolder", -help="the test case directory") -parser.add_argument("-f", "--file", dest="module", -help="run tests in the given file") -parser.add_argument("-r", "--result", dest="result", -help="test result log file", default='/tmp/t.log') -parser.add_argument("-t", "--client", dest="testcaselog", -help="test case log file", default='/tmp/r.log') -parser.add_argument("-c", "--config", action="store", -default="./datacenterCfg", dest="config", -help="the path where the json config file generated,\ - by default is ./datacenterCfg") -parser.add_argument("-l", "--load", dest="load", action="store_true", -help="only load config, do not deploy,\ - it will only run testcase") -parser.add_argument("-n", "--num", dest="number", -help="how many times you want run the test case") - -options = parser.parse_args() - -testResultLogFile = None -if options.result is not None: -testResultLogFile = options.result - -testCaseLogFile = None -if options.testcaselog is not None: -testCaseLogFile = options.testcaselog -deploy = deployDataCenter.deployDataCenters(options.config) -if options.load: -deploy.loadCfg() -else: -deploy.deploy() -iterates = 1 -if options.number is not None: -if options.number == "loop": -iterates = sys.maxint -else: -try: -iterates = int(options.number) -except: -iterates = 1 - -if options.testCaseFolder is None: -if options.module is None: -parser.print_usage() -exit(1) -else: -n = 0 -while(n < iterates): -engine = \ -TestCaseExecuteEngine.TestCaseExecuteEngine( -deploy.testClient, -deploy.getCfg( -), -testCaseLogFile, -testResultLogFile) -engine.loadTestsFromFile(options.module) -engine.run() -n = n + 1 -else: -n = 0 -while(n < iterates): -engine = TestCaseExecuteEngine.TestCaseExecuteEngine( -deploy.testClient, -deploy.getCfg( -), -testCaseLogFile, -testResultLogFile) -engine.loadTestsFromDir(options.testCaseFolder) -engine.run() -n = n + 1 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/65b12f45/tools/marvin/build/lib/marvin/deployDataCenter.py -- diff --git a/tools/marvin/build/lib/marvin/deployDataCenter.py b/tools/marvin/build/lib/marvin/deployDataCenter.py deleted file mode 100644 index beed8c8..000 --- a/tools/marvin/build/lib/marvin/deployDataCenter.py +++ /dev/null @@ -1,625 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apa
git commit: updated refs/heads/4.2 to cf7532e
Updated Branches: refs/heads/4.2 c76da5312 -> cf7532e84 Added fix for bug 5056. The fix contains fixes related to ssh library majorly. Complete description should be available under bug description. Signed-off-by: Santhosh Edukulla Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cf7532e8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cf7532e8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cf7532e8 Branch: refs/heads/4.2 Commit: cf7532e8480385bcc9c5dfd63fb82cd836282028 Parents: c76da53 Author: Santhosh Edukulla Authored: Wed Nov 6 22:41:38 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 16:42:13 2013 +0530 -- tools/marvin/marvin/codes.py | 2 + tools/marvin/marvin/integration/lib/utils.py | 17 ++- tools/marvin/marvin/remoteSSHClient.py | 150 -- 3 files changed, 127 insertions(+), 42 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf7532e8/tools/marvin/marvin/codes.py -- diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py index b6580d0..f409c7c 100644 --- a/tools/marvin/marvin/codes.py +++ b/tools/marvin/marvin/codes.py @@ -40,3 +40,5 @@ EMPTY_LIST = "EMPTY_LIST" FAIL = 0 PASS = 1 MATCH_NOT_FOUND = "ELEMENT NOT FOUND IN THE INPUT" +SUCCESS = "SUCCESS" +EXCEPTION_OCCURRED = "Exception Occurred" http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf7532e8/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index cf2dd3c..8863999 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -113,8 +113,16 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=10, timeout=30, keyPairFileLocation=None): -"""Return ssh handle else wait till sshd is running""" +def is_server_ssh_ready(ipaddress, port, username, password, retries=10, retryinterv=30, timeout=3.0, keyPairFileLocation=None): +''' +@Name: is_server_ssh_ready +@Input: timeout: tcp connection timeout flag, +others information need to be added +@Output:object for remoteSSHClient +Name of the function is little misnomer and is not + verifying anything as such mentioned +''' + try: ssh = remoteSSHClient( host=ipaddress, @@ -123,9 +131,10 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=10, timeout passwd=password, keyPairFileLocation=keyPairFileLocation, retries=retries, -delay=timeout) +delay=retryinterv, +timeout=timeout) except Exception, e: -raise Exception("Failed to bring up ssh service in time. Waited %ss. Error is %s" % (retries * timeout, e)) +raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, e)) else: return ssh http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf7532e8/tools/marvin/marvin/remoteSSHClient.py -- diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py index fea9b12..19df16e 100644 --- a/tools/marvin/marvin/remoteSSHClient.py +++ b/tools/marvin/marvin/remoteSSHClient.py @@ -20,57 +20,48 @@ import time import cloudstackException import contextlib import logging +from marvin.codes import ( +SUCCESS, FAIL, INVALID_INPUT, EXCEPTION_OCCURRED +) from contextlib import closing class remoteSSHClient(object): +''' +Added timeout flag for ssh connect calls.Default to 3.0 seconds +''' def __init__(self, host, port, user, passwd, retries=10, delay=30, - log_lvl=logging.INFO, keyPairFileLocation=None): -self.host = host -self.port = port + log_lvl=logging.INFO, keyPairFiles=None, timeout=3.0): +self.host = None +self.port = 22 self.user = user self.passwd = passwd -self.keyPairFile = keyPairFileLocation +self.keyPairFiles = keyPairFiles self.ssh = paramiko.SSHClient() self.ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) self.logger = logging.getLogger('
git commit: updated refs/heads/4.2 to 9495fbc
Updated Branches: refs/heads/4.2 cf7532e84 -> 9495fbc87 Increasing the timeout values to 600 seconds from 300 seconds Timeout for ssh related test cases is increased based upon few test run observations where ssh is taking more time during restart scenarios as an example. We have done few changes to streamline ssh library. This is in addition to those to keep less ssh script issues Signed-off-by: Santhosh Edukulla Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9495fbc8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9495fbc8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9495fbc8 Branch: refs/heads/4.2 Commit: 9495fbc87317cbcf8b77630d06e52d52dfc19060 Parents: cf7532e Author: Santhosh Edukulla Authored: Thu Nov 7 21:18:22 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 16:43:11 2013 +0530 -- tools/marvin/marvin/integration/lib/utils.py | 2 +- tools/marvin/marvin/remoteSSHClient.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9495fbc8/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index 8863999..3decd31 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -113,7 +113,7 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=10, retryinterv=30, timeout=3.0, keyPairFileLocation=None): +def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None): ''' @Name: is_server_ssh_ready @Input: timeout: tcp connection timeout flag, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9495fbc8/tools/marvin/marvin/remoteSSHClient.py -- diff --git a/tools/marvin/marvin/remoteSSHClient.py b/tools/marvin/marvin/remoteSSHClient.py index 19df16e..c9720e3 100644 --- a/tools/marvin/marvin/remoteSSHClient.py +++ b/tools/marvin/marvin/remoteSSHClient.py @@ -30,8 +30,8 @@ class remoteSSHClient(object): ''' Added timeout flag for ssh connect calls.Default to 3.0 seconds ''' -def __init__(self, host, port, user, passwd, retries=10, delay=30, - log_lvl=logging.INFO, keyPairFiles=None, timeout=3.0): +def __init__(self, host, port, user, passwd, retries=20, delay=30, + log_lvl=logging.INFO, keyPairFiles=None, timeout=10.0): self.host = None self.port = 22 self.user = user
git commit: updated refs/heads/4.2 to 9d00bfe
Updated Branches: refs/heads/4.2 3e8e44d58 -> 9d00bfeba fixed indentaion problem in utils.py :359 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9d00bfeb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9d00bfeb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9d00bfeb Branch: refs/heads/4.2 Commit: 9d00bfeba261a63c2b5362ad1d980cbb81f7c409 Parents: 3e8e44d Author: SrikanteswaraRao Talluri Authored: Fri Nov 8 18:00:55 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 18:00:55 2013 +0530 -- tools/marvin/marvin/integration/lib/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9d00bfeb/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index 9f5ea12..8841c26 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -330,7 +330,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid): return 'snapshot exists' in result def validateList(inp): -''' +""" @name: validateList @Description: 1. A utility function to validate whether the input passed is a list @@ -349,7 +349,7 @@ def validateList(inp): default to None. INVALID_INPUT EMPTY_LIST -''' +""" ret = [FAIL, None, None] if inp is None: ret[2] = INVALID_INPUT
git commit: updated refs/heads/master to 011b87e
Updated Branches: refs/heads/master d05891afa -> 011b87ead fixed indentaion problem in utils.py :359 Conflicts: tools/marvin/marvin/integration/lib/utils.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/011b87ea Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/011b87ea Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/011b87ea Branch: refs/heads/master Commit: 011b87eadcf3dd9694080a23ebe1eebd65676e79 Parents: d05891a Author: SrikanteswaraRao Talluri Authored: Fri Nov 8 18:00:55 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 18:05:05 2013 +0530 -- tools/marvin/marvin/integration/lib/utils.py | 31 +++ 1 file changed, 15 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/011b87ea/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index a106fc0..df3ca8a 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -329,11 +329,10 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid): (config.mgtSvr[0].mgtSvrIp, e)) return 'snapshot exists' in result - def validateList(inp): -''' -@name: validateList -@Description: 1. A utility function to validate +""" +@name: validateList +@Description: 1. A utility function to validate whether the input passed is a list 2. The list is empty or not 3. If it is list and not empty, return PASS and first element @@ -350,18 +349,18 @@ def validateList(inp): default to None. INVALID_INPUT EMPTY_LIST -''' -ret = [FAIL, None, None] -if inp is None: -ret[2] = INVALID_INPUT -return ret -if not isinstance(inp, list): -ret[2] = INVALID_INPUT -return ret -if len(inp) == 0: -ret[2] = EMPTY_LIST -return ret -return [PASS, inp[0], None] +""" +ret = [FAIL, None, None] +if inp is None: +ret[2] = INVALID_INPUT +return ret +if not isinstance(inp, list): +ret[2] = INVALID_INPUT +return ret +if len(inp) == 0: +ret[2] = EMPTY_LIST +return ret +return [PASS, inp[0], None] def verifyElementInList(inp, toverify, responsevar=None, pos=0): '''
git commit: updated refs/heads/master to 1e57f1c
Updated Branches: refs/heads/master a2117d46f -> 1e57f1cee Modified remoteSSHClient references to SshClient Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e57f1ce Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e57f1ce Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e57f1ce Branch: refs/heads/master Commit: 1e57f1cee7ef0d7ef2d50dbd5be4197ed1b738ad Parents: a2117d4 Author: SrikanteswaraRao Talluri Authored: Fri Nov 8 19:50:22 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 19:50:22 2013 +0530 -- tools/marvin/marvin/integration/lib/common.py| 4 ++-- tools/marvin/marvin/integration/lib/utils.py | 8 tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py | 4 ++-- .../marvin/sandbox/demo/simulator/testcase/libs/common.py| 4 ++-- .../marvin/sandbox/demo/simulator/testcase/libs/utils.py | 8 .../sandbox/demo/simulator/testcase/test_vm_life_cycle.py| 2 +- tools/marvin/marvin/sshClient.py | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e57f1ce/tools/marvin/marvin/integration/lib/common.py -- diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py index 1386eaf..6c2bb2a 100644 --- a/tools/marvin/marvin/integration/lib/common.py +++ b/tools/marvin/marvin/integration/lib/common.py @@ -19,7 +19,7 @@ #Import Local Modules from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from utils import * from base import * from marvin.codes import PASS @@ -217,7 +217,7 @@ def download_systemplates_sec_storage(server, services): try: # Login to management server -ssh = remoteSSHClient( +ssh = SshClient( server["ipaddress"], server["port"], server["username"], http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e57f1ce/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index df3ca8a..0fe3c26 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -29,7 +29,7 @@ import socket import urlparse import datetime from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from marvin.codes import * @@ -124,7 +124,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryin ''' try: -ssh = remoteSSHClient( +ssh = SshClient( host=ipaddress, port=port, user=username, @@ -190,7 +190,7 @@ def get_process_status(hostip, port, username, password, linklocalip, process, h """Double hop and returns a process status""" #SSH to the machine -ssh = remoteSSHClient(hostip, port, username, password) +ssh = SshClient(hostip, port, username, password) if str(hypervisor).lower() == 'vmware': ssh_command = "ssh -i /var/cloudstack/management/.ssh/id_rsa -ostricthostkeychecking=no " else: @@ -296,7 +296,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid): mgtSvr, user, passwd = config.mgtSvr[0].mgtSvrIp, config.mgtSvr[0].user, config.mgtSvr[0].passwd try: -ssh_client = remoteSSHClient( +ssh_client = SshClient( mgtSvr, 22, user, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e57f1ce/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py -- diff --git a/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py b/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py index 5438e40..3835186 100644 --- a/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py +++ b/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py @@ -20,7 +20,7 @@ import marvin from marvin.cloudstackTestCase import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient @UserName('demo', 'ROOT', '0') @@ -84,7 +84,7 @@ class TestSshDeployVm(cloudstackTestCase): # SSH login and compare hostname
git commit: updated refs/heads/4.2 to f893a80
Updated Branches: refs/heads/4.2 86976fb29 -> f893a80d1 Modified remoteSSHClient references to SshClient Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f893a80d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f893a80d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f893a80d Branch: refs/heads/4.2 Commit: f893a80d1d306046d600db2f01887c3be3dbfe0d Parents: 86976fb Author: SrikanteswaraRao Talluri Authored: Fri Nov 8 19:50:22 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 19:52:41 2013 +0530 -- tools/marvin/marvin/integration/lib/common.py| 4 ++-- tools/marvin/marvin/integration/lib/utils.py | 8 tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py | 4 ++-- .../marvin/sandbox/demo/simulator/testcase/libs/common.py| 4 ++-- .../marvin/sandbox/demo/simulator/testcase/libs/utils.py | 8 .../sandbox/demo/simulator/testcase/test_vm_life_cycle.py| 2 +- tools/marvin/marvin/sshClient.py | 2 +- 7 files changed, 16 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f893a80d/tools/marvin/marvin/integration/lib/common.py -- diff --git a/tools/marvin/marvin/integration/lib/common.py b/tools/marvin/marvin/integration/lib/common.py index 1386eaf..6c2bb2a 100644 --- a/tools/marvin/marvin/integration/lib/common.py +++ b/tools/marvin/marvin/integration/lib/common.py @@ -19,7 +19,7 @@ #Import Local Modules from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from utils import * from base import * from marvin.codes import PASS @@ -217,7 +217,7 @@ def download_systemplates_sec_storage(server, services): try: # Login to management server -ssh = remoteSSHClient( +ssh = SshClient( server["ipaddress"], server["port"], server["username"], http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f893a80d/tools/marvin/marvin/integration/lib/utils.py -- diff --git a/tools/marvin/marvin/integration/lib/utils.py b/tools/marvin/marvin/integration/lib/utils.py index 8841c26..4e7fe82 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -29,7 +29,7 @@ import socket import urlparse import datetime from marvin.cloudstackAPI import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient from marvin.codes import * @@ -124,7 +124,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryin ''' try: -ssh = remoteSSHClient( +ssh = SshClient( host=ipaddress, port=port, user=username, @@ -190,7 +190,7 @@ def get_process_status(hostip, port, username, password, linklocalip, process, h """Double hop and returns a process status""" #SSH to the machine -ssh = remoteSSHClient(hostip, port, username, password) +ssh = SshClient(hostip, port, username, password) if str(hypervisor).lower() == 'vmware': ssh_command = "ssh -i /var/cloudstack/management/.ssh/id_rsa -ostricthostkeychecking=no " else: @@ -296,7 +296,7 @@ def is_snapshot_on_nfs(apiclient, dbconn, config, zoneid, snapshotid): mgtSvr, user, passwd = config.mgtSvr[0].mgtSvrIp, config.mgtSvr[0].user, config.mgtSvr[0].passwd try: -ssh_client = remoteSSHClient( +ssh_client = SshClient( mgtSvr, 22, user, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f893a80d/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py -- diff --git a/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py b/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py index 5438e40..3835186 100644 --- a/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py +++ b/tools/marvin/marvin/sandbox/demo/live/testSshDeployVM.py @@ -20,7 +20,7 @@ import marvin from marvin.cloudstackTestCase import * -from marvin.remoteSSHClient import remoteSSHClient +from marvin.sshClient import SshClient @UserName('demo', 'ROOT', '0') @@ -84,7 +84,7 @@ class TestSshDeployVm(cloudstackTestCase): # SSH login and compare hostname
git commit: updated refs/heads/4.2 to 2526383
Updated Branches: refs/heads/4.2 20fd5dc84 -> 2526383b9 fixing indentation problem in test_network.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2526383b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2526383b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2526383b Branch: refs/heads/4.2 Commit: 2526383b9ecdbc108cbbc8b95365add7a24fda59 Parents: 20fd5dc Author: SrikanteswaraRao Talluri Authored: Fri Nov 8 23:38:12 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 23:38:12 2013 +0530 -- test/integration/smoke/test_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2526383b/test/integration/smoke/test_network.py -- diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 09d6437..6218f3b 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -460,7 +460,7 @@ class TestPortForwarding(cloudstackTestCase): "SSHing into VM with IP address %s after NAT rule deletion" % self.virtual_machine.ipaddress) - SshClient( +SshClient( src_nat_ip_addr.ipaddress, self.virtual_machine.ssh_port, self.virtual_machine.username,
git commit: updated refs/heads/master to 31b439e
Updated Branches: refs/heads/master fdb3b4922 -> 31b439eab fixing indentation problem in test_network.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/31b439ea Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/31b439ea Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/31b439ea Branch: refs/heads/master Commit: 31b439eab6b90a7c14126c8f17c366fe26429fc7 Parents: fdb3b49 Author: SrikanteswaraRao Talluri Authored: Fri Nov 8 23:38:12 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Nov 8 23:40:06 2013 +0530 -- test/integration/smoke/test_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31b439ea/test/integration/smoke/test_network.py -- diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 09d6437..6218f3b 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -460,7 +460,7 @@ class TestPortForwarding(cloudstackTestCase): "SSHing into VM with IP address %s after NAT rule deletion" % self.virtual_machine.ipaddress) - SshClient( +SshClient( src_nat_ip_addr.ipaddress, self.virtual_machine.ssh_port, self.virtual_machine.username,
git commit: updated refs/heads/master to ded8d65
Updated Branches: refs/heads/master fd2e8c9ac -> ded8d6592 fixed indentation error in test_network.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ded8d659 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ded8d659 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ded8d659 Branch: refs/heads/master Commit: ded8d6592b81ab24bfb8b668e7aa380c06bce55d Parents: fd2e8c9 Author: SrikanteswaraRao Talluri Authored: Sat Nov 9 11:53:41 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Sat Nov 9 11:54:50 2013 +0530 -- test/integration/smoke/test_network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ded8d659/test/integration/smoke/test_network.py -- diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 6218f3b..732fe15 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -578,7 +578,7 @@ class TestPortForwarding(cloudstackTestCase): "SSHing into VM with IP address %s after NAT rule deletion" % self.virtual_machine.ipaddress) - SshClient( +SshClient( ip_address.ipaddress.ipaddress, self.virtual_machine.ssh_port, self.virtual_machine.username, @@ -741,7 +741,7 @@ class TestRebootRouter(cloudstackTestCase): try: self.debug("SSH into VM (ID : %s ) after reboot" % self.vm_1.id) - SshClient( +SshClient( self.public_ip.ipaddress.ipaddress, self.services["natrule"]["publicport"], self.vm_1.username,
git commit: updated refs/heads/4.2 to 858783e
Updated Branches: refs/heads/4.2 88047a458 -> 858783e6e fixed indentation error in test_network.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/858783e6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/858783e6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/858783e6 Branch: refs/heads/4.2 Commit: 858783e6e5b2218c95c01b3e0374d3b447cc93d6 Parents: 88047a4 Author: SrikanteswaraRao Talluri Authored: Sat Nov 9 11:53:41 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Sat Nov 9 11:56:54 2013 +0530 -- test/integration/smoke/test_network.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/858783e6/test/integration/smoke/test_network.py -- diff --git a/test/integration/smoke/test_network.py b/test/integration/smoke/test_network.py index 6218f3b..732fe15 100644 --- a/test/integration/smoke/test_network.py +++ b/test/integration/smoke/test_network.py @@ -578,7 +578,7 @@ class TestPortForwarding(cloudstackTestCase): "SSHing into VM with IP address %s after NAT rule deletion" % self.virtual_machine.ipaddress) - SshClient( +SshClient( ip_address.ipaddress.ipaddress, self.virtual_machine.ssh_port, self.virtual_machine.username, @@ -741,7 +741,7 @@ class TestRebootRouter(cloudstackTestCase): try: self.debug("SSH into VM (ID : %s ) after reboot" % self.vm_1.id) - SshClient( +SshClient( self.public_ip.ipaddress.ipaddress, self.services["natrule"]["publicport"], self.vm_1.username,
git commit: updated refs/heads/4.2 to 3e3b1c8
Updated Branches: refs/heads/4.2 cff7e3933 -> 3e3b1c86e Fixed missing checkin while merging from master Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3e3b1c86 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3e3b1c86 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3e3b1c86 Branch: refs/heads/4.2 Commit: 3e3b1c86e1bd9c7f0385b49980141d0de0af18d2 Parents: cff7e39 Author: SrikanteswaraRao Talluri Authored: Mon Nov 11 15:47:56 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Nov 11 15:47:56 2013 +0530 -- tools/marvin/marvin/marvinPlugin.py | 11 +++ 1 file changed, 11 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3e3b1c86/tools/marvin/marvin/marvinPlugin.py -- diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index 2a749f0..48d5154 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -33,6 +33,17 @@ class MarvinPlugin(Plugin): name = "marvin" def configure(self, options, config): +"""enable the marvin plugin when the --with-marvin directive is given +to nose. The enableOpt value is set from the command line directive and +self.enabled (True|False) determines whether marvin's tests will run. +By default non-default plugins like marvin will be disabled +""" +if hasattr(options, self.enableOpt): +if not getattr(options, self.enableOpt): +self.enabled = False +return +else: +self.enabled = True self.logformat = logging.Formatter("%(asctime)s - %(levelname)s - " + "%(name)s - %(message)s")
git commit: updated refs/heads/4.2 to 8c78e63
Updated Branches: refs/heads/4.2 89f25c8e5 -> 8c78e639c CLOUDSTACK-5149: fixed cls._cleanup initialization issue Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8c78e639 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8c78e639 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8c78e639 Branch: refs/heads/4.2 Commit: 8c78e639c21441ff8a54391f5fa84be213195139 Parents: 89f25c8 Author: SrikanteswaraRao Talluri Authored: Tue Nov 12 19:20:14 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 12 19:21:03 2013 +0530 -- test/integration/component/test_assign_vm.py| 2 +- test/integration/component/test_netscaler_lb.py | 36 .../component/test_netscaler_lb_algo.py | 10 +++--- 3 files changed, 20 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c78e639/test/integration/component/test_assign_vm.py -- diff --git a/test/integration/component/test_assign_vm.py b/test/integration/component/test_assign_vm.py index 55c174b..cbdce73 100644 --- a/test/integration/component/test_assign_vm.py +++ b/test/integration/component/test_assign_vm.py @@ -150,7 +150,7 @@ class TestVMOwnership(cloudstackTestCase): cls.service_offering = ServiceOffering.create(cls.api_client, cls.services["service_offering"]) # Cleanup -cls._cleanup = [cls.service_offering] +cls._cleanup.append(cls.service_offering) # Create domain, account, user, project and volumes. cls.domain_account_user1 = create_domain_account_user() cls.domain_account_user2 = create_domain_account_user() http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8c78e639/test/integration/component/test_netscaler_lb.py -- diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py index 5a8d6a4..26df545 100644 --- a/test/integration/component/test_netscaler_lb.py +++ b/test/integration/component/test_netscaler_lb.py @@ -149,6 +149,7 @@ class TestLbSourceNat(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestLbSourceNat, cls @@ -164,9 +165,7 @@ class TestLbSourceNat(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -359,6 +358,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestLbOnIpWithPf, cls @@ -374,9 +374,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -573,6 +571,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestPfOnIpWithLb, cls @@ -588,9 +587,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -788,6 +785,7 @@ class TestLbOnNonSourceNat(cloudstackTestC
git commit: updated refs/heads/master to c2078cd
Updated Branches: refs/heads/master 5e14e1692 -> c2078cd60 CLOUDSTACK-5149: fixed cls._cleanup initialization issue Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2078cd6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2078cd6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2078cd6 Branch: refs/heads/master Commit: c2078cd60ced685edc4d5a6495299f3c30c974e1 Parents: 5e14e16 Author: SrikanteswaraRao Talluri Authored: Tue Nov 12 19:20:14 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 12 19:24:12 2013 +0530 -- test/integration/component/test_assign_vm.py| 2 +- test/integration/component/test_netscaler_lb.py | 36 .../component/test_netscaler_lb_algo.py | 10 +++--- 3 files changed, 20 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2078cd6/test/integration/component/test_assign_vm.py -- diff --git a/test/integration/component/test_assign_vm.py b/test/integration/component/test_assign_vm.py index 55c174b..cbdce73 100644 --- a/test/integration/component/test_assign_vm.py +++ b/test/integration/component/test_assign_vm.py @@ -150,7 +150,7 @@ class TestVMOwnership(cloudstackTestCase): cls.service_offering = ServiceOffering.create(cls.api_client, cls.services["service_offering"]) # Cleanup -cls._cleanup = [cls.service_offering] +cls._cleanup.append(cls.service_offering) # Create domain, account, user, project and volumes. cls.domain_account_user1 = create_domain_account_user() cls.domain_account_user2 = create_domain_account_user() http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2078cd6/test/integration/component/test_netscaler_lb.py -- diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py index 5a8d6a4..26df545 100644 --- a/test/integration/component/test_netscaler_lb.py +++ b/test/integration/component/test_netscaler_lb.py @@ -149,6 +149,7 @@ class TestLbSourceNat(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestLbSourceNat, cls @@ -164,9 +165,7 @@ class TestLbSourceNat(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -359,6 +358,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestLbOnIpWithPf, cls @@ -374,9 +374,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -573,6 +571,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestPfOnIpWithLb, cls @@ -588,9 +587,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -788,6 +785,7 @@ class TestLbOnNonSourceNat(cloudstackTestC
git commit: updated refs/heads/4.3 to 71993c1
Updated Branches: refs/heads/4.3 c9108376b -> 71993c10d CLOUDSTACK-5149: fixed cls._cleanup initialization issue Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/71993c10 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/71993c10 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/71993c10 Branch: refs/heads/4.3 Commit: 71993c10dd87692d7d518bcbf7b0456335d408ce Parents: c910837 Author: SrikanteswaraRao Talluri Authored: Tue Nov 12 19:20:14 2013 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 12 19:25:14 2013 +0530 -- test/integration/component/test_assign_vm.py| 2 +- test/integration/component/test_netscaler_lb.py | 36 .../component/test_netscaler_lb_algo.py | 10 +++--- 3 files changed, 20 insertions(+), 28 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/71993c10/test/integration/component/test_assign_vm.py -- diff --git a/test/integration/component/test_assign_vm.py b/test/integration/component/test_assign_vm.py index 55c174b..cbdce73 100644 --- a/test/integration/component/test_assign_vm.py +++ b/test/integration/component/test_assign_vm.py @@ -150,7 +150,7 @@ class TestVMOwnership(cloudstackTestCase): cls.service_offering = ServiceOffering.create(cls.api_client, cls.services["service_offering"]) # Cleanup -cls._cleanup = [cls.service_offering] +cls._cleanup.append(cls.service_offering) # Create domain, account, user, project and volumes. cls.domain_account_user1 = create_domain_account_user() cls.domain_account_user2 = create_domain_account_user() http://git-wip-us.apache.org/repos/asf/cloudstack/blob/71993c10/test/integration/component/test_netscaler_lb.py -- diff --git a/test/integration/component/test_netscaler_lb.py b/test/integration/component/test_netscaler_lb.py index 5a8d6a4..26df545 100644 --- a/test/integration/component/test_netscaler_lb.py +++ b/test/integration/component/test_netscaler_lb.py @@ -149,6 +149,7 @@ class TestLbSourceNat(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestLbSourceNat, cls @@ -164,9 +165,7 @@ class TestLbSourceNat(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -359,6 +358,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestLbOnIpWithPf, cls @@ -374,9 +374,7 @@ class TestLbOnIpWithPf(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -573,6 +571,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): @classmethod def setUpClass(cls): +cls._cleanup = [] cls.api_client = super( TestPfOnIpWithLb, cls @@ -588,9 +587,7 @@ class TestPfOnIpWithLb(cloudstackTestCase): ) try: cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler"]) - cls._cleanup = [ -cls.netscaler -] + cls._cleanup.append(cls.netscaler) cls.network_offering = NetworkOffering.create( cls.api_client, cls.services["network_offering"], @@ -788,6 +785,7 @@ class TestLbOnNonSourceNat(cloudstackTestC
git commit: updated refs/heads/master to 81d5dd9
Repository: cloudstack Updated Branches: refs/heads/master b4f03a133 -> 81d5dd9bc CLOUDSTACK-7519: Using bound/unbound methods instead of directly calling API methods from test case Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/81d5dd9b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/81d5dd9b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/81d5dd9b Branch: refs/heads/master Commit: 81d5dd9bcda185ff83820f8dd6233cf80f8efaed Parents: b4f03a1 Author: Gaurav Aradhye Authored: Tue Sep 9 17:29:49 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Sep 10 14:37:54 2014 +0530 -- test/integration/smoke/test_templates.py | 74 ++- tools/marvin/marvin/lib/base.py | 4 +- 2 files changed, 30 insertions(+), 48 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/81d5dd9b/test/integration/smoke/test_templates.py -- diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index b7fe49d..db938d9 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templates.py @@ -19,19 +19,14 @@ #Import Local Modules from marvin.codes import FAILED from marvin.cloudstackTestCase import cloudstackTestCase, unittest -from marvin.cloudstackAPI import (updateTemplate, - extractTemplate, - listZones, - updateTemplatePermissions, - deleteTemplate, - copyTemplate) from marvin.lib.utils import random_gen, cleanup_resources from marvin.lib.base import (Account, ServiceOffering, VirtualMachine, DiskOffering, Template, - Volume) + Volume, + Zone) from marvin.lib.common import (get_domain, get_zone, get_template) @@ -62,7 +57,6 @@ class TestCreateTemplate(cloudstackTestCase): @classmethod def setUpClass(cls): - testClient = super(TestCreateTemplate, cls).getClsTestClient() cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() @@ -220,8 +214,7 @@ class TestTemplates(cloudstackTestCase): cls.zone = get_zone(cls.apiclient, cls.testClient.getZoneForTests()) cls.services['mode'] = cls.zone.networktype #populate second zone id for iso copy -cmd = listZones.listZonesCmd() -cls.zones = cls.apiclient.listZones(cmd) +cls.zones = Zone.list(cls.apiclient) if not isinstance(cls.zones, list): raise Exception("Failed to find zones.") @@ -350,21 +343,17 @@ class TestTemplates(cloudstackTestCase): new_displayText = random_gen() new_name = random_gen() -cmd = updateTemplate.updateTemplateCmd() -# Update template attributes -cmd.id = self.template_1.id -cmd.displaytext = new_displayText -cmd.name = new_name -cmd.bootable = self.services["bootable"] -cmd.passwordenabled = self.services["passwordenabled"] - -self.apiclient.updateTemplate(cmd) +self.template_1.update(self.apiclient, + displaytext = new_displayText, + name = new_name, + bootable = self.services["bootable"], + passwordenabled = self.services["passwordenabled"]) self.debug("Edited template with new name: %s" % new_name) - + # Sleep to ensure update reflected across all the calls time.sleep(self.services["sleep"]) - + timeout = self.services["timeout"] while True: # Verify template response for updated attributes @@ -383,7 +372,7 @@ class TestTemplates(cloudstackTestCase): time.sleep(10) timeout = timeout -1 - + self.assertEqual( isinstance(list_template_response, list), True, @@ -395,7 +384,7 @@ class TestTemplates(cloudstackTestCase): "Check template available in List Templates" ) template_response = list_template_response[0] - +
git commit: updated refs/heads/master to 3411fba
Repository: cloudstack Updated Branches: refs/heads/master 8929d7451 -> 3411fbacc CLOUDSTACK-7351: Passing hypervisor type while deploying VM using ISO Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3411fbac Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3411fbac Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3411fbac Branch: refs/heads/master Commit: 3411fbaccafbce8f99af4714a26f38a2c17d8a9e Parents: 8929d74 Author: Gaurav Aradhye Authored: Wed Sep 10 16:38:19 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Sep 10 18:17:51 2014 +0530 -- test/integration/component/test_stopped_vm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3411fbac/test/integration/component/test_stopped_vm.py -- diff --git a/test/integration/component/test_stopped_vm.py b/test/integration/component/test_stopped_vm.py index 65b9767..1a928cc 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -770,6 +770,7 @@ class TestDeployHaEnabledVM(cloudstackTestCase): self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() +self.hypervisor = self.testClient.getHypervisorInfo() self.services = Services().services self.services["virtual_machine"]["zoneid"] = self.zone.id self.services["virtual_machine"]["template"] = self.template.id @@ -851,7 +852,8 @@ class TestDeployHaEnabledVM(cloudstackTestCase): templateid=self.iso.id, serviceofferingid=self.service_offering.id, diskofferingid=self.disk_offering.id, -startvm=True +startvm=True, +hypervisor=self.hypervisor ) response = self.virtual_machine.getState(self.apiclient, VirtualMachine.RUNNING)
git commit: updated refs/heads/master to 3a3e5cb
Repository: cloudstack Updated Branches: refs/heads/master 86bf33bfa -> 3a3e5cbbb CLOUDSTACK-7134: Fixed test cases for basic zone, services dict was getting overwritten which passed zone type as advanced even in basic zone setup Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3a3e5cbb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3a3e5cbb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3a3e5cbb Branch: refs/heads/master Commit: 3a3e5c405854c0d77d37846e524815afe6cf Parents: 86bf33b Author: Gaurav Aradhye Authored: Wed Sep 10 16:29:22 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Sep 15 14:58:15 2014 +0530 -- test/integration/component/test_reset_ssh_keypair.py | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a3e5cbb/test/integration/component/test_reset_ssh_keypair.py -- diff --git a/test/integration/component/test_reset_ssh_keypair.py b/test/integration/component/test_reset_ssh_keypair.py index 204690e..20321ac 100644 --- a/test/integration/component/test_reset_ssh_keypair.py +++ b/test/integration/component/test_reset_ssh_keypair.py @@ -93,7 +93,7 @@ class Services: "SSHPasswordEnabledTemplate": "SSHKeyPassword", "sleep": 60, "timeout": 20, -"mode": 'advanced', +"mode": '', } def wait_vm_start(apiclient, vmid, timeout, sleep): @@ -232,7 +232,6 @@ class TestResetSSHKeypair(cloudstackTestCase): def setUp(self): self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() -self.services = Services().services self.keypair = SSHKeyPair.create( self.apiclient, @@ -1047,7 +1046,6 @@ class TestResetSSHKeyUserRights(cloudstackTestCase): def setUp(self): self.apiclient = self.testClient.getApiClient() self.dbclient = self.testClient.getDbConnection() -self.services = Services().services # Set Zones and disk offerings self.services["virtual_machine"]["zoneid"] = self.zone.id @@ -1090,8 +1088,6 @@ class TestResetSSHKeyUserRights(cloudstackTestCase): self.cleanup.append(self.user_account) self.debug("Account created: %s" % self.user_account.name) -self.services = Services().services - # Spawn an instance virtual_machine = VirtualMachine.create( self.apiclient,
git commit: updated refs/heads/master to 46c1c1c
Repository: cloudstack Updated Branches: refs/heads/master 4796cceb3 -> 46c1c1c94 CLOUDSTACK-7391: Passing virtualmachineid while retrieving suitable hosts for migration Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/46c1c1c9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/46c1c1c9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/46c1c1c9 Branch: refs/heads/master Commit: 46c1c1c94969554b3c4c3867fefb64adbff45291 Parents: 4796cce Author: Gaurav Aradhye Authored: Thu Sep 11 15:53:11 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Sep 15 16:41:40 2014 +0530 -- .../maint/test_host_high_availability.py| 33 1 file changed, 20 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/46c1c1c9/test/integration/component/maint/test_host_high_availability.py -- diff --git a/test/integration/component/maint/test_host_high_availability.py b/test/integration/component/maint/test_host_high_availability.py index 4cd7fd8..ecc23f7 100644 --- a/test/integration/component/maint/test_host_high_availability.py +++ b/test/integration/component/maint/test_host_high_availability.py @@ -336,14 +336,16 @@ class TestHostHighAvailability(cloudstackTestCase): """ Verify you can not migrate VMs to hosts with an ha.tag (positive) """ # Steps, -#1. Create a Compute service offering with the 'Offer HA' option selected. -#2. Create a Guest VM with the compute service offering created above. -#3. Select the VM and migrate VM to another host. Choose a 'Suitable' host (i.e. host2) +# 1. Create a Compute service offering with the 'Offer HA' option selected. +# 2. Create a Guest VM with the compute service offering created above. +# 3. Select the VM and migrate VM to another host. Choose a 'Suitable' host (i.e. host2) # Validations -#The option from the 'Migrate instance to another host' dialog box' should list host3 as 'Not Suitable' for migration. -#Confirm that the VM is migrated to the 'Suitable' host you selected (i.e. host2) +# The option from the 'Migrate instance to another host' dialog box' should list host3 as 'Not Suitable' for migration. +# Confirm that the VM is migrated to the 'Suitable' host you selected +# (i.e. host2) -#create and verify the virtual machine with HA enabled service offering +# create and verify the virtual machine with HA enabled service +# offering virtual_machine_with_ha = VirtualMachine.create( self.apiclient, self.services["virtual_machine"], @@ -374,9 +376,10 @@ class TestHostHighAvailability(cloudstackTestCase): self.debug("Deployed VM on host: %s" % vm.hostid) -#Find out a Suitable host for VM migration +# Find out a Suitable host for VM migration list_hosts_response = list_hosts( self.apiclient, +virtualmachineid = vm.id ) self.assertEqual( isinstance(list_hosts_response, list), @@ -391,21 +394,25 @@ class TestHostHighAvailability(cloudstackTestCase): ) suitableHost = None for host in list_hosts_response: -if host.suitableformigration == True and host.hostid != vm.hostid: +if host.suitableformigration and host.hostid != vm.hostid: suitableHost = host break -self.assertTrue(suitableHost is not None, "suitablehost should not be None") +self.assertTrue( +suitableHost is not None, +"suitablehost should not be None") -#Migration of the VM to a suitable host -self.debug("Migrating VM-ID: %s to Host: %s" % (self.vm.id, suitableHost.id)) +# Migration of the VM to a suitable host +self.debug( +"Migrating VM-ID: %s to Host: %s" % +(vm.id, suitableHost.id)) cmd = migrateVirtualMachine.migrateVirtualMachineCmd() cmd.hostid = suitableHost.id -cmd.virtualmachineid = self.vm.id +cmd.virtualmachineid = vm.id self.apiclient.migrateVirtualMachine(cmd) -#Verify that the VM migrated to a targeted Suitable host +# Verify that the VM migrated to a targeted Suitable host list_vm_response = list_virtual_machines( self.apiclient, id=vm.id
git commit: updated refs/heads/master to 593ba55
Repository: cloudstack Updated Branches: refs/heads/master 46c1c1c94 -> 593ba5538 CLOUDSTACK-7135: test_baremetal.py - Tagging test case as invalid Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/593ba553 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/593ba553 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/593ba553 Branch: refs/heads/master Commit: 593ba5538a1248f799b267bc3a92cf6a6522f884 Parents: 46c1c1c Author: Gaurav Aradhye Authored: Fri Sep 12 11:45:22 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Sep 15 16:53:50 2014 +0530 -- test/integration/component/test_baremetal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/593ba553/test/integration/component/test_baremetal.py -- diff --git a/test/integration/component/test_baremetal.py b/test/integration/component/test_baremetal.py index 6ab9146..a27e76c 100644 --- a/test/integration/component/test_baremetal.py +++ b/test/integration/component/test_baremetal.py @@ -80,7 +80,7 @@ class TestBaremetal(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) return -@attr(tags = ["baremetal", "basic"]) +@attr(tags = ["baremetal", "invalid"]) def test_baremetal(self): self.debug("Test create baremetal network offering") networkoffering = NetworkOffering.create(self.apiclient, self.services["network_offering"])
git commit: updated refs/heads/master to f5ff789
Repository: cloudstack Updated Branches: refs/heads/master 15a3bb318 -> f5ff78947 CLOUDSTACK-7441: Fixed template registration issue in test_resource_limits.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f5ff7894 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f5ff7894 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f5ff7894 Branch: refs/heads/master Commit: f5ff78947e81b6929ba1223abd84906793d38ece Parents: 15a3bb3 Author: Gaurav Aradhye Authored: Thu Sep 11 14:55:40 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Sep 16 11:22:18 2014 +0530 -- test/integration/component/test_resource_limits.py | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5ff7894/test/integration/component/test_resource_limits.py -- diff --git a/test/integration/component/test_resource_limits.py b/test/integration/component/test_resource_limits.py index 35128b4..f7fecb0 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1270,6 +1270,10 @@ class TestResourceLimitsDomain(cloudstackTestCase): #appropriate error and an alert should be generated. try: +userapiclient = self.testClient.getUserApiClient( + UserName=self.account.name, + DomainName=self.account.domain) + # Set usage_vm=1 for Account 1 update_resource_limit( self.apiclient, @@ -1286,7 +1290,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): max=2 ) virtual_machine_1 = VirtualMachine.create( -self.apiclient, +userapiclient, self.services["server"], templateid=self.template.id, accountid=self.account.name, @@ -1300,10 +1304,10 @@ class TestResourceLimitsDomain(cloudstackTestCase): 'Running', "Check VM state is Running or not" ) -virtual_machine_1.stop(self.apiclient) +virtual_machine_1.stop(userapiclient) # Get the Root disk of VM volumes = list_volumes( -self.apiclient, +userapiclient, virtualmachineid=virtual_machine_1.id, type='ROOT', listall=True @@ -1318,7 +1322,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): self.debug("Creating template from volume: %s" % volume.id) # Create a template from the ROOTDISK template_1 = Template.create( -self.apiclient, +userapiclient, self.services["template"], volumeid=volume.id, account=self.account.name, @@ -1335,7 +1339,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): self.debug("Creating template from volume: %s" % volume.id) # Create a template from the ROOTDISK template_2 = Template.create( -self.apiclient, +userapiclient, self.services["template"], volumeid=volume.id, account=self.account.name, @@ -1355,7 +1359,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): # Exception should be raised for second template with self.assertRaises(Exception): Template.create( -self.apiclient, +userapiclient, self.services["template"], volumeid=volume.id, account=self.account.name,
git commit: updated refs/heads/master to 13357cf
Repository: cloudstack Updated Branches: refs/heads/master f5ff78947 -> 13357cff7 CLOUDSTACK-7516: Fixed resource permission issue in test_snapshots.py, account was using template registered with other account Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/13357cff Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/13357cff Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/13357cff Branch: refs/heads/master Commit: 13357cff7d15d439f1393b18558776831260a1bd Parents: f5ff789 Author: Gaurav Aradhye Authored: Tue Sep 9 12:16:47 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Sep 16 11:30:33 2014 +0530 -- test/integration/component/test_snapshots.py | 37 ++- 1 file changed, 23 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/13357cff/test/integration/component/test_snapshots.py -- diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py index 8a5c7ff..0811eb1 100644 --- a/test/integration/component/test_snapshots.py +++ b/test/integration/component/test_snapshots.py @@ -18,7 +18,7 @@ """ #Import Local Modules from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.cloudstackTestCase import cloudstackTestCase from marvin.lib.base import (Snapshot, Template, @@ -734,6 +734,10 @@ class TestSnapshots(cloudstackTestCase): #5. Login to newly created virtual machine #6. Compare data in the root disk with the one that was written on the volume, it should match +userapiclient = self.testClient.getUserApiClient( +UserName=self.account.name, +DomainName=self.account.domain) + random_data_0 = random_gen(size=100) random_data_1 = random_gen(size=100) @@ -788,7 +792,7 @@ class TestSnapshots(cloudstackTestCase): ssh_client.execute(c) volumes = list_volumes( -self.apiclient, +userapiclient, virtualmachineid=self.virtual_machine.id, type='ROOT', listall=True @@ -803,7 +807,7 @@ class TestSnapshots(cloudstackTestCase): #Create a snapshot of volume snapshot = Snapshot.create( - self.apiclient, + userapiclient, volume.id, account=self.account.name, domainid=self.account.domainid @@ -812,7 +816,7 @@ class TestSnapshots(cloudstackTestCase): self.debug("Snapshot created from volume ID: %s" % volume.id) # Generate template from the snapshot template = Template.create_from_snapshot( -self.apiclient, +userapiclient, snapshot, self.services["templates"] ) @@ -821,7 +825,7 @@ class TestSnapshots(cloudstackTestCase): # Verify created template templates = list_templates( -self.apiclient, +userapiclient, templatefilter=\ self.services["templates"]["templatefilter"], id=template.id @@ -841,7 +845,7 @@ class TestSnapshots(cloudstackTestCase): # Deploy new virtual machine using template new_virtual_machine = VirtualMachine.create( -self.apiclient, +userapiclient, self.services["server_without_disk"], templateid=template.id, accountid=self.account.name, @@ -995,8 +999,13 @@ class TestCreateVMSnapshotTemplate(cloudstackTestCase): #State of this VM should be Running. #Create Virtual Machine + +userapiclient = self.testClient.getUserApiClient( +UserName=self.account.name, +DomainName=self.account.domain) + self.virtual_machine = VirtualMachine.create( -
git commit: updated refs/heads/master to 1b14fa6
Repository: cloudstack Updated Branches: refs/heads/master 13357cff7 -> 1b14fa6ab CLOUDSTACK-7387: Corrected code related to adding host tags Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1b14fa6a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1b14fa6a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1b14fa6a Branch: refs/heads/master Commit: 1b14fa6abef5811079eeb7cbd26ab718f6f69405 Parents: 13357cf Author: Gaurav Aradhye Authored: Mon Sep 15 14:03:49 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Sep 16 11:33:13 2014 +0530 -- .../maint/test_vpc_host_maintenance.py | 43 1 file changed, 35 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1b14fa6a/test/integration/component/maint/test_vpc_host_maintenance.py -- diff --git a/test/integration/component/maint/test_vpc_host_maintenance.py b/test/integration/component/maint/test_vpc_host_maintenance.py index 83ba271..73adee7 100644 --- a/test/integration/component/maint/test_vpc_host_maintenance.py +++ b/test/integration/component/maint/test_vpc_host_maintenance.py @@ -18,13 +18,24 @@ """ Component tests VM life cycle in VPC network functionality """ #Import Local Modules -import marvin from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.cloudstackAPI import migrateSystemVm +from marvin.lib.utils import cleanup_resources +from marvin.lib.base import (Host, + VirtualMachine, + ServiceOffering, + VPC, + VpcOffering, + Router, + Network, + NetworkOffering, + Cluster, + Account) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + wait_for_cleanup) class Services: @@ -55,7 +66,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 64, -"tags": "HOST_TAGS_HERE" +"hosttags": "hosttag1" }, "service_offering_2": { "name": "Tiny Instance- tagged host 2", @@ -63,7 +74,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 64, -"tags": "HOST_TAGS_HERE" +"hosttags": "hosttag2" }, "network_offering": { "name": 'VPC Network offering', @@ -203,6 +214,19 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id +clusterWithSufficientHosts = None +clusters = Cluster.list(cls.api_client, zoneid=cls.zone.id) +for cluster in clusters: +cls.hosts = Host.list(cls.api_client, clusterid=cluster.id) +if len(cls.hosts) >= 2: +clusterWithSufficientHosts = cluster + +if clusterWithSufficientHosts is None: +raise unittest.SkipTest("No Cluster with 2 hosts found") + +Host.update(cls.api_client, id=cls.hosts[0].id, hosttags="hosttag1") +Host.update(cls.api_client, id=cls.hosts[1].id, hosttags="hosttag2") + cls.service_offering_1 = ServiceOffering.create( cls.api_client, cls.services["service_offering_1"] @@ -325,6 +349,9 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): @classmethod def tearDownCla
[2/2] git commit: updated refs/heads/master to 20f9d3d
CLOUDSTACK-7387: Corrected code related to adding host tags Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20f9d3dc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20f9d3dc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20f9d3dc Branch: refs/heads/master Commit: 20f9d3dcd8a980e03b651629b510b6e98e411271 Parents: 374d6ad Author: Gaurav Aradhye Authored: Mon Sep 15 14:03:49 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Sep 17 14:34:32 2014 +0530 -- .../maint/test_vpc_host_maintenance.py | 43 1 file changed, 35 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20f9d3dc/test/integration/component/maint/test_vpc_host_maintenance.py -- diff --git a/test/integration/component/maint/test_vpc_host_maintenance.py b/test/integration/component/maint/test_vpc_host_maintenance.py index 83ba271..fbc1bb4 100644 --- a/test/integration/component/maint/test_vpc_host_maintenance.py +++ b/test/integration/component/maint/test_vpc_host_maintenance.py @@ -18,13 +18,24 @@ """ Component tests VM life cycle in VPC network functionality """ #Import Local Modules -import marvin from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.cloudstackAPI import migrateSystemVm +from marvin.lib.utils import cleanup_resources +from marvin.lib.base import (Host, + VirtualMachine, + ServiceOffering, + VPC, + VpcOffering, + Router, + Network, + NetworkOffering, + Cluster, + Account) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + wait_for_cleanup) class Services: @@ -55,7 +66,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 64, -"tags": "HOST_TAGS_HERE" +"hosttags": "hosttag1" }, "service_offering_2": { "name": "Tiny Instance- tagged host 2", @@ -63,7 +74,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 64, -"tags": "HOST_TAGS_HERE" +"hosttags": "hosttag2" }, "network_offering": { "name": 'VPC Network offering', @@ -203,6 +214,19 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id +clusterWithSufficientHosts = None +clusters = Cluster.list(cls.api_client, zoneid=cls.zone.id) +for cluster in clusters: +cls.hosts = Host.list(cls.api_client, clusterid=cluster.id) +if len(cls.hosts) >= 2: +clusterWithSufficientHosts = cluster + +if clusterWithSufficientHosts is None: +raise unittest.SkipTest("No Cluster with 2 hosts found") + +Host.update(cls.api_client, id=cls.hosts[0].id, hosttags="hosttag1") +Host.update(cls.api_client, id=cls.hosts[1].id, hosttags="hosttag2") + cls.service_offering_1 = ServiceOffering.create( cls.api_client, cls.services["service_offering_1"] @@ -325,6 +349,9 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): @classmethod def tearDownClass(cls): try: +#Delete the host tags +Host.update(cls.api_client, id=cls.hosts[0].id, hosttags="") +Host.update(cls.api_client, id=cls.hosts[1].id, hosttags="") cls.account.delete(cls.api_client) wait_for_cleanup(cls.api_client, ["account.cleanup.interval"]) #Cleanup resources used
[1/2] git commit: updated refs/heads/master to 20f9d3d
Repository: cloudstack Updated Branches: refs/heads/master a5004e37a -> 20f9d3dcd Revert "CLOUDSTACK-7387: Corrected code related to adding host tags" This reverts commit 1b14fa6abef5811079eeb7cbd26ab718f6f69405. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/374d6ad7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/374d6ad7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/374d6ad7 Branch: refs/heads/master Commit: 374d6ad7981bbec2270e414b161f2e7e74a93758 Parents: a5004e3 Author: SrikanteswaraRao Talluri Authored: Wed Sep 17 14:34:18 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Sep 17 14:34:18 2014 +0530 -- .../maint/test_vpc_host_maintenance.py | 43 1 file changed, 8 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/374d6ad7/test/integration/component/maint/test_vpc_host_maintenance.py -- diff --git a/test/integration/component/maint/test_vpc_host_maintenance.py b/test/integration/component/maint/test_vpc_host_maintenance.py index 73adee7..83ba271 100644 --- a/test/integration/component/maint/test_vpc_host_maintenance.py +++ b/test/integration/component/maint/test_vpc_host_maintenance.py @@ -18,24 +18,13 @@ """ Component tests VM life cycle in VPC network functionality """ #Import Local Modules +import marvin from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase, unittest -from marvin.cloudstackAPI import migrateSystemVm -from marvin.lib.utils import cleanup_resources -from marvin.lib.base import (Host, - VirtualMachine, - ServiceOffering, - VPC, - VpcOffering, - Router, - Network, - NetworkOffering, - Cluster, - Account) -from marvin.lib.common import (get_domain, - get_zone, - get_template, - wait_for_cleanup) +from marvin.cloudstackTestCase import * +from marvin.cloudstackAPI import * +from marvin.lib.utils import * +from marvin.lib.base import * +from marvin.lib.common import * class Services: @@ -66,7 +55,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 64, -"hosttags": "hosttag1" +"tags": "HOST_TAGS_HERE" }, "service_offering_2": { "name": "Tiny Instance- tagged host 2", @@ -74,7 +63,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 64, -"hosttags": "hosttag2" +"tags": "HOST_TAGS_HERE" }, "network_offering": { "name": 'VPC Network offering', @@ -214,19 +203,6 @@ class TestVMLifeCycleHostmaintenance(cloudstackTestCase): cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id -clusterWithSufficientHosts = None -clusters = Cluster.list(cls.api_client, zoneid=cls.zone.id) -for cluster in clusters: -cls.hosts = Host.list(cls.api_client, clusterid=cluster.id) -if len(cls.hosts) >= 2: -clusterWithSufficientHosts = cluster - -if clusterWithSufficientHosts is None: -raise unittest.SkipTest("No Cluster with 2 hosts found") - -Host.update(cls.api_client, id=cls.hosts[0].id, hosttags="hosttag1") -Host.update(cls.api_client, id=cls.hosts[1].id, hosttags="hosttag2") - cls.service_offering_1 = ServiceOffering.create( cls.api_client, cls.services["service_offering_1"] @@ -349,9 +325,6 @@ class TestVMLifeCycleHostmaintenance(clo
git commit: updated refs/heads/master to 58ea99a
Repository: cloudstack Updated Branches: refs/heads/master 20f9d3dcd -> 58ea99a9d CLOUDSTACK-7557: test_vpc_network.py - Fixed wait period of network state check Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/58ea99a9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/58ea99a9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/58ea99a9 Branch: refs/heads/master Commit: 58ea99a9d665b4370651fe867988d597ea16165e Parents: 20f9d3d Author: Gaurav Aradhye Authored: Tue Sep 16 12:11:01 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Sep 17 14:38:59 2014 +0530 -- test/integration/component/test_vpc_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/58ea99a9/test/integration/component/test_vpc_network.py -- diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index b399765..096315c 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -1944,7 +1944,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): if retriesCount == 0: self.fail("Network state should change to Allocated, it is %s" % networks[0].state) retriesCount -= 1 -time.sleep(6) +time.sleep(60) self.debug("Upgrading network offering to support PF services") try:
git commit: updated refs/heads/master to 71611da
Repository: cloudstack Updated Branches: refs/heads/master 58ea99a9d -> 71611da17 CLOUDSTACK-7547: Brocade Device Data was hard coded, moved it to config file Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/71611da1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/71611da1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/71611da1 Branch: refs/heads/master Commit: 71611da17f082d9d813c89767a69c5b13ba5adf1 Parents: 58ea99a Author: Gaurav Aradhye Authored: Mon Sep 15 18:01:01 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Sep 17 14:40:30 2014 +0530 -- test/integration/component/test_brocade_vcs.py | 44 ++--- 1 file changed, 22 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/71611da1/test/integration/component/test_brocade_vcs.py -- diff --git a/test/integration/component/test_brocade_vcs.py b/test/integration/component/test_brocade_vcs.py index a5eff53..adaf21b 100644 --- a/test/integration/component/test_brocade_vcs.py +++ b/test/integration/component/test_brocade_vcs.py @@ -19,28 +19,25 @@ """ #Import Local Modules from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase -from marvin.cloudstackAPI import * -from marvin.lib.utils import (cleanup_resources, - random_gen, validateList) +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.cloudstackAPI import (listPhysicalNetworks, + listNetworkServiceProviders, + addNetworkServiceProvider, + addBrocadeVcsDevice, + updateNetworkServiceProvider, + deleteBrocadeVcsDevice) +from marvin.lib.utils import (cleanup_resources) from marvin.lib.base import (Account, VirtualMachine, - PublicIPAddress, - LoadBalancerRule, ServiceOffering, NetworkOffering, - Host, - Network, - NATRule, - Configurations) + Configurations, + Network) from marvin.lib.common import (get_domain, get_zone, get_template) -from marvin.sshClient import SshClient -from marvin.codes import PASS import time - class Services: """Test brocade plugin """ @@ -73,11 +70,6 @@ class Services: "publicport": 22, "protocol": 'TCP', }, - "brocade": { -"ipaddress": '10.24.51.45', -"username": 'admin', -"password": 'password123' - }, "network_offering": { "name": 'Brocade', "displaytext": 'Brocade', @@ -118,7 +110,15 @@ class TestBrocadeVcs(cloudstackTestCase): cls.zone.id, cls.services["ostype"] ) -cls.brocade_services = cls.services["brocade"] +try: +cls.brocadeDeviceData = cls.config.__dict__["brocadeDeviceData"].__dict__ +assert cls.brocadeDeviceData["ipaddress"], "ipaddress of brocade device\ +not present in config file" +assert cls.brocadeDeviceData["username"], "username of brocade device\ +not present in config file" +except Exception as e: +raise unittest.SkipTest("Exception occured while reading\ +brocade device data from config file: %s" % e) try: """ Adds Brocade device and enables NS provider""" @@ -142,9 +142,9 @@ class TestBrocadeVcs(cloudstackTestCase): cmd2 = addBrocadeVcsDevice.addBrocadeVcsDeviceCmd() cmd2.physicalnetworkid = physical_network.id - cmd2.username = cls.brocade_services["usern
[1/2] CLOUDSTACK-7565: Fixes to avoiding QEMU issue in attach volume operation by changing test case steps
Repository: cloudstack Updated Branches: refs/heads/master 071004e3e -> 032bce5b5 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/032bce5b/test/integration/component/test_escalations_volumes.py -- diff --git a/test/integration/component/test_escalations_volumes.py b/test/integration/component/test_escalations_volumes.py index db4c3d8..0d78c58 100644 --- a/test/integration/component/test_escalations_volumes.py +++ b/test/integration/component/test_escalations_volumes.py @@ -15,18 +15,24 @@ # specific language governing permissions and limitations # under the License. -#Import Local Modules -from marvin.cloudstackTestCase import * -from marvin.cloudstackException import * -from marvin.cloudstackAPI import * -from marvin.sshClient import SshClient -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * -from marvin.lib.utils import checkVolumeSize -from marvin.codes import SUCCESS +# Import Local Modules +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackAPI import createVolume, createTemplate +from marvin.lib.utils import (cleanup_resources, + random_gen) +from marvin.lib.base import (Account, + VirtualMachine, + ServiceOffering, + Volume, + DiskOffering, + Snapshot, + Template, + SnapshotPolicy) +from marvin.lib.common import (get_domain, + get_zone, + get_template) from nose.plugins.attrib import attr -from time import sleep + class TestVolumes(cloudstackTestCase): @@ -39,55 +45,42 @@ class TestVolumes(cloudstackTestCase): cls.services = cls.testClient.getParsedTestDataConfig() # Get Domain, Zone, Template cls.domain = get_domain(cls.api_client) -cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) +cls.zone = get_zone( +cls.api_client, +cls.testClient.getZoneForTests()) cls.template = get_template( -cls.api_client, -cls.zone.id, -cls.services["ostype"] -) +cls.api_client, +cls.zone.id, +cls.services["ostype"] +) if cls.zone.localstorageenabled: cls.storagetype = 'local' -cls.services["service_offerings"]["tiny"]["storagetype"] = 'local' +cls.services["service_offerings"][ +"tiny"]["storagetype"] = 'local' cls.services["disk_offering"]["storagetype"] = 'local' else: cls.storagetype = 'shared' -cls.services["service_offerings"]["tiny"]["storagetype"] = 'shared' +cls.services["service_offerings"][ +"tiny"]["storagetype"] = 'shared' cls.services["disk_offering"]["storagetype"] = 'shared' cls.services['mode'] = cls.zone.networktype -cls.services["virtual_machine"]["hypervisor"] = cls.testClient.getHypervisorInfo() +cls.services["virtual_machine"][ +"hypervisor"] = cls.testClient.getHypervisorInfo() cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id cls.services["custom_volume"]["zoneid"] = cls.zone.id # Creating Disk offering, Service Offering and Account cls.disk_offering = DiskOffering.create( -cls.api_client, -cls.services["disk_offering"] -) +cls.api_client, +cls.services["disk_offering"] +) cls.service_offering = ServiceOffering.create( -cls.api_client, - cls.services["service_offerings"]["tiny"] -) -cls.account = Account.create( -cls.api_client, -cls.services["account"], -domainid=cls.domain.id -) -# Getting authentication for user in newly created Account -cls.user = cls.account.user[0] -cls.userapiclient = cls.testClient.getUserApiClient(cls.user.username, cls.domain.name) -# Creating Virtual Machine -cls.virtual_machine = VirtualMachine.create( -
[2/2] git commit: updated refs/heads/master to 032bce5
CLOUDSTACK-7565: Fixes to avoiding QEMU issue in attach volume operation by changing test case steps Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/032bce5b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/032bce5b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/032bce5b Branch: refs/heads/master Commit: 032bce5b544afe7316651227e593c977430f2cde Parents: 071004e Author: Gaurav Aradhye Authored: Wed Sep 17 18:41:13 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Sep 18 12:01:02 2014 +0530 -- .../component/test_escalations_volumes.py | 2293 +- 1 file changed, 1192 insertions(+), 1101 deletions(-) --
git commit: updated refs/heads/master to 937aee3
Repository: cloudstack Updated Branches: refs/heads/master 44e8fc47d -> 937aee34e CLOUDSTACK-7579 Adding a method to base.py to update storage pool Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/937aee34 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/937aee34 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/937aee34 Branch: refs/heads/master Commit: 937aee34eded1a795b4eff3b7ebb59b8fbbef568 Parents: 44e8fc4 Author: Prashant Kumar Mishra Authored: Fri Sep 19 13:22:00 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Mon Sep 22 16:33:19 2014 +0530 -- tools/marvin/marvin/lib/base.py | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/937aee34/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 04217b2..b0dd6e2 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -2571,6 +2571,13 @@ class StoragePool: cmd.listall = True return(apiclient.findStoragePoolsForMigration(cmd)) +@classmethod +def update(cls,apiclient, **kwargs): +"""Update storage pool""" +cmd=updateStoragePool.updateStoragePoolCmd() +[setattr(cmd, k, v) for k, v in kwargs.items()] +return apiclient.updateStoragePool(cmd) + class Network: """Manage Network pools"""
git commit: updated refs/heads/master to f3252db
Repository: cloudstack Updated Branches: refs/heads/master 8c8c54f9f -> f3252db79 CLOUDSTACK-7555 - Fixed the test_usage script - Template now belongs to the Regular Account to test TEMPLATE.CREATE Event Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f3252db7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f3252db7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f3252db7 Branch: refs/heads/master Commit: f3252db797a6d53a1922a60b29cd6b4914de7d51 Parents: 8c8c54f Author: Chandan Purushothama Authored: Mon Sep 15 23:15:57 2014 -0700 Committer: SrikanteswaraRao Talluri Committed: Thu Sep 25 12:04:16 2014 +0530 -- test/integration/component/test_usage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f3252db7/test/integration/component/test_usage.py -- diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py index e99bb81..81cce48 100644 --- a/test/integration/component/test_usage.py +++ b/test/integration/component/test_usage.py @@ -744,7 +744,9 @@ class TestTemplateUsage(cloudstackTestCase): self.template = Template.create( self.apiclient, self.services["templates"], -self.volume.id +self.volume.id, +TestTemplateUsage.account.name, +TestTemplateUsage.account.domainid ) self.debug("Created template with ID: %s" % self.template.id) # Delete template
git commit: updated refs/heads/master to f4ef836
Repository: cloudstack Updated Branches: refs/heads/master 03e3a39ed -> f4ef83630 CLOUDSTACK-7617: Removed hard coded VM names and skipped test cases according to the hypervisor support Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f4ef8363 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f4ef8363 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f4ef8363 Branch: refs/heads/master Commit: f4ef8363093c289bea09a2c5a81a49641b601c8d Parents: 03e3a39 Author: Gaurav Aradhye Authored: Wed Sep 24 16:05:14 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Sep 26 12:09:07 2014 +0530 -- .../component/test_custom_hostname.py | 915 +++ 1 file changed, 511 insertions(+), 404 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f4ef8363/test/integration/component/test_custom_hostname.py -- diff --git a/test/integration/component/test_custom_hostname.py b/test/integration/component/test_custom_hostname.py index 9d9008a..fcd497e 100644 --- a/test/integration/component/test_custom_hostname.py +++ b/test/integration/component/test_custom_hostname.py @@ -16,12 +16,13 @@ # under the License. """ P1 tests for user provide hostname cases """ -#Import Local Modules +# Import Local Modules from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.lib.utils import (cleanup_resources, - random_gen) + random_gen, + get_hypervisor_type) from marvin.lib.base import (ServiceOffering, Configurations, VirtualMachine, @@ -30,133 +31,143 @@ from marvin.lib.common import (get_domain, get_zone, get_template, is_config_suitable) +import string class Services: + """Test user provided hostname Services """ def __init__(self): self.services = { -"domain": { - "name": "Domain", -}, -"project": { -"name": "Project", -"displaytext": "Test project", -}, -"account": { -"email": "administra...@clogeny.com", -"firstname": "Test", -"lastname": "User", -"username": "test", -# Random characters are appended for unique -# username -"password": "password", - }, -"account_2": { -"email": "administrat...@clogeny.com", -"firstname": "Test1", -"lastname": "User1", -"username": "test1", -# Random characters are appended for unique -# username -"password": "password", - }, - "user": { -"email": "administra...@clogeny.com", -"firstname": "User", -"lastname": "User", -"username": "User", -# Random characters are appended for unique -# username -"password": "password", - }, -"disk_offering": { -"displaytext": "Tiny Disk Offering", -"name": "
git commit: updated refs/heads/master to 05913e3
Repository: cloudstack Updated Branches: refs/heads/master 4eeae5ad5 -> 05913e3cb CLOUDSTACK-7499: Adding test cases for VMLC test path Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/05913e3c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/05913e3c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/05913e3c Branch: refs/heads/master Commit: 05913e3cbda1be35f3247a970d66eb74bb3b1449 Parents: 4eeae5a Author: Ashutosh K Authored: Fri Sep 5 17:25:00 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Sep 26 14:37:26 2014 +0530 -- test/integration/testpaths/__init__.py | 16 + test/integration/testpaths/testpath_vmlc.py | 916 +++ tools/marvin/marvin/config/test_data.py | 22 +- tools/marvin/marvin/lib/base.py | 8 + 4 files changed, 960 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/05913e3c/test/integration/testpaths/__init__.py -- diff --git a/test/integration/testpaths/__init__.py b/test/integration/testpaths/__init__.py new file mode 100644 index 000..978b68a --- /dev/null +++ b/test/integration/testpaths/__init__.py @@ -0,0 +1,16 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. http://git-wip-us.apache.org/repos/asf/cloudstack/blob/05913e3c/test/integration/testpaths/testpath_vmlc.py -- diff --git a/test/integration/testpaths/testpath_vmlc.py b/test/integration/testpaths/testpath_vmlc.py new file mode 100644 index 000..226621f --- /dev/null +++ b/test/integration/testpaths/testpath_vmlc.py @@ -0,0 +1,916 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. +""" Test Path for VM Life Cycle (VMLC) +""" +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + ServiceOffering, + VirtualMachine, + Template, + User, + Network, + PublicIPAddress, + NATRule, + FireWallRule, + VPC, + VpcOffering, + SecurityGroup, + NetworkACL, + LoadBalancerRule) +from marvin.lib.common import (get_domain, + get_zone, + get_builtin_template_info, + findSuitableHostForMigration, + createEnabledNetworkOffering, + setSharedNetworkParams, + get_free_vlan) +from marvin.codes import (PASS, + ERROR_NO_HOST_FOR_MIGRATION, + ISOLATED_NETWORK, + SHARED_NETWORK, +
[2/4] git commit: updated refs/heads/master to e5efa70
CLOUDSTACK-7616: Fixed test_escalations_ipaddress.py - test suite should use its own vpc offering Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0b9938ce Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0b9938ce Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0b9938ce Branch: refs/heads/master Commit: 0b9938ce40bd269639e91bf0e7bcfb36427cdaaa Parents: 05913e3 Author: Gaurav Aradhye Authored: Wed Sep 24 14:15:55 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Sep 26 14:43:50 2014 +0530 -- .../component/test_escalations_ipaddresses.py | 5385 +- 1 file changed, 2728 insertions(+), 2657 deletions(-) --
[1/4] CLOUDSTACK-7616: Fixed test_escalations_ipaddress.py - test suite should use its own vpc offering
Repository: cloudstack Updated Branches: refs/heads/master 05913e3cb -> e5efa702b http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0b9938ce/test/integration/component/test_escalations_ipaddresses.py -- diff --git a/test/integration/component/test_escalations_ipaddresses.py b/test/integration/component/test_escalations_ipaddresses.py index 00aacbf..b29cd1d 100644 --- a/test/integration/component/test_escalations_ipaddresses.py +++ b/test/integration/component/test_escalations_ipaddresses.py @@ -43,6 +43,7 @@ from marvin.lib.utils import validateList, cleanup_resources from marvin.codes import PASS from nose.plugins.attrib import attr + class TestIpAddresses(cloudstackTestCase): @classmethod @@ -55,30 +56,41 @@ class TestIpAddresses(cloudstackTestCase): cls.hypervisor = cls.testClient.getHypervisorInfo() # Get Domain, Zone, Template cls.domain = get_domain(cls.api_client) -cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) +cls.zone = get_zone( +cls.api_client, +cls.testClient.getZoneForTests()) cls.template = get_template( -cls.api_client, -cls.zone.id, -cls.services["ostype"] -) +cls.api_client, +cls.zone.id, +cls.services["ostype"] +) if cls.zone.localstorageenabled: cls.storagetype = 'local' -cls.services["service_offerings"]["tiny"]["storagetype"] = 'local' +cls.services["service_offerings"][ +"tiny"]["storagetype"] = 'local' else: cls.storagetype = 'shared' -cls.services["service_offerings"]["tiny"]["storagetype"] = 'shared' +cls.services["service_offerings"][ +"tiny"]["storagetype"] = 'shared' cls.services['mode'] = cls.zone.networktype -cls.services["virtual_machine"]["hypervisor"] = cls.testClient.getHypervisorInfo() +cls.services["virtual_machine"][ +"hypervisor"] = cls.testClient.getHypervisorInfo() cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id cls.service_offering = ServiceOffering.create( - cls.api_client, - cls.services["service_offerings"]["tiny"] - ) +cls.api_client, +cls.services["service_offerings"]["tiny"] +) cls._cleanup.append(cls.service_offering) cls.services['mode'] = cls.zone.networktype +cls.vpc_offering = VpcOffering.create(cls.api_client, + cls.services["vpc_offering"] + ) +cls.vpc_offering.update(cls.api_client, state='Enabled') +cls._cleanup.append(cls.vpc_offering) + except Exception as e: cls.tearDownClass() raise Exception("Warning: Exception in setup : %s" % e) @@ -89,14 +101,15 @@ class TestIpAddresses(cloudstackTestCase): self.apiClient = self.testClient.getApiClient() self.cleanup = [] self.account = Account.create( -self.apiClient, -self.services["account"], -domainid=self.domain.id -) +self.apiClient, +self.services["account"], +domainid=self.domain.id +) # Getting authentication for user in newly created Account self.user = self.account.user[0] -self.userapiclient = self.testClient.getUserApiClient(self.user.username, self.domain.name) -# self.cleanup.append(self.account) +self.userapiclient = self.testClient.getUserApiClient( +self.user.username, +self.domain.name) def tearDown(self): # Clean up, terminate the created volumes @@ -111,13 +124,14 @@ class TestIpAddresses(cloudstackTestCase): raise Exception("Warning: Exception during cleanup : %s" % e) def __verify_values(self, expected_vals, actual_vals): -""" +""" @summary: Function to verify expected and actual values Step1: Initializing return flag to True -Step1: Verifying length of expected and actual dictionaries is matching. +Step1: Verifying length of expected and actual dictionaries is matching If not matching retur
[4/4] git commit: updated refs/heads/master to e5efa70
CLOUDSTACK-7603: Fixed test_escalations_network.py - test suite should use its own vpc offering Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e5efa702 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e5efa702 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e5efa702 Branch: refs/heads/master Commit: e5efa702bbd57a1855d68ea3df5c0aee3db85dcc Parents: 0b9938c Author: Gaurav Aradhye Authored: Wed Sep 24 14:04:48 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Sep 26 14:46:43 2014 +0530 -- .../component/test_escalations_networks.py | 3001 +- 1 file changed, 1567 insertions(+), 1434 deletions(-) --
[3/4] CLOUDSTACK-7603: Fixed test_escalations_network.py - test suite should use its own vpc offering
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e5efa702/test/integration/component/test_escalations_networks.py -- diff --git a/test/integration/component/test_escalations_networks.py b/test/integration/component/test_escalations_networks.py index 5fad43a..c0ab709 100644 --- a/test/integration/component/test_escalations_networks.py +++ b/test/integration/component/test_escalations_networks.py @@ -16,17 +16,31 @@ # under the License. # Import Local Modules -from marvin.cloudstackTestCase import * -from marvin.cloudstackException import * -from marvin.cloudstackAPI import * -from marvin.sshClient import SshClient -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * -from marvin.lib.utils import checkVolumeSize -from marvin.codes import SUCCESS +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources) +from marvin.lib.base import (Account, + VPC, + Network, + NetworkOffering, + ServiceOffering, + Vpn, + Configurations, + VpcOffering, + PublicIPAddress, + PrivateGateway, + NetworkACL, + VpnCustomerGateway, + VirtualMachine, + EgressFireWallRule, + NetworkACLList, + Zone) +from marvin.lib.common import (get_zone, + get_template, + get_domain) +from marvin.lib.utils import (validateList) +from marvin.codes import PASS, FAIL from nose.plugins.attrib import attr -from time import sleep + class TestNetworks_1(cloudstackTestCase): @@ -39,51 +53,59 @@ class TestNetworks_1(cloudstackTestCase): cls.test_data = cls.testClient.getParsedTestDataConfig() # Get Domain, Zone, Template cls.domain = get_domain(cls.api_client) -cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) +cls.zone = get_zone( +cls.api_client, +cls.testClient.getZoneForTests()) cls.template = get_template( -cls.api_client, -cls.zone.id, -cls.test_data["ostype"] -) +cls.api_client, +cls.zone.id, +cls.test_data["ostype"] +) if cls.zone.localstorageenabled: cls.storagetype = 'local' -cls.test_data["service_offerings"]["tiny"]["storagetype"] = 'local' +cls.test_data["service_offerings"][ +"tiny"]["storagetype"] = 'local' else: cls.storagetype = 'shared' -cls.test_data["service_offerings"]["tiny"]["storagetype"] = 'shared' +cls.test_data["service_offerings"][ +"tiny"]["storagetype"] = 'shared' cls.test_data['mode'] = cls.zone.networktype -cls.test_data["virtual_machine"]["hypervisor"] = cls.testClient.getHypervisorInfo() +cls.test_data["virtual_machine"][ +"hypervisor"] = cls.testClient.getHypervisorInfo() cls.test_data["virtual_machine"]["zoneid"] = cls.zone.id cls.test_data["virtual_machine"]["template"] = cls.template.id cls.test_data["network_without_acl"]["zoneid"] = cls.zone.id # Create Network offering cls.network_offering = NetworkOffering.create( -cls.api_client, -cls.test_data["network_offering_vlan"], -) +cls.api_client, +cls.test_data["network_offering_vlan"], +) # Enable Network offering cls.network_offering.update(cls.api_client, state='Enabled') -cls.test_data["network_without_acl"]["networkoffering"] = cls.network_offering.id +cls.test_data["network_without_acl"][ +"networkoffering"] = cls.network_offering.id cls.service_offering = ServiceOffering.create( - cls.api_client, - cls.test_data["service_offerings"]["tiny"] - ) +cls.api_client, +cls.test_data["service_offerings"]["tiny"] +) # Creating Disk offering, Service Offering and Account cls.account = Account.create( -
git commit: updated refs/heads/master to e921ec6
Repository: cloudstack Updated Branches: refs/heads/master 9e5da759b -> e921ec6ec CLOUDSTACK-7408: Fixed - Private key of the ssh keypair was getting corrupted Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e921ec6e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e921ec6e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e921ec6e Branch: refs/heads/master Commit: e921ec6ec79c50096d58264d60c15091969ff888 Parents: 9e5da75 Author: Gaurav Aradhye Authored: Tue Sep 23 14:18:18 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Sep 26 16:26:56 2014 +0530 -- tools/marvin/marvin/lib/base.py | 8 +--- tools/marvin/marvin/lib/utils.py | 7 +-- tools/marvin/marvin/sshClient.py | 20 +--- 3 files changed, 27 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e921ec6e/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 5bd8931..d623386 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -552,7 +552,7 @@ class VirtualMachine: def get_ssh_client( self, ipaddress=None, reconnect=False, port=None, -keyPairFileLocation=None): +keyPairFileLocation=None, knownHostsFilePath=None): """Get SSH object of VM""" # If NAT Rules are not created while VM deployment in Advanced mode @@ -571,14 +571,16 @@ class VirtualMachine: self.ssh_port, self.username, self.password, -keyPairFileLocation=keyPairFileLocation +keyPairFileLocation=keyPairFileLocation, +knownHostsFilePath=knownHostsFilePath ) self.ssh_client = self.ssh_client or is_server_ssh_ready( self.ssh_ip, self.ssh_port, self.username, self.password, -keyPairFileLocation=keyPairFileLocation +keyPairFileLocation=keyPairFileLocation, +knownHostsFilePath=knownHostsFilePath ) return self.ssh_client http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e921ec6e/tools/marvin/marvin/lib/utils.py -- diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py index 8788b3b..b58b59d 100644 --- a/tools/marvin/marvin/lib/utils.py +++ b/tools/marvin/marvin/lib/utils.py @@ -121,7 +121,9 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None): +def is_server_ssh_ready(ipaddress, port, username, password, retries=20, +retryinterv=30, timeout=10.0, keyPairFileLocation=None, +knownHostsFilePath=None): ''' @Name: is_server_ssh_ready @Input: timeout: tcp connection timeout flag, @@ -140,7 +142,8 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryin keyPairFiles=keyPairFileLocation, retries=retries, delay=retryinterv, -timeout=timeout) +timeout=timeout, +knownHostsFilePath=knownHostsFilePath) except Exception, e: raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, str(e))) else: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e921ec6e/tools/marvin/marvin/sshClient.py -- diff --git a/tools/marvin/marvin/sshClient.py b/tools/marvin/marvin/sshClient.py index df2..f027890 100644 --- a/tools/marvin/marvin/sshClient.py +++ b/tools/marvin/marvin/sshClient.py @@ -24,6 +24,7 @@ from paramiko import (BadHostKeyException, SFTPClient) import socket import time +import os from marvin.cloudstackException import ( internalError, GetDetailExceptionInfo @@ -49,7 +50,8 @@ class SshClient(object): ''' def __init__(self, host, port, user, passwd, retries=60, delay=10, - log_lvl=logging.DEBUG, keyPairFiles=None, timeout=10.0): + log_lvl=logging.DEBUG, keyPairFiles=None, timeout=10.0, + knownHostsFilePath=None): self.host = None self.port = 22 self.user = user @@ -77,6 +79,18 @@ class SshClient(object): self.timeout = timeout if port is not None and port >= 0:
git commit: updated refs/heads/4.2 to 2ad26d7
Repository: cloudstack Updated Branches: refs/heads/4.2 421c8461f -> 2ad26d772 CLOUDSTACK-7677: 4.2 systemvm template job failing Fixed the trailing and leading whitespaces in the hdd path Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2ad26d77 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2ad26d77 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2ad26d77 Branch: refs/heads/4.2 Commit: 2ad26d772334e8788f4ecf02f3f4fb05ff879f72 Parents: 421c846 Author: Harikrishna Patnala Authored: Tue Oct 7 14:28:09 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 7 15:05:26 2014 +0530 -- tools/appliance/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ad26d77/tools/appliance/build.sh -- diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index f01cff6..595dd58 100644 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -46,7 +46,7 @@ done # Get appliance uuids machine_uuid=`vboxmanage showvminfo $appliance | grep UUID | head -1 | awk '{print $2}'` hdd_uuid=`vboxmanage showvminfo $appliance | grep vdi | head -1 | awk '{print $8}' | cut -d ')' -f 1` -hdd_path=`vboxmanage list hdds | grep "$appliance\/" | grep vdi | cut -c 14-` +hdd_path=`vboxmanage list hdds | grep "$appliance\/" | grep vdi | cut -c 14- | sed -e 's/^ *//' -e 's/ *$//'` # Remove any shared folder shared_folders=`vboxmanage showvminfo $appliance | grep Name | grep Host`
git commit: updated refs/heads/master to 4a1018e
Repository: cloudstack Updated Branches: refs/heads/master ff797dfa5 -> 4a1018e23 CLOUDSTACK-7680:Adding kwargs to volume.upload in base.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4a1018e2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4a1018e2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4a1018e2 Branch: refs/heads/master Commit: 4a1018e23b0ea80ba8b7cdb80a5efebdb50afea1 Parents: ff797df Author: Prashant Kumar Mishra Authored: Tue Oct 7 15:45:48 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 7 16:15:51 2014 +0530 -- tools/marvin/marvin/lib/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4a1018e2/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index d623386..77faeeb 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -894,7 +894,7 @@ class Volume: @classmethod def upload(cls, apiclient, services, zoneid=None, - account=None, domainid=None, url=None): + account=None, domainid=None, url=None, **kwargs): """Uploads the volume to specified account""" cmd = uploadVolume.uploadVolumeCmd() @@ -910,6 +910,7 @@ class Volume: cmd.url = url else: cmd.url = services["url"] +[setattr(cmd, k, v) for k, v in kwargs.items()] return Volume(apiclient.uploadVolume(cmd).__dict__) def wait_for_upload(self, apiclient, timeout=10, interval=60):
git commit: updated refs/heads/master to 69bd2d3
Repository: cloudstack Updated Branches: refs/heads/master d910b4ff1 -> 69bd2d3c7 CLOUDSTACK-7649: test_lb_secondary_ip.py - Removed SSH trying step after Destroying and Recovering VM because secondary IP information does not retain on VM after destroying it and SSH will not be successful in that case Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/69bd2d3c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/69bd2d3c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/69bd2d3c Branch: refs/heads/master Commit: 69bd2d3c7c0b7b2d994da43f8090b29c468cae65 Parents: d910b4f Author: Gaurav Aradhye Authored: Wed Oct 1 17:43:08 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 7 16:59:08 2014 +0530 -- .../component/test_lb_secondary_ip.py | 1022 ++ 1 file changed, 566 insertions(+), 456 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/69bd2d3c/test/integration/component/test_lb_secondary_ip.py -- diff --git a/test/integration/component/test_lb_secondary_ip.py b/test/integration/component/test_lb_secondary_ip.py index b1cb78a..23ff1ee 100644 --- a/test/integration/component/test_lb_secondary_ip.py +++ b/test/integration/component/test_lb_secondary_ip.py @@ -19,29 +19,31 @@ P1 tests for Load balancing rules for secondary IP feature, this is an enhancement to the Multiple IPs per NIC feature -Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/TestPlan+%3AConfiguring+load+balancing+rules+for+VM+nic+secondary+ips +Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/ +TestPlan+%3AConfiguring+load+balancing+rules+for+VM+nic+secondary+ips Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-4840 -Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Configuring+load+balancing+rules+for+VM+nic+secondary+ips +Feature Specifications: https://cwiki.apache.org/confluence/display/ +CLOUDSTACK/Configuring+load+balancing+rules+for+VM+nic+secondary+ips """ # Import Local Modules from nose.plugins.attrib import attr from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.lib.base import ( - Account, - ServiceOffering, - VirtualMachine, - LoadBalancerRule, - NIC, - PublicIPAddress, - Router, - NetworkOffering, - Network, - FireWallRule, - NATRule - ) +Account, +ServiceOffering, +VirtualMachine, +LoadBalancerRule, +NIC, +PublicIPAddress, +Router, +NetworkOffering, +Network, +FireWallRule, +NATRule +) from marvin.lib.common import (get_domain, get_zone, get_template, @@ -51,23 +53,25 @@ from marvin.lib.common import (get_domain, ) from marvin.lib.utils import (validateList, - random_gen, + random_gen, cleanup_resources) from marvin.cloudstackAPI import (restartNetwork) from marvin.sshClient import SshClient from marvin.codes import PASS + def IsIpAssignedToLoadBalancerRule(self, lbrule, iplist): -"""List Load Balancer Rule Instances and verify that IP is present in the list""" +"""List Load Balancer Rule Instances and verify that +IP is present in the list""" exceptionMessage = "" isIpAssignedToLbRule = True try: lbruleinstances = LoadBalancerRule.listLoadBalancerRuleInstances( -self.apiclient, -id=lbrule.id, -lbvmips=True -) +self.apiclient, +id=lbrule.id, +lbvmips=True +) self.assertEqual(validateList(lbruleinstances)[0], PASS, "lbruleinstances list validation failed") @@ -77,25 +81,28 @@ def IsIpAssignedToLoadBalancerRule(self, lbrule, iplist): for ip in iplist: self.assertTrue(ip in lbruleips, - "IP ad
[2/2] git commit: updated refs/heads/master to cd67270
CLOUDSTACK-7644: test_persistent_networks.py - SSH failure in case of LB rule due to port mismatch Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cd672709 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cd672709 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cd672709 Branch: refs/heads/master Commit: cd672709c35e92a4a5a9767e2d2e60aa91fd8e73 Parents: 69bd2d3 Author: Gaurav Aradhye Authored: Mon Sep 29 15:40:40 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 7 17:15:38 2014 +0530 -- .../component/test_persistent_networks.py | 2748 -- 1 file changed, 1903 insertions(+), 845 deletions(-) --
[1/2] CLOUDSTACK-7644: test_persistent_networks.py - SSH failure in case of LB rule due to port mismatch
Repository: cloudstack Updated Branches: refs/heads/master 69bd2d3c7 -> cd672709c http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd672709/test/integration/component/test_persistent_networks.py -- diff --git a/test/integration/component/test_persistent_networks.py b/test/integration/component/test_persistent_networks.py index 02f6229..65b109f 100644 --- a/test/integration/component/test_persistent_networks.py +++ b/test/integration/component/test_persistent_networks.py @@ -48,8 +48,10 @@ from marvin.cloudstackTestCase import cloudstackTestCase, unittest from ddt import ddt, data import time + @ddt class TestPersistentNetworks(cloudstackTestCase): + ''' Test Persistent Networks without running VMs ''' @@ -65,44 +67,59 @@ class TestPersistentNetworks(cloudstackTestCase): cls.domain = get_domain(cls.api_client) cls.zone = get_zone(cls.api_client, cls.testClient.getZoneForTests()) cls.template = get_template( -cls.api_client, -cls.zone.id, -cls.services["ostype"] -) +cls.api_client, +cls.zone.id, +cls.services["ostype"] +) cls.account = Account.create( -cls.api_client, -cls.services["account"], -domainid=cls.domain.id -) +cls.api_client, +cls.services["account"], +domainid=cls.domain.id +) cls.services["virtual_machine"]["zoneid"] = cls.zone.id cls.services["virtual_machine"]["template"] = cls.template.id cls.service_offering = ServiceOffering.create( -cls.api_client, -cls.services["service_offering"] -) -cls.isolated_persistent_network_offering = cls.createNetworkOffering("nw_off_isolated_persistent") -cls.isolated_persistent_network_offering_netscaler = cls.createNetworkOffering("nw_off_isolated_persistent_netscaler") -cls.isolated_persistent_network_offering_RVR = cls.createNetworkOffering("nw_off_persistent_RVR") -cls.isolated_network_offering = cls.createNetworkOffering("isolated_network_offering") -cls.isolated_network_offering_netscaler = cls.createNetworkOffering("nw_off_isolated_netscaler") +cls.api_client, +cls.services["service_offering"] +) +cls.isolated_persistent_network_offering = cls.createNetworkOffering( +"nw_off_isolated_persistent") +cls.isolated_persistent_network_offering_netscaler =\ +cls.createNetworkOffering( +"nw_off_isolated_persistent_netscaler" +) +cls.isolated_persistent_network_offering_RVR =\ +cls.createNetworkOffering( +"nw_off_persistent_RVR" +) +cls.isolated_network_offering = cls.createNetworkOffering( +"isolated_network_offering") +cls.isolated_network_offering_netscaler = cls.createNetworkOffering( +"nw_off_isolated_netscaler") # Configure Netscaler device -# If configuration succeeds, set ns_configured to True so that Netscaler tests are executed +# If configuration succeeds, set ns_configured to True so that +# Netscaler tests are executed cls.ns_configured = False try: -cls.netscaler = add_netscaler(cls.api_client, cls.zone.id, cls.services["netscaler_VPX"]) +cls.netscaler = add_netscaler( +cls.api_client, +cls.zone.id, +cls.services["netscaler_VPX"]) cls._cleanup.append(cls.netscaler) cls.ns_configured = True except Exception: cls.ns_configured = False - # network will be deleted as part of account cleanup cls._cleanup = [ -cls.account, cls.service_offering, cls.isolated_persistent_network_offering, cls.isolated_network_offering, -cls.isolated_persistent_network_offering_RVR, cls.isolated_persistent_network_offering_netscaler, -cls.isolated_network_offering_netscaler -] +cls.account, +cls.service_offering, +cls.isolated_persistent_network_offering, +cls.isolated_network_offering, +cls.isolated_persistent_network_offering_RVR, +cls.isolated_persistent_network_offering_netscaler, +cls.isolated_network_offering_netscaler] return @classmethod @@ -117,13 +134,16 @@ class TestPersistentNetworks(cloudstackTestCase): @classmethod def createNetworkOffering(
git commit: updated refs/heads/master to 5408e0b
Repository: cloudstack Updated Branches: refs/heads/master cd672709c -> 5408e0b8d CLOUDSTACK-7646: test_nuage_vsp.py - Fixed basic indentation issues, list index issues, marked it as invalid because the test cases needs attention by the original author as it does not pass even after fixing the issues. Also moving it to smoke folder as clearly it is a Basic Validation test Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5408e0b8 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5408e0b8 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5408e0b8 Branch: refs/heads/master Commit: 5408e0b8d195fa32a0a9a59ea2e3535ed083ee8e Parents: cd67270 Author: Gaurav Aradhye Authored: Mon Sep 29 16:53:14 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Oct 7 17:17:31 2014 +0530 -- test/integration/component/test_nuage_vsp.py | 312 -- test/integration/smoke/test_nuage_vsp.py | 301 + 2 files changed, 301 insertions(+), 312 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5408e0b8/test/integration/component/test_nuage_vsp.py -- diff --git a/test/integration/component/test_nuage_vsp.py b/test/integration/component/test_nuage_vsp.py deleted file mode 100644 index 096b9d1..000 --- a/test/integration/component/test_nuage_vsp.py +++ /dev/null @@ -1,312 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "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. - -""" P1 tests for NuageVsp network Plugin -""" -#Import Local Modules -from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import cloudstackTestCase -from marvin.cloudstackAPI import * -from marvin.lib.utils import (cleanup_resources, - random_gen, validateList) -from marvin.lib.base import (Account, - VirtualMachine, - PublicIPAddress, - LoadBalancerRule, - ServiceOffering, - NetworkOffering, - Host, - Network, - NATRule, - Configurations) -from marvin.lib.common import (get_domain, - get_zone, - get_template) -from marvin.sshClient import SshClient -from marvin.codes import PASS -import time - - -class Services: -"""Test NuageVsp plugin -""" - -def __init__(self): -self.services = { - "account": { -"email": "cloudst...@cloudmonkey.com", -"firstname": "cloudstack", -"lastname": "bob", -"username": "bobbuilder", -"password": "password", - }, - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 100,# in MHz -"memory": 128, # In MBs - }, - "virtual_machine": { -"displayname": "TestVM", -"username": "root", -"password": "password", -
git commit: updated refs/heads/master to 679f945
Repository: cloudstack Updated Branches: refs/heads/master 925f30a41 -> 679f94507 CLOUDSTACK-7632:Automation for volume life cycle testPath Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/679f9450 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/679f9450 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/679f9450 Branch: refs/heads/master Commit: 679f945074d54fb68f7b1778fd60418bffaf4d23 Parents: 925f30a Author: Prashant Kumar Mishra Authored: Tue Sep 30 11:01:13 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 8 17:50:25 2014 +0530 -- .../testpaths/testpath_volumelifecycle.py | 567 +++ 1 file changed, 567 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/679f9450/test/integration/testpaths/testpath_volumelifecycle.py -- diff --git a/test/integration/testpaths/testpath_volumelifecycle.py b/test/integration/testpaths/testpath_volumelifecycle.py new file mode 100644 index 000..d30f2b0 --- /dev/null +++ b/test/integration/testpaths/testpath_volumelifecycle.py @@ -0,0 +1,567 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "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. +"""Utilities functions +""" +#All tests inherit from cloudstackTestCase +from marvin.cloudstackTestCase import cloudstackTestCase +#Import Integration Libraries +from marvin.codes import FAILED, PASS +#base - contains all resources as entities and defines create, delete, list operations on them +from marvin.lib.base import (Account, + VirtualMachine, + ServiceOffering, + User, + DiskOffering, + Volume, + Template, + StoragePool) +from marvin.lib.utils import cleanup_resources, validateList + +#common - commonly used methods for all tests are listed here +from marvin.lib.common import (get_zone, + get_domain, + get_template, + list_virtual_machines) +from nose.plugins.attrib import attr +import os +import urllib +import tempfile + + +def verify_attach_volume(self, vmid, volid): +list_volumes = Volume.list(self.userapiclient, + id=volid + ) +self.assertEqual(validateList(list_volumes)[0], PASS, "Check List volume response for volume %s" % volid) +self.assertEqual(len(list_volumes), 1, "There is no data disk attached to vm id:%s" % vmid) +self.assertEqual(list_volumes[0].virtualmachineid, vmid, "Check if volume state (attached) is reflected") +self.debug("volume id:%s successfully attached to vm id%s" % (volid, vmid)) +return + + +def verify_detach_volume(self, vmid, volid): +list_volumes = Volume.list(self.userapiclient, + id=volid + ) +self.assertEqual(validateList(list_volumes)[0], PASS, "Check List volume response for volume %s" % volid) +self.assertEqual(len(list_volumes), 1, "Detach data disk id: %s for vm id :%s was not successful" % (volid, vmid)) +self.assertEqual(list_volumes[0].virtualmachineid, None, "Check if volume state (attached) is reflected") +self.debug("volume id: %s successfully detached from vm id:%s" % (volid, vmid)) + + +def verify_vm(self, vmid): +list_vm = list_virtual_machines(self.userapiclient, +account=self.account.name, +domainid=self.account.domainid, +id=vmid +) +self.assertEqual(valida
[2/2] git commit: updated refs/heads/master to 35e05a6
CLOUDSTACK-7693: Fixing pep8 issues pep8 fixes for test_routers.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/35e05a69 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/35e05a69 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/35e05a69 Branch: refs/heads/master Commit: 35e05a69a51496c343cf3bf8545c9d3650d4c6e8 Parents: 58cfbcd Author: Gaurav Aradhye Authored: Thu Oct 9 15:30:43 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 15 10:56:55 2014 +0530 -- .../component/test_recurring_snapshots.py | 497 +++--- test/integration/component/test_routers.py | 1422 +- 2 files changed, 984 insertions(+), 935 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e05a69/test/integration/component/test_recurring_snapshots.py -- diff --git a/test/integration/component/test_recurring_snapshots.py b/test/integration/component/test_recurring_snapshots.py index faa6787..58dd769 100644 --- a/test/integration/component/test_recurring_snapshots.py +++ b/test/integration/component/test_recurring_snapshots.py @@ -16,110 +16,125 @@ # under the License. from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources) +from marvin.lib.base import (Account, + DiskOffering, + ServiceOffering, + VirtualMachine, + SnapshotPolicy) +from marvin.lib.common import (get_zone, + get_domain, + get_template, + list_snapshots, + list_volumes, + list_snapshot_policy + ) +import time + class Services: + """Test Snapshots Services """ def __init__(self): self.services = { -"account": { -"email": "t...@test.com", -"firstname": "Test", -"lastname": "User", -"username": "test", -# Random characters are appended for unique -# username -"password": "password", - }, - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 200,# in MHz +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +# Random characters are appended for unique +# username +"password": "password", +}, +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 200,# in MHz "memory": 256, # In MBs -}, -"disk_offering": { -"displaytext": "Small Disk", -"name": "Small Disk", -"disksize": 1 -}, -"server_with_disk": -{ -"displayname": "Test VM -With Disk", -"username": "root", -"password": "password", -
[1/2] CLOUDSTACK-7693: Fixing pep8 issues
Repository: cloudstack Updated Branches: refs/heads/master 58cfbcdf9 -> 35e05a69a http://git-wip-us.apache.org/repos/asf/cloudstack/blob/35e05a69/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index 24f44b3..0a74234 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -5,9 +5,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -16,81 +16,101 @@ # under the License. """ P1 tests for routers """ -#Import Local Modules -import marvin +# Import Local Modules from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * - -#Import System modules +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackAPI import (stopVirtualMachine, + stopRouter, + startRouter) +from marvin.lib.utils import (cleanup_resources, + get_process_status, + get_host_credentials) +from marvin.lib.base import (ServiceOffering, + VirtualMachine, + Account, + LoadBalancerRule, + FireWallRule, + NATRule) +from marvin.lib.common import (get_zone, + get_template, + get_domain, + list_virtual_machines, + list_networks, + list_configurations, + list_routers, + list_nat_rules, + list_publicIP, + list_lb_rules, + list_firewall_rules, + list_hosts) + +# Import System modules import time class Services: + """Test router Services """ def __init__(self): self.services = { - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 100,# in MHz +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100,# in MHz "memory": 128, # In MBs -}, -"virtual_machine": -{ -"displayname": "Test VM", -"username": "root", -"password": "password", -"ssh_port": 22, -"hypervisor": 'XenServer', -# Hypervisor type should be same as -# hypervisor type of cluster -"privateport": 22, -"publicport": 22, -"protocol": 'TCP', -}, -"host": { -"username": "root", -"password": "password", -"publicport": 22, -}, -"account": { -"email": "t...@test.com", -"firstname": "Test", -"lastname": "User", -"username": "testuser", -"password": "password", -}, -"natrule": -{ -"privateport": 22, -"publicport": 22, -"protocol": "TCP" -}, - "lbrule": -
[1/2] CLOUDSTACK-7693: Fixing pep8 issues
Repository: cloudstack Updated Branches: refs/heads/4.5 71c980416 -> 159a372fd http://git-wip-us.apache.org/repos/asf/cloudstack/blob/159a372f/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index 24f44b3..0a74234 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -5,9 +5,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -16,81 +16,101 @@ # under the License. """ P1 tests for routers """ -#Import Local Modules -import marvin +# Import Local Modules from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * - -#Import System modules +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackAPI import (stopVirtualMachine, + stopRouter, + startRouter) +from marvin.lib.utils import (cleanup_resources, + get_process_status, + get_host_credentials) +from marvin.lib.base import (ServiceOffering, + VirtualMachine, + Account, + LoadBalancerRule, + FireWallRule, + NATRule) +from marvin.lib.common import (get_zone, + get_template, + get_domain, + list_virtual_machines, + list_networks, + list_configurations, + list_routers, + list_nat_rules, + list_publicIP, + list_lb_rules, + list_firewall_rules, + list_hosts) + +# Import System modules import time class Services: + """Test router Services """ def __init__(self): self.services = { - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 100,# in MHz +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100,# in MHz "memory": 128, # In MBs -}, -"virtual_machine": -{ -"displayname": "Test VM", -"username": "root", -"password": "password", -"ssh_port": 22, -"hypervisor": 'XenServer', -# Hypervisor type should be same as -# hypervisor type of cluster -"privateport": 22, -"publicport": 22, -"protocol": 'TCP', -}, -"host": { -"username": "root", -"password": "password", -"publicport": 22, -}, -"account": { -"email": "t...@test.com", -"firstname": "Test", -"lastname": "User", -"username": "testuser", -"password": "password", -}, -"natrule": -{ -"privateport": 22, -"publicport": 22, -"protocol": "TCP" -}, - "lbrule": -
[2/2] git commit: updated refs/heads/4.5 to 159a372
CLOUDSTACK-7693: Fixing pep8 issues pep8 fixes for test_routers.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/159a372f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/159a372f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/159a372f Branch: refs/heads/4.5 Commit: 159a372fddad93cababe64978f5c2b50b431db4f Parents: 71c9804 Author: Gaurav Aradhye Authored: Thu Oct 9 15:30:43 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 15 10:58:15 2014 +0530 -- .../component/test_recurring_snapshots.py | 497 +++--- test/integration/component/test_routers.py | 1422 +- 2 files changed, 984 insertions(+), 935 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/159a372f/test/integration/component/test_recurring_snapshots.py -- diff --git a/test/integration/component/test_recurring_snapshots.py b/test/integration/component/test_recurring_snapshots.py index faa6787..58dd769 100644 --- a/test/integration/component/test_recurring_snapshots.py +++ b/test/integration/component/test_recurring_snapshots.py @@ -16,110 +16,125 @@ # under the License. from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.lib.utils import (cleanup_resources) +from marvin.lib.base import (Account, + DiskOffering, + ServiceOffering, + VirtualMachine, + SnapshotPolicy) +from marvin.lib.common import (get_zone, + get_domain, + get_template, + list_snapshots, + list_volumes, + list_snapshot_policy + ) +import time + class Services: + """Test Snapshots Services """ def __init__(self): self.services = { -"account": { -"email": "t...@test.com", -"firstname": "Test", -"lastname": "User", -"username": "test", -# Random characters are appended for unique -# username -"password": "password", - }, - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 200,# in MHz +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +# Random characters are appended for unique +# username +"password": "password", +}, +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 200,# in MHz "memory": 256, # In MBs -}, -"disk_offering": { -"displaytext": "Small Disk", -"name": "Small Disk", -"disksize": 1 -}, -"server_with_disk": -{ -"displayname": "Test VM -With Disk", -"username": "root", -"password": "password", -
git commit: updated refs/heads/4.5 to ac820a3
Repository: cloudstack Updated Branches: refs/heads/4.5 159a372fd -> ac820a323 CLOUDSTACK-7690: Added missing unittest import to test_escalations_volumes.py fixed pep8 issues Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ac820a32 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ac820a32 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ac820a32 Branch: refs/heads/4.5 Commit: ac820a3230cc8a7358a4d9d27039d69f230734ea Parents: 159a372 Author: Gaurav Aradhye Authored: Thu Oct 9 12:58:27 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 15 11:01:39 2014 +0530 -- .../component/test_escalations_volumes.py | 77 +--- 1 file changed, 52 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac820a32/test/integration/component/test_escalations_volumes.py -- diff --git a/test/integration/component/test_escalations_volumes.py b/test/integration/component/test_escalations_volumes.py index bf5e37c..7290325 100644 --- a/test/integration/component/test_escalations_volumes.py +++ b/test/integration/component/test_escalations_volumes.py @@ -16,10 +16,10 @@ # under the License. # Import Local Modules -from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.cloudstackAPI import createVolume, createTemplate from marvin.lib.utils import (cleanup_resources, - random_gen,validateList) + random_gen, validateList) from marvin.lib.base import (Account, VirtualMachine, ServiceOffering, @@ -34,6 +34,7 @@ from marvin.lib.common import (get_domain, from nose.plugins.attrib import attr from marvin.codes import PASS + class TestVolumes(cloudstackTestCase): @classmethod @@ -208,7 +209,7 @@ class TestVolumes(cloudstackTestCase): volume_created.name, "Newly created volume name and the test data\ volume name are not matching" -) +) # Listing all the volumes again after creation of volumes list_volumes_after = Volume.list( @@ -239,7 +240,7 @@ class TestVolumes(cloudstackTestCase): self.services["pagesize"], "List Volume response is not matching with\ the page size length for page 1" -) +) # Listing all the volumes in page2 list_volumes_page2 = Volume.list( @@ -335,7 +336,7 @@ class TestVolumes(cloudstackTestCase): volume_created.name, "Newly created volume name and\ the test data volume name are not matching" -) +) # Listing all the volumes for a user after creating a data volume list_volumes_after = Volume.list( self.userapiclient, @@ -464,7 +465,9 @@ class TestVolumes(cloudstackTestCase): Step6: Resizing data volume """ if self.hypervisor.lower() in ['hyperv']: -raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test") +raise unittest.SkipTest( +"This featureis not supported on existing\ +hypervisor. Hence, skipping the test") # Listing volumes for a user before creating a volume list_volumes_before = Volume.list( self.userapiclient, @@ -585,7 +588,9 @@ class TestVolumes(cloudstackTestCase): Step6: Resizing custom volume """ if self.hypervisor.lower() in ['hyperv']: -raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test") +raise unittest.SkipTest( +"This featureis not supported on existing\ +hypervisor. Hence, skipping the test") # Listing all the disk offerings list_disk_offerings = DiskOffering.list(self.apiClient) @@ -710,7 +715,9 @@ class TestVolumes(cloudstackTestCase): Step5: Creating Template from Snapshot """ if self.hypervisor.lower() in ['hyperv']: -raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test") +raise unittest.SkipTest( +"This featureis not supported on existing\ +hypervisor. Hence
git commit: updated refs/heads/master to bd9d57e
Repository: cloudstack Updated Branches: refs/heads/master 35e05a69a -> bd9d57e20 CLOUDSTACK-7690: Added missing unittest import to test_escalations_volumes.py fixed pep8 issues Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bd9d57e2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bd9d57e2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bd9d57e2 Branch: refs/heads/master Commit: bd9d57e20c4f8bd49fd403841cff909016987ced Parents: 35e05a6 Author: Gaurav Aradhye Authored: Thu Oct 9 12:58:27 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 15 11:02:33 2014 +0530 -- .../component/test_escalations_volumes.py | 77 +--- 1 file changed, 52 insertions(+), 25 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bd9d57e2/test/integration/component/test_escalations_volumes.py -- diff --git a/test/integration/component/test_escalations_volumes.py b/test/integration/component/test_escalations_volumes.py index bf5e37c..7290325 100644 --- a/test/integration/component/test_escalations_volumes.py +++ b/test/integration/component/test_escalations_volumes.py @@ -16,10 +16,10 @@ # under the License. # Import Local Modules -from marvin.cloudstackTestCase import cloudstackTestCase +from marvin.cloudstackTestCase import cloudstackTestCase, unittest from marvin.cloudstackAPI import createVolume, createTemplate from marvin.lib.utils import (cleanup_resources, - random_gen,validateList) + random_gen, validateList) from marvin.lib.base import (Account, VirtualMachine, ServiceOffering, @@ -34,6 +34,7 @@ from marvin.lib.common import (get_domain, from nose.plugins.attrib import attr from marvin.codes import PASS + class TestVolumes(cloudstackTestCase): @classmethod @@ -208,7 +209,7 @@ class TestVolumes(cloudstackTestCase): volume_created.name, "Newly created volume name and the test data\ volume name are not matching" -) +) # Listing all the volumes again after creation of volumes list_volumes_after = Volume.list( @@ -239,7 +240,7 @@ class TestVolumes(cloudstackTestCase): self.services["pagesize"], "List Volume response is not matching with\ the page size length for page 1" -) +) # Listing all the volumes in page2 list_volumes_page2 = Volume.list( @@ -335,7 +336,7 @@ class TestVolumes(cloudstackTestCase): volume_created.name, "Newly created volume name and\ the test data volume name are not matching" -) +) # Listing all the volumes for a user after creating a data volume list_volumes_after = Volume.list( self.userapiclient, @@ -464,7 +465,9 @@ class TestVolumes(cloudstackTestCase): Step6: Resizing data volume """ if self.hypervisor.lower() in ['hyperv']: -raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test") +raise unittest.SkipTest( +"This featureis not supported on existing\ +hypervisor. Hence, skipping the test") # Listing volumes for a user before creating a volume list_volumes_before = Volume.list( self.userapiclient, @@ -585,7 +588,9 @@ class TestVolumes(cloudstackTestCase): Step6: Resizing custom volume """ if self.hypervisor.lower() in ['hyperv']: -raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test") +raise unittest.SkipTest( +"This featureis not supported on existing\ +hypervisor. Hence, skipping the test") # Listing all the disk offerings list_disk_offerings = DiskOffering.list(self.apiClient) @@ -710,7 +715,9 @@ class TestVolumes(cloudstackTestCase): Step5: Creating Template from Snapshot """ if self.hypervisor.lower() in ['hyperv']: -raise unittest.SkipTest("This featureis not supported on existing hypervisor. Hence, skipping the test") +raise unittest.SkipTest( +"This featureis not supported on existing\ +hypervis
git commit: updated refs/heads/4.5 to d081efc
Repository: cloudstack Updated Branches: refs/heads/4.5 420d4e0da -> d081efc64 CLOUDSTACK-7727 Skip various BVT tests on LXC A number of BVT tests are not valid for LXC (e.g. migrating a VM), so this patch ensures they skip if LXC is in use. Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d081efc6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d081efc6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d081efc6 Branch: refs/heads/4.5 Commit: d081efc647737d4fee106eda31767a061f885f69 Parents: 420d4e0 Author: Alex Brett Authored: Wed Oct 15 18:50:57 2014 +0100 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 16 17:21:44 2014 +0530 -- test/integration/smoke/test_primary_storage.py | 4 ++-- test/integration/smoke/test_scale_vm.py| 4 ++-- test/integration/smoke/test_snapshots.py | 4 ++-- test/integration/smoke/test_templates.py | 6 ++ test/integration/smoke/test_vm_life_cycle.py | 14 +- test/integration/smoke/test_vm_snapshots.py| 4 ++-- 6 files changed, 23 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d081efc6/test/integration/smoke/test_primary_storage.py -- diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py index 0813d28..310afca 100644 --- a/test/integration/smoke/test_primary_storage.py +++ b/test/integration/smoke/test_primary_storage.py @@ -154,8 +154,8 @@ class TestPrimaryStorageServices(cloudstackTestCase): """Test primary storage pools - XEN. Not Supported for kvm,hyperv,vmware """ -if self.hypervisor.lower() in ["kvm","hyperv", "vmware"]: -raise self.skipTest("iscsi primary storage not supported on kvm, VMWare or Hyper-V") +if self.hypervisor.lower() in ["kvm","hyperv", "vmware", "lxc"]: +raise self.skipTest("iscsi primary storage not supported on kvm, VMWare, Hyper-V, or LXC") # Validate the following: # 1. List Clusters http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d081efc6/test/integration/smoke/test_scale_vm.py -- diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py index 0b770c4..3a2983e 100644 --- a/test/integration/smoke/test_scale_vm.py +++ b/test/integration/smoke/test_scale_vm.py @@ -35,8 +35,8 @@ class TestScaleVm(cloudstackTestCase): cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() cls.hypervisor = cls.testClient.getHypervisorInfo() -if cls.hypervisor.lower() in ('kvm', 'hyperv'): -raise unittest.SkipTest("ScaleVM is not supported on KVM or Hyper-V. Hence, skipping the test") +if cls.hypervisor.lower() in ('kvm', 'hyperv', 'lxc'): +raise unittest.SkipTest("ScaleVM is not supported on KVM, Hyper-V or LXC. Hence, skipping the test") # Get Zone, Domain and templates domain = get_domain(cls.apiclient) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d081efc6/test/integration/smoke/test_snapshots.py -- diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py index 5db3e40..2df1778 100644 --- a/test/integration/smoke/test_snapshots.py +++ b/test/integration/smoke/test_snapshots.py @@ -37,8 +37,8 @@ class TestSnapshotRootDisk(cloudstackTestCase): cls.services['mode'] = cls.zone.networktype cls.hypervisor = cls.testClient.getHypervisorInfo() -if cls.hypervisor.lower() == 'hyperv': -raise unittest.SkipTest("Snapshots not supported on Hyper-V") +if cls.hypervisor.lower() in ['hyperv', 'lxc']: +raise unittest.SkipTest("Snapshots not supported on Hyper-V or LXC") template = get_template( cls.apiclient, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d081efc6/test/integration/smoke/test_templates.py -- diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index db938d9..4153ca3 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templ
git commit: updated refs/heads/master to 20d3cf1
Repository: cloudstack Updated Branches: refs/heads/master 1f8cf0bee -> 20d3cf1ac CLOUDSTACK-7727 Skip various BVT tests on LXC A number of BVT tests are not valid for LXC (e.g. migrating a VM), so this patch ensures they skip if LXC is in use. Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/20d3cf1a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/20d3cf1a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/20d3cf1a Branch: refs/heads/master Commit: 20d3cf1acc535c3380e52e92a4108444a0b593e3 Parents: 1f8cf0b Author: Alex Brett Authored: Wed Oct 15 18:50:57 2014 +0100 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 16 17:23:04 2014 +0530 -- test/integration/smoke/test_primary_storage.py | 4 ++-- test/integration/smoke/test_scale_vm.py| 4 ++-- test/integration/smoke/test_snapshots.py | 4 ++-- test/integration/smoke/test_templates.py | 6 ++ test/integration/smoke/test_vm_life_cycle.py | 14 +- test/integration/smoke/test_vm_snapshots.py| 4 ++-- 6 files changed, 23 insertions(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_primary_storage.py -- diff --git a/test/integration/smoke/test_primary_storage.py b/test/integration/smoke/test_primary_storage.py index 0813d28..310afca 100644 --- a/test/integration/smoke/test_primary_storage.py +++ b/test/integration/smoke/test_primary_storage.py @@ -154,8 +154,8 @@ class TestPrimaryStorageServices(cloudstackTestCase): """Test primary storage pools - XEN. Not Supported for kvm,hyperv,vmware """ -if self.hypervisor.lower() in ["kvm","hyperv", "vmware"]: -raise self.skipTest("iscsi primary storage not supported on kvm, VMWare or Hyper-V") +if self.hypervisor.lower() in ["kvm","hyperv", "vmware", "lxc"]: +raise self.skipTest("iscsi primary storage not supported on kvm, VMWare, Hyper-V, or LXC") # Validate the following: # 1. List Clusters http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_scale_vm.py -- diff --git a/test/integration/smoke/test_scale_vm.py b/test/integration/smoke/test_scale_vm.py index 0b770c4..3a2983e 100644 --- a/test/integration/smoke/test_scale_vm.py +++ b/test/integration/smoke/test_scale_vm.py @@ -35,8 +35,8 @@ class TestScaleVm(cloudstackTestCase): cls.apiclient = testClient.getApiClient() cls.services = testClient.getParsedTestDataConfig() cls.hypervisor = cls.testClient.getHypervisorInfo() -if cls.hypervisor.lower() in ('kvm', 'hyperv'): -raise unittest.SkipTest("ScaleVM is not supported on KVM or Hyper-V. Hence, skipping the test") +if cls.hypervisor.lower() in ('kvm', 'hyperv', 'lxc'): +raise unittest.SkipTest("ScaleVM is not supported on KVM, Hyper-V or LXC. Hence, skipping the test") # Get Zone, Domain and templates domain = get_domain(cls.apiclient) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_snapshots.py -- diff --git a/test/integration/smoke/test_snapshots.py b/test/integration/smoke/test_snapshots.py index 5db3e40..2df1778 100644 --- a/test/integration/smoke/test_snapshots.py +++ b/test/integration/smoke/test_snapshots.py @@ -37,8 +37,8 @@ class TestSnapshotRootDisk(cloudstackTestCase): cls.services['mode'] = cls.zone.networktype cls.hypervisor = cls.testClient.getHypervisorInfo() -if cls.hypervisor.lower() == 'hyperv': -raise unittest.SkipTest("Snapshots not supported on Hyper-V") +if cls.hypervisor.lower() in ['hyperv', 'lxc']: +raise unittest.SkipTest("Snapshots not supported on Hyper-V or LXC") template = get_template( cls.apiclient, http://git-wip-us.apache.org/repos/asf/cloudstack/blob/20d3cf1a/test/integration/smoke/test_templates.py -- diff --git a/test/integration/smoke/test_templates.py b/test/integration/smoke/test_templates.py index db938d9..4153ca3 100644 --- a/test/integration/smoke/test_templates.py +++ b/test/integration/smoke/test_templ
git commit: updated refs/heads/4.5 to 070e689
Repository: cloudstack Updated Branches: refs/heads/4.5 0d6a277a0 -> 070e689c4 CLOUDSTACK-7800: VMware - Hot plug/unplug NIC to/from VM only when vmware tools are installed, else assert for exception Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/070e689c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/070e689c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/070e689c Branch: refs/heads/4.5 Commit: 070e689c4f4622f6a923cce61d4de2c20c2c28fe Parents: 0d6a277 Author: Gaurav Aradhye Authored: Tue Oct 28 11:05:20 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Wed Oct 29 15:06:08 2014 +0530 -- test/integration/smoke/test_nic.py | 352 ++-- 1 file changed, 200 insertions(+), 152 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/070e689c/test/integration/smoke/test_nic.py -- diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py index 488ed0a..f130bbe 100644 --- a/test/integration/smoke/test_nic.py +++ b/test/integration/smoke/test_nic.py @@ -15,24 +15,27 @@ # specific language governing permissions and limitations # under the License. """ NIC tests for VM """ -import marvin -from marvin.codes import FAILED -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.sshClient import SshClient -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.lib.base import (Account, + ServiceOffering, + Network, + VirtualMachine, + NetworkOffering) +from marvin.lib.common import (get_zone, + get_template, + get_domain) from nose.plugins.attrib import attr import signal import sys import time + class TestNic(cloudstackTestCase): def setUp(self): self.cleanup = [] + def signal_handler(signal, frame): self.tearDown() sys.exit(0) @@ -40,171 +43,217 @@ class TestNic(cloudstackTestCase): # assign the signal handler immediately signal.signal(signal.SIGINT, signal_handler) -hypervisor = self.testClient.getHypervisorInfo() -if hypervisor.lower() == "hyperv": +self.hypervisor = self.testClient.getHypervisorInfo() +if self.hypervisor.lower() == "hyperv": raise unittest.SkipTest("Not supported on Hyper-V") try: self.apiclient = self.testClient.getApiClient() -self.dbclient = self.testClient.getDbConnection() -self.services = self.testClient.getParsedTestDataConfig() +self.dbclient = self.testClient.getDbConnection() +self.services = self.testClient.getParsedTestDataConfig() # Get Zone, Domain and templates domain = get_domain(self.apiclient) -zone = get_zone(self.apiclient, self.testClient.getZoneForTests()) -self.services['mode'] = zone.networktype +self.zone = get_zone( +self.apiclient, +self.testClient.getZoneForTests() +) -#if local storage is enabled, alter the offerings to use localstorage -#this step is needed for devcloud -if zone.localstorageenabled == True: -self.services["service_offerings"]["tiny"]["storagetype"] = 'local' +# if local storage is enabled, alter the offerings to use +# localstorage +# this step is needed for devcloud +if self.zone.localstorageenabled: +self.services["service_offerings"][ +"tiny"]["storagetype"] = 'local' template = get_template( -self.apiclient, -zone.id, -self.services["ostype"] -) +self.apiclient, +self.zone.id, +self.services["ostype"] +) # Set Zones and disk offerings -self.services["small"]["zoneid"] = zone.id +self.services["small"]["zoneid"] = self.zone.id self.services["small"]["template"] =
git commit: updated refs/heads/4.5 to e87da18
Repository: cloudstack Updated Branches: refs/heads/4.5 591f46847 -> e87da186f Revert "CLOUDSTACK-7408: Fixed - Private key of the ssh keypair was getting corrupted" This reverts commit e921ec6ec79c50096d58264d60c15091969ff888. CLOUDSTACK-7408: sshClient.py - removing function load_host_keys(). This function is used to load host keys from local host keys file and to save back the host key. It is not needed while running test cases because we are connecting to unknown host anyway and don't want to use any local host key file. We have the AutoAddPolicy for missing host key file, hence whenever ssh connects to a new host, it will save the host key in memory temporarily. Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e87da186 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e87da186 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e87da186 Branch: refs/heads/4.5 Commit: e87da186f3b094e76a174713d6933f83d1c00854 Parents: 591f468 Author: Gaurrav Aradhye Authored: Thu Oct 30 12:23:49 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 14:51:54 2014 +0530 -- tools/marvin/marvin/lib/base.py | 8 +++- tools/marvin/marvin/lib/utils.py | 7 ++- tools/marvin/marvin/sshClient.py | 17 + 3 files changed, 6 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e87da186/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 77faeeb..7f53328 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -552,7 +552,7 @@ class VirtualMachine: def get_ssh_client( self, ipaddress=None, reconnect=False, port=None, -keyPairFileLocation=None, knownHostsFilePath=None): +keyPairFileLocation=None): """Get SSH object of VM""" # If NAT Rules are not created while VM deployment in Advanced mode @@ -571,16 +571,14 @@ class VirtualMachine: self.ssh_port, self.username, self.password, -keyPairFileLocation=keyPairFileLocation, -knownHostsFilePath=knownHostsFilePath +keyPairFileLocation=keyPairFileLocation ) self.ssh_client = self.ssh_client or is_server_ssh_ready( self.ssh_ip, self.ssh_port, self.username, self.password, -keyPairFileLocation=keyPairFileLocation, -knownHostsFilePath=knownHostsFilePath +keyPairFileLocation=keyPairFileLocation ) return self.ssh_client http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e87da186/tools/marvin/marvin/lib/utils.py -- diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py index b58b59d..8788b3b 100644 --- a/tools/marvin/marvin/lib/utils.py +++ b/tools/marvin/marvin/lib/utils.py @@ -121,9 +121,7 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=20, -retryinterv=30, timeout=10.0, keyPairFileLocation=None, -knownHostsFilePath=None): +def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None): ''' @Name: is_server_ssh_ready @Input: timeout: tcp connection timeout flag, @@ -142,8 +140,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, keyPairFiles=keyPairFileLocation, retries=retries, delay=retryinterv, -timeout=timeout, -knownHostsFilePath=knownHostsFilePath) +timeout=timeout) except Exception, e: raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, str(e))) else: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e87da186/tools/marvin/marvin/sshClient.py -- diff --git a/tools/marvin/marvin/sshClient.py b/tools/marvin/marvin/sshClient.py index f027890..e481109 100644 --- a/tools/marvin/marvin/sshClient.py +++ b/tools/marvin/marvin/sshClient.py @@ -24,7 +24,6 @@ from paramiko import (BadHostKeyException, SFTPClient) import socket import time -import os from marvin.cloudstackException import ( internalError, GetDetailExceptionInfo @@ -50,8 +49,7
git commit: updated refs/heads/4.5 to a4174d3
Repository: cloudstack Updated Branches: refs/heads/4.5 e87da186f -> a4174d3e9 CLOUDSTACK-7805: test_vpc_vms_deployment.py - Removing invalid steps from test case Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a4174d3e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a4174d3e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a4174d3e Branch: refs/heads/4.5 Commit: a4174d3e91fd4b090de2f9d1688a862fe46f99e5 Parents: e87da18 Author: Gaurav Aradhye Authored: Tue Oct 28 14:38:05 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:01:31 2014 +0530 -- .../component/test_vpc_vms_deployment.py| 20 1 file changed, 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4174d3e/test/integration/component/test_vpc_vms_deployment.py -- diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py index 54586d0..e61b2f8 100644 --- a/test/integration/component/test_vpc_vms_deployment.py +++ b/test/integration/component/test_vpc_vms_deployment.py @@ -2087,26 +2087,6 @@ class TestVMDeployVPC(cloudstackTestCase): self.fail("Failed to enable static NAT on IP: %s - %s" % ( public_ip_4.ipaddress.ipaddress, e)) -public_ips = PublicIPAddress.list( -self.apiclient, -networkid=network_2.id, -listall=True, -isstaticnat=True, -account=self.account.name, -domainid=self.account.domainid - ) -self.assertEqual( - isinstance(public_ips, list), - True, - "List public Ip for network should list the Ip addr" - ) -self.assertEqual( - public_ips[0].ipaddress, - public_ip_4.ipaddress.ipaddress, - "List public Ips %s for network should list the Ip addr %s" - % (public_ips[0].ipaddress, public_ip_4.ipaddress.ipaddress) - ) - self.debug("Adding NetwrokACl rules to make NAT rule accessible with network %s" % network_1.id) NetworkACL.create( self.apiclient,
[3/3] git commit: updated refs/heads/4.5 to a1e7fee
CLOUDSTACK-7685: Fixed copy template method call in test_escalations_template.py. Removed unbound method of the same name as bound method from base library and changed method call accordingly Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a1e7feea Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a1e7feea Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a1e7feea Branch: refs/heads/4.5 Commit: a1e7feead91b22350f96114add4bf8d75a74b8b1 Parents: b1ab888 Author: Gaurav Aradhye Authored: Wed Oct 8 16:08:44 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:15:52 2014 +0530 -- test/integration/component/test_escalations_templates.py | 3 +-- tools/marvin/marvin/lib/base.py | 11 --- 2 files changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a1e7feea/test/integration/component/test_escalations_templates.py -- diff --git a/test/integration/component/test_escalations_templates.py b/test/integration/component/test_escalations_templates.py index 78028bc..3dc24c1 100644 --- a/test/integration/component/test_escalations_templates.py +++ b/test/integration/component/test_escalations_templates.py @@ -839,9 +839,8 @@ class TestTemplates(cloudstackTestCase): count = count + 1 # Copying the Template from Zone1 to Zone2 -copied_template = Template.copy( +copied_template = template_created.copy( self.userapiclient, -template_created.id, sourcezoneid=template_created.zoneid, destzoneid=zones_list[1].id ) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a1e7feea/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 7f53328..580d0ab 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -1255,17 +1255,6 @@ class Template: [setattr(cmd, k, v) for k, v in kwargs.items()] return(apiclient.updateTemplate(cmd)) -@classmethod -def copy(cls, apiclient, id, sourcezoneid, destzoneid): -"Copy Template from source Zone to Destination Zone" - -cmd = copyTemplate.copyTemplateCmd() -cmd.id = id -cmd.sourcezoneid = sourcezoneid -cmd.destzoneid = destzoneid - -return apiclient.copyTemplate(cmd) - def copy(self, apiclient, sourcezoneid, destzoneid): "Copy Template from source Zone to Destination Zone"
[2/3] git commit: updated refs/heads/4.5 to a1e7fee
CLOUDSTACK-7801: test_volumes.py - Fixed import and pep8 issues Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b1ab888b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b1ab888b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b1ab888b Branch: refs/heads/4.5 Commit: b1ab888bf0ae1c5f63e515de28be482d18bb884c Parents: af510eb Author: Gaurav Aradhye Authored: Tue Oct 28 12:30:22 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:07:52 2014 +0530 -- test/integration/component/test_volumes.py | 1131 --- 1 file changed, 593 insertions(+), 538 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b1ab888b/test/integration/component/test_volumes.py -- diff --git a/test/integration/component/test_volumes.py b/test/integration/component/test_volumes.py index 36a910b..77cad54 100644 --- a/test/integration/component/test_volumes.py +++ b/test/integration/component/test_volumes.py @@ -16,13 +16,13 @@ # under the License. """ P1 tests for Volumes """ -#Import Local Modules +# Import Local Modules from nose.plugins.attrib import attr from marvin.cloudstackTestCase import cloudstackTestCase from marvin.cloudstackAPI import (listHypervisorCapabilities, attachIso, deleteVolume) -from marvin.lib.utils import cleanup_resources +from marvin.lib.utils import cleanup_resources, validateList from marvin.lib.base import (Account, ServiceOffering, VirtualMachine, @@ -31,70 +31,73 @@ from marvin.lib.base import (Account, Iso, Configurations, DiskOffering, - Domain) + Domain, + StoragePool) from marvin.lib.common import (get_domain, get_zone, get_template, get_pod) -#Import System modules +from marvin.codes import PASS +# Import System modules import time class Services: + """Test Volume Services """ def __init__(self): self.services = { - "account": { -"email": "t...@test.com", -"firstname": "Test", -"lastname": "User", -"username": "test", -# Random characters are appended for unique -# username -"password": "password", - }, - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 100,# in MHz +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +# Random characters are appended for unique +# username +"password": "password", +}, +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100,# in MHz "memory": 128, # In MBs -}, -"disk_offering": { -"displaytext": "Small", -"name": "Small", -"disksize": 1 -}, -"volume": { -"diskname": "TestDiskServ", -}, - "virtual_machine": { -&q
[1/3] git commit: updated refs/heads/4.5 to a1e7fee
Repository: cloudstack Updated Branches: refs/heads/4.5 a4174d3e9 -> a1e7feead CLOUDSTACK-7802: test_vpc_network.py - Increasing polling period for network state check Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/af510eb6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/af510eb6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/af510eb6 Branch: refs/heads/4.5 Commit: af510eb656eac08eb7f299ad970d49d9f3d96eb3 Parents: a4174d3 Author: Gaurav Aradhye Authored: Tue Oct 28 13:38:10 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:06:46 2014 +0530 -- test/integration/component/test_vpc_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/af510eb6/test/integration/component/test_vpc_network.py -- diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index 096315c..f4c0a2f 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -1934,7 +1934,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): # When all Vms ain network are stopped, network state changes from Implemented --> Shutdown --> Allocated # We can't update the network when it is in Shutodown state, hence we should wait for the state to change to # Allocated and then update the network -retriesCount = 10 +retriesCount = 20 while True: networks = list_networks(self.apiclient, id=network_1.id) self.assertEqual(validateList(networks)[0], PASS, "networks list validation failed, list id %s" % networks)
[4/5] git commit: updated refs/heads/4.5 to aa1e260
CLOUDSTACK-7692: Fixed template register issue in test_project_usage.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4f297efe Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4f297efe Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4f297efe Branch: refs/heads/4.5 Commit: 4f297efef5627f04348a6b9ac550bef2364cb661 Parents: e2ba1b6 Author: Gaurav Aradhye Authored: Thu Oct 9 15:14:30 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:33:37 2014 +0530 -- test/integration/component/test_project_usage.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4f297efe/test/integration/component/test_project_usage.py -- diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py index 3262e40..2627504 100644 --- a/test/integration/component/test_project_usage.py +++ b/test/integration/component/test_project_usage.py @@ -712,6 +712,9 @@ class TestTemplateUsage(cloudstackTestCase): domainid=cls.domain.id ) cls._cleanup.append(cls.account) +cls.userapiclient = cls.testClient.getUserApiClient( +UserName=cls.account.name, +DomainName=cls.account.domain) cls.services["account"] = cls.account.name cls.project = Project.create( @@ -789,7 +792,7 @@ class TestTemplateUsage(cloudstackTestCase): #Create template from Virtual machine and Volume ID self.template = Template.create( -self.apiclient, +self.userapiclient, self.services["templates"], self.volume.id, projectid=self.project.id
[5/5] git commit: updated refs/heads/4.5 to aa1e260
CLOUDSTACK-7728: Test script to identify product issue Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aa1e2608 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aa1e2608 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aa1e2608 Branch: refs/heads/4.5 Commit: aa1e26081208b5d6c758a6efbbf3b62ab2d6720d Parents: 4f297ef Author: Gaurav Aradhye Authored: Fri Oct 17 14:43:21 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:35:32 2014 +0530 -- test/integration/component/test_egress_fw_rules.py | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aa1e2608/test/integration/component/test_egress_fw_rules.py -- diff --git a/test/integration/component/test_egress_fw_rules.py b/test/integration/component/test_egress_fw_rules.py index 12bade4..0122e4f 100755 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -397,11 +397,18 @@ class TestEgressFWRules(cloudstackTestCase): # 2. login to VM. # 3. ping public network. # 4. public network should be reachable from the VM. +# 5. Reboot the router +# 6. Ping public network from VM, it should be reachable self.create_vm() self.exec_script_on_user_vm('ping -c 1 www.google.com', "| grep -oP \'\d+(?=% packet loss)\'", "['0']", negative_test=False) +self.reboot_Router() +self.exec_script_on_user_vm('ping -c 1 www.google.com', +"| grep -oP \'\d+(?=% packet loss)\'", +"['0']", +negative_test=False) @attr(tags=["advanced"], required_hardware="true") def test_01_1_egress_fr1(self):
[1/5] git commit: updated refs/heads/4.5 to aa1e260
Repository: cloudstack Updated Branches: refs/heads/4.5 a1e7feead -> aa1e26081 CLOUDSTACK-7682: Fixed usage event issue. Used api client of account for which we are checking the usage Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b9fed951 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b9fed951 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b9fed951 Branch: refs/heads/4.5 Commit: b9fed951ef6498c828f07ab120a242fcf15e14f6 Parents: a1e7fee Author: Gaurav Aradhye Authored: Wed Oct 8 11:25:15 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:28:39 2014 +0530 -- test/integration/component/test_usage.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b9fed951/test/integration/component/test_usage.py -- diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py index 81cce48..58cfbed 100644 --- a/test/integration/component/test_usage.py +++ b/test/integration/component/test_usage.py @@ -669,6 +669,9 @@ class TestTemplateUsage(cloudstackTestCase): domainid=cls.domain.id ) cls._cleanup.append(cls.account) +cls.userapiclient = cls.testClient.getUserApiClient( +UserName=cls.account.name, +DomainName=cls.account.domain) cls.services["account"] = cls.account.name cls.service_offering = ServiceOffering.create( @@ -742,7 +745,7 @@ class TestTemplateUsage(cloudstackTestCase): #Create template from Virtual machine and Volume ID self.template = Template.create( -self.apiclient, +self.userapiclient, self.services["templates"], self.volume.id, TestTemplateUsage.account.name, @@ -750,7 +753,7 @@ class TestTemplateUsage(cloudstackTestCase): ) self.debug("Created template with ID: %s" % self.template.id) # Delete template -self.template.delete(self.apiclient) +self.template.delete(self.userapiclient) self.debug("Deleted template with ID: %s" % self.template.id) # Fetch account ID from account_uuid
[3/5] git commit: updated refs/heads/4.5 to aa1e260
CLOUDSTACK-7691: Fixed 'Exception not raised' issue in test_project_limits.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e2ba1b61 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e2ba1b61 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e2ba1b61 Branch: refs/heads/4.5 Commit: e2ba1b614c7792856314cfa363f2a4e9cd667065 Parents: dc4b04f Author: Gaurav Aradhye Authored: Thu Oct 9 14:56:34 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:32:24 2014 +0530 -- .../component/test_project_limits.py| 51 ++-- 1 file changed, 37 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2ba1b61/test/integration/component/test_project_limits.py -- diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py index 5f33ad8..5d37f0b 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -5,9 +5,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -17,16 +17,35 @@ """ P1 tests for Resource limits """ #Import Local Modules -import marvin from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase +#from marvin.cloudstackAPI import * +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + Domain, + Project, + Template, + Snapshot, + Volume, + NetworkOffering, + ServiceOffering, + VirtualMachine, + DiskOffering, + Configurations, + Network, + PublicIPAddress) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_snapshots, + list_volumes, + list_configurations, + list_resource_limits, + update_resource_limit + ) from marvin.codes import PASS -import datetime - +import time class Services: """Test Resource Limits Services @@ -525,6 +544,11 @@ class TestResourceLimitsProject(cloudstackTestCase): cls.services["account"], domainid=cls.domain.id ) + +cls.userapiclient = cls.testClient.getUserApiClient( +UserName=cls.account.name, +DomainName=cls.account.domain) + # Create project as a domain admin cls.project = Project.create( cls.api_client, @@ -713,7 +737,7 @@ class TestResourceLimitsProject(cloudstackTestCase): # Exception should be raised for second Public IP with self.assertRaises(Exception): -public_ip_2 = PublicIPAddress.create( +PublicIPAddress.create( self.apiclient, zoneid=virtual_machine_1.zoneid, services=self.services["server"], @@ -772,7 +796,6 @@ class TestResourceLimitsProject(cloudstackTestCase): True, "Check for list volume response return valid data" ) -volume = volumes[0] self.debug("Creating snapshot from volume: %s" % volumes[0].id) # Create a snapshot from the ROOTDISK @@ -915,7 +938,7 @@ class TestResourceLimitsProject(cloudstackTestCase): self.debug("Creating tem
[2/5] git commit: updated refs/heads/4.5 to aa1e260
CLOUDSTACK-7684: Fixed Exception not raised issue in secondary storage limits test suite test_ss_max_limits.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dc4b04fb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dc4b04fb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dc4b04fb Branch: refs/heads/4.5 Commit: dc4b04fbe87048849d51e9e4dbcce566de7f9cf0 Parents: b9fed95 Author: Gaurav Aradhye Authored: Wed Oct 8 11:57:45 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 15:31:19 2014 +0530 -- test/integration/component/test_ss_max_limits.py | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dc4b04fb/test/integration/component/test_ss_max_limits.py -- diff --git a/test/integration/component/test_ss_max_limits.py b/test/integration/component/test_ss_max_limits.py index ba886e8..49a1e4f 100644 --- a/test/integration/component/test_ss_max_limits.py +++ b/test/integration/component/test_ss_max_limits.py @@ -101,7 +101,7 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.services["template_2"]["hypervisor"] = builtin_info[1] self.services["template_2"]["format"] = builtin_info[2] -template = Template.register(self.apiclient, +template = Template.register(self.userapiclient, self.services["template_2"], zoneid=self.zone.id, account=self.child_do_admin.name if not inProject else None, @@ -110,7 +110,7 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): template.download(self.apiclient) -templates = Template.list(self.apiclient, +templates = Template.list(self.userapiclient, templatefilter=\ self.services["template_2"]["templatefilter"], id=template.id) @@ -131,6 +131,10 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.child_do_admin = Account.create(self.apiclient, self.services["account"], admin=True, domainid=self.child_domain.id) +self.userapiclient = self.testClient.getUserApiClient( +UserName=self.child_do_admin.name, +DomainName=self.child_do_admin.domain) + # Create project as a domain admin self.project = Project.create(self.apiclient, self.services["project"], account=self.child_do_admin.name, @@ -195,11 +199,12 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.assertEqual(response[0], PASS, response[1]) with self.assertRaises(Exception): -template = Template.register(self.apiclient, +template = Template.register(self.userapiclient, self.services["template_2"], zoneid=self.zone.id, account=self.child_do_admin.name, domainid=self.child_do_admin.domainid) +template.delete(self.userapiclient) return @attr(tags=["advanced"], required_hardware="false") @@ -231,11 +236,12 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.assertEqual(response[0], PASS, response[1]) with self.assertRaises(Exception): -template = Template.register(self.apiclient, +template = Template.register(self.userapiclient, self.services["template_2"], zoneid=self.zone.id, account=self.child_do_admin.name, domainid=self.child_do_admin.domainid) +template.delete(self.userapiclient) return @attr(tags=["advanced"], required_hardware="false") @@ -256,7 +262,7 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.assertEqual(response[0], PASS, response[1]) try: -projects = Project.list(self.apiclient, id=self.project.id, listall=True) +projects = Project.list(self.userapiclient, id=self.project.id, listall=True) except Exce
git commit: updated refs/heads/4.2 to 14b8468
Repository: cloudstack Updated Branches: refs/heads/4.2 d0db137d8 -> 14b846877 CLOUDSTACK-7817: use debian 7.7.0 in the definition.rb Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/14b84687 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/14b84687 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/14b84687 Branch: refs/heads/4.2 Commit: 14b846877e6c79794e7d60b058a67f4b8e98dab6 Parents: d0db137 Author: SrikanteswaraRao Talluri Authored: Thu Oct 30 17:57:55 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 17:59:32 2014 +0530 -- tools/appliance/build.sh | 2 +- tools/appliance/definitions/systemvmtemplate/definition.rb | 6 +++--- tools/appliance/definitions/systemvmtemplate64/definition.rb | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b84687/tools/appliance/build.sh -- diff --git a/tools/appliance/build.sh b/tools/appliance/build.sh index 595dd58..3ce9db1 100644 --- a/tools/appliance/build.sh +++ b/tools/appliance/build.sh @@ -68,7 +68,7 @@ which faketime >/dev/null 2>&1 && which vhd-util >/dev/null 2>&1 if [ $? == 0 ]; then set -e vboxmanage internalcommands converttoraw -format vdi "$hdd_path" img.raw - faketime '2010-01-01' vhd-util convert -s 0 -t 1 -i img.raw -o stagefixed.vhd + vhd-util convert -s 0 -t 1 -i img.raw -o stagefixed.vhd faketime '2010-01-01' vhd-util convert -s 1 -t 2 -i stagefixed.vhd -o $appliance-$build_date-$branch-xen.vhd rm *.bak bzip2 $appliance-$build_date-$branch-xen.vhd http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b84687/tools/appliance/definitions/systemvmtemplate/definition.rb -- diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb index c9f0ba4..fd4dbf7 100644 --- a/tools/appliance/definitions/systemvmtemplate/definition.rb +++ b/tools/appliance/definitions/systemvmtemplate/definition.rb @@ -3,9 +3,9 @@ Veewee::Definition.declare({ :memory_size=> '256', :disk_size => '2000', :disk_format => 'VDI', :hostiocache => 'off', :os_type_id => 'Debian', - :iso_file => "debian-7.5.0-i386-netinst.iso", - :iso_src => "http://cdimage.debian.org/mirror/cdimage/archive/7.5.0/i386/iso-cd/debian-7.5.0-i386-netinst.iso";, - :iso_md5 => "0e6eaacb5a5828473afe90f6df9c8f16", + :iso_file => "debian-7.7.0-i386-netinst.iso", + :iso_src => "http://cdimage.debian.org/debian-cd/7.7.0/i386/iso-cd/debian-7.7.0-i386-netinst.iso";, + :iso_md5 => "76d512c44a9b7eca53ea2812ad5ac36f", :iso_download_timeout => "1000", :boot_wait => "10", :boot_cmd_sequence => [ '', http://git-wip-us.apache.org/repos/asf/cloudstack/blob/14b84687/tools/appliance/definitions/systemvmtemplate64/definition.rb -- diff --git a/tools/appliance/definitions/systemvmtemplate64/definition.rb b/tools/appliance/definitions/systemvmtemplate64/definition.rb index cd7e146..4f547b2 100644 --- a/tools/appliance/definitions/systemvmtemplate64/definition.rb +++ b/tools/appliance/definitions/systemvmtemplate64/definition.rb @@ -3,9 +3,9 @@ Veewee::Definition.declare({ :memory_size=> '256', :disk_size => '2000', :disk_format => 'VDI', :hostiocache => 'off', :os_type_id => 'Debian_64', - :iso_file => "debian-7.5.0-amd64-netinst.iso", - :iso_src => "http://cdimage.debian.org/mirror/cdimage/archive/7.5.0/amd64/iso-cd/debian-7.5.0-amd64-netinst.iso";, - :iso_md5 => "8fdb6715228ea90faba58cb84644d296", + :iso_file => "debian-7.7.0-amd64-netinst.iso", + :iso_src => "http://cdimage.debian.org/debian-cd/7.7.0/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso";, + :iso_md5 => "0b31bb048d20b551f70830bb7ad0", :iso_download_timeout => "1000", :boot_wait => "10", :boot_cmd_sequence => [ '',
git commit: updated refs/heads/4.5 to a69950f
Repository: cloudstack Updated Branches: refs/heads/4.5 aa1e26081 -> a69950f6a CLOUDSTACK-7632:Automation for volume life cycle testPath Signed-off-by: SrikanteswaraRao Talluri This closes #32 Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a69950f6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a69950f6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a69950f6 Branch: refs/heads/4.5 Commit: a69950f6a97819c9c071ad9f278377f2a5ca77ca Parents: aa1e260 Author: Prashant Kumar Mishra Authored: Thu Oct 9 11:42:56 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Thu Oct 30 18:30:25 2014 +0530 -- .../testpaths/testpath_volumelifecycle.py | 967 ++- 1 file changed, 732 insertions(+), 235 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a69950f6/test/integration/testpaths/testpath_volumelifecycle.py -- diff --git a/test/integration/testpaths/testpath_volumelifecycle.py b/test/integration/testpaths/testpath_volumelifecycle.py index d30f2b0..526d20c 100644 --- a/test/integration/testpaths/testpath_volumelifecycle.py +++ b/test/integration/testpaths/testpath_volumelifecycle.py @@ -16,11 +16,12 @@ # under the License. """Utilities functions """ -#All tests inherit from cloudstackTestCase +# All tests inherit from cloudstackTestCase from marvin.cloudstackTestCase import cloudstackTestCase -#Import Integration Libraries +# Import Integration Libraries from marvin.codes import FAILED, PASS -#base - contains all resources as entities and defines create, delete, list operations on them +# base - contains all resources as entities and defines create, delete, +# list operations on them from marvin.lib.base import (Account, VirtualMachine, ServiceOffering, @@ -28,10 +29,11 @@ from marvin.lib.base import (Account, DiskOffering, Volume, Template, - StoragePool) + StoragePool, + Resources) from marvin.lib.utils import cleanup_resources, validateList -#common - commonly used methods for all tests are listed here +# common - commonly used methods for all tests are listed here from marvin.lib.common import (get_zone, get_domain, get_template, @@ -43,54 +45,97 @@ import tempfile def verify_attach_volume(self, vmid, volid): -list_volumes = Volume.list(self.userapiclient, - id=volid - ) -self.assertEqual(validateList(list_volumes)[0], PASS, "Check List volume response for volume %s" % volid) -self.assertEqual(len(list_volumes), 1, "There is no data disk attached to vm id:%s" % vmid) -self.assertEqual(list_volumes[0].virtualmachineid, vmid, "Check if volume state (attached) is reflected") -self.debug("volume id:%s successfully attached to vm id%s" % (volid, vmid)) -return +list_volumes = Volume.list(self.userapiclient, + id=volid + ) +self.assertEqual( +validateList(list_volumes)[0], +PASS, +"Check List volume response for volume %s" % +volid) +self.assertEqual( +len(list_volumes), +1, +"There is no data disk attached to vm id:%s" % +vmid) +self.assertEqual( +list_volumes[0].virtualmachineid, +vmid, +"Check if volume state (attached) is reflected") +self.debug("volume id:%s successfully attached to vm id%s" % (volid, vmid)) +return def verify_detach_volume(self, vmid, volid): -list_volumes = Volume.list(self.userapiclient, - id=volid - ) -self.assertEqual(validateList(list_volumes)[0], PASS, "Check List volume response for volume %s" % volid) -self.assertEqual(len(list_volumes), 1, "Detach data disk id: %s for vm id :%s was not successful" % (volid, vmid)) -self.assertEqual(list_volumes[0].virtualmachineid, None, "Check if volume state (attached) is reflected") -self.debug("volume id: %s successfully detached from vm id:%s" % (volid, vmid)) +list_volumes = Volume.list(self.userapiclient, + id=volid + ) +self.assertEqual( +
git commit: updated refs/heads/master to 93529e4
Repository: cloudstack Updated Branches: refs/heads/master 03a43159d -> 93529e47f CLOUDSTACK-7824: using debian 7.7.0 and added 'sharutils' package installation in system template Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/93529e47 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/93529e47 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/93529e47 Branch: refs/heads/master Commit: 93529e47fda38e199b108d046c94d8766c92dd88 Parents: 03a4315 Author: SrikanteswaraRao Talluri Authored: Fri Oct 31 11:07:53 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 31 18:52:17 2014 +0530 -- .../definitions/systemvmtemplate/definition.rb | 12 ++-- .../systemvmtemplate/install_systemvm_packages.sh | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93529e47/tools/appliance/definitions/systemvmtemplate/definition.rb -- diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb index 5965406..c3acfc6 100644 --- a/tools/appliance/definitions/systemvmtemplate/definition.rb +++ b/tools/appliance/definitions/systemvmtemplate/definition.rb @@ -27,15 +27,15 @@ arch = ENV['VM_ARCH'] || 'i386' architectures = { :i386 => { :os_type_id => 'Debian', -:iso_file => 'debian-7.6.0-i386-netinst.iso', -:iso_src => 'http://cdimage.debian.org/debian-cd/7.6.0/i386/iso-cd/debian-7.6.0-i386-netinst.iso', -:iso_md5 => '528e1a7315da1bbf50bd4d187880a519', +:iso_file => 'iso-cd/debian-7.7.0-i386-netinst.iso', +:iso_src => 'http://cdimage.debian.org/debian-cd/7.7.0/i386/iso-cd/debian-7.7.0-i386-netinst.iso', +:iso_md5 => '76d512c44a9b7eca53ea2812ad5ac36f', }, :amd64 => { :os_type_id => 'Debian_64', -:iso_file => 'debian-7.6.0-amd64-netinst.iso', -:iso_src => 'http://cdimage.debian.org/debian-cd/7.6.0/amd64/iso-cd/debian-7.6.0-amd64-netinst.iso', -:iso_md5 => '8a3c2ad7fd7a9c4c7e9bcb5cae38c135' +:iso_file => 'debian-7.7.0-amd64-netinst.iso', +:iso_src => 'http://cdimage.debian.org/debian-cd/7.7.0/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso', +:iso_md5 => '0b31bb048d20b551f70830bb7ad0' } } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/93529e47/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh -- diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh index bc29e62..31ba2d4 100644 --- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh +++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh @@ -72,7 +72,8 @@ function install_packages() { libtcnative-1 libssl-dev libapr1-dev \ open-vm-tools \ haproxy \ -radvd +radvd \ +sharutils # commented out installation of vmware-tools as we are using the open source open-vm-tools: # ${apt_install} build-essential linux-headers-`uname -r`
git commit: updated refs/heads/4.5 to e463d6d
Repository: cloudstack Updated Branches: refs/heads/4.5 e1c788ca3 -> e463d6d21 CLOUDSTACK-7824: using debian 7.7.0 for systemvm template Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e463d6d2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e463d6d2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e463d6d2 Branch: refs/heads/4.5 Commit: e463d6d21c346b71b3d810f8dfb9dbe5f1a931fd Parents: e1c788c Author: SrikanteswaraRao Talluri Authored: Thu Oct 30 17:31:47 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 31 19:06:07 2014 +0530 -- tools/appliance/definitions/systemvm64template/definition.rb | 6 +++--- tools/appliance/definitions/systemvmtemplate/definition.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e463d6d2/tools/appliance/definitions/systemvm64template/definition.rb -- diff --git a/tools/appliance/definitions/systemvm64template/definition.rb b/tools/appliance/definitions/systemvm64template/definition.rb index 4186742..8dbf724 100644 --- a/tools/appliance/definitions/systemvm64template/definition.rb +++ b/tools/appliance/definitions/systemvm64template/definition.rb @@ -10,9 +10,9 @@ Veewee::Definition.declare({ :memory_size=> '256', :disk_size => '2500', :disk_format => 'VDI', :hostiocache => 'off', :os_type_id => 'Debian_64', - :iso_file => "debian-7.5.0-amd64-netinst.iso", - :iso_src => "http://cdimage.debian.org/mirror/cdimage/archive/7.5.0/amd64/iso-cd/debian-7.5.0-amd64-netinst.iso";, - :iso_md5 => "8fdb6715228ea90faba58cb84644d296", + :iso_file => "debian-7.7.0-amd64-netinst.iso", + :iso_src => "http://ftp.acc.umu.se/debian-cd/7.7.0/amd64/iso-cd/debian-7.7.0-amd64-netinst.iso";, + :iso_md5 => "0b31bb048d20b551f70830bb7ad0", :iso_download_timeout => "1000", :boot_wait => "10", :boot_cmd_sequence => [ '', http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e463d6d2/tools/appliance/definitions/systemvmtemplate/definition.rb -- diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb index d29efcd..91514bf 100644 --- a/tools/appliance/definitions/systemvmtemplate/definition.rb +++ b/tools/appliance/definitions/systemvmtemplate/definition.rb @@ -10,9 +10,9 @@ Veewee::Definition.declare({ :memory_size=> '256', :disk_size => '2500', :disk_format => 'VDI', :hostiocache => 'off', :os_type_id => 'Debian', - :iso_file => "debian-7.5.0-i386-netinst.iso", - :iso_src => "http://cdimage.debian.org/mirror/cdimage/archive/7.5.0/i386/iso-cd/debian-7.5.0-i386-netinst.iso";, - :iso_md5 => "0e6eaacb5a5828473afe90f6df9c8f16", + :iso_file => "debian-7.7.0-i386-netinst.iso", + :iso_src => "http://ftp.acc.umu.se/debian-cd/7.7.0/i386/iso-cd/debian-7.7.0-i386-netinst.iso";, + :iso_md5 => "76d512c44a9b7eca53ea2812ad5ac36f", :iso_download_timeout => "1000", :boot_wait => "10", :boot_cmd_sequence => [ '',
git commit: updated refs/heads/master to 6c04d86
Repository: cloudstack Updated Branches: refs/heads/master 93529e47f -> 6c04d867b CLOUDSTACK-7660: Enhance system vm template to support baremetal Installed flask package and removed the disk expert recipe in system vm template to keep only one partition Signed-off-by: Frank Zhang Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6c04d867 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c04d867 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c04d867 Branch: refs/heads/master Commit: 6c04d867b0a70dd00fa8e4dcf3f0701a5f1feeb2 Parents: 93529e4 Author: Harikrishna Patnala Authored: Fri Oct 31 18:50:17 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Fri Oct 31 19:35:09 2014 +0530 -- .../install_systemvm_packages.sh| 1 + .../definitions/systemvmtemplate/preseed.cfg| 41 2 files changed, 1 insertion(+), 41 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c04d867/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh -- diff --git a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh index 31ba2d4..0cb2a92 100644 --- a/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh +++ b/tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh @@ -71,6 +71,7 @@ function install_packages() { iptables-persistent \ libtcnative-1 libssl-dev libapr1-dev \ open-vm-tools \ +python-flask \ haproxy \ radvd \ sharutils http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c04d867/tools/appliance/definitions/systemvmtemplate/preseed.cfg -- diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg index 0d2f70b..832a296 100644 --- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg +++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg @@ -42,47 +42,6 @@ d-i clock-setup/ntp boolean true d-i partman-auto/disk string /dev/sda d-i partman-auto/method string regular d-i partman-auto/choose_recipe select atomic -d-i partman-auto/expert_recipe string \ - boot-root ::\ - 30 50 100 ext4 \ - $primary{ } $bootable{ }\ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ /boot } \ - . \ - 400 40 500 ext4 \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ / } \ - . \ - 50 100 200 ext4 \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ /home } \ - . \ - 700 70 1100 ext4\ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ /usr } \ - . \ - 400 40 500 ext4 \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ /opt } \ - . \ - 450 70 1000 ext4\ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ /var } \ - . \ - 50 60 100 ext4 \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 }\ - mountpoint{ /
git commit: updated refs/heads/master to 9e37a51
Repository: cloudstack Updated Branches: refs/heads/master 62c5cefb8 -> 9e37a51bd CLOUDSTACK-7632:Automation for volume life cycle testPath Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9e37a51b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9e37a51b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9e37a51b Branch: refs/heads/master Commit: 9e37a51bdea2183eeebf694cece3ac67c54ba36e Parents: 62c5cef Author: Prashant Kumar Mishra Authored: Thu Oct 9 11:42:56 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:12:16 2014 +0530 -- .../testpaths/testpath_volumelifecycle.py | 967 ++- 1 file changed, 732 insertions(+), 235 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e37a51b/test/integration/testpaths/testpath_volumelifecycle.py -- diff --git a/test/integration/testpaths/testpath_volumelifecycle.py b/test/integration/testpaths/testpath_volumelifecycle.py index d30f2b0..526d20c 100644 --- a/test/integration/testpaths/testpath_volumelifecycle.py +++ b/test/integration/testpaths/testpath_volumelifecycle.py @@ -16,11 +16,12 @@ # under the License. """Utilities functions """ -#All tests inherit from cloudstackTestCase +# All tests inherit from cloudstackTestCase from marvin.cloudstackTestCase import cloudstackTestCase -#Import Integration Libraries +# Import Integration Libraries from marvin.codes import FAILED, PASS -#base - contains all resources as entities and defines create, delete, list operations on them +# base - contains all resources as entities and defines create, delete, +# list operations on them from marvin.lib.base import (Account, VirtualMachine, ServiceOffering, @@ -28,10 +29,11 @@ from marvin.lib.base import (Account, DiskOffering, Volume, Template, - StoragePool) + StoragePool, + Resources) from marvin.lib.utils import cleanup_resources, validateList -#common - commonly used methods for all tests are listed here +# common - commonly used methods for all tests are listed here from marvin.lib.common import (get_zone, get_domain, get_template, @@ -43,54 +45,97 @@ import tempfile def verify_attach_volume(self, vmid, volid): -list_volumes = Volume.list(self.userapiclient, - id=volid - ) -self.assertEqual(validateList(list_volumes)[0], PASS, "Check List volume response for volume %s" % volid) -self.assertEqual(len(list_volumes), 1, "There is no data disk attached to vm id:%s" % vmid) -self.assertEqual(list_volumes[0].virtualmachineid, vmid, "Check if volume state (attached) is reflected") -self.debug("volume id:%s successfully attached to vm id%s" % (volid, vmid)) -return +list_volumes = Volume.list(self.userapiclient, + id=volid + ) +self.assertEqual( +validateList(list_volumes)[0], +PASS, +"Check List volume response for volume %s" % +volid) +self.assertEqual( +len(list_volumes), +1, +"There is no data disk attached to vm id:%s" % +vmid) +self.assertEqual( +list_volumes[0].virtualmachineid, +vmid, +"Check if volume state (attached) is reflected") +self.debug("volume id:%s successfully attached to vm id%s" % (volid, vmid)) +return def verify_detach_volume(self, vmid, volid): -list_volumes = Volume.list(self.userapiclient, - id=volid - ) -self.assertEqual(validateList(list_volumes)[0], PASS, "Check List volume response for volume %s" % volid) -self.assertEqual(len(list_volumes), 1, "Detach data disk id: %s for vm id :%s was not successful" % (volid, vmid)) -self.assertEqual(list_volumes[0].virtualmachineid, None, "Check if volume state (attached) is reflected") -self.debug("volume id: %s successfully detached from vm id:%s" % (volid, vmid)) +list_volumes = Volume.list(self.userapiclient, + id=volid + ) +self.assertEqual( +validateLis
[05/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7682: Fixed usage event issue. Used api client of account for which we are checking the usage Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/88312363 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/88312363 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/88312363 Branch: refs/heads/master Commit: 883123630c48d0246e811ba0366163fbdbc82010 Parents: 1f7ffb2 Author: Gaurav Aradhye Authored: Wed Oct 8 11:25:15 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:53:27 2014 +0530 -- test/integration/component/test_usage.py | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88312363/test/integration/component/test_usage.py -- diff --git a/test/integration/component/test_usage.py b/test/integration/component/test_usage.py index 81cce48..58cfbed 100644 --- a/test/integration/component/test_usage.py +++ b/test/integration/component/test_usage.py @@ -669,6 +669,9 @@ class TestTemplateUsage(cloudstackTestCase): domainid=cls.domain.id ) cls._cleanup.append(cls.account) +cls.userapiclient = cls.testClient.getUserApiClient( +UserName=cls.account.name, +DomainName=cls.account.domain) cls.services["account"] = cls.account.name cls.service_offering = ServiceOffering.create( @@ -742,7 +745,7 @@ class TestTemplateUsage(cloudstackTestCase): #Create template from Virtual machine and Volume ID self.template = Template.create( -self.apiclient, +self.userapiclient, self.services["templates"], self.volume.id, TestTemplateUsage.account.name, @@ -750,7 +753,7 @@ class TestTemplateUsage(cloudstackTestCase): ) self.debug("Created template with ID: %s" % self.template.id) # Delete template -self.template.delete(self.apiclient) +self.template.delete(self.userapiclient) self.debug("Deleted template with ID: %s" % self.template.id) # Fetch account ID from account_uuid
[09/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7805: test_vpc_vms_deployment.py - Removing invalid steps from test case Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0d6e3e48 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0d6e3e48 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0d6e3e48 Branch: refs/heads/master Commit: 0d6e3e48baf4844e4236779039abe76ec7b9d2de Parents: d5316d0 Author: Gaurav Aradhye Authored: Tue Oct 28 14:38:05 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:58:23 2014 +0530 -- .../component/test_vpc_vms_deployment.py| 20 1 file changed, 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0d6e3e48/test/integration/component/test_vpc_vms_deployment.py -- diff --git a/test/integration/component/test_vpc_vms_deployment.py b/test/integration/component/test_vpc_vms_deployment.py index 54586d0..e61b2f8 100644 --- a/test/integration/component/test_vpc_vms_deployment.py +++ b/test/integration/component/test_vpc_vms_deployment.py @@ -2087,26 +2087,6 @@ class TestVMDeployVPC(cloudstackTestCase): self.fail("Failed to enable static NAT on IP: %s - %s" % ( public_ip_4.ipaddress.ipaddress, e)) -public_ips = PublicIPAddress.list( -self.apiclient, -networkid=network_2.id, -listall=True, -isstaticnat=True, -account=self.account.name, -domainid=self.account.domainid - ) -self.assertEqual( - isinstance(public_ips, list), - True, - "List public Ip for network should list the Ip addr" - ) -self.assertEqual( - public_ips[0].ipaddress, - public_ip_4.ipaddress.ipaddress, - "List public Ips %s for network should list the Ip addr %s" - % (public_ips[0].ipaddress, public_ip_4.ipaddress.ipaddress) - ) - self.debug("Adding NetwrokACl rules to make NAT rule accessible with network %s" % network_1.id) NetworkACL.create( self.apiclient,
[10/11] git commit: updated refs/heads/master to 8b636bd
Revert "CLOUDSTACK-7408: Fixed - Private key of the ssh keypair was getting corrupted" This reverts commit e921ec6ec79c50096d58264d60c15091969ff888. CLOUDSTACK-7408: sshClient.py - removing function load_host_keys(). This function is used to load host keys from local host keys file and to save back the host key. It is not needed while running test cases because we are connecting to unknown host anyway and don't want to use any local host key file. We have the AutoAddPolicy for missing host key file, hence whenever ssh connects to a new host, it will save the host key in memory temporarily. Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9e19a9af Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9e19a9af Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9e19a9af Branch: refs/heads/master Commit: 9e19a9afdbe8ec2154c50fe421e0a1876ecebe2c Parents: 0d6e3e4 Author: Gaurrav Aradhye Authored: Thu Oct 30 12:23:49 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:59:04 2014 +0530 -- tools/marvin/marvin/lib/base.py | 8 +++- tools/marvin/marvin/lib/utils.py | 7 ++- tools/marvin/marvin/sshClient.py | 17 + 3 files changed, 6 insertions(+), 26 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e19a9af/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index cedb95b..580d0ab 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -552,7 +552,7 @@ class VirtualMachine: def get_ssh_client( self, ipaddress=None, reconnect=False, port=None, -keyPairFileLocation=None, knownHostsFilePath=None): +keyPairFileLocation=None): """Get SSH object of VM""" # If NAT Rules are not created while VM deployment in Advanced mode @@ -571,16 +571,14 @@ class VirtualMachine: self.ssh_port, self.username, self.password, -keyPairFileLocation=keyPairFileLocation, -knownHostsFilePath=knownHostsFilePath +keyPairFileLocation=keyPairFileLocation ) self.ssh_client = self.ssh_client or is_server_ssh_ready( self.ssh_ip, self.ssh_port, self.username, self.password, -keyPairFileLocation=keyPairFileLocation, -knownHostsFilePath=knownHostsFilePath +keyPairFileLocation=keyPairFileLocation ) return self.ssh_client http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e19a9af/tools/marvin/marvin/lib/utils.py -- diff --git a/tools/marvin/marvin/lib/utils.py b/tools/marvin/marvin/lib/utils.py index b58b59d..8788b3b 100644 --- a/tools/marvin/marvin/lib/utils.py +++ b/tools/marvin/marvin/lib/utils.py @@ -121,9 +121,7 @@ def cleanup_resources(api_client, resources): obj.delete(api_client) -def is_server_ssh_ready(ipaddress, port, username, password, retries=20, -retryinterv=30, timeout=10.0, keyPairFileLocation=None, -knownHostsFilePath=None): +def is_server_ssh_ready(ipaddress, port, username, password, retries=20, retryinterv=30, timeout=10.0, keyPairFileLocation=None): ''' @Name: is_server_ssh_ready @Input: timeout: tcp connection timeout flag, @@ -142,8 +140,7 @@ def is_server_ssh_ready(ipaddress, port, username, password, retries=20, keyPairFiles=keyPairFileLocation, retries=retries, delay=retryinterv, -timeout=timeout, -knownHostsFilePath=knownHostsFilePath) +timeout=timeout) except Exception, e: raise Exception("SSH connection has Failed. Waited %ss. Error is %s" % (retries * retryinterv, str(e))) else: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e19a9af/tools/marvin/marvin/sshClient.py -- diff --git a/tools/marvin/marvin/sshClient.py b/tools/marvin/marvin/sshClient.py index f027890..e481109 100644 --- a/tools/marvin/marvin/sshClient.py +++ b/tools/marvin/marvin/sshClient.py @@ -24,7 +24,6 @@ from paramiko import (BadHostKeyException, SFTPClient) import socket import time -import os from marvin.cloudstackException import ( internalError, GetDetailExceptionInfo @@ -50,8 +49,7 @@ class SshClient(object): ''' def __init__(self, ho
[04/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7684: Fixed Exception not raised issue in secondary storage limits test suite test_ss_max_limits.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1f7ffb26 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1f7ffb26 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1f7ffb26 Branch: refs/heads/master Commit: 1f7ffb26180969205ae6683f965178a97d70 Parents: bf7ce74 Author: Gaurav Aradhye Authored: Wed Oct 8 11:57:45 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:52:41 2014 +0530 -- test/integration/component/test_ss_max_limits.py | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1f7ffb26/test/integration/component/test_ss_max_limits.py -- diff --git a/test/integration/component/test_ss_max_limits.py b/test/integration/component/test_ss_max_limits.py index ba886e8..49a1e4f 100644 --- a/test/integration/component/test_ss_max_limits.py +++ b/test/integration/component/test_ss_max_limits.py @@ -101,7 +101,7 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.services["template_2"]["hypervisor"] = builtin_info[1] self.services["template_2"]["format"] = builtin_info[2] -template = Template.register(self.apiclient, +template = Template.register(self.userapiclient, self.services["template_2"], zoneid=self.zone.id, account=self.child_do_admin.name if not inProject else None, @@ -110,7 +110,7 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): template.download(self.apiclient) -templates = Template.list(self.apiclient, +templates = Template.list(self.userapiclient, templatefilter=\ self.services["template_2"]["templatefilter"], id=template.id) @@ -131,6 +131,10 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.child_do_admin = Account.create(self.apiclient, self.services["account"], admin=True, domainid=self.child_domain.id) +self.userapiclient = self.testClient.getUserApiClient( +UserName=self.child_do_admin.name, +DomainName=self.child_do_admin.domain) + # Create project as a domain admin self.project = Project.create(self.apiclient, self.services["project"], account=self.child_do_admin.name, @@ -195,11 +199,12 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.assertEqual(response[0], PASS, response[1]) with self.assertRaises(Exception): -template = Template.register(self.apiclient, +template = Template.register(self.userapiclient, self.services["template_2"], zoneid=self.zone.id, account=self.child_do_admin.name, domainid=self.child_do_admin.domainid) +template.delete(self.userapiclient) return @attr(tags=["advanced"], required_hardware="false") @@ -231,11 +236,12 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.assertEqual(response[0], PASS, response[1]) with self.assertRaises(Exception): -template = Template.register(self.apiclient, +template = Template.register(self.userapiclient, self.services["template_2"], zoneid=self.zone.id, account=self.child_do_admin.name, domainid=self.child_do_admin.domainid) +template.delete(self.userapiclient) return @attr(tags=["advanced"], required_hardware="false") @@ -256,7 +262,7 @@ class TestMaxSecondaryStorageLimits(cloudstackTestCase): self.assertEqual(response[0], PASS, response[1]) try: -projects = Project.list(self.apiclient, id=self.project.id, listall=True) +projects = Project.list(self.userapiclient, id=self.project.id, listall=True) except Exce
[06/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7802: test_vpc_network.py - Increasing polling period for network state check Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7b48b697 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7b48b697 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7b48b697 Branch: refs/heads/master Commit: 7b48b69763606ebf3d5f58c92016802c34796895 Parents: 8831236 Author: Gaurav Aradhye Authored: Tue Oct 28 13:38:10 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:53:59 2014 +0530 -- test/integration/component/test_vpc_network.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7b48b697/test/integration/component/test_vpc_network.py -- diff --git a/test/integration/component/test_vpc_network.py b/test/integration/component/test_vpc_network.py index 096315c..f4c0a2f 100644 --- a/test/integration/component/test_vpc_network.py +++ b/test/integration/component/test_vpc_network.py @@ -1934,7 +1934,7 @@ class TestVPCNetworkUpgrade(cloudstackTestCase): # When all Vms ain network are stopped, network state changes from Implemented --> Shutdown --> Allocated # We can't update the network when it is in Shutodown state, hence we should wait for the state to change to # Allocated and then update the network -retriesCount = 10 +retriesCount = 20 while True: networks = list_networks(self.apiclient, id=network_1.id) self.assertEqual(validateList(networks)[0], PASS, "networks list validation failed, list id %s" % networks)
[01/11] git commit: updated refs/heads/master to 8b636bd
Repository: cloudstack Updated Branches: refs/heads/master 9e37a51bd -> 8b636bd41 CLOUDSTACK-7728: Test script to identify product issue Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b277b1ab Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b277b1ab Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b277b1ab Branch: refs/heads/master Commit: b277b1abd812391bf5e0a9aba3406fc369a1a087 Parents: 9e37a51 Author: Gaurav Aradhye Authored: Fri Oct 17 14:43:21 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:22:07 2014 +0530 -- test/integration/component/test_egress_fw_rules.py | 7 +++ 1 file changed, 7 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b277b1ab/test/integration/component/test_egress_fw_rules.py -- diff --git a/test/integration/component/test_egress_fw_rules.py b/test/integration/component/test_egress_fw_rules.py index 12bade4..0122e4f 100755 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -397,11 +397,18 @@ class TestEgressFWRules(cloudstackTestCase): # 2. login to VM. # 3. ping public network. # 4. public network should be reachable from the VM. +# 5. Reboot the router +# 6. Ping public network from VM, it should be reachable self.create_vm() self.exec_script_on_user_vm('ping -c 1 www.google.com', "| grep -oP \'\d+(?=% packet loss)\'", "['0']", negative_test=False) +self.reboot_Router() +self.exec_script_on_user_vm('ping -c 1 www.google.com', +"| grep -oP \'\d+(?=% packet loss)\'", +"['0']", +negative_test=False) @attr(tags=["advanced"], required_hardware="true") def test_01_1_egress_fr1(self):
[08/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7685: Fixed copy template method call in test_escalations_template.py. Removed unbound method of the same name as bound method from base library and changed method call accordingly Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d5316d05 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d5316d05 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d5316d05 Branch: refs/heads/master Commit: d5316d0572df0843a5decb69c0385fc5fcf192b0 Parents: 6d7666b Author: Gaurav Aradhye Authored: Wed Oct 8 16:08:44 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:55:52 2014 +0530 -- test/integration/component/test_escalations_templates.py | 3 +-- tools/marvin/marvin/lib/base.py | 11 --- 2 files changed, 1 insertion(+), 13 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5316d05/test/integration/component/test_escalations_templates.py -- diff --git a/test/integration/component/test_escalations_templates.py b/test/integration/component/test_escalations_templates.py index 78028bc..3dc24c1 100644 --- a/test/integration/component/test_escalations_templates.py +++ b/test/integration/component/test_escalations_templates.py @@ -839,9 +839,8 @@ class TestTemplates(cloudstackTestCase): count = count + 1 # Copying the Template from Zone1 to Zone2 -copied_template = Template.copy( +copied_template = template_created.copy( self.userapiclient, -template_created.id, sourcezoneid=template_created.zoneid, destzoneid=zones_list[1].id ) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d5316d05/tools/marvin/marvin/lib/base.py -- diff --git a/tools/marvin/marvin/lib/base.py b/tools/marvin/marvin/lib/base.py index 77faeeb..cedb95b 100755 --- a/tools/marvin/marvin/lib/base.py +++ b/tools/marvin/marvin/lib/base.py @@ -1257,17 +1257,6 @@ class Template: [setattr(cmd, k, v) for k, v in kwargs.items()] return(apiclient.updateTemplate(cmd)) -@classmethod -def copy(cls, apiclient, id, sourcezoneid, destzoneid): -"Copy Template from source Zone to Destination Zone" - -cmd = copyTemplate.copyTemplateCmd() -cmd.id = id -cmd.sourcezoneid = sourcezoneid -cmd.destzoneid = destzoneid - -return apiclient.copyTemplate(cmd) - def copy(self, apiclient, sourcezoneid, destzoneid): "Copy Template from source Zone to Destination Zone"
[07/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7801: test_volumes.py - Fixed import and pep8 issues Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6d7666b1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6d7666b1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6d7666b1 Branch: refs/heads/master Commit: 6d7666b1351539b2f49deeed03b17ebd6da783bb Parents: 7b48b69 Author: Gaurav Aradhye Authored: Tue Oct 28 12:30:22 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:54:40 2014 +0530 -- test/integration/component/test_volumes.py | 1131 --- 1 file changed, 593 insertions(+), 538 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6d7666b1/test/integration/component/test_volumes.py -- diff --git a/test/integration/component/test_volumes.py b/test/integration/component/test_volumes.py index 36a910b..77cad54 100644 --- a/test/integration/component/test_volumes.py +++ b/test/integration/component/test_volumes.py @@ -16,13 +16,13 @@ # under the License. """ P1 tests for Volumes """ -#Import Local Modules +# Import Local Modules from nose.plugins.attrib import attr from marvin.cloudstackTestCase import cloudstackTestCase from marvin.cloudstackAPI import (listHypervisorCapabilities, attachIso, deleteVolume) -from marvin.lib.utils import cleanup_resources +from marvin.lib.utils import cleanup_resources, validateList from marvin.lib.base import (Account, ServiceOffering, VirtualMachine, @@ -31,70 +31,73 @@ from marvin.lib.base import (Account, Iso, Configurations, DiskOffering, - Domain) + Domain, + StoragePool) from marvin.lib.common import (get_domain, get_zone, get_template, get_pod) -#Import System modules +from marvin.codes import PASS +# Import System modules import time class Services: + """Test Volume Services """ def __init__(self): self.services = { - "account": { -"email": "t...@test.com", -"firstname": "Test", -"lastname": "User", -"username": "test", -# Random characters are appended for unique -# username -"password": "password", - }, - "service_offering": { -"name": "Tiny Instance", -"displaytext": "Tiny Instance", -"cpunumber": 1, -"cpuspeed": 100,# in MHz +"account": { +"email": "t...@test.com", +"firstname": "Test", +"lastname": "User", +"username": "test", +# Random characters are appended for unique +# username +"password": "password", +}, +"service_offering": { +"name": "Tiny Instance", +"displaytext": "Tiny Instance", +"cpunumber": 1, +"cpuspeed": 100,# in MHz "memory": 128, # In MBs -}, -"disk_offering": { -"displaytext": "Small", -"name": "Small", -"disksize": 1 -}, -"volume": { -"diskname": "TestDiskServ", -}, - "virtual_machine": { -
[03/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7691: Fixed 'Exception not raised' issue in test_project_limits.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/bf7ce74c Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/bf7ce74c Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/bf7ce74c Branch: refs/heads/master Commit: bf7ce74c9367c6889b87233e28c33243a65353c8 Parents: 5d37f37 Author: Gaurav Aradhye Authored: Thu Oct 9 14:56:34 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:52:03 2014 +0530 -- .../component/test_project_limits.py| 51 ++-- 1 file changed, 37 insertions(+), 14 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bf7ce74c/test/integration/component/test_project_limits.py -- diff --git a/test/integration/component/test_project_limits.py b/test/integration/component/test_project_limits.py index 5f33ad8..5d37f0b 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -5,9 +5,9 @@ # to you under the Apache License, Version 2.0 (the # "License"); you may not use this file except in compliance # with the License. You may obtain a copy of the License at -# +# # http://www.apache.org/licenses/LICENSE-2.0 -# +# # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -17,16 +17,35 @@ """ P1 tests for Resource limits """ #Import Local Modules -import marvin from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase +#from marvin.cloudstackAPI import * +from marvin.lib.utils import (cleanup_resources, + validateList) +from marvin.lib.base import (Account, + Domain, + Project, + Template, + Snapshot, + Volume, + NetworkOffering, + ServiceOffering, + VirtualMachine, + DiskOffering, + Configurations, + Network, + PublicIPAddress) +from marvin.lib.common import (get_domain, + get_zone, + get_template, + list_snapshots, + list_volumes, + list_configurations, + list_resource_limits, + update_resource_limit + ) from marvin.codes import PASS -import datetime - +import time class Services: """Test Resource Limits Services @@ -525,6 +544,11 @@ class TestResourceLimitsProject(cloudstackTestCase): cls.services["account"], domainid=cls.domain.id ) + +cls.userapiclient = cls.testClient.getUserApiClient( +UserName=cls.account.name, +DomainName=cls.account.domain) + # Create project as a domain admin cls.project = Project.create( cls.api_client, @@ -713,7 +737,7 @@ class TestResourceLimitsProject(cloudstackTestCase): # Exception should be raised for second Public IP with self.assertRaises(Exception): -public_ip_2 = PublicIPAddress.create( +PublicIPAddress.create( self.apiclient, zoneid=virtual_machine_1.zoneid, services=self.services["server"], @@ -772,7 +796,6 @@ class TestResourceLimitsProject(cloudstackTestCase): True, "Check for list volume response return valid data" ) -volume = volumes[0] self.debug("Creating snapshot from volume: %s" % volumes[0].id) # Create a snapshot from the ROOTDISK @@ -915,7 +938,7 @@ class TestResourceLimitsProject(cloudstackTestCase): self.debug("Creating tem
[11/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7800: VMware - Hot plug/unplug NIC to/from VM only when vmware tools are installed, else assert for exception Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8b636bd4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8b636bd4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8b636bd4 Branch: refs/heads/master Commit: 8b636bd41e2cf737d9e35b24741a81cf0912a695 Parents: 9e19a9a Author: Gaurav Aradhye Authored: Tue Oct 28 11:05:20 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:59:50 2014 +0530 -- test/integration/smoke/test_nic.py | 352 ++-- 1 file changed, 200 insertions(+), 152 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b636bd4/test/integration/smoke/test_nic.py -- diff --git a/test/integration/smoke/test_nic.py b/test/integration/smoke/test_nic.py index 488ed0a..f130bbe 100644 --- a/test/integration/smoke/test_nic.py +++ b/test/integration/smoke/test_nic.py @@ -15,24 +15,27 @@ # specific language governing permissions and limitations # under the License. """ NIC tests for VM """ -import marvin -from marvin.codes import FAILED -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.sshClient import SshClient -from marvin.lib.utils import * -from marvin.lib.base import * -from marvin.lib.common import * +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.lib.base import (Account, + ServiceOffering, + Network, + VirtualMachine, + NetworkOffering) +from marvin.lib.common import (get_zone, + get_template, + get_domain) from nose.plugins.attrib import attr import signal import sys import time + class TestNic(cloudstackTestCase): def setUp(self): self.cleanup = [] + def signal_handler(signal, frame): self.tearDown() sys.exit(0) @@ -40,171 +43,217 @@ class TestNic(cloudstackTestCase): # assign the signal handler immediately signal.signal(signal.SIGINT, signal_handler) -hypervisor = self.testClient.getHypervisorInfo() -if hypervisor.lower() == "hyperv": +self.hypervisor = self.testClient.getHypervisorInfo() +if self.hypervisor.lower() == "hyperv": raise unittest.SkipTest("Not supported on Hyper-V") try: self.apiclient = self.testClient.getApiClient() -self.dbclient = self.testClient.getDbConnection() -self.services = self.testClient.getParsedTestDataConfig() +self.dbclient = self.testClient.getDbConnection() +self.services = self.testClient.getParsedTestDataConfig() # Get Zone, Domain and templates domain = get_domain(self.apiclient) -zone = get_zone(self.apiclient, self.testClient.getZoneForTests()) -self.services['mode'] = zone.networktype +self.zone = get_zone( +self.apiclient, +self.testClient.getZoneForTests() +) -#if local storage is enabled, alter the offerings to use localstorage -#this step is needed for devcloud -if zone.localstorageenabled == True: -self.services["service_offerings"]["tiny"]["storagetype"] = 'local' +# if local storage is enabled, alter the offerings to use +# localstorage +# this step is needed for devcloud +if self.zone.localstorageenabled: +self.services["service_offerings"][ +"tiny"]["storagetype"] = 'local' template = get_template( -self.apiclient, -zone.id, -self.services["ostype"] -) +self.apiclient, +self.zone.id, +self.services["ostype"] +) # Set Zones and disk offerings -self.services["small"]["zoneid"] = zone.id +self.services["small"]["zoneid"] = self.zone.id self.services["small"]["template"] = template.id -self.services["iso1"]["zoneid
[02/11] git commit: updated refs/heads/master to 8b636bd
CLOUDSTACK-7692: Fixed template register issue in test_project_usage.py Signed-off-by: SrikanteswaraRao Talluri Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5d37f374 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5d37f374 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5d37f374 Branch: refs/heads/master Commit: 5d37f374366c5967a5f2d96577d022464bf9694c Parents: b277b1a Author: Gaurav Aradhye Authored: Thu Oct 9 15:14:30 2014 +0530 Committer: SrikanteswaraRao Talluri Committed: Tue Nov 4 11:23:01 2014 +0530 -- test/integration/component/test_project_usage.py | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5d37f374/test/integration/component/test_project_usage.py -- diff --git a/test/integration/component/test_project_usage.py b/test/integration/component/test_project_usage.py index 3262e40..2627504 100644 --- a/test/integration/component/test_project_usage.py +++ b/test/integration/component/test_project_usage.py @@ -712,6 +712,9 @@ class TestTemplateUsage(cloudstackTestCase): domainid=cls.domain.id ) cls._cleanup.append(cls.account) +cls.userapiclient = cls.testClient.getUserApiClient( +UserName=cls.account.name, +DomainName=cls.account.domain) cls.services["account"] = cls.account.name cls.project = Project.create( @@ -789,7 +792,7 @@ class TestTemplateUsage(cloudstackTestCase): #Create template from Virtual machine and Volume ID self.template = Template.create( -self.apiclient, +self.userapiclient, self.services["templates"], self.volume.id, projectid=self.project.id