git commit: updated refs/heads/master to c8b91f1
Updated Branches: refs/heads/master b4ceefa46 -> c8b91f1b7 CLOUDSTACK-4686: Fixed volume limit for domain Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c8b91f1b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c8b91f1b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c8b91f1b Branch: refs/heads/master Commit: c8b91f1b72d228b9979bdd38d62138eb84cb69c3 Parents: b4ceefa Author: Girish Shilamkar Authored: Mon Oct 28 11:36:20 2013 +0530 Committer: Girish Shilamkar Committed: Mon Oct 28 11:36:20 2013 +0530 -- test/integration/component/test_resource_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c8b91f1b/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 833723c..377aa74 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1185,7 +1185,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): self.apiclient, 2, # Volume domainid=self.account.domainid, - max=2 + max=1 ) self.debug("Deploying VM for account: %s" % self.account.name)
git commit: updated refs/heads/master to c53d4e9
Updated Branches: refs/heads/master 3205cd42b -> c53d4e9e1 CLOUDSTACK-2243: Add automation tests for VMs base image update faclity Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c53d4e9e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c53d4e9e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c53d4e9e Branch: refs/heads/master Commit: c53d4e9e141d5048a4ed2ea040fbef545c7ae9d1 Parents: 3205cd4 Author: Ashutosh Kelkar Authored: Thu Oct 31 14:49:17 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 14:55:29 2013 +0530 -- .../component/test_base_image_updation.py | 648 +++ tools/marvin/marvin/codes.py| 1 + tools/marvin/marvin/integration/lib/base.py | 11 + 3 files changed, 660 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c53d4e9e/test/integration/component/test_base_image_updation.py -- diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py new file mode 100644 index 000..8a99350 --- /dev/null +++ b/test/integration/component/test_base_image_updation.py @@ -0,0 +1,648 @@ +# 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. + +""" Component tests for Base Image Updation functionality + +Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Base+Image+Update+facility + +Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Base+Image+Updation+facility+TestPlan + +Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-2243 +""" + +#Import Local Modules +import marvin +from marvin.codes import (PASS, + RECURRING) +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (ServiceOffering, + Account, + VirtualMachine, + Volume, + Host, + Snapshot, + SnapshotPolicy, + Template + ) + +from marvin.integration.lib.common import (get_domain, + get_zone, + get_template, + list_templates + ) + +from marvin.integration.lib.utils import (validateList, + cleanup_resources) + +import time +from datetime import datetime, timedelta + +class Services: +"""Test Base Image Updation +""" + +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_with_reset": { +"name": "Tiny Instance With Reset", +"displaytext": "Tiny Instance With Reset", +"cpunumber": 1, +"cpuspeed": 100, +"memory": 128, +"isvolatile": True, +}, +"service_offering_without_reset": { +"name": "Tiny Instance Without Reset", +
git commit: updated refs/heads/4.2 to 4d7c66b
Updated Branches: refs/heads/4.2 bcadbe6f9 -> 4d7c66bde The code module represents enum for constant comparison This module provides facilitation to use uniform codes across various test features. Users can import this module and use these codes to maintain readability and one point of change. Signed-off-by: Santhosh Edukulla Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4d7c66bd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4d7c66bd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4d7c66bd Branch: refs/heads/4.2 Commit: 4d7c66bdeccdcd7e7d11422eeb01e6469a09246f Parents: bcadbe6 Author: Santhosh Edukulla Authored: Tue Oct 22 20:46:04 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 14:59:53 2013 +0530 -- tools/marvin/marvin/codes.py | 35 +++ 1 file changed, 35 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d7c66bd/tools/marvin/marvin/codes.py -- diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py new file mode 100644 index 000..6099d88 --- /dev/null +++ b/tools/marvin/marvin/codes.py @@ -0,0 +1,35 @@ +# 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. +""" +@Desc : This module defines all codes, constants maintained globally \ +and used across marvin and its test features.The main purpose \ +is to maintain readability, maintain one common place for \ +all codes used or reused across test features. It enhances \ +maintainability and readability. Users just import statement \ +to receive all the codes mentioned here. EX: Here, we define \ +a code viz., ENABLED with value "Enabled",then using \ +this code in a sample feature say test_a.py as below. \ + +from marvinCodes import * +if obj.getvalue() == ENABLED + +@DateAdded: 20th October 2013 +""" + +ENABLED = "Enabled" +NETWORK_OFFERING = "network_offering" +ROOT = "ROOT"
git commit: updated refs/heads/4.2 to e47dfb6
Updated Branches: refs/heads/4.2 4d7c66bde -> e47dfb673 CLOUDSTACK-2243: Add automation tests for VMs base image update faclity Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e47dfb67 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e47dfb67 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e47dfb67 Branch: refs/heads/4.2 Commit: e47dfb673cc71a0014fc320a0a14cb8942145e8f Parents: 4d7c66b Author: Ashutosh Kelkar Authored: Thu Oct 31 15:02:03 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 15:02:03 2013 +0530 -- .../component/test_base_image_updation.py | 648 +++ tools/marvin/marvin/codes.py| 1 + tools/marvin/marvin/integration/lib/base.py | 11 + 3 files changed, 660 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e47dfb67/test/integration/component/test_base_image_updation.py -- diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py new file mode 100644 index 000..8a99350 --- /dev/null +++ b/test/integration/component/test_base_image_updation.py @@ -0,0 +1,648 @@ +# 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. + +""" Component tests for Base Image Updation functionality + +Feature Specifications: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Base+Image+Update+facility + +Test Plan: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Base+Image+Updation+facility+TestPlan + +Issue Link: https://issues.apache.org/jira/browse/CLOUDSTACK-2243 +""" + +#Import Local Modules +import marvin +from marvin.codes import (PASS, + RECURRING) +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (ServiceOffering, + Account, + VirtualMachine, + Volume, + Host, + Snapshot, + SnapshotPolicy, + Template + ) + +from marvin.integration.lib.common import (get_domain, + get_zone, + get_template, + list_templates + ) + +from marvin.integration.lib.utils import (validateList, + cleanup_resources) + +import time +from datetime import datetime, timedelta + +class Services: +"""Test Base Image Updation +""" + +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_with_reset": { +"name": "Tiny Instance With Reset", +"displaytext": "Tiny Instance With Reset", +"cpunumber": 1, +"cpuspeed": 100, +"memory": 128, +"isvolatile": True, +}, +"service_offering_without_reset": { +"name": "Tiny Instance Without Reset", +
git commit: updated refs/heads/master to 58179d2
Updated Branches: refs/heads/master 0b617a13f -> 58179d288 CLOUDSTACK-4335: Delete test_deployVmSharedNetworkWithoutIpRange test_deployVmSharedNetworkWithoutIpRange creates a shared network without start and end ip. This is no longer permitted and creation of shared network will fail with error "insufficient capacity". So remove this test which is invalid. Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/58179d28 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/58179d28 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/58179d28 Branch: refs/heads/master Commit: 58179d28840a37e6b098d731d4fe6e6e5ea8ecf9 Parents: 0b617a1 Author: Girish Shilamkar Authored: Thu Oct 31 18:26:14 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 18:26:14 2013 +0530 -- .../component/test_shared_network_offering.py | 213 --- 1 file changed, 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/58179d28/test/integration/component/test_shared_network_offering.py -- diff --git a/test/integration/component/test_shared_network_offering.py b/test/integration/component/test_shared_network_offering.py deleted file mode 100644 index 85f0892..000 --- a/test/integration/component/test_shared_network_offering.py +++ /dev/null @@ -1,213 +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 -from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.integration.lib.utils import * -from marvin.integration.lib.base import * -from marvin.integration.lib.common import * - - -class Services: -"""Test network offering 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 -"memory": 128, # In MBs -}, - "network_offering": { -"name": 'Network offering-VR services', -"displaytext": 'Network offering-VR services', -"guestiptype": 'Isolated', -"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat', -"traffictype": 'GUEST', -"availability": 'Optional', -"serviceProviderList": { -"Dhcp": 'VirtualRouter', -"Dns": 'VirtualRouter', -"SourceNat": 'Virtu
git commit: updated refs/heads/4.2 to 733c355
Updated Branches: refs/heads/4.2 743eed877 -> 733c355ea CLOUDSTACK-4335: Delete test_deployVmSharedNetworkWithoutIpRange test_deployVmSharedNetworkWithoutIpRange creates a shared network without start and end ip. This is no longer permitted and creation of shared network will fail with error "insufficient capacity". So remove this test which is invalid. Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/733c355e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/733c355e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/733c355e Branch: refs/heads/4.2 Commit: 733c355eaa364e5402876b1347b206454b3bec66 Parents: 743eed8 Author: Girish Shilamkar Authored: Thu Oct 31 18:26:14 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 18:29:46 2013 +0530 -- .../component/test_shared_network_offering.py | 213 --- 1 file changed, 213 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/733c355e/test/integration/component/test_shared_network_offering.py -- diff --git a/test/integration/component/test_shared_network_offering.py b/test/integration/component/test_shared_network_offering.py deleted file mode 100644 index 85f0892..000 --- a/test/integration/component/test_shared_network_offering.py +++ /dev/null @@ -1,213 +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 -from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.integration.lib.utils import * -from marvin.integration.lib.base import * -from marvin.integration.lib.common import * - - -class Services: -"""Test network offering 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 -"memory": 128, # In MBs -}, - "network_offering": { -"name": 'Network offering-VR services', -"displaytext": 'Network offering-VR services', -"guestiptype": 'Isolated', -"supportedservices": 'Dhcp,Dns,SourceNat,PortForwarding,Vpn,Firewall,Lb,UserData,StaticNat', -"traffictype": 'GUEST', -"availability": 'Optional', -"serviceProviderList": { -"Dhcp": 'VirtualRouter', -"Dns": 'VirtualRouter', -"SourceNat": 'Virtu
git commit: updated refs/heads/master to 23499ef
Updated Branches: refs/heads/master afaf6370d -> 23499efe4 CLOUDSTACK-4995: Fixed test_reset_ssh_keypair which checks the state of the VM Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/23499efe Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/23499efe Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/23499efe Branch: refs/heads/master Commit: 23499efe42da721dd8123ab27e19531493318af4 Parents: afaf637 Author: Gaurav Aradhye Authored: Thu Oct 31 21:55:32 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 21:57:57 2013 +0530 -- .../component/test_reset_ssh_keypair.py | 48 tools/marvin/marvin/codes.py| 1 + 2 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/23499efe/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 4d0c45e..7530335 100644 --- a/test/integration/component/test_reset_ssh_keypair.py +++ b/test/integration/component/test_reset_ssh_keypair.py @@ -19,13 +19,28 @@ """ #Import Local Modules -from marvin.cloudstackTestCase import * -from marvin.integration.lib.base import * -from marvin.integration.lib.common import * +from marvin.integration.lib.base import (VirtualMachine, + SSHKeyPair, + Account, + Template, + ServiceOffering, + EgressFireWallRule) +from marvin.integration.lib.common import (get_domain, + get_zone, + get_template, + list_virtual_machines, + list_volumes) +from marvin.integration.lib.utils import (cleanup_resources, + random_gen, + validateList) +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.codes import PASS, RUNNING + #Import System modules import tempfile import os from nose.plugins.attrib import attr +import time class Services: @@ -82,17 +97,12 @@ class Services: "mode": 'advanced', } -def wait_vm_start(apiclient, account, timeout, sleep): +def wait_vm_start(apiclient, vmid, timeout, sleep): while timeout: -vms = VirtualMachine.list( - apiclient, - account=account.name, - domainid=account.domainid, - listall=True - ) -if vms and vms[0].state == "Running": +vms = VirtualMachine.list(apiclient, id=vmid) +vm_list_validation_result = validateList(vms) +if vm_list_validation_result[0] == PASS and vm_list_validation_result[1].state == RUNNING: return timeout - time.sleep(sleep) timeout = timeout - 1 @@ -363,7 +373,7 @@ class TestResetSSHKeypair(cloudstackTestCase): self.fail("Failed to start virtual machine: %s, %s" % (virtual_machine.name, e)) -timeout = wait_vm_start(self.apiclient, self.account, self.services["timeout"], +timeout = wait_vm_start(self.apiclient, virtual_machine.id, self.services["timeout"], self.services["sleep"]) if timeout == 0: @@ -473,7 +483,7 @@ class TestResetSSHKeypair(cloudstackTestCase): self.fail("Failed to start virtual machine: %s, %s" % (virtual_machine.name, e)) -timeout = wait_vm_start(self.apiclient, self.account, self.services["timeout"], +timeout = wait_vm_start(self.apiclient, virtual_machine.id, self.services["timeout"], self.services["sleep"]) if timeout == 0: @@ -583,7 +593,7 @@ class TestResetSSHKeypair(cloudstackTestCase): self.fail("Failed to start virtual machine: %s, %s" % (virtual_machine.name, e)) -timeout = wait_vm_start(self.apiclient, self.account, self.services["timeout"], +timeout = wait_vm_start(self.apiclient, virtu
git commit: updated refs/heads/4.2 to c61c592
Updated Branches: refs/heads/4.2 733c355ea -> c61c59267 CLOUDSTACK-4995: Fixed test_reset_ssh_keypair which checks the state of the VM Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c61c5926 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c61c5926 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c61c5926 Branch: refs/heads/4.2 Commit: c61c592677fc723c3562239893d56d59103d9594 Parents: 733c355 Author: Gaurav Aradhye Authored: Thu Oct 31 21:55:32 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 21:55:32 2013 +0530 -- .../component/test_reset_ssh_keypair.py | 48 tools/marvin/marvin/codes.py| 1 + 2 files changed, 30 insertions(+), 19 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c61c5926/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 4d0c45e..7530335 100644 --- a/test/integration/component/test_reset_ssh_keypair.py +++ b/test/integration/component/test_reset_ssh_keypair.py @@ -19,13 +19,28 @@ """ #Import Local Modules -from marvin.cloudstackTestCase import * -from marvin.integration.lib.base import * -from marvin.integration.lib.common import * +from marvin.integration.lib.base import (VirtualMachine, + SSHKeyPair, + Account, + Template, + ServiceOffering, + EgressFireWallRule) +from marvin.integration.lib.common import (get_domain, + get_zone, + get_template, + list_virtual_machines, + list_volumes) +from marvin.integration.lib.utils import (cleanup_resources, + random_gen, + validateList) +from marvin.cloudstackTestCase import cloudstackTestCase, unittest +from marvin.codes import PASS, RUNNING + #Import System modules import tempfile import os from nose.plugins.attrib import attr +import time class Services: @@ -82,17 +97,12 @@ class Services: "mode": 'advanced', } -def wait_vm_start(apiclient, account, timeout, sleep): +def wait_vm_start(apiclient, vmid, timeout, sleep): while timeout: -vms = VirtualMachine.list( - apiclient, - account=account.name, - domainid=account.domainid, - listall=True - ) -if vms and vms[0].state == "Running": +vms = VirtualMachine.list(apiclient, id=vmid) +vm_list_validation_result = validateList(vms) +if vm_list_validation_result[0] == PASS and vm_list_validation_result[1].state == RUNNING: return timeout - time.sleep(sleep) timeout = timeout - 1 @@ -363,7 +373,7 @@ class TestResetSSHKeypair(cloudstackTestCase): self.fail("Failed to start virtual machine: %s, %s" % (virtual_machine.name, e)) -timeout = wait_vm_start(self.apiclient, self.account, self.services["timeout"], +timeout = wait_vm_start(self.apiclient, virtual_machine.id, self.services["timeout"], self.services["sleep"]) if timeout == 0: @@ -473,7 +483,7 @@ class TestResetSSHKeypair(cloudstackTestCase): self.fail("Failed to start virtual machine: %s, %s" % (virtual_machine.name, e)) -timeout = wait_vm_start(self.apiclient, self.account, self.services["timeout"], +timeout = wait_vm_start(self.apiclient, virtual_machine.id, self.services["timeout"], self.services["sleep"]) if timeout == 0: @@ -583,7 +593,7 @@ class TestResetSSHKeypair(cloudstackTestCase): self.fail("Failed to start virtual machine: %s, %s" % (virtual_machine.name, e)) -timeout = wait_vm_start(self.apiclient, self.account, self.services["timeout"], +timeout = wait_vm_start(self.apiclient, virtu
[4/4] git commit: updated refs/heads/4.2 to dc081c9
CLOUDSTACK-4256: Fixed Shared Network test cases using random private ips for shared networks Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dc081c9f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dc081c9f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dc081c9f Branch: refs/heads/4.2 Commit: dc081c9f6bbf10e2a4e996946a4750d08bc32a13 Parents: c61c592 Author: Girish Shilamkar Authored: Thu Oct 31 22:21:00 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 22:22:47 2013 +0530 -- .../component/test_shared_networks.py | 786 ++- 1 file changed, 407 insertions(+), 379 deletions(-) --
[2/4] git commit: updated refs/heads/master to addf5b0
CLOUDSTACK-4256: Fixed Shared Network test cases using random private ips for shared networks Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/addf5b0f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/addf5b0f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/addf5b0f Branch: refs/heads/master Commit: addf5b0f8c1eeaec60dc1f2e64d560e751059899 Parents: 23499ef Author: Girish Shilamkar Authored: Thu Oct 31 22:21:00 2013 +0530 Committer: Girish Shilamkar Committed: Thu Oct 31 22:21:00 2013 +0530 -- .../component/test_shared_networks.py | 786 ++- 1 file changed, 407 insertions(+), 379 deletions(-) --
git commit: updated refs/heads/master to 58cd71f
Updated Branches: refs/heads/master 47641637f -> 58cd71f5c Added a verifyElementInList utility function The purpose is to verify a given element in list at a given position with few error checks like list type,empty list and position Returns appropriate codes based upon the inputs. Can be used under tests instead of multiple asserts Signed-off-by: Santhosh Edukulla Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/58cd71f5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/58cd71f5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/58cd71f5 Branch: refs/heads/master Commit: 58cd71f5c1ff3962827e166e8e0a5aca5a928818 Parents: 4764163 Author: Santhosh Edukulla Authored: Fri Nov 1 16:55:07 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 1 16:55:07 2013 +0530 -- tools/marvin/marvin/codes.py | 1 + tools/marvin/marvin/integration/lib/utils.py | 40 +++ 2 files changed, 41 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/58cd71f5/tools/marvin/marvin/codes.py -- diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py index bd01ad3..b6580d0 100644 --- a/tools/marvin/marvin/codes.py +++ b/tools/marvin/marvin/codes.py @@ -39,3 +39,4 @@ INVALID_INPUT = "INVALID INPUT" EMPTY_LIST = "EMPTY_LIST" FAIL = 0 PASS = 1 +MATCH_NOT_FOUND = "ELEMENT NOT FOUND IN THE INPUT" http://git-wip-us.apache.org/repos/asf/cloudstack/blob/58cd71f5/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 b6e38ec..d53c1ae 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -353,3 +353,43 @@ def validateList(inp): ret[2] = EMPTY_LIST return ret return [PASS, inp[0], None] + +def verifyElementInList(inp, toverify, pos = 0): + ''' + @name: verifyElementInList + @Description: + 1. A utility function to validate + whether the input passed is a list. + The list is empty or not. + If it is list and not empty, verify + whether a given element is there in that list or not + at a given pos + @Input: + I : Input to be verified whether its a list or not + II : Element to verify whether it exists in the list + III : Position in the list at which the input element to verify +default to 0 + @output: List, containing [ Result,Reason ] +Ist Argument('Result') : FAIL : If it is not a list + If it is list but empty + PASS : If it is list and not empty + and matching element was found +IIrd Argument( 'Reason' ): Reason for failure ( FAIL ), +default to None. +INVALID_INPUT +EMPTY_LIST +MATCH_NOT_FOUND + ''' + if toverify is None or toverify == '' \ + or pos is None or pos < -1 or pos == '': + return [FAIL, INVALID_INPUT] + out = validateList(inp) + if out[0] == FAIL: + return [FAIL, out[2]] + if out[0] == PASS: + if len(inp) > pos and inp[pos] == toverify: + return [PASS, None] + else: + return [FAIL, MATCH_NOT_FOUND] + +
git commit: updated refs/heads/master to 1e41799
Updated Branches: refs/heads/master 58cd71f5c -> 1e417994d CLOUDSTACK-3961: Added a function to get free vlan Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1e417994 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1e417994 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1e417994 Branch: refs/heads/master Commit: 1e417994dfeeb23a198ecff1d9f70fa427af2f1d Parents: 58cd71f Author: Girish Shilamkar Authored: Fri Nov 1 17:27:46 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 1 17:27:46 2013 +0530 -- .../component/test_vpc_vms_deployment.py| 40 ++-- 1 file changed, 37 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1e417994/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 0a1321c..b01137b 100644 --- a/test/integration/component/test_vpc_vms_deployment.py +++ b/test/integration/component/test_vpc_vms_deployment.py @@ -272,6 +272,34 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("VPC network validated - %s" % network.name) return +def getFreeVlan(self, apiclient, zoneid): +""" +Find an unallocated VLAN outside the range allocated to the physical network. + +@note: This does not guarantee that the VLAN is available for use in +the deployment's network gear +@return: physical_network, shared_vlan_tag +""" +list_physical_networks_response = PhysicalNetwork.list( +apiclient, +zoneid=zoneid +) +assert isinstance(list_physical_networks_response, list) +assert len(list_physical_networks_response) > 0, "No physical networks found in zone %s" % zoneid + +physical_network = list_physical_networks_response[0] +vlans = xsplit(physical_network.vlan, ['-', ',']) + +assert len(vlans) > 0 +assert int(vlans[0]) < int(vlans[-1]), "VLAN range %s was improperly split" % physical_network.vlan +shared_ntwk_vlan = int(vlans[-1]) + random.randrange(1, 20) +if shared_ntwk_vlan > 4095: +shared_ntwk_vlan = int(vlans[0]) - random.randrange(1, 20) +assert shared_ntwk_vlan > 0, "VLAN chosen %s is invalid < 0" % shared_ntwk_vlan +self.debug("Attempting free VLAN %s for shared network creation" % shared_ntwk_vlan) +return shared_ntwk_vlan + + @attr(tags=["advanced", "intervlan"]) def test_01_deploy_vms_in_network(self): """ Test deploy VMs in VPC networks @@ -1995,6 +2023,8 @@ class TestVMDeployVPC(cloudstackTestCase): services=self.services["http_rule"], traffictype='Egress' ) + +vlan = self.getFreeVlan(self.api_client, self.zone.id) self.debug("Creating private gateway in VPC: %s" % vpc.name) private_gateway = PrivateGateway.create( @@ -2002,7 +2032,7 @@ class TestVMDeployVPC(cloudstackTestCase): gateway='10.2.3.1', ipaddress='10.2.3.2', netmask='255.255.255.0', -vlan=678, +vlan=vlan, vpcid=vpc.id ) self.debug("Check if the private gateway created successfully?") @@ -2110,7 +2140,8 @@ class TestVMDeployVPC(cloudstackTestCase): self.assertEqual( public_ips[0].ipaddress, public_ip_6.ipaddress.ipaddress, - "List public Ip for network should list the Ip addr" + "List public Ips %s for network should list the Ip addr %s" + % (public_ips[0].ipaddress, public_ip_6.ipaddress.ipaddress ) ) self.debug("Associating public IP for network: %s" % vpc.name) @@ -2150,13 +2181,14 @@ class TestVMDeployVPC(cloudstackTestCase): traffictype='Egress' ) +vlan = self.getFreeVlan(self.api_cl
git commit: updated refs/heads/4.2 to ba8be7c
Updated Branches: refs/heads/4.2 f9b658f6a -> ba8be7cbe CLOUDSTACK-3961: Added a function to get free vlan Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ba8be7cb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ba8be7cb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ba8be7cb Branch: refs/heads/4.2 Commit: ba8be7cbed7c180c1a6f2925f6d5ce8d12f9576f Parents: f9b658f Author: Girish Shilamkar Authored: Fri Nov 1 17:27:46 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 1 17:30:48 2013 +0530 -- .../component/test_vpc_vms_deployment.py| 40 ++-- 1 file changed, 37 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ba8be7cb/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 0a1321c..b01137b 100644 --- a/test/integration/component/test_vpc_vms_deployment.py +++ b/test/integration/component/test_vpc_vms_deployment.py @@ -272,6 +272,34 @@ class TestVMDeployVPC(cloudstackTestCase): self.debug("VPC network validated - %s" % network.name) return +def getFreeVlan(self, apiclient, zoneid): +""" +Find an unallocated VLAN outside the range allocated to the physical network. + +@note: This does not guarantee that the VLAN is available for use in +the deployment's network gear +@return: physical_network, shared_vlan_tag +""" +list_physical_networks_response = PhysicalNetwork.list( +apiclient, +zoneid=zoneid +) +assert isinstance(list_physical_networks_response, list) +assert len(list_physical_networks_response) > 0, "No physical networks found in zone %s" % zoneid + +physical_network = list_physical_networks_response[0] +vlans = xsplit(physical_network.vlan, ['-', ',']) + +assert len(vlans) > 0 +assert int(vlans[0]) < int(vlans[-1]), "VLAN range %s was improperly split" % physical_network.vlan +shared_ntwk_vlan = int(vlans[-1]) + random.randrange(1, 20) +if shared_ntwk_vlan > 4095: +shared_ntwk_vlan = int(vlans[0]) - random.randrange(1, 20) +assert shared_ntwk_vlan > 0, "VLAN chosen %s is invalid < 0" % shared_ntwk_vlan +self.debug("Attempting free VLAN %s for shared network creation" % shared_ntwk_vlan) +return shared_ntwk_vlan + + @attr(tags=["advanced", "intervlan"]) def test_01_deploy_vms_in_network(self): """ Test deploy VMs in VPC networks @@ -1995,6 +2023,8 @@ class TestVMDeployVPC(cloudstackTestCase): services=self.services["http_rule"], traffictype='Egress' ) + +vlan = self.getFreeVlan(self.api_client, self.zone.id) self.debug("Creating private gateway in VPC: %s" % vpc.name) private_gateway = PrivateGateway.create( @@ -2002,7 +2032,7 @@ class TestVMDeployVPC(cloudstackTestCase): gateway='10.2.3.1', ipaddress='10.2.3.2', netmask='255.255.255.0', -vlan=678, +vlan=vlan, vpcid=vpc.id ) self.debug("Check if the private gateway created successfully?") @@ -2110,7 +2140,8 @@ class TestVMDeployVPC(cloudstackTestCase): self.assertEqual( public_ips[0].ipaddress, public_ip_6.ipaddress.ipaddress, - "List public Ip for network should list the Ip addr" + "List public Ips %s for network should list the Ip addr %s" + % (public_ips[0].ipaddress, public_ip_6.ipaddress.ipaddress ) ) self.debug("Associating public IP for network: %s" % vpc.name) @@ -2150,13 +2181,14 @@ class TestVMDeployVPC(cloudstackTestCase): traffictype='Egress' ) +vlan = self.getFreeVlan(self.api_cl
git commit: updated refs/heads/4.2 to ed76e8a
Updated Branches: refs/heads/4.2 544d1594f -> ed76e8a61 CLOUDSTACK-4686: Fixed volume limit for domain Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ed76e8a6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ed76e8a6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ed76e8a6 Branch: refs/heads/4.2 Commit: ed76e8a610c66724c2b5f5c9a29bbbd3a2503e98 Parents: 544d159 Author: Girish Shilamkar Authored: Wed Nov 6 12:26:37 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 6 12:26:37 2013 +0530 -- test/integration/component/test_resource_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed76e8a6/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 833723c..377aa74 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1185,7 +1185,7 @@ class TestResourceLimitsDomain(cloudstackTestCase): self.apiclient, 2, # Volume domainid=self.account.domainid, - max=2 + max=1 ) self.debug("Deploying VM for account: %s" % self.account.name)
git commit: updated refs/heads/4.2 to 527f037
Updated Branches: refs/heads/4.2 de448ec47 -> 527f03722 CLOUDSTACK-4996: Resolved gateway accessibility issue Gateway of isolated network is pinged instead of shared network Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/527f0372 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/527f0372 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/527f0372 Branch: refs/heads/4.2 Commit: 527f03722f1ecc33db6936b096760df85c2f0057 Parents: de448ec Author: Ashutosh K Authored: Thu Nov 7 16:00:43 2013 +0530 Committer: Girish Shilamkar Committed: Thu Nov 7 16:01:41 2013 +0530 -- .../component/test_vpc_vm_life_cycle.py| 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/527f0372/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 425c284..5893cc3 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -26,6 +26,7 @@ from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * from marvin.remoteSSHClient import remoteSSHClient +from marvin.codes import PASS import time @@ -1195,10 +1196,20 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): ) self.debug("We should be allowed to ping virtual gateway") -self.debug("VM gateway: %s" % self.vm_1.nic[0].gateway) +self.debug("Finding the gateway corresponding to isolated network") +gateways = [nic.gateway for nic in self.vm_1.nic if nic.networkid == self.network_1.id] -res = ssh_1.execute("ping -c 1 %s" % self.vm_1.nic[0].gateway) -self.debug("ping -c 1 %s: %s" % (self.vm_1.nic[0].gateway, res)) +gateway_list_validation_result = validateList(gateways) + +self.assertEqual(gateway_list_validation_result[0], PASS, "gateway list validation failed due to %s" % + gateway_list_validation_result[2]) + +gateway = gateway_list_validation_result[1] + +self.debug("VM gateway: %s" % gateway) + +res = ssh_1.execute("ping -c 1 %s" % gateway) +self.debug("ping -c 1 %s: %s" % (gateway, res)) result = str(res) self.assertEqual(
git commit: updated refs/heads/master to 5d75c6b
Updated Branches: refs/heads/master 494ccd821 -> 5d75c6b75 CLOUDSTACK-4996: Resolved gateway accessibility issue Gateway of isolated network is pinged instead of shared network Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5d75c6b7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5d75c6b7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5d75c6b7 Branch: refs/heads/master Commit: 5d75c6b75c3ee65a15563d4c6b62cae7761afd86 Parents: 494ccd82 Author: Ashutosh K Authored: Thu Nov 7 16:00:43 2013 +0530 Committer: Girish Shilamkar Committed: Thu Nov 7 16:03:57 2013 +0530 -- .../component/test_vpc_vm_life_cycle.py| 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5d75c6b7/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 425c284..5893cc3 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -26,6 +26,7 @@ from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * from marvin.remoteSSHClient import remoteSSHClient +from marvin.codes import PASS import time @@ -1195,10 +1196,20 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): ) self.debug("We should be allowed to ping virtual gateway") -self.debug("VM gateway: %s" % self.vm_1.nic[0].gateway) +self.debug("Finding the gateway corresponding to isolated network") +gateways = [nic.gateway for nic in self.vm_1.nic if nic.networkid == self.network_1.id] -res = ssh_1.execute("ping -c 1 %s" % self.vm_1.nic[0].gateway) -self.debug("ping -c 1 %s: %s" % (self.vm_1.nic[0].gateway, res)) +gateway_list_validation_result = validateList(gateways) + +self.assertEqual(gateway_list_validation_result[0], PASS, "gateway list validation failed due to %s" % + gateway_list_validation_result[2]) + +gateway = gateway_list_validation_result[1] + +self.debug("VM gateway: %s" % gateway) + +res = ssh_1.execute("ping -c 1 %s" % gateway) +self.debug("ping -c 1 %s: %s" % (gateway, res)) result = str(res) self.assertEqual(
git commit: updated refs/heads/4.2 to b9547b0
Updated Branches: refs/heads/4.2 8f76c49a9 -> b9547b07c CLOUDSTACK-4648: Fixed Snapshots test cases Fixed following test cases: 1) test_01_volume_from_snapshot 2) test_03_snapshot_detachedDisk 3) test_07_template_from_snapshot All three test cases are running successfully on XenServer but test cases (01 and 07) failing on KVM due to a common issue. Product defect logged for this: https://issues.apache.org/jira/browse/CLOUDSTACK-5097 test_03 is running ok on KVM too, the problem was - disk was not getting detached because it was not unmounted before detaching. Added code to unmount the disk. Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b9547b07 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b9547b07 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b9547b07 Branch: refs/heads/4.2 Commit: b9547b07c059d229e6aed6213366cc3ab59fa26e Parents: 8f76c49 Author: Gaurav Aradhye Authored: Fri Nov 8 12:48:37 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 12:48:37 2013 +0530 -- test/integration/component/test_snapshots.py | 158 +++-- tools/marvin/marvin/integration/lib/common.py | 13 ++ 2 files changed, 126 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b9547b07/test/integration/component/test_snapshots.py -- diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py index 1c2537c..0a82fc1 100644 --- a/test/integration/component/test_snapshots.py +++ b/test/integration/component/test_snapshots.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,13 +17,35 @@ """ P1 tests for Snapshots """ #Import Local Modules -from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.integration.lib.utils import * -from marvin.integration.lib.base import * -from marvin.integration.lib.common import * -from marvin.integration.lib.utils import is_snapshot_on_nfs +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (Snapshot, + Template, + VirtualMachine, + Account, + ServiceOffering, + DiskOffering, + Volume) + +from marvin.integration.lib.common import (get_domain, + get_zone, + get_template, + list_events, + list_volumes, + list_snapshots, + list_templates, + list_virtual_machines, + get_hypervisor_type) + +from marvin.integration.lib.utils import(cleanup_resources, + format_volume_to_ext3, + random_gen, + is_snapshot_on_nfs) + +from marvin.cloudstackAPI importdetachVolume +import time + class Services: @@ -104,7 +126,18 @@ class Services: "volume": { "diskname": "APP Data Volume", "size": 1, # in GBs - "diskdevice": ['/dev/xvdb', '/dev/sdb', '/dev/hdb', '/dev/vdb' ], # Data Disk + "xenserver": {"rootdiskdevice":"/dev/xvda", + "datadiskdevice_1": '/dev/xvdb', + "datadiskdevice_2": '/dev/xvdc', # Data Disk
git commit: updated refs/heads/master to 3c350ab
Updated Branches: refs/heads/master cb6d8d019 -> 3c350ab0b CLOUDSTACK-4648: Fixed Snapshots test cases Fixed following test cases: 1) test_01_volume_from_snapshot 2) test_03_snapshot_detachedDisk 3) test_07_template_from_snapshot All three test cases are running successfully on XenServer but test cases (01 and 07) failing on KVM due to a common issue. Product defect logged for this: https://issues.apache.org/jira/browse/CLOUDSTACK-5097 test_03 is running ok on KVM too, the problem was - disk was not getting detached because it was not unmounted before detaching. Added code to unmount the disk. Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3c350ab0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3c350ab0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3c350ab0 Branch: refs/heads/master Commit: 3c350ab0b8ce1687a8f7e27e9e2f8e8d0fa68c47 Parents: cb6d8d0 Author: Gaurav Aradhye Authored: Fri Nov 8 12:48:37 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 12:54:20 2013 +0530 -- test/integration/component/test_snapshots.py | 158 +++-- tools/marvin/marvin/integration/lib/common.py | 13 ++ 2 files changed, 126 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3c350ab0/test/integration/component/test_snapshots.py -- diff --git a/test/integration/component/test_snapshots.py b/test/integration/component/test_snapshots.py index 1c2537c..0a82fc1 100644 --- a/test/integration/component/test_snapshots.py +++ b/test/integration/component/test_snapshots.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,13 +17,35 @@ """ P1 tests for Snapshots """ #Import Local Modules -from nose.plugins.attrib import attr -from marvin.cloudstackTestCase import * -from marvin.cloudstackAPI import * -from marvin.integration.lib.utils import * -from marvin.integration.lib.base import * -from marvin.integration.lib.common import * -from marvin.integration.lib.utils import is_snapshot_on_nfs +from nose.plugins.attrib import attr +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (Snapshot, + Template, + VirtualMachine, + Account, + ServiceOffering, + DiskOffering, + Volume) + +from marvin.integration.lib.common import (get_domain, + get_zone, + get_template, + list_events, + list_volumes, + list_snapshots, + list_templates, + list_virtual_machines, + get_hypervisor_type) + +from marvin.integration.lib.utils import(cleanup_resources, + format_volume_to_ext3, + random_gen, + is_snapshot_on_nfs) + +from marvin.cloudstackAPI importdetachVolume +import time + class Services: @@ -104,7 +126,18 @@ class Services: "volume": { "diskname": "APP Data Volume", "size": 1, # in GBs - "diskdevice": ['/dev/xvdb', '/dev/sdb', '/dev/hdb', '/dev/vdb' ], # Data Disk + "xenserver": {"rootdiskdevice":"/dev/xvda", + "datadiskdevice_1": '/dev/xvdb', + "datadiskdevice_2": '/dev/xvdc', # Data Disk
git commit: updated refs/heads/4.2 to ae852ad
Updated Branches: refs/heads/4.2 b9547b07c -> ae852adab CLOUDSTACK-4885: basic timing profiler for tests This will add time taken in seconds along with start and end timestamp logging facility for test cases.Currently this is not available for console logs Signed-off-by: Santhosh Edukulla Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ae852ada Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ae852ada Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ae852ada Branch: refs/heads/4.2 Commit: ae852adabb70f43d6d349dd4ab56dc3116e10aed Parents: b9547b0 Author: Santhosh Edukulla Authored: Thu Oct 24 00:13:01 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 12:58:26 2013 +0530 -- tools/marvin/marvin/marvinPlugin.py | 23 +-- 1 file changed, 21 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ae852ada/tools/marvin/marvin/marvinPlugin.py -- diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index aded17c..3b282e4 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -22,6 +22,7 @@ import nose.core from marvin.cloudstackTestCase import cloudstackTestCase from marvin import deployDataCenter from nose.plugins.base import Plugin +import time class MarvinPlugin(Plugin): @@ -121,10 +122,28 @@ class MarvinPlugin(Plugin): self.config = config def beforeTest(self, test): -testname = test.__str__().split()[0] -self.testclient.identifier = '-'.join([self.identifier, testname]) +self.testName = test.__str__().split()[0] +self.testclient.identifier = '-'.join([self.identifier, self.testName]) self.logger.name = test.__str__() +def startTest(self, test): +""" +Currently used to record start time for tests +""" +self.startTime = time.time() + +def stopTest(self, test): +""" +Currently used to record end time for tests +""" +endTime = time.time() +if self.startTime is not None: +totTime = int(endTime - self.startTime) +self.logger.debug( +"TestCaseName: %s; Time Taken: %s Seconds; \ +StartTime: %s; EndTime: %s" +% (self.testName, str(totTime), self.startTime, endTime)) + def _injectClients(self, test): self.debug_stream. \ setFormatter(logging.
git commit: updated refs/heads/4.2 to 3a31a7e
Updated Branches: refs/heads/4.2 ae852adab -> 3a31a7e65 Adding readable start and end time stamps Signed-off-by: Santhosh Edukulla Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3a31a7e6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3a31a7e6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3a31a7e6 Branch: refs/heads/4.2 Commit: 3a31a7e65d91f860e9259ee4a6bce864c7a238eb Parents: ae852ad Author: Santhosh Edukulla Authored: Fri Oct 25 23:39:35 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 13:04:38 2013 +0530 -- tools/marvin/marvin/marvinPlugin.py | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3a31a7e6/tools/marvin/marvin/marvinPlugin.py -- diff --git a/tools/marvin/marvin/marvinPlugin.py b/tools/marvin/marvin/marvinPlugin.py index 3b282e4..c5931e0 100644 --- a/tools/marvin/marvin/marvinPlugin.py +++ b/tools/marvin/marvin/marvinPlugin.py @@ -140,9 +140,10 @@ class MarvinPlugin(Plugin): if self.startTime is not None: totTime = int(endTime - self.startTime) self.logger.debug( -"TestCaseName: %s; Time Taken: %s Seconds; \ -StartTime: %s; EndTime: %s" -% (self.testName, str(totTime), self.startTime, endTime)) +"TestCaseName: %s; Time Taken: %s Seconds; \ +StartTime: %s; EndTime: %s" +% (self.testName, str(totTime), + str(time.ctime(self.startTime)), str(time.ctime(endTime def _injectClients(self, test): self.debug_stream. \
git commit: updated refs/heads/4.2 to e7b6ee1
Updated Branches: refs/heads/4.2 3a31a7e65 -> e7b6ee10e Fixed Bug: 4899 Added Configuration Support to Marvin. 1. It provides the basic configuration facilities to marvin. 2. User can just add configuration files for his tests, deployment etc, under one config folder before running their tests. cs/tools/marvin/marvin/config. They can remove all hard coded values from code and separate it out as config at this location. Either add this to the existing setup.cfg as separate section or add new configuration. 3. This will thus removes hard coded tests and separate data from tests. 4. This API is provided as an additional facility under cloudstackTestClient and users can get the configuration object as similar to apiclient,dbconnection etc to drive their test. 5. They just add their configuration for a test, setup etc,at one single place under configuration dir and use "getConfigParser" API of cloudstackTestClient It will give them "configObj".They can either pass their own config file for parsing to "getConfig" or it will use default config file @ config/setup.cfg. 6. They will then get the dictionary of parsed configuration and can use it further to drive their tests or config drive 7. Test features, can drive their setups thus removing hard coded values. Configuration default file will be under config and as setup.cfg. 8. Users can use their own configuration file passed to "getConfig" API,once configObj is returned. Signed-off-by: Santhosh Edukulla Conflicts: tools/marvin/marvin/cloudstackTestClient.py 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/e7b6ee10 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e7b6ee10 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e7b6ee10 Branch: refs/heads/4.2 Commit: e7b6ee10eda85a90c594c9de5d36cc062e069576 Parents: 3a31a7e Author: Santhosh Edukulla Authored: Tue Oct 29 22:30:26 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 13:31:52 2013 +0530 -- tools/marvin/marvin/cloudstackTestClient.py | 48 +++-- tools/marvin/marvin/config/setup.cfg | 228 ++ tools/marvin/marvin/configGenerator.py | 161 +-- tools/marvin/marvin/integration/lib/utils.py | 33 4 files changed, 435 insertions(+), 35 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e7b6ee10/tools/marvin/marvin/cloudstackTestClient.py -- diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 36f7f8d..d9fa206 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -22,6 +22,18 @@ from cloudstackAPI import * import random import string import hashlib +from configGenerator import ConfigManager + +''' +@Desc : CloudStackTestClient is encapsulated class for getting various \ + clients viz., apiclient,dbconnection etc +@Input : mgmtDetails : Management Server Details + dbSvrDetails: Database Server details of Management \ + Server. Retrieved from configuration file. + asyncTimeout : + defaultWorkerThreads : + logging : +''' class cloudstackTestClient(object): @@ -35,6 +47,21 @@ class cloudstackTestClient(object): self.apiClient =\ cloudstackAPIClient.CloudStackAPIClient(self.connection) self.dbConnection = None +if dbSvrDetails is not None: +self.createDbConnection(dbSvrDetails.dbSvr, dbSvrDetails.port, +dbSvrDetails.user, +dbSvrDetails.passwd, dbSvrDetails.db) +''' +Provides the Configuration Object to users through getConfigParser +The purpose of this object is to parse the config +and provide dictionary of the config so users can +use that configuration.Users can later call getConfig +on this object and it will return the default parsed +config dictionary from default configuration file, +they can overwrite it with providing their own +configuration file as well. +''' +self.configObj = ConfigManager() self.asyncJobMgr = None self.ssh = None self.id = None
git commit: updated refs/heads/4.2 to b18e730
Updated Branches: refs/heads/4.2 e7b6ee10e -> b18e73010 Added a verifyElementInList utility function The purpose is to verify a given element in list at a given position with few error checks like list type,empty list and position Returns appropriate codes based upon the inputs. Can be used under tests instead of multiple asserts Signed-off-by: Santhosh Edukulla Conflicts: tools/marvin/marvin/codes.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b18e7301 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b18e7301 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b18e7301 Branch: refs/heads/4.2 Commit: b18e730108e6a24e00c372e3c56c655ff51106ba Parents: e7b6ee1 Author: Santhosh Edukulla Authored: Fri Nov 1 16:55:07 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 13:42:19 2013 +0530 -- tools/marvin/marvin/codes.py | 5 +++ tools/marvin/marvin/integration/lib/utils.py | 40 +++ 2 files changed, 45 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b18e7301/tools/marvin/marvin/codes.py -- diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py index ad4f17f..3fe7b74 100644 --- a/tools/marvin/marvin/codes.py +++ b/tools/marvin/marvin/codes.py @@ -35,3 +35,8 @@ RECURRING = "RECURRING" ENABLED = "Enabled" NETWORK_OFFERING = "network_offering" ROOT = "ROOT" +INVALID_INPUT = "INVALID INPUT" +EMPTY_LIST = "EMPTY_LIST" +FAIL = 0 +PASS = 1 +MATCH_NOT_FOUND = "ELEMENT NOT FOUND IN THE INPUT" http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b18e7301/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 8a1ebbd..a8d676c 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -351,3 +351,43 @@ def validateList(inp): ret[2] = EMPTY_LIST return ret return [PASS, inp[0], None] + +def verifyElementInList(inp, toverify, pos = 0): + ''' + @name: verifyElementInList + @Description: + 1. A utility function to validate + whether the input passed is a list. + The list is empty or not. + If it is list and not empty, verify + whether a given element is there in that list or not + at a given pos + @Input: + I : Input to be verified whether its a list or not + II : Element to verify whether it exists in the list + III : Position in the list at which the input element to verify +default to 0 + @output: List, containing [ Result,Reason ] +Ist Argument('Result') : FAIL : If it is not a list + If it is list but empty + PASS : If it is list and not empty + and matching element was found +IIrd Argument( 'Reason' ): Reason for failure ( FAIL ), +default to None. +INVALID_INPUT +EMPTY_LIST +MATCH_NOT_FOUND + ''' + if toverify is None or toverify == '' \ + or pos is None or pos < -1 or pos == '': + return [FAIL, INVALID_INPUT] + out = validateList(inp) + if out[0] == FAIL: + return [FAIL, out[2]] + if out[0] == PASS: + if len(inp) > pos and inp[pos] == toverify: + return [PASS, None] + else: + return [FAIL, MATCH_NOT_FOUND] + +
[2/2] git commit: updated refs/heads/4.2 to fba8741
CLOUDSTACK-4832. Added support for https to marvin. advanced.cfg: Contains three additional flags "useHttps,certCAPath,certPath" for https usage in marvin for establishing cs connection. We will use the configuraiton under advanced.cfg provided by user to establish connection over https. If establishing the connection over https failed, then the default certs will be used. or else raise the exception, the existing http will work as it is when useHttps flag set to "False" Signed-off-by: Santhosh Edukulla Signed-off-by: Prasanna Santhanam Conflicts: tools/marvin/marvin/cloudstackConnection.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6e1821f5 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6e1821f5 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6e1821f5 Branch: refs/heads/4.2 Commit: 6e1821f585df5c643873ab0ce1e7d91d1d94f00d Parents: 0f0889a Author: Santhosh Edukulla Authored: Fri Oct 11 23:27:35 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 14:40:58 2013 +0530 -- setup/dev/advanced.cfg | 6 +- tools/marvin/marvin/cloudstackConnection.py | 76 ++-- tools/marvin/marvin/cloudstackTestClient.py | 8 +-- tools/marvin/marvin/configGenerator.py | 9 ++- tools/marvin/marvin/deployDataCenter.py | 35 +-- 5 files changed, 84 insertions(+), 50 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e1821f5/setup/dev/advanced.cfg -- diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg index 4a48399..dfaba00 100644 --- a/setup/dev/advanced.cfg +++ b/setup/dev/advanced.cfg @@ -14,7 +14,6 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. - { "zones": [ { @@ -220,7 +219,10 @@ "passwd": "password", "user": "root", "port": 8096, -"hypervisor" : "simulator" +"hypervisor": "simulator", + "useHttps": "True", + "certCAPath": "NA", + "certPath": "NA" } ] } http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6e1821f5/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 8129396..e0671c9 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -34,28 +34,27 @@ from requests import RequestException class cloudConnection(object): """ Connections to make API calls to the cloudstack management server """ -def __init__(self, mgtSvr, port=8096, user=None, passwd=None, - apiKey=None, securityKey=None, - asyncTimeout=3600, logging=None, scheme='http', - path='client/api'): +def __init__(self, mgmtDet,asyncTimeout=3600, logging=None, scheme='http',path='client/api'): self.loglevel() # Turn off requests logs -self.apiKey = apiKey -self.securityKey = securityKey -self.mgtSvr = mgtSvr -self.port = port -self.user = user -self.passwd = passwd +self.apiKey = mgmtDet.apiKey +self.securityKey = mgmtDet.securityKey +self.mgtSvr = mgmtDet.mgtSvrIp +self.port = mgmtDet.port +self.user = mgmtDet.user +self.passwd = mgmtDet.passwd +self.certCAPath = mgmtDet.certCAPath +self.certPath = mgmtDet.certPath self.logging = logging self.path = path self.retries = 5 +self.protocol = "http" self.asyncTimeout = asyncTimeout self.auth = True -if port == 8096 or \ +if self.port == 8096 or \ (self.apiKey is None and self.securityKey is None): self.auth = False -if scheme not in ['http', 'https']: -raise RequestException("Protocol must be HTTP") -self.protocol = scheme +if mgmtDet.useHttps == "True": + self.protocol = "https" self.baseurl = "%s://%s:%d/%s"\ % (self.protocol, self.mgtSvr, self.port, self.path) @@ -143,13 +142,49 @@ class cloudConnection(object): payload["signature"] = signature try:
[1/2] git commit: updated refs/heads/4.2 to fba8741
Updated Branches: refs/heads/4.2 0f0889ae2 -> fba874120 Adding few changes and cleaning up the code - Added few common naming conventions - Cleanedup code - Added a simple utility function Signed-off-by: Santhosh Edukulla Conflicts: tools/marvin/marvin/codes.py 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/fba87412 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/fba87412 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/fba87412 Branch: refs/heads/4.2 Commit: fba874120bb40ddeceacbc7ef51217f34d3749de Parents: 6e1821f Author: Santhosh Edukulla Authored: Mon Oct 28 12:48:05 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 14:40:58 2013 +0530 -- tools/marvin/marvin/codes.py | 2 +- tools/marvin/marvin/configGenerator.py | 8 ++ tools/marvin/marvin/deployDataCenter.py | 18 ++-- tools/marvin/marvin/integration/lib/utils.py | 35 --- tools/marvin/marvin/marvinPlugin.py | 15 ++ 5 files changed, 33 insertions(+), 45 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fba87412/tools/marvin/marvin/codes.py -- diff --git a/tools/marvin/marvin/codes.py b/tools/marvin/marvin/codes.py index 3fe7b74..b6580d0 100644 --- a/tools/marvin/marvin/codes.py +++ b/tools/marvin/marvin/codes.py @@ -24,7 +24,7 @@ a code viz., ENABLED with value "Enabled",then using \ this code in a sample feature say test_a.py as below. \ -from marvinCodes import * +from codes import * if obj.getvalue() == ENABLED @DateAdded: 20th October 2013 http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fba87412/tools/marvin/marvin/configGenerator.py -- diff --git a/tools/marvin/marvin/configGenerator.py b/tools/marvin/marvin/configGenerator.py index eb8dc2c..132b4f6 100644 --- a/tools/marvin/marvin/configGenerator.py +++ b/tools/marvin/marvin/configGenerator.py @@ -951,7 +951,7 @@ def generate_setup_config(config, file=None): fp.close() -def get_setup_config(file): +def getSetupConfig(file): if not os.path.exists(file): raise IOError("config file %s not found. \ please specify a valid config file" % file) @@ -962,9 +962,7 @@ def get_setup_config(file): ws = line.strip() if not ws.startswith("#"): configLines.append(ws) -k = json.loads("\n".join(configLines)) -#config = json.loads("\n".join(configLines)) -config = k +config = json.loads("\n".join(configLines)) return jsonHelper.jsonLoader(config) if __name__ == "__main__": @@ -985,7 +983,7 @@ by default is ./datacenterCfg") (options, args) = parser.parse_args() if options.inputfile: -config = get_setup_config(options.inputfile) +config = getSetupConfig(options.inputfile) if options.advanced: config = descSetupInAdvancedMode() elif options.advancedsg: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/fba87412/tools/marvin/marvin/deployDataCenter.py -- diff --git a/tools/marvin/marvin/deployDataCenter.py b/tools/marvin/marvin/deployDataCenter.py index efb4150..4cb5b78 100644 --- a/tools/marvin/marvin/deployDataCenter.py +++ b/tools/marvin/marvin/deployDataCenter.py @@ -88,11 +88,11 @@ specify a valid config file" % cfgFile) if cluster.hypervisor.lower() != "vmware": self.addHosts(cluster.hosts, zoneId, podId, clusterId, cluster.hypervisor) -self.wait_for_host(zoneId, clusterId) +self.waitForHost(zoneId, clusterId) self.createPrimaryStorages(cluster.primaryStorages, zoneId, podId, clusterId) -def wait_for_host(self, zoneId, clusterId): +def waitForHost(self, zoneId, clusterId): """ Wait for the hosts in the zoneid, clusterid to be up @@ -123,7 +123,7 @@ specify a valid config file" % cfgFile) primarycmd.clusterid = clusterId self.apiClient.createStoragePool(primarycmd) -def createpods(self, pods, zoneId, networkId=None): +def createPods(self, pods, zoneId, networkId=None): if pods is None: return for pod in pods: @@ -208,7 +208,7 @@ specify a valid config file" % cfgFile)
git commit: updated refs/heads/4.2 to 87983e0
Updated Branches: refs/heads/4.2 79ef40c0a -> 87983e09e Added few changes related to bug 4920. Removed unwanted code There were few unwanted calls as part of test client, did some clean up Made the test client API uniform to accept both mgmt and dbsvr details Did some minor bug fixes as well. Signed-off-by: Santhosh Edukulla Conflicts: tools/marvin/marvin/cloudstackConnection.py tools/marvin/marvin/cloudstackTestClient.py tools/marvin/marvin/configGenerator.py tools/marvin/marvin/deployDataCenter.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/87983e09 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/87983e09 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/87983e09 Branch: refs/heads/4.2 Commit: 87983e09e21c51dbef6b2a8a0252b039e32915ad Parents: 79ef40c Author: Santhosh Edukulla Authored: Wed Oct 23 17:19:36 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 15:29:53 2013 +0530 -- tools/marvin/marvin/cloudstackConnection.py | 96 tools/marvin/marvin/cloudstackTestClient.py | 28 --- tools/marvin/marvin/codegenerator.py| 2 +- tools/marvin/marvin/configGenerator.py | 6 +- tools/marvin/marvin/deployDataCenter.py | 33 5 files changed, 104 insertions(+), 61 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/87983e09/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index e0671c9..a56dd68 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -59,9 +59,11 @@ class cloudConnection(object): % (self.protocol, self.mgtSvr, self.port, self.path) def __copy__(self): -return cloudConnection(self.mgtSvr, self.port, self.user, self.passwd, - self.apiKey, self.securityKey, - self.asyncTimeout, self.logging, self.protocol, +return cloudConnection(self.mgtSvr, self.port, self.user, + self.passwd, self.apiKey, + self.securityKey, + self.asyncTimeout, self.logging, + self.protocol, self.path) def loglevel(self, lvl=logging.WARNING): @@ -83,7 +85,7 @@ class cloudConnection(object): timeout = self.asyncTimeout while timeout > 0: -asyncResonse = self.marvin_request(cmd, response_type=response) +asyncResonse = self.marvinRequest(cmd, response_type=response) if asyncResonse.jobstatus == 2: raise cloudstackException.cloudstackAPIException( @@ -142,35 +144,38 @@ class cloudConnection(object): payload["signature"] = signature try: -''' -https_flag : Signifies whether to verify connection over http or https, - if set to true uses https otherwise http -cert_path : Signifies ca and cert path required by requests library for the connection -''' -https_flag = False -cert_path= () +#https_flag : Signifies whether to verify connection over \ +#http or https, \ +#initialized to False, will be set to true if user provided https +#connection +https_flag = False +cert_path = () if self.protocol == "https": https_flag = True -if self.certCAPath != "NA" and self.certPath != "NA": -cert_path = ( self.certCAPath,self.certPath ) +if self.certCAPath != "NA" and self.certPath != "NA": +cert_path = (self.certCAPath, self.certPath) -''' -Verify whether protocol is "http", then call the request over http -''' +#Verify whether protocol is "http", then call the request over http if self.protocol == "http": if method == 'POST': - response = requests.post(self.baseurl, params=payload, verify=https_flag) + response = requests.post(self.baseurl, params=payload, +verify=https_flag) else: - response = requests.get(self.baseurl, params=payload, verify=
git commit: updated refs/heads/4.2 to c76da53
Updated Branches: refs/heads/4.2 87983e09e -> c76da5312 CLOUDSTACK-5032 Provides custom assert facility to test features Added assertElementInList to cloudstackTestCase. Users can use this new custom addition to add assertions, thus replacing current multiple assertions Signed-off-by: Santhosh Edukulla Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c76da531 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c76da531 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c76da531 Branch: refs/heads/4.2 Commit: c76da53123f4130ac59bdf112171bc2e39af91d4 Parents: 87983e0 Author: Santhosh Edukulla Authored: Tue Nov 5 03:16:24 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 15:37:26 2013 +0530 -- tools/marvin/marvin/cloudstackTestCase.py| 14 tools/marvin/marvin/integration/lib/utils.py | 80 +-- 2 files changed, 58 insertions(+), 36 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c76da531/tools/marvin/marvin/cloudstackTestCase.py -- diff --git a/tools/marvin/marvin/cloudstackTestCase.py b/tools/marvin/marvin/cloudstackTestCase.py index 85ef542..6456bb1 100644 --- a/tools/marvin/marvin/cloudstackTestCase.py +++ b/tools/marvin/marvin/cloudstackTestCase.py @@ -16,6 +16,8 @@ # under the License. import unittest +from marvin.integration.lib.utils import verifyElementInList +from marvin.codes import PASS def user(Name, DomainName, AcctType): @@ -35,6 +37,18 @@ def user(Name, DomainName, AcctType): class cloudstackTestCase(unittest.case.TestCase): clstestclient = None +def assertElementInList(inp, toverify, responsevar=None, pos=0, +assertmsg="TC Failed for reason"): +''' +@Name: assertElementInList +@desc:Uses the utility function verifyElementInList and +asserts based upon PASS\FAIL value of the output. +Takes one additional argument of what message to assert with +when failed +''' +out = verifyElementInList(inp, toverify, responsevar, pos) +unittest.TestCase.assertEquals(out[0], PASS, "msg:%s" % out[1]) + @classmethod def getClsTestClient(cls): return cls.clstestclient http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c76da531/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 bd22fa6..cf2dd3c 100644 --- a/tools/marvin/marvin/integration/lib/utils.py +++ b/tools/marvin/marvin/integration/lib/utils.py @@ -353,42 +353,50 @@ def validateList(inp): return ret return [PASS, inp[0], None] -def verifyElementInList(inp, toverify, pos = 0): - ''' - @name: verifyElementInList - @Description: - 1. A utility function to validate - whether the input passed is a list. - The list is empty or not. - If it is list and not empty, verify - whether a given element is there in that list or not - at a given pos - @Input: - I : Input to be verified whether its a list or not +def verifyElementInList(inp, toverify, responsevar=None, pos=0): +''' +@name: verifyElementInList +@Description: +1. A utility function to validate +whether the input passed is a list. +The list is empty or not. +If it is list and not empty, verify +whether a given element is there in that list or not +at a given pos +@Input: + I : Input to be verified whether its a list or not II : Element to verify whether it exists in the list - III : Position in the list at which the input element to verify -default to 0 - @output: List, containing [ Result,Reason ] -Ist Argument('Result') : FAIL : If it is not a list - If it is list but empty - PASS : If it is list and not empty + III : variable name in response object to verify + default to None, if None, we will verify for the complete + first element EX: state of response object object + IV : Position in the list at which the input element to verify + default to 0 +@output: List, containing [ Result,Reason ] + Ist Argument('Result') : FAIL : If it is not a list +
git commit: updated refs/heads/4.2 to 48d9e24
Updated Branches: refs/heads/4.2 91669ea62 -> 48d9e2443 Signed-off-by: venkataswamybabu budumuru Have added a test for transferring portable ip across different works with in the same zone. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/48d9e244 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/48d9e244 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/48d9e244 Branch: refs/heads/4.2 Commit: 48d9e2443cb57a2853f13e96d639bb28c2a45b5c Parents: 91669ea Author: venkataswamybabu budumuru Authored: Thu Oct 3 19:58:45 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 17:41:53 2013 +0530 -- test/integration/component/test_portable_ip.py | 245 +++- 1 file changed, 244 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/48d9e244/test/integration/component/test_portable_ip.py -- diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index ffcbf2a..499fa37 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -71,6 +71,14 @@ class Services: "name": "Test Network - Portable IP", "displaytext": "Test Network - Portable IP", }, +"network1": { + "name": "Test Network 1 - Portable IP", + "displaytext": "Test Network 1 - Portable IP", +}, +"network2": { + "name": "Test Network 2 - Portable IP", + "displaytext": "Test Network 2 - Portable IP", +}, "disk_offering": { "displaytext": "Small Disk", "name": "Small Disk", @@ -94,6 +102,30 @@ class Services: "publicport": 22, "protocol": 'TCP', }, +"vm1": +# Create a small virtual machine instance with disk offering +{ + "displayname": "vm1", + "username": "root", # VM creds for SSH + "password": "password", + "ssh_port": 22, + "hypervisor": 'XenServer', + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', +}, +"vm2": +# Create a small virtual machine instance with disk offering +{ + "displayname": "vm2", + "username": "root", # VM creds for SSH + "password": "password", + "ssh_port": 22, + "hypervisor": 'XenServer', + "privateport": 22, + "publicport": 22, + "protocol": 'TCP', +}, "ostype": 'CentOS 5.3 (64-bit)', } @@ -726,7 +758,7 @@ class TestAssociatePublicIp(cloudstackTestCase): try: -self.debug("Deploying Virtual Machine") +self.debug("DeployingVirtual Machine") self.virtual_machine = VirtualMachine.create( self.apiclient, self.services["small"], @@ -1307,3 +1339,214 @@ class TestDeleteAccount(cloudstackTestCase): id=portableip.ipaddress.id) return + + +class TestPortableIpTransferAcrossNetworks(cloudstackTestCase): +"""Test Tran
git commit: updated refs/heads/4.2 to 9e6a1ea
Updated Branches: refs/heads/4.2 9d00bfeba -> 9e6a1eaff CLOUDSTACK-5107: Decreasing memory in service offering so as not to run out of resources Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9e6a1eaf Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9e6a1eaf Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9e6a1eaf Branch: refs/heads/4.2 Commit: 9e6a1eaffe3df0981703dc26ab4cc7043d4ca23f Parents: 9d00bfe Author: Gaurav Aradhye Authored: Fri Nov 8 18:51:43 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 18:51:43 2013 +0530 -- .../component/test_mm_domain_limits.py | 59 ++-- test/integration/component/test_mm_limits.py| 40 ++--- .../component/test_mm_project_limits.py | 2 +- 3 files changed, 50 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e6a1eaf/test/integration/component/test_mm_domain_limits.py -- diff --git a/test/integration/component/test_mm_domain_limits.py b/test/integration/component/test_mm_domain_limits.py index d87db84..c856087 100644 --- a/test/integration/component/test_mm_domain_limits.py +++ b/test/integration/component/test_mm_domain_limits.py @@ -56,7 +56,7 @@ class Services: "displaytext": "Tiny Instance", "cpunumber": 1, "cpuspeed": 100,# in MHz -"memory": 5120,# In MBs +"memory": 2048,# In MBs }, "virtual_machine": { "displayname": "TestVM", @@ -183,7 +183,7 @@ class TestDomainMemoryLimits(cloudstackTestCase): Resources.updateLimit(self.apiclient, resourcetype=9, - max=15360, + max=6144, account=self.child_do_admin_1.name, domainid=self.child_do_admin_1.domainid) @@ -203,17 +203,17 @@ class TestDomainMemoryLimits(cloudstackTestCase): Resources.updateLimit(self.apiclient, resourcetype=9, - max=15360, + max=6144, account=self.child_do_admin_2.name, domainid=self.child_do_admin_2.domainid) return @attr(tags=["advanced", "advancedns","simulator"]) def test_01_change_service_offering(self): -"""Test Deploy VM with 5 GB RAM & verify the usage""" +"""Test Deploy VM with specified RAM & verify the usage""" # Validate the following -# 1. Create compute offering with 5 GB RAM & Deploy VM in the created domain +# 1. Create compute offering with specified RAM & Deploy VM in the created domain # 2. List Resource count for the root admin Memory usage # 3. Upgrade and downgrade service offering # 4. Resource count should list properly for the domain @@ -228,7 +228,7 @@ class TestDomainMemoryLimits(cloudstackTestCase): self.domain = domain #Resetting memory count in service offering -self.services["service_offering"]["memory"] = 5120 +self.services["service_offering"]["memory"] = 2048 self.debug("Creating an instance with service offering: %s" % self.service_offering.name) @@ -266,24 +266,24 @@ class TestDomainMemoryLimits(cloudstackTestCase): self.assertEqual(resource_count_after_stop, expected_resource_count, "Resource count should be same after stopping the instance") -self.debug("Creating service offering with 7 GB RAM") -self.services["service_offering"]["memory"] = 7168 -self.service_offering_7gb = ServiceOffering.create( +self.debug("Creating service offering with 5 GB RAM") +self.services["service_offering"]["memory"] = 5120 +self.service_offering_5gb = ServiceOffering.create( self.apiclient, self.services["service_offeri
git commit: updated refs/heads/master to a2117d4
Updated Branches: refs/heads/master 011b87ead -> a2117d46f CLOUDSTACK-5107: Decreasing memory in service offering so as not to run out of resources Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a2117d46 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a2117d46 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a2117d46 Branch: refs/heads/master Commit: a2117d46f90ae6a96e3d046e306e524756609f5d Parents: 011b87e Author: Gaurav Aradhye Authored: Fri Nov 8 18:51:43 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 8 18:56:50 2013 +0530 -- .../integration/component/test_memory_limits.py | 40 ++--- .../component/test_mm_domain_limits.py | 59 ++-- .../component/test_mm_project_limits.py | 2 +- 3 files changed, 50 insertions(+), 51 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2117d46/test/integration/component/test_memory_limits.py -- diff --git a/test/integration/component/test_memory_limits.py b/test/integration/component/test_memory_limits.py index 18eab4c..7da85a5 100644 --- a/test/integration/component/test_memory_limits.py +++ b/test/integration/component/test_memory_limits.py @@ -55,7 +55,7 @@ class Services: "displaytext": "Tiny Instance", "cpunumber": 1, "cpuspeed": 100,# in MHz -"memory": 5120,# In MBs +"memory": 2048,# In MBs }, "virtual_machine": { "displayname": "TestVM", @@ -177,10 +177,10 @@ class TestMemoryLimits(cloudstackTestCase): @attr(tags=["advanced", "advancedns","simulator"]) def test_01_stop_start_instance(self): -"""Test Deploy VM with 5 GB RAM & verify the usage""" +"""Test Deploy VM with specified RAM & verify the usage""" # Validate the following -# 1. Create compute offering with 5 GB RAM & Deploy VM as root admin +# 1. Create compute offering with specified RAM & Deploy VM as root admin # 2 .List Resource count for the root admin Memory usage # 3. Stop and start instance, resource count should list properly. @@ -229,10 +229,10 @@ class TestMemoryLimits(cloudstackTestCase): @attr(tags=["advanced", "advancedns","simulator"]) def test_02_migrate_instance(self): -"""Test Deploy VM with 5 GB RAM & verify the usage""" +"""Test Deploy VM with specified RAM & verify the usage""" # Validate the following -# 1. Create compute offering with 5 GB RAM & Deploy VM as root admin +# 1. Create compute offering with specified RAM & Deploy VM as root admin # 2. List Resource count for the root admin Memory usage # 3. Migrate vm, resource count should list properly. @@ -268,10 +268,10 @@ class TestMemoryLimits(cloudstackTestCase): @attr(tags=["advanced", "advancedns","simulator"]) def test_03_delete_instance(self): -"""Test Deploy VM with 5 GB RAM & verify the usage""" +"""Test Deploy VM with specified GB RAM & verify the usage""" # Validate the following -# 1. Create compute offering with 5 GB RAM & Deploy VM as root admin +# 1. Create compute offering with specified RAM & Deploy VM as root admin # 2. List Resource count for the root admin Memory usage # 3. Delete instance, resource count should be 0 after delete operation. @@ -306,11 +306,11 @@ class TestMemoryLimits(cloudstackTestCase): return @attr(tags=["advanced", "advancedns","simulator"]) -def test_04_deploy_multiple_vm_with_5gb_ram(self): -"""Test Deploy multiple VM with 5 GB RAM & verify the usage""" +def test_04_deploy_multiple_vm(self): +"""Test Deploy multiple VM with specified RAM & verify the usage""" # Validate the following -# 1. Create compute offering with 5 GB RAM +# 1. Create compute offering with specified RAM # 2. Deploy multiple VMs with this
git commit: updated refs/heads/master to 4473bb2
Updated Branches: refs/heads/master 175ead4ea -> 4473bb218 Fixed few indentation errors and removed unwanted imports Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4473bb21 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4473bb21 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4473bb21 Branch: refs/heads/master Commit: 4473bb2185dfaa1d91aa8484e76afd8bc04e4c20 Parents: 175ead4 Author: Santhosh Edukulla Authored: Mon Nov 11 10:32:01 2013 +0530 Committer: Girish Shilamkar Committed: Mon Nov 11 10:32:01 2013 +0530 -- .../component/test_network_offering.py | 1 - test/integration/component/test_portable_ip.py | 24 .../component/test_security_groups.py | 11 - .../component/test_snapshot_limits.py | 1 - test/integration/component/test_stopped_vm.py | 1 - .../component/test_storage_motion.py| 1 - test/integration/component/test_templates.py| 1 - test/integration/component/test_vpc_network.py | 1 - test/integration/component/test_vpc_routers.py | 1 - .../component/test_vpc_vm_life_cycle.py | 1 - .../component/test_vpc_vms_deployment.py| 1 - 11 files changed, 15 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4473bb21/test/integration/component/test_network_offering.py -- diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py index 04777b0..33c4305 100644 --- a/test/integration/component/test_network_offering.py +++ b/test/integration/component/test_network_offering.py @@ -25,7 +25,6 @@ from marvin.cloudstackAPI import * from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * -from marvin.sshClient import SshClient import datetime http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4473bb21/test/integration/component/test_portable_ip.py -- diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index a532b36..14b6dac 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -807,13 +807,11 @@ class TestAssociatePublicIp(cloudstackTestCase): try: self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress) - - SshClient( -portableip.ipaddress.ipaddress, -self.services['natrule']["publicport"], -self.virtual_machine.username, -self.virtual_machine.password -) +SshClient(portableip.ipaddress.ipaddress, + self.services['natrule']["publicport"], + self.virtual_machine.username, + self.virtual_machine.password + ) except Exception as e: self.fail("Exception while SSHing : %s" % e) @@ -1532,13 +1530,11 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase): try: self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress) - - SshClient( -portableip.ipaddress.ipaddress, -self.services['natrule']["publicport"], -self.virtual_machine2.username, -self.virtual_machine2.password -) +SshClient(portableip.ipaddress.ipaddress, + self.services['natrule']["publicport"], + self.virtual_machine2.username, + self.virtual_machine2.password + ) except Exception as e: self.fail("Exception while SSHing : %s" % e) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4473bb21/test/integration/component/test_security_groups.py -- diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py index c90ccf6..8e07396 100644 --- a/test/integration/component/test_security_groups.py +++ b/test/integration/component/test_security_groups.py @@ -656,12 +656,11 @@ class TestRevokeIngressRule(cloudstackTestCase): # SSH Attempt to VM should fail with self.assertRaises(Exception): self.debug("SSH int
git commit: updated refs/heads/4.2 to e82fe01
Updated Branches: refs/heads/4.2 42941b337 -> e82fe0169 CLOUDSTACK-5121: There was one wrong initialization of cloudstackConnection. The bug mentioned is causing test cases to fail. Signed-off-by: Santhosh Edukulla Conflicts: tools/marvin/marvin/cloudstackConnection.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e82fe016 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e82fe016 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e82fe016 Branch: refs/heads/4.2 Commit: e82fe016920d42afd3c648d370dfc5de61e03c48 Parents: 42941b3 Author: Santhosh Edukulla Authored: Mon Nov 11 03:30:09 2013 +0530 Committer: Gaurav Aradhye Committed: Sun Nov 10 17:28:32 2013 -0500 -- tools/marvin/marvin/cloudstackConnection.py| 12 ++-- tools/marvin/marvin/cloudstackTestClient.py| 13 +++-- tools/marvin/marvin/integration/lib/utils.py | 5 + .../sandbox/demo/simulator/testcase/libs/utils.py | 5 + 4 files changed, 15 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e82fe016/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index a56dd68..64a43f8 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -34,7 +34,8 @@ from requests import RequestException class cloudConnection(object): """ Connections to make API calls to the cloudstack management server """ -def __init__(self, mgmtDet,asyncTimeout=3600, logging=None, scheme='http',path='client/api'): +def __init__(self, mgmtDet, asyncTimeout=3600, logging=None, + path='client/api'): self.loglevel() # Turn off requests logs self.apiKey = mgmtDet.apiKey self.securityKey = mgmtDet.securityKey @@ -47,6 +48,7 @@ class cloudConnection(object): self.logging = logging self.path = path self.retries = 5 +self.mgtDetails = mgmtDet self.protocol = "http" self.asyncTimeout = asyncTimeout self.auth = True @@ -59,11 +61,9 @@ class cloudConnection(object): % (self.protocol, self.mgtSvr, self.port, self.path) def __copy__(self): -return cloudConnection(self.mgtSvr, self.port, self.user, - self.passwd, self.apiKey, - self.securityKey, - self.asyncTimeout, self.logging, - self.protocol, +return cloudConnection(self.mgtDetails, + self.asyncTimeout, + self.logging, self.path) def loglevel(self, lvl=logging.WARNING): http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e82fe016/tools/marvin/marvin/cloudstackTestClient.py -- diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 916219c..b3826a7 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -52,8 +52,9 @@ class cloudstackTestClient(object): dbSvrDetails, asyncTimeout=3600, defaultWorkerThreads=10, logging=None): +self.mgmtDetails = mgmtDetails self.connection = \ -cloudstackConnection.cloudConnection(mgmtDetails, +cloudstackConnection.cloudConnection(self.mgmtDetails, asyncTimeout, logging) self.apiClient =\ @@ -158,12 +159,12 @@ class cloudstackTestClient(object): apiKey = registerUserRes.apikey securityKey = registerUserRes.secretkey +mgtDetails = self.mgmtDetails +mgtDetails.apiKey = apiKey +mgtDetails.securityKey = securityKey + newUserConnection =\ -cloudstackConnection.cloudConnection(self.connection.mgtSvr, - self.connection.port, - self.connection.user, - self.connection.passwd, - apiKey, securityKey, +cloudstackConnection.cloudConnection(mgtDetails, self.connection.asyncTimeout, self.connection.logging) self.use
git commit: updated refs/heads/4.2 to 6a92f75
Updated Branches: refs/heads/4.2 e82fe0169 -> 6a92f7546 Fixed few indentation errors and removed unwanted imports Conflicts: test/integration/component/test_portable_ip.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6a92f754 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6a92f754 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6a92f754 Branch: refs/heads/4.2 Commit: 6a92f75465d07e78d8b8bd58f39e0f3591337a01 Parents: e82fe01 Author: Santhosh Edukulla Authored: Mon Nov 11 10:32:01 2013 +0530 Committer: Gaurav Aradhye Committed: Sun Nov 10 17:34:46 2013 -0500 -- .../component/test_network_offering.py | 1 - test/integration/component/test_portable_ip.py | 24 .../component/test_security_groups.py | 11 - .../component/test_snapshot_limits.py | 1 - test/integration/component/test_stopped_vm.py | 1 - .../component/test_storage_motion.py| 1 - test/integration/component/test_templates.py| 1 - test/integration/component/test_vpc_network.py | 1 - test/integration/component/test_vpc_routers.py | 1 - .../component/test_vpc_vm_life_cycle.py | 1 - .../component/test_vpc_vms_deployment.py| 1 - 11 files changed, 15 insertions(+), 29 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a92f754/test/integration/component/test_network_offering.py -- diff --git a/test/integration/component/test_network_offering.py b/test/integration/component/test_network_offering.py index 04777b0..33c4305 100644 --- a/test/integration/component/test_network_offering.py +++ b/test/integration/component/test_network_offering.py @@ -25,7 +25,6 @@ from marvin.cloudstackAPI import * from marvin.integration.lib.utils import * from marvin.integration.lib.base import * from marvin.integration.lib.common import * -from marvin.sshClient import SshClient import datetime http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a92f754/test/integration/component/test_portable_ip.py -- diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index 499fa37..14b6dac 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -807,13 +807,11 @@ class TestAssociatePublicIp(cloudstackTestCase): try: self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress) - - SshClient( -portableip.ipaddress.ipaddress, -self.services['natrule']["publicport"], -self.virtual_machine.username, -self.virtual_machine.password -) +SshClient(portableip.ipaddress.ipaddress, + self.services['natrule']["publicport"], + self.virtual_machine.username, + self.virtual_machine.password + ) except Exception as e: self.fail("Exception while SSHing : %s" % e) @@ -1532,13 +1530,11 @@ class TestPortableIpTransferAcrossNetworks(cloudstackTestCase): try: self.debug("Trying to SSH to ip: %s" % portableip.ipaddress.ipaddress) - -remoteSSHClient( -portableip.ipaddress.ipaddress, -self.services['natrule']["publicport"], -self.virtual_machine2.username, -self.virtual_machine2.password -) +SshClient(portableip.ipaddress.ipaddress, + self.services['natrule']["publicport"], + self.virtual_machine2.username, + self.virtual_machine2.password + ) except Exception as e: self.fail("Exception while SSHing : %s" % e) http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6a92f754/test/integration/component/test_security_groups.py -- diff --git a/test/integration/component/test_security_groups.py b/test/integration/component/test_security_groups.py index c90ccf6..8e07396 100644 --- a/test/integration/component/test_security_groups.py +++ b/test/integration/component/test_security_groups.py @@ -656,12 +656,11 @@ class TestRevokeIngressRule(cloudstackTestCase): # SSH Attempt to VM should fail with self.assertRaises(Exception): self.debug("SSH into VM: %s" % self.virtual_machine.id) - SshClient( -
git commit: updated refs/heads/4.2 to cff7e39
Updated Branches: refs/heads/4.2 8f53bb273 -> cff7e3933 Fixed few hunks which were incorrect. While adding certain marvin related fixes from master to 4.2 branch incorrect hunks were added. Fixed them. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cff7e393 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cff7e393 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cff7e393 Branch: refs/heads/4.2 Commit: cff7e39339cc8735e3dc930bd1ce6761d502e307 Parents: 8f53bb2 Author: Girish Shilamkar Authored: Mon Nov 11 15:10:29 2013 +0530 Committer: Girish Shilamkar Committed: Mon Nov 11 15:10:29 2013 +0530 -- tools/marvin/marvin/cloudstackConnection.py | 27 ++-- 1 file changed, 7 insertions(+), 20 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cff7e393/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 64a43f8..644cf3a 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -32,6 +32,7 @@ from requests import RequestException class cloudConnection(object): + """ Connections to make API calls to the cloudstack management server """ def __init__(self, mgmtDet, asyncTimeout=3600, logging=None, @@ -56,7 +57,7 @@ class cloudConnection(object): (self.apiKey is None and self.securityKey is None): self.auth = False if mgmtDet.useHttps == "True": - self.protocol = "https" +self.protocol = "https" self.baseurl = "%s://%s:%d/%s"\ % (self.protocol, self.mgtSvr, self.port, self.path) @@ -157,12 +158,12 @@ class cloudConnection(object): #Verify whether protocol is "http", then call the request over http if self.protocol == "http": - if method == 'POST': - response = requests.post(self.baseurl, params=payload, +if method == 'POST': +response = requests.post(self.baseurl, params=payload, + verify=https_flag) +else: +response = requests.get(self.baseurl, params=payload, verify=https_flag) - else: - response = requests.get(self.baseurl, params=payload, - verify=https_flag) else: ''' If protocol is https, then create the connection url with \ @@ -170,20 +171,6 @@ class cloudConnection(object): provided as part of cert ''' try: - if method == 'POST': - response = requests.post(self.baseurl, params=payload, -cert=cert_path, verify=https_flag) - else: - response = requests.get(self.baseurl, params=payload, - cert=cert_path, verify=https_flag) -except Exception,e: -''' -If an exception occurs with current CA certs,\ - then try with default certs path, we dont need \ -to mention here the cert path -''' -self.logging.debug( "Creating CS connection over https \ -didnt worked with user provided certs %s"%e ) if method == 'POST': response = requests.post(self.baseurl, params=payload,
git commit: updated refs/heads/master to aebbb15
Updated Branches: refs/heads/master 1b2f1d745 -> aebbb15a6 Fixed a connection issue under asyncmgr. Fixed a connection issue under asyncmgr. Added __init__.py files to directory to make it a package.This file was missing under few directories and so not appearing as packages while refactoring. Adding one None Check Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aebbb15a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aebbb15a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aebbb15a Branch: refs/heads/master Commit: aebbb15a64b3f2b96fc7b89be229f82116bd710d Parents: 1b2f1d7 Author: Santhosh Edukulla Authored: Mon Nov 11 16:55:09 2013 +0530 Committer: Girish Shilamkar Committed: Mon Nov 11 16:55:09 2013 +0530 -- tools/marvin/marvin/asyncJobMgr.py| 2 +- tools/marvin/marvin/cloudstackConnection.py | 2 ++ tools/marvin/marvin/sandbox/demo/__init__.py | 17 + tools/marvin/marvin/sandbox/demo/live/__init__.py | 17 + 4 files changed, 37 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aebbb15a/tools/marvin/marvin/asyncJobMgr.py -- diff --git a/tools/marvin/marvin/asyncJobMgr.py b/tools/marvin/marvin/asyncJobMgr.py index 0d7939c..e24170e 100644 --- a/tools/marvin/marvin/asyncJobMgr.py +++ b/tools/marvin/marvin/asyncJobMgr.py @@ -88,7 +88,7 @@ class workThread(threading.Thread): time.mktime(jobstatus.endTime.timetuple()) - time.mktime( jobstatus.startTime.timetuple()) else: -result = self.connection.marvin_request(cmd) +result = self.connection.marvinRequest(cmd) if result is None: jobstatus.status = False else: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aebbb15a/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 644cf3a..23f81fb 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -271,6 +271,8 @@ class cloudConnection(object): self.auth, payload=payload, method=method) +if response is None: +return None self.logging.debug("Request: %s Response: %s" % (response.url, response.text)) try: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aebbb15a/tools/marvin/marvin/sandbox/demo/__init__.py -- diff --git a/tools/marvin/marvin/sandbox/demo/__init__.py b/tools/marvin/marvin/sandbox/demo/__init__.py new file mode 100644 index 000..00ae6c0 --- /dev/null +++ b/tools/marvin/marvin/sandbox/demo/__init__.py @@ -0,0 +1,17 @@ +# 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/aebbb15a/tools/marvin/marvin/sandbox/demo/live/__init__.py -- diff --git a/tools/marvin/marvin/sandbox/demo/live/__init__.py b/tools/marvin/marvin/sandbox/demo/live/__init__.py new file mode 100644 index 000..00ae6c0 --- /dev/null +++ b/tools/marvin/marvin/sandbox/demo/live/__init__.py @@ -0,0 +1,17 @@ +# 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 th
git commit: updated refs/heads/4.3 to aeb5ec0
Updated Branches: refs/heads/4.3 61386f406 -> aeb5ec07c Fixed a connection issue under asyncmgr. Fixed a connection issue under asyncmgr. Added __init__.py files to directory to make it a package.This file was missing under few directories and so not appearing as packages while refactoring. Adding one None Check Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/aeb5ec07 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/aeb5ec07 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/aeb5ec07 Branch: refs/heads/4.3 Commit: aeb5ec07c68a4f1116496ffd54e993e48b5c9f0d Parents: 61386f4 Author: Santhosh Edukulla Authored: Mon Nov 11 16:55:09 2013 +0530 Committer: Girish Shilamkar Committed: Mon Nov 11 16:59:59 2013 +0530 -- tools/marvin/marvin/asyncJobMgr.py| 2 +- tools/marvin/marvin/cloudstackConnection.py | 2 ++ tools/marvin/marvin/sandbox/demo/__init__.py | 17 + tools/marvin/marvin/sandbox/demo/live/__init__.py | 17 + 4 files changed, 37 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aeb5ec07/tools/marvin/marvin/asyncJobMgr.py -- diff --git a/tools/marvin/marvin/asyncJobMgr.py b/tools/marvin/marvin/asyncJobMgr.py index 0d7939c..e24170e 100644 --- a/tools/marvin/marvin/asyncJobMgr.py +++ b/tools/marvin/marvin/asyncJobMgr.py @@ -88,7 +88,7 @@ class workThread(threading.Thread): time.mktime(jobstatus.endTime.timetuple()) - time.mktime( jobstatus.startTime.timetuple()) else: -result = self.connection.marvin_request(cmd) +result = self.connection.marvinRequest(cmd) if result is None: jobstatus.status = False else: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aeb5ec07/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 2c027c3..75af874 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -272,6 +272,8 @@ class cloudConnection(object): self.auth, payload=payload, method=method) +if response is None: +return None self.logging.debug("Request: %s Response: %s" % (response.url, response.text)) try: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/aeb5ec07/tools/marvin/marvin/sandbox/demo/__init__.py -- diff --git a/tools/marvin/marvin/sandbox/demo/__init__.py b/tools/marvin/marvin/sandbox/demo/__init__.py new file mode 100644 index 000..00ae6c0 --- /dev/null +++ b/tools/marvin/marvin/sandbox/demo/__init__.py @@ -0,0 +1,17 @@ +# 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/aeb5ec07/tools/marvin/marvin/sandbox/demo/live/__init__.py -- diff --git a/tools/marvin/marvin/sandbox/demo/live/__init__.py b/tools/marvin/marvin/sandbox/demo/live/__init__.py new file mode 100644 index 000..00ae6c0 --- /dev/null +++ b/tools/marvin/marvin/sandbox/demo/live/__init__.py @@ -0,0 +1,17 @@ +# 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 th
git commit: updated refs/heads/4.2 to 7d02c71
Updated Branches: refs/heads/4.2 3e3b1c86e -> 7d02c71ff Fixed a connection issue under asyncmgr. Fixed a connection issue under asyncmgr. Added __init__.py files to directory to make it a package.This file was missing under few directories and so not appearing as packages while refactoring. Adding one None Check Conflicts: tools/marvin/marvin/asyncJobMgr.py Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7d02c71f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7d02c71f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7d02c71f Branch: refs/heads/4.2 Commit: 7d02c71ff7ddfb231d722c9ad83d9ac27261d7fb Parents: 3e3b1c8 Author: Santhosh Edukulla Authored: Mon Nov 11 16:55:09 2013 +0530 Committer: Girish Shilamkar Committed: Mon Nov 11 16:58:44 2013 +0530 -- tools/marvin/marvin/asyncJobMgr.py| 2 +- tools/marvin/marvin/cloudstackConnection.py | 2 ++ tools/marvin/marvin/sandbox/demo/__init__.py | 17 + tools/marvin/marvin/sandbox/demo/live/__init__.py | 17 + 4 files changed, 37 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d02c71f/tools/marvin/marvin/asyncJobMgr.py -- diff --git a/tools/marvin/marvin/asyncJobMgr.py b/tools/marvin/marvin/asyncJobMgr.py index 25818a6..cab1406 100644 --- a/tools/marvin/marvin/asyncJobMgr.py +++ b/tools/marvin/marvin/asyncJobMgr.py @@ -88,7 +88,7 @@ class workThread(threading.Thread): time.mktime(jobstatus.endTime.timetuple()) - time.mktime( jobstatus.startTime.timetuple()) else: -result = self.connection.make_request(cmd, None, True) +result = self.connection.marvinRequest(cmd) if result is None: jobstatus.status = False else: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d02c71f/tools/marvin/marvin/cloudstackConnection.py -- diff --git a/tools/marvin/marvin/cloudstackConnection.py b/tools/marvin/marvin/cloudstackConnection.py index 644cf3a..23f81fb 100644 --- a/tools/marvin/marvin/cloudstackConnection.py +++ b/tools/marvin/marvin/cloudstackConnection.py @@ -271,6 +271,8 @@ class cloudConnection(object): self.auth, payload=payload, method=method) +if response is None: +return None self.logging.debug("Request: %s Response: %s" % (response.url, response.text)) try: http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7d02c71f/tools/marvin/marvin/sandbox/demo/__init__.py -- diff --git a/tools/marvin/marvin/sandbox/demo/__init__.py b/tools/marvin/marvin/sandbox/demo/__init__.py new file mode 100644 index 000..00ae6c0 --- /dev/null +++ b/tools/marvin/marvin/sandbox/demo/__init__.py @@ -0,0 +1,17 @@ +# 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/7d02c71f/tools/marvin/marvin/sandbox/demo/live/__init__.py -- diff --git a/tools/marvin/marvin/sandbox/demo/live/__init__.py b/tools/marvin/marvin/sandbox/demo/live/__init__.py new file mode 100644 index 000..00ae6c0 --- /dev/null +++ b/tools/marvin/marvin/sandbox/demo/live/__init__.py @@ -0,0 +1,17 @@ +# 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
git commit: updated refs/heads/4.2 to 5deefb1
Updated Branches: refs/heads/4.2 153d1ad09 -> 5deefb1ec CLOUDSTACK-5146: Removing basic and sg tags from the test case which is invalid for the basic zone TestRouterRestart.test_01_restart_network_cleanup test scenario is invalid for basic zone. The test case tries to restart the Router assigned to individual account but in basic zone, there is only one router i.e of shared network and there is only one guest(shared) network per zone. Hence the API fails to list the router of the individual account. More over, we will not try to restart the Router of the shared network because it is used by many accounts and restarting it may affect the execution of other test cases. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5deefb1e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5deefb1e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5deefb1e Branch: refs/heads/4.2 Commit: 5deefb1ec56a0d96a7c4a850a6d2943bb337e1ee Parents: 153d1ad Author: Girish Shilamkar Authored: Wed Nov 13 12:19:30 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 12:19:30 2013 +0530 -- test/integration/component/test_blocker_bugs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5deefb1e/test/integration/component/test_blocker_bugs.py -- diff --git a/test/integration/component/test_blocker_bugs.py b/test/integration/component/test_blocker_bugs.py index 62800f8..5488ddb 100644 --- a/test/integration/component/test_blocker_bugs.py +++ b/test/integration/component/test_blocker_bugs.py @@ -630,7 +630,7 @@ class TestRouterRestart(cloudstackTestCase): # No need return -@attr(tags = ["advanced", "basic", "sg", "advancedns", "eip"]) +@attr(tags = ["advanced", "advancedns", "eip"]) def test_01_restart_network_cleanup(self): """TS_BUG_008-Test restart network """
git commit: updated refs/heads/4.3 to b894a38
Updated Branches: refs/heads/4.3 09cfcd619 -> b894a3820 CLOUDSTACK-5146: Removing basic and sg tags from the test case which is invalid for the basic zone TestRouterRestart.test_01_restart_network_cleanup test scenario is invalid for basic zone. The test case tries to restart the Router assigned to individual account but in basic zone, there is only one router i.e of shared network and there is only one guest(shared) network per zone. Hence the API fails to list the router of the individual account. More over, we will not try to restart the Router of the shared network because it is used by many accounts and restarting it may affect the execution of other test cases. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b894a382 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b894a382 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b894a382 Branch: refs/heads/4.3 Commit: b894a3820ce48d777631cffb0610040c97ffafce Parents: 09cfcd6 Author: Girish Shilamkar Authored: Wed Nov 13 12:19:30 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 12:21:15 2013 +0530 -- test/integration/component/test_blocker_bugs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b894a382/test/integration/component/test_blocker_bugs.py -- diff --git a/test/integration/component/test_blocker_bugs.py b/test/integration/component/test_blocker_bugs.py index 62800f8..5488ddb 100644 --- a/test/integration/component/test_blocker_bugs.py +++ b/test/integration/component/test_blocker_bugs.py @@ -630,7 +630,7 @@ class TestRouterRestart(cloudstackTestCase): # No need return -@attr(tags = ["advanced", "basic", "sg", "advancedns", "eip"]) +@attr(tags = ["advanced", "advancedns", "eip"]) def test_01_restart_network_cleanup(self): """TS_BUG_008-Test restart network """
git commit: updated refs/heads/master to 967a5bd
Updated Branches: refs/heads/master fc9adec72 -> 967a5bded CLOUDSTACK-5146: Removing basic and sg tags from the test case which is invalid for the basic zone TestRouterRestart.test_01_restart_network_cleanup test scenario is invalid for basic zone. The test case tries to restart the Router assigned to individual account but in basic zone, there is only one router i.e of shared network and there is only one guest(shared) network per zone. Hence the API fails to list the router of the individual account. More over, we will not try to restart the Router of the shared network because it is used by many accounts and restarting it may affect the execution of other test cases. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/967a5bde Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/967a5bde Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/967a5bde Branch: refs/heads/master Commit: 967a5bded4b34c3e92a3860f79980d5ebe4c14e0 Parents: fc9adec Author: Girish Shilamkar Authored: Wed Nov 13 12:19:30 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 12:22:02 2013 +0530 -- test/integration/component/test_blocker_bugs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/967a5bde/test/integration/component/test_blocker_bugs.py -- diff --git a/test/integration/component/test_blocker_bugs.py b/test/integration/component/test_blocker_bugs.py index 62800f8..5488ddb 100644 --- a/test/integration/component/test_blocker_bugs.py +++ b/test/integration/component/test_blocker_bugs.py @@ -630,7 +630,7 @@ class TestRouterRestart(cloudstackTestCase): # No need return -@attr(tags = ["advanced", "basic", "sg", "advancedns", "eip"]) +@attr(tags = ["advanced", "advancedns", "eip"]) def test_01_restart_network_cleanup(self): """TS_BUG_008-Test restart network """
git commit: updated refs/heads/master to c6195c3
Updated Branches: refs/heads/master 967a5bded -> c6195c355 CLOUDSTACK-5147: Removing basic and sg tag from the test case which should not be run on basic zone setup component.test_project_limits.TestMaxProjectNetworks.test_maxAccountNetworks tries to create multiple guest networks in an project of account which is not possible in basic zone as there is only one guest network allowed per zone in basic zone setup. Hence removing the tags basic and sg so that this test case won't be picked up to run on basic zone setup. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c6195c35 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c6195c35 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c6195c35 Branch: refs/heads/master Commit: c6195c355643a0768a805491079ba9727ae44a00 Parents: 967a5bd Author: Girish Shilamkar Authored: Wed Nov 13 12:27:56 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 12:28:44 2013 +0530 -- test/integration/component/test_project_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c6195c35/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 c6df7f3..04e6922 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -1014,7 +1014,7 @@ class TestMaxProjectNetworks(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "simulator", -"api", "basic", "eip", "sg"]) +"api", "eip"]) def test_maxAccountNetworks(self): """Test Limit number of guest account specific networks """
git commit: updated refs/heads/4.3 to c2ea4fc
Updated Branches: refs/heads/4.3 b894a3820 -> c2ea4fc3c CLOUDSTACK-5147: Removing basic and sg tag from the test case which should not be run on basic zone setup component.test_project_limits.TestMaxProjectNetworks.test_maxAccountNetworks tries to create multiple guest networks in an project of account which is not possible in basic zone as there is only one guest network allowed per zone in basic zone setup. Hence removing the tags basic and sg so that this test case won't be picked up to run on basic zone setup. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c2ea4fc3 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c2ea4fc3 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c2ea4fc3 Branch: refs/heads/4.3 Commit: c2ea4fc3c7a880a2dedd9b21e7a8dca287557b39 Parents: b894a38 Author: Girish Shilamkar Authored: Wed Nov 13 12:27:56 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 12:30:24 2013 +0530 -- test/integration/component/test_project_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c2ea4fc3/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 c6df7f3..04e6922 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -1014,7 +1014,7 @@ class TestMaxProjectNetworks(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "simulator", -"api", "basic", "eip", "sg"]) +"api", "eip"]) def test_maxAccountNetworks(self): """Test Limit number of guest account specific networks """
git commit: updated refs/heads/4.2 to 1aec433
Updated Branches: refs/heads/4.2 738e7257c -> 1aec43370 CLOUDSTACK-5147: Removing basic and sg tag from the test case which should not be run on basic zone setup component.test_project_limits.TestMaxProjectNetworks.test_maxAccountNetworks tries to create multiple guest networks in an project of account which is not possible in basic zone as there is only one guest network allowed per zone in basic zone setup. Hence removing the tags basic and sg so that this test case won't be picked up to run on basic zone setup. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1aec4337 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1aec4337 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1aec4337 Branch: refs/heads/4.2 Commit: 1aec43370faf626348897489ec3d32a315cd32f4 Parents: 738e725 Author: Girish Shilamkar Authored: Wed Nov 13 12:27:56 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 12:31:10 2013 +0530 -- test/integration/component/test_project_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1aec4337/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 c6df7f3..04e6922 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -1014,7 +1014,7 @@ class TestMaxProjectNetworks(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "simulator", -"api", "basic", "eip", "sg"]) +"api", "eip"]) def test_maxAccountNetworks(self): """Test Limit number of guest account specific networks """
git commit: updated refs/heads/4.2 to b5d3b99
Updated Branches: refs/heads/4.2 1aec43370 -> b5d3b9930 CLOUDSTACK-5154: Fixed test script issue related to failure in creating snapshot from volume Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b5d3b993 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b5d3b993 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b5d3b993 Branch: refs/heads/4.2 Commit: b5d3b99307668269d74b4c2fc3c71e6650b88b03 Parents: 1aec433 Author: Ashutosh K Authored: Wed Nov 13 17:32:28 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 17:32:28 2013 +0530 -- test/integration/component/test_project_limits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b5d3b993/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 04e6922..e883283 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -763,9 +763,9 @@ class TestResourceLimitsProject(cloudstackTestCase): # Get the Root disk of VM volumes = list_volumes( self.apiclient, +virtualmachineid=virtual_machine_1.id, projectid=self.project.id, -type='ROOT', -listall=True +type='ROOT' ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/4.3 to 57c7825
Updated Branches: refs/heads/4.3 c2ea4fc3c -> 57c782527 CLOUDSTACK-5154: Fixed test script issue related to failure in creating snapshot from volume Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/57c78252 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/57c78252 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/57c78252 Branch: refs/heads/4.3 Commit: 57c782527554028d3cf6cf51eff59914b7b1b10e Parents: c2ea4fc Author: Ashutosh K Authored: Wed Nov 13 17:32:28 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 17:34:41 2013 +0530 -- test/integration/component/test_project_limits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/57c78252/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 04e6922..e883283 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -763,9 +763,9 @@ class TestResourceLimitsProject(cloudstackTestCase): # Get the Root disk of VM volumes = list_volumes( self.apiclient, +virtualmachineid=virtual_machine_1.id, projectid=self.project.id, -type='ROOT', -listall=True +type='ROOT' ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/master to 52b0484
Updated Branches: refs/heads/master 553a9ab85 -> 52b048481 CLOUDSTACK-5154: Fixed test script issue related to failure in creating snapshot from volume Signed-off-by: Girish Shilamkar Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/52b04848 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/52b04848 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/52b04848 Branch: refs/heads/master Commit: 52b0484812641ddcffef5715d97f39a1fc38c75e Parents: 553a9ab Author: Ashutosh K Authored: Wed Nov 13 17:32:28 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 17:35:28 2013 +0530 -- test/integration/component/test_project_limits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/52b04848/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 04e6922..e883283 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -763,9 +763,9 @@ class TestResourceLimitsProject(cloudstackTestCase): # Get the Root disk of VM volumes = list_volumes( self.apiclient, +virtualmachineid=virtual_machine_1.id, projectid=self.project.id, -type='ROOT', -listall=True +type='ROOT' ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/master to 2e373d5
Updated Branches: refs/heads/master 0068da719 -> 2e373d58e CLOUDSTACK-5156: Fixed test script issue related to detach volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/2e373d58 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2e373d58 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2e373d58 Branch: refs/heads/master Commit: 2e373d58e0cc5843e4c59a9e6aaca64d003db785 Parents: 0068da7 Author: Gaurav Aradhye Authored: Wed Nov 13 21:16:13 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:16:13 2013 +0530 -- test/integration/component/test_project_limits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e373d58/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 e883283..c497311 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -902,9 +902,9 @@ class TestResourceLimitsProject(cloudstackTestCase): # Get the Root disk of VM volumes = list_volumes( self.apiclient, +virtualmachineid=virtual_machine_1.id, projectid=self.project.id, -type='ROOT', -listall=True +type='ROOT' ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/4.3 to 4d21591
Updated Branches: refs/heads/4.3 57c782527 -> 4d21591bf CLOUDSTACK-5156: Fixed test script issue related to detach volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4d21591b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4d21591b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4d21591b Branch: refs/heads/4.3 Commit: 4d21591bf81af12469c913e4ccfb50e1a76dce73 Parents: 57c7825 Author: Gaurav Aradhye Authored: Wed Nov 13 21:16:13 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:17:42 2013 +0530 -- test/integration/component/test_project_limits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4d21591b/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 e883283..c497311 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -902,9 +902,9 @@ class TestResourceLimitsProject(cloudstackTestCase): # Get the Root disk of VM volumes = list_volumes( self.apiclient, +virtualmachineid=virtual_machine_1.id, projectid=self.project.id, -type='ROOT', -listall=True +type='ROOT' ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/4.2 to 9e2b7bf
Updated Branches: refs/heads/4.2 b5d3b9930 -> 9e2b7bfa7 CLOUDSTACK-5156: Fixed test script issue related to detach volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9e2b7bfa Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9e2b7bfa Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9e2b7bfa Branch: refs/heads/4.2 Commit: 9e2b7bfa7b740b732de98eb4e138373dc920dc7e Parents: b5d3b99 Author: Gaurav Aradhye Authored: Wed Nov 13 21:16:13 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:18:21 2013 +0530 -- test/integration/component/test_project_limits.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9e2b7bfa/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 e883283..c497311 100644 --- a/test/integration/component/test_project_limits.py +++ b/test/integration/component/test_project_limits.py @@ -902,9 +902,9 @@ class TestResourceLimitsProject(cloudstackTestCase): # Get the Root disk of VM volumes = list_volumes( self.apiclient, +virtualmachineid=virtual_machine_1.id, projectid=self.project.id, -type='ROOT', -listall=True +type='ROOT' ) self.assertEqual( isinstance(volumes, list),
[1/2] git commit: updated refs/heads/4.2 to 6c8b946
Updated Branches: refs/heads/4.2 9e2b7bfa7 -> 6c8b946f5 refs/heads/master 2e373d58e -> 6aff6aa60 CLOUDSTACK-5155: Removing basic and sg tags from test case which is invalid for basic zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6c8b946f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6c8b946f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6c8b946f Branch: refs/heads/4.2 Commit: 6c8b946f5c70a10c6869278d07ed057e153a6c99 Parents: 9e2b7bf Author: Gaurav Aradhye Authored: Wed Nov 13 21:21:39 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:23:13 2013 +0530 -- test/integration/component/test_stopped_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6c8b946f/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 2586c0b..4514bb7 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -1256,7 +1256,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase): except Exception as e: self.debug("Warning! Exception in tearDown: %s" % e) -@attr(tags = ["advanced", "eip", "advancedns", "basic", "sg"]) +@attr(tags = ["advanced", "eip", "advancedns"]) def test_01_deploy_vm_no_startvm(self): """Test Deploy Virtual Machine with no startVM parameter """
[2/2] git commit: updated refs/heads/master to 6aff6aa
CLOUDSTACK-5155: Removing basic and sg tags from test case which is invalid for basic zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6aff6aa6 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6aff6aa6 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6aff6aa6 Branch: refs/heads/master Commit: 6aff6aa601a165f00bfaad6543e4b2a33d798806 Parents: 2e373d5 Author: Gaurav Aradhye Authored: Wed Nov 13 21:29:47 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:29:47 2013 +0530 -- test/integration/component/test_stopped_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aff6aa6/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 2586c0b..4514bb7 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -1256,7 +1256,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase): except Exception as e: self.debug("Warning! Exception in tearDown: %s" % e) -@attr(tags = ["advanced", "eip", "advancedns", "basic", "sg"]) +@attr(tags = ["advanced", "eip", "advancedns"]) def test_01_deploy_vm_no_startvm(self): """Test Deploy Virtual Machine with no startVM parameter """
git commit: updated refs/heads/4.3 to 5b5e444
Updated Branches: refs/heads/4.3 4d21591bf -> 5b5e44486 CLOUDSTACK-5155: Removing basic and sg tags from test case which is invalid for basic zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5b5e4448 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b5e4448 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b5e4448 Branch: refs/heads/4.3 Commit: 5b5e444861f90feebf9a1f3b9ec0f05db61fb38b Parents: 4d21591 Author: Gaurav Aradhye Authored: Wed Nov 13 21:29:47 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:31:30 2013 +0530 -- test/integration/component/test_stopped_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b5e4448/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 5a5c298..5c1b4de 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -1257,7 +1257,7 @@ class TestRouterStateAfterDeploy(cloudstackTestCase): except Exception as e: self.debug("Warning! Exception in tearDown: %s" % e) -@attr(tags = ["advanced", "eip", "advancedns", "basic", "sg"]) +@attr(tags = ["advanced", "eip", "advancedns"]) def test_01_deploy_vm_no_startvm(self): """Test Deploy Virtual Machine with no startVM parameter """
git commit: updated refs/heads/master to cb91892
Updated Branches: refs/heads/master 6aff6aa60 -> cb918928e Missing tests from QA repo to ASF - 3 tests from test_vmware_drs.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cb918928 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cb918928 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cb918928 Branch: refs/heads/master Commit: cb918928e692b9023b68c981e1b88edd1a8e9f8c Parents: 6aff6aa Author: Ashutosh K Authored: Wed Nov 13 21:51:35 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:51:35 2013 +0530 -- test/integration/component/test_vmware_drs.py | 713 + 1 file changed, 713 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cb918928/test/integration/component/test_vmware_drs.py -- diff --git a/test/integration/component/test_vmware_drs.py b/test/integration/component/test_vmware_drs.py new file mode 100644 index 000..8eeb2c3 --- /dev/null +++ b/test/integration/component/test_vmware_drs.py @@ -0,0 +1,713 @@ +# 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 for VMware DRS testing +""" +#Import Local Modules +import marvin +from nose.plugins.attrib import attr + +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (Account, + AffinityGroup, + Host, + VirtualMachine, + ServiceOffering) + +from marvin.integration.lib.commom import (get_zone, + get_template, + get_domain, + get_pod + ) + +from marvin.integration.lib.utils import (validateList, + cleanup_resources, + random_gen) + +from marvin.cloudstackAPI import (prepareHostForMaintenance, + cancelHostMaintenance, + migrateVirtualMachine) + +from marvin.codes import PASS + + +#Import System modules +import time + + +class Services: +"""Test vmware DRS services +""" + +def __init__(self): +self.services = { +"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": 2048, # In MBs +}, +"service_o
git commit: updated refs/heads/4.3 to cd1956e
Updated Branches: refs/heads/4.3 5b5e44486 -> cd1956e40 Missing tests from QA repo to ASF - 3 tests from test_vmware_drs.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cd1956e4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cd1956e4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cd1956e4 Branch: refs/heads/4.3 Commit: cd1956e40060685dcbfff0f4a30b5b7e4ad89cf0 Parents: 5b5e444 Author: Ashutosh K Authored: Wed Nov 13 21:51:35 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:52:25 2013 +0530 -- test/integration/component/test_vmware_drs.py | 713 + 1 file changed, 713 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cd1956e4/test/integration/component/test_vmware_drs.py -- diff --git a/test/integration/component/test_vmware_drs.py b/test/integration/component/test_vmware_drs.py new file mode 100644 index 000..8eeb2c3 --- /dev/null +++ b/test/integration/component/test_vmware_drs.py @@ -0,0 +1,713 @@ +# 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 for VMware DRS testing +""" +#Import Local Modules +import marvin +from nose.plugins.attrib import attr + +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (Account, + AffinityGroup, + Host, + VirtualMachine, + ServiceOffering) + +from marvin.integration.lib.commom import (get_zone, + get_template, + get_domain, + get_pod + ) + +from marvin.integration.lib.utils import (validateList, + cleanup_resources, + random_gen) + +from marvin.cloudstackAPI import (prepareHostForMaintenance, + cancelHostMaintenance, + migrateVirtualMachine) + +from marvin.codes import PASS + + +#Import System modules +import time + + +class Services: +"""Test vmware DRS services +""" + +def __init__(self): +self.services = { +"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": 2048, # In MBs +}, +"service_o
[2/2] git commit: updated refs/heads/4.2 to d8fd962
Including tests for VPC VM Lifecycle on Tagged hosts Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d8fd962a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d8fd962a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d8fd962a Branch: refs/heads/4.2 Commit: d8fd962a735305b1f6c27adc0f18e65c881434dd Parents: d605a43 Author: Ashutosh K Authored: Wed Nov 13 21:54:35 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:54:35 2013 +0530 -- .../component/test_vpc_vm_life_cycle.py | 953 ++- tools/marvin/marvin/integration/lib/base.py | 8 + 2 files changed, 959 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d8fd962a/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 3690514..60a8971 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -57,7 +57,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 128, -"tags": "HOST_TAGS_HERE" +"hosttags": "host1" }, "service_offering_2": { "name": "Tiny Instance- tagged host 2", @@ -65,7 +65,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 128, -"tags": "HOST_TAGS_HERE" +"hosttags": "host2" }, "network_offering": { "name": 'VPC Network offering', @@ -2716,3 +2716,952 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): listall=True ) return + +class TestVMLifeCycleDiffHosts(cloudstackTestCase): + +@classmethod +def setUpClass(cls): +try: + +cls.api_client = super( + TestVMLifeCycleDiffHosts, + cls + ).getClsTestClient().getApiClient() +cls.services = Services().services +# Get Zone, Domain and templates +cls.domain = get_domain(cls.api_client, cls.services) +cls.zone = get_zone(cls.api_client, cls.services) +cls.template = get_template( +cls.api_client, +cls.zone.id, +cls.services["ostype"] +) +cls.services["virtual_machine"]["zoneid"] = cls.zone.id +cls.services["virtual_machine"]["template"] = cls.template.id + +hosts = list_hosts(cls.api_client) + +assert isinstance(hosts, list), "list_hosts should return a list response,\ +instead got %s" % hosts + +if len(hosts) < 3: +raise Exception("Minimum 3 hosts should be available to run this test suite") + +Host.update(cls.api_client, id=hosts[0].id, hosttags="host1") + +Host.update(cls.api_client, id=hosts[1].id, hosttags="host1") + +Host.update(cls.api_client, id=hosts[2].id, hosttags="host2") + +cls.service_offering_1 = ServiceOffering.create( +cls.api_client, +cls.services["service_offering_1"] +) +cls.service_offering_2 = ServiceOffering.create( +cls.api_client, +cls.services["service_offering_2"] +) + +cls.account = Account.create( + cls.api_client, + cls.services["account"], + admin=True, + domainid=cls.domain.id + ) + +cls.vpc_off = VpcOffering.create( + cls.api_client, + cls.services["vpc_offering"] +
[1/2] git commit: updated refs/heads/4.2 to d8fd962
Updated Branches: refs/heads/4.2 6c8b946f5 -> d8fd962a7 Missing tests from QA repo to ASF - 3 tests from test_vmware_drs.py Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/d605a436 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/d605a436 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/d605a436 Branch: refs/heads/4.2 Commit: d605a4367e1419d22d3936e48d0b9a6878c75c1b Parents: 6c8b946 Author: Ashutosh K Authored: Wed Nov 13 21:51:35 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:52:48 2013 +0530 -- test/integration/component/test_vmware_drs.py | 713 + 1 file changed, 713 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/d605a436/test/integration/component/test_vmware_drs.py -- diff --git a/test/integration/component/test_vmware_drs.py b/test/integration/component/test_vmware_drs.py new file mode 100644 index 000..8eeb2c3 --- /dev/null +++ b/test/integration/component/test_vmware_drs.py @@ -0,0 +1,713 @@ +# 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 for VMware DRS testing +""" +#Import Local Modules +import marvin +from nose.plugins.attrib import attr + +from marvin.cloudstackTestCase import cloudstackTestCase, unittest + +from marvin.integration.lib.base import (Account, + AffinityGroup, + Host, + VirtualMachine, + ServiceOffering) + +from marvin.integration.lib.commom import (get_zone, + get_template, + get_domain, + get_pod + ) + +from marvin.integration.lib.utils import (validateList, + cleanup_resources, + random_gen) + +from marvin.cloudstackAPI import (prepareHostForMaintenance, + cancelHostMaintenance, + migrateVirtualMachine) + +from marvin.codes import PASS + + +#Import System modules +import time + + +class Services: +"""Test vmware DRS services +""" + +def __init__(self): +self.services = { +"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": 2048, # In MBs +}, +"service_o
git commit: updated refs/heads/4.3 to 7bb7c08
Updated Branches: refs/heads/4.3 cd1956e40 -> 7bb7c08e1 Including tests for VPC VM Lifecycle on Tagged hosts Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7bb7c08e Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7bb7c08e Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7bb7c08e Branch: refs/heads/4.3 Commit: 7bb7c08e10894727bcdfa7708170aab69a3aeeea Parents: cd1956e Author: Ashutosh K Authored: Wed Nov 13 21:54:35 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:56:20 2013 +0530 -- .../component/test_vpc_vm_life_cycle.py | 953 ++- tools/marvin/marvin/integration/lib/base.py | 8 + 2 files changed, 959 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7bb7c08e/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index cc65eed..8e79f95 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -58,7 +58,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 128, -"tags": "HOST_TAGS_HERE" +"hosttags": "host1" }, "service_offering_2": { "name": "Tiny Instance- tagged host 2", @@ -66,7 +66,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 128, -"tags": "HOST_TAGS_HERE" +"hosttags": "host2" }, "network_offering": { "name": 'VPC Network offering', @@ -2717,3 +2717,952 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): listall=True ) return + +class TestVMLifeCycleDiffHosts(cloudstackTestCase): + +@classmethod +def setUpClass(cls): +try: + +cls.api_client = super( + TestVMLifeCycleDiffHosts, + cls + ).getClsTestClient().getApiClient() +cls.services = Services().services +# Get Zone, Domain and templates +cls.domain = get_domain(cls.api_client, cls.services) +cls.zone = get_zone(cls.api_client, cls.services) +cls.template = get_template( +cls.api_client, +cls.zone.id, +cls.services["ostype"] +) +cls.services["virtual_machine"]["zoneid"] = cls.zone.id +cls.services["virtual_machine"]["template"] = cls.template.id + +hosts = list_hosts(cls.api_client) + +assert isinstance(hosts, list), "list_hosts should return a list response,\ +instead got %s" % hosts + +if len(hosts) < 3: +raise Exception("Minimum 3 hosts should be available to run this test suite") + +Host.update(cls.api_client, id=hosts[0].id, hosttags="host1") + +Host.update(cls.api_client, id=hosts[1].id, hosttags="host1") + +Host.update(cls.api_client, id=hosts[2].id, hosttags="host2") + +cls.service_offering_1 = ServiceOffering.create( +cls.api_client, +cls.services["service_offering_1"] +) +cls.service_offering_2 = ServiceOffering.create( +cls.api_client, +cls.services["service_offering_2"] +) + +cls.account = Account.create( + cls.api_client, + cls.services["account"], + admin=True, + domainid=cls.domain.id + ) + +cls.vpc_off = VpcOffering.create( + cls.api_client, +
git commit: updated refs/heads/master to 401e0ca
Updated Branches: refs/heads/master cb918928e -> 401e0ca0b Including tests for VPC VM Lifecycle on Tagged hosts Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/401e0ca0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/401e0ca0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/401e0ca0 Branch: refs/heads/master Commit: 401e0ca0ba9132e40ff06c5df2f449d21dc3a6d6 Parents: cb91892 Author: Ashutosh K Authored: Wed Nov 13 21:54:35 2013 +0530 Committer: Girish Shilamkar Committed: Wed Nov 13 21:56:51 2013 +0530 -- .../component/test_vpc_vm_life_cycle.py | 953 ++- tools/marvin/marvin/integration/lib/base.py | 8 + 2 files changed, 959 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/401e0ca0/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 3690514..60a8971 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -57,7 +57,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 128, -"tags": "HOST_TAGS_HERE" +"hosttags": "host1" }, "service_offering_2": { "name": "Tiny Instance- tagged host 2", @@ -65,7 +65,7 @@ class Services: "cpunumber": 1, "cpuspeed": 100, "memory": 128, -"tags": "HOST_TAGS_HERE" +"hosttags": "host2" }, "network_offering": { "name": 'VPC Network offering', @@ -2716,3 +2716,952 @@ class TestVMLifeCycleStoppedVPCVR(cloudstackTestCase): listall=True ) return + +class TestVMLifeCycleDiffHosts(cloudstackTestCase): + +@classmethod +def setUpClass(cls): +try: + +cls.api_client = super( + TestVMLifeCycleDiffHosts, + cls + ).getClsTestClient().getApiClient() +cls.services = Services().services +# Get Zone, Domain and templates +cls.domain = get_domain(cls.api_client, cls.services) +cls.zone = get_zone(cls.api_client, cls.services) +cls.template = get_template( +cls.api_client, +cls.zone.id, +cls.services["ostype"] +) +cls.services["virtual_machine"]["zoneid"] = cls.zone.id +cls.services["virtual_machine"]["template"] = cls.template.id + +hosts = list_hosts(cls.api_client) + +assert isinstance(hosts, list), "list_hosts should return a list response,\ +instead got %s" % hosts + +if len(hosts) < 3: +raise Exception("Minimum 3 hosts should be available to run this test suite") + +Host.update(cls.api_client, id=hosts[0].id, hosttags="host1") + +Host.update(cls.api_client, id=hosts[1].id, hosttags="host1") + +Host.update(cls.api_client, id=hosts[2].id, hosttags="host2") + +cls.service_offering_1 = ServiceOffering.create( +cls.api_client, +cls.services["service_offering_1"] +) +cls.service_offering_2 = ServiceOffering.create( +cls.api_client, +cls.services["service_offering_2"] +) + +cls.account = Account.create( + cls.api_client, + cls.services["account"], + admin=True, + domainid=cls.domain.id + ) + +cls.vpc_off = VpcOffering.create( + cls.api_client, +
git commit: updated refs/heads/4.3 to 3c4d4cc
Updated Branches: refs/heads/4.3 f29c7188b -> 3c4d4cc03 CLOUDSTACK-5166: Fixed test script issue related to egress rules Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/3c4d4cc0 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/3c4d4cc0 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/3c4d4cc0 Branch: refs/heads/4.3 Commit: 3c4d4cc03bbecc1141cea521449529a04ed27360 Parents: f29c718 Author: Ashutosh K Authored: Fri Nov 15 11:14:44 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:16:30 2013 +0530 -- test/integration/component/test_egress_rules.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/3c4d4cc0/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 34995ff..983b7ce 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -523,7 +523,7 @@ class TestDefaultGroupEgress(cloudstackTestCase): #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, -#ping out to google.com from the VM should fail, +#ping out to google.com from the VM should be successful, #ssh from within VM to mgt server should pass security_group = SecurityGroup.create( @@ -617,7 +617,7 @@ class TestDefaultGroupEgress(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" ) @@ -625,8 +625,8 @@ class TestDefaultGroupEgress(cloudstackTestCase): try: self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( -self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] + self.apiclient.connection.user, + self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res)) @@ -725,7 +725,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): # 5. authorizeSecurityGroupEgress to allow ssh access only out to #CIDR: 0.0.0.0/0 # 6. deployed VM should be Running, ssh should be allowed into the VM, -#ping out to google.com from the VM should fail +#ping out to google.com from the VM should be successful security_group = SecurityGroup.create( self.apiclient, @@ -819,7 +819,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" )
git commit: updated refs/heads/master to 868e944
Updated Branches: refs/heads/master bf22f6dfe -> 868e944bf CLOUDSTACK-5166: Fixed test script issue related to egress rules Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/868e944b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/868e944b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/868e944b Branch: refs/heads/master Commit: 868e944bf1194f0e54f08b02677b2ada66bfc9cf Parents: bf22f6d Author: Ashutosh K Authored: Fri Nov 15 11:14:44 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:14:44 2013 +0530 -- test/integration/component/test_egress_rules.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/868e944b/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 34995ff..983b7ce 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -523,7 +523,7 @@ class TestDefaultGroupEgress(cloudstackTestCase): #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, -#ping out to google.com from the VM should fail, +#ping out to google.com from the VM should be successful, #ssh from within VM to mgt server should pass security_group = SecurityGroup.create( @@ -617,7 +617,7 @@ class TestDefaultGroupEgress(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" ) @@ -625,8 +625,8 @@ class TestDefaultGroupEgress(cloudstackTestCase): try: self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( -self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] + self.apiclient.connection.user, + self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res)) @@ -725,7 +725,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): # 5. authorizeSecurityGroupEgress to allow ssh access only out to #CIDR: 0.0.0.0/0 # 6. deployed VM should be Running, ssh should be allowed into the VM, -#ping out to google.com from the VM should fail +#ping out to google.com from the VM should be successful security_group = SecurityGroup.create( self.apiclient, @@ -819,7 +819,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" )
git commit: updated refs/heads/4.2 to c653f0e
Updated Branches: refs/heads/4.2 5f8dc7a38 -> c653f0eb1 CLOUDSTACK-5166: Fixed test script issue related to egress rules Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c653f0eb Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c653f0eb Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c653f0eb Branch: refs/heads/4.2 Commit: c653f0eb150f3fd47d12ce72489a872de21de204 Parents: 5f8dc7a Author: Ashutosh K Authored: Fri Nov 15 11:14:44 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:17:33 2013 +0530 -- test/integration/component/test_egress_rules.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c653f0eb/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 34995ff..983b7ce 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -523,7 +523,7 @@ class TestDefaultGroupEgress(cloudstackTestCase): #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, -#ping out to google.com from the VM should fail, +#ping out to google.com from the VM should be successful, #ssh from within VM to mgt server should pass security_group = SecurityGroup.create( @@ -617,7 +617,7 @@ class TestDefaultGroupEgress(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" ) @@ -625,8 +625,8 @@ class TestDefaultGroupEgress(cloudstackTestCase): try: self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( -self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] + self.apiclient.connection.user, + self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res)) @@ -725,7 +725,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): # 5. authorizeSecurityGroupEgress to allow ssh access only out to #CIDR: 0.0.0.0/0 # 6. deployed VM should be Running, ssh should be allowed into the VM, -#ping out to google.com from the VM should fail +#ping out to google.com from the VM should be successful security_group = SecurityGroup.create( self.apiclient, @@ -819,7 +819,7 @@ class TestDefaultGroupEgressAfterDeploy(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" )
git commit: updated refs/heads/4.2 to 1106116
Updated Branches: refs/heads/4.2 c653f0eb1 -> 1106116b4 CLOUDSTACK-5168: Fixed test script issue related to SSH command Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1106116b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1106116b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1106116b Branch: refs/heads/4.2 Commit: 1106116b48cdb253046462c2d9d483b63876a740 Parents: c653f0e Author: Ashutosh K Authored: Fri Nov 15 11:20:44 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:20:44 2013 +0530 -- test/integration/component/test_egress_rules.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1106116b/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 983b7ce..eb38c1a 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -907,7 +907,7 @@ class TestRevokeEgressRule(cloudstackTestCase): #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, -#ping out to google.com from the VM should fail, +#ping out to google.com from the VM should be successful, #ssh from within VM to mgt server should pass # 7. Revoke egress rule. Verify ping and SSH access to management server #is restored @@ -1005,7 +1005,7 @@ class TestRevokeEgressRule(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" ) @@ -1014,7 +1014,7 @@ class TestRevokeEgressRule(cloudstackTestCase): self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] +self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res)) @@ -1062,16 +1062,16 @@ class TestRevokeEgressRule(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("1 received"), + result.count("0 received"), 1, - "Ping to outside world from VM should be successful" + "Ping to outside world from VM should fail" ) try: self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] +self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res))
git commit: updated refs/heads/4.3 to 0a02c7e
Updated Branches: refs/heads/4.3 3c4d4cc03 -> 0a02c7e14 CLOUDSTACK-5168: Fixed test script issue related to SSH command Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0a02c7e1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0a02c7e1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0a02c7e1 Branch: refs/heads/4.3 Commit: 0a02c7e1474d12fb494e6938d5e67018790c2bd2 Parents: 3c4d4cc Author: Ashutosh K Authored: Fri Nov 15 11:20:44 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:23:26 2013 +0530 -- test/integration/component/test_egress_rules.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0a02c7e1/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 983b7ce..eb38c1a 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -907,7 +907,7 @@ class TestRevokeEgressRule(cloudstackTestCase): #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, -#ping out to google.com from the VM should fail, +#ping out to google.com from the VM should be successful, #ssh from within VM to mgt server should pass # 7. Revoke egress rule. Verify ping and SSH access to management server #is restored @@ -1005,7 +1005,7 @@ class TestRevokeEgressRule(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" ) @@ -1014,7 +1014,7 @@ class TestRevokeEgressRule(cloudstackTestCase): self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] +self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res)) @@ -1062,16 +1062,16 @@ class TestRevokeEgressRule(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("1 received"), + result.count("0 received"), 1, - "Ping to outside world from VM should be successful" + "Ping to outside world from VM should fail" ) try: self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] +self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res))
git commit: updated refs/heads/4.2 to 6ac099e
Updated Branches: refs/heads/4.2 1106116b4 -> 6ac099e44 CLOUDSTACK-5169: Egress rules - Improved assertion code related to SSH to avoid assertion error Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6ac099e4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6ac099e4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6ac099e4 Branch: refs/heads/4.2 Commit: 6ac099e44c576b70e99779b6c14d1e38d6d6c95d Parents: 1106116 Author: Ashutosh K Authored: Fri Nov 15 11:28:07 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:30:33 2013 +0530 -- test/integration/component/test_egress_rules.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6ac099e4/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 eb38c1a..590f72a 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -1439,8 +1439,7 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): try: self.debug("SSHing into VM type B from VM A") self.debug("VM IP: %s" % self.virtual_machineB.ssh_ip) -res = ssh.execute("ssh %s@%s" % ( -self.services["virtual_machine"]["username"], +res = ssh.execute("ssh -o 'BatchMode=yes' %s" % ( self.virtual_machineB.ssh_ip )) self.debug("SSH result: %s" % str(res)) @@ -1450,10 +1449,14 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): (self.virtual_machineA.ipaddress, e) ) result = str(res) -self.assertEqual( -result.count("Connection timed out"), -1, -"SSH into management server from VM should not be successful" + +# SSH failure may result in one of the following three error messages +ssh_failure_result_set = ["ssh: connect to host %s port 22: No route to host" % self.virtual_machineB.ssh_ip, + "ssh: connect to host %s port 22: Connection timed out" % self.virtual_machineB.ssh_ip, + "Host key verification failed."] + +self.assertFalse(set(res).isdisjoint(ssh_failure_result_set), +"SSH into VM of other account should not be successful" ) return
git commit: updated refs/heads/master to b178d06
Updated Branches: refs/heads/master 868e944bf -> b178d0645 CLOUDSTACK-5168: Fixed test script issue related to SSH command Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b178d064 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b178d064 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b178d064 Branch: refs/heads/master Commit: b178d0645418faa947c414be4241e01657dcadb4 Parents: 868e944 Author: Ashutosh K Authored: Fri Nov 15 11:20:44 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:24:30 2013 +0530 -- test/integration/component/test_egress_rules.py | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b178d064/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 983b7ce..eb38c1a 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -907,7 +907,7 @@ class TestRevokeEgressRule(cloudstackTestCase): #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, -#ping out to google.com from the VM should fail, +#ping out to google.com from the VM should be successful, #ssh from within VM to mgt server should pass # 7. Revoke egress rule. Verify ping and SSH access to management server #is restored @@ -1005,7 +1005,7 @@ class TestRevokeEgressRule(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("0 received"), + result.count("1 received"), 1, "Ping to outside world from VM should be successful" ) @@ -1014,7 +1014,7 @@ class TestRevokeEgressRule(cloudstackTestCase): self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] +self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res)) @@ -1062,16 +1062,16 @@ class TestRevokeEgressRule(cloudstackTestCase): result = str(res) self.assertEqual( - result.count("1 received"), + result.count("0 received"), 1, - "Ping to outside world from VM should be successful" + "Ping to outside world from VM should fail" ) try: self.debug("SSHing into management server from VM") res = ssh.execute("ssh %s@%s" % ( self.services["mgmt_server"]["username"], -self.services["mgmt_server"]["ipaddress"] +self.apiclient.connection.mgtSvr )) self.debug("SSH result: %s" % str(res))
git commit: updated refs/heads/master to 9410423
Updated Branches: refs/heads/master b178d0645 -> 941042355 CLOUDSTACK-5169: Egress rules - Improved assertion code related to SSH to avoid assertion error Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/94104235 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/94104235 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/94104235 Branch: refs/heads/master Commit: 9410423555d81f9da1c579f8d3c86b448bb9fee3 Parents: b178d06 Author: Ashutosh K Authored: Fri Nov 15 11:28:07 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:28:07 2013 +0530 -- test/integration/component/test_egress_rules.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/94104235/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 eb38c1a..590f72a 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -1439,8 +1439,7 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): try: self.debug("SSHing into VM type B from VM A") self.debug("VM IP: %s" % self.virtual_machineB.ssh_ip) -res = ssh.execute("ssh %s@%s" % ( -self.services["virtual_machine"]["username"], +res = ssh.execute("ssh -o 'BatchMode=yes' %s" % ( self.virtual_machineB.ssh_ip )) self.debug("SSH result: %s" % str(res)) @@ -1450,10 +1449,14 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): (self.virtual_machineA.ipaddress, e) ) result = str(res) -self.assertEqual( -result.count("Connection timed out"), -1, -"SSH into management server from VM should not be successful" + +# SSH failure may result in one of the following three error messages +ssh_failure_result_set = ["ssh: connect to host %s port 22: No route to host" % self.virtual_machineB.ssh_ip, + "ssh: connect to host %s port 22: Connection timed out" % self.virtual_machineB.ssh_ip, + "Host key verification failed."] + +self.assertFalse(set(res).isdisjoint(ssh_failure_result_set), +"SSH into VM of other account should not be successful" ) return
git commit: updated refs/heads/4.3 to b87f675
Updated Branches: refs/heads/4.3 0a02c7e14 -> b87f675f4 CLOUDSTACK-5169: Egress rules - Improved assertion code related to SSH to avoid assertion error Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/b87f675f Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/b87f675f Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/b87f675f Branch: refs/heads/4.3 Commit: b87f675f4abb9abff91b87dff5c6a087407427df Parents: 0a02c7e Author: Ashutosh K Authored: Fri Nov 15 11:28:07 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 11:29:32 2013 +0530 -- test/integration/component/test_egress_rules.py | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/b87f675f/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 eb38c1a..590f72a 100644 --- a/test/integration/component/test_egress_rules.py +++ b/test/integration/component/test_egress_rules.py @@ -1439,8 +1439,7 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): try: self.debug("SSHing into VM type B from VM A") self.debug("VM IP: %s" % self.virtual_machineB.ssh_ip) -res = ssh.execute("ssh %s@%s" % ( -self.services["virtual_machine"]["username"], +res = ssh.execute("ssh -o 'BatchMode=yes' %s" % ( self.virtual_machineB.ssh_ip )) self.debug("SSH result: %s" % str(res)) @@ -1450,10 +1449,14 @@ class TestMultipleAccountsEgressRuleNeg(cloudstackTestCase): (self.virtual_machineA.ipaddress, e) ) result = str(res) -self.assertEqual( -result.count("Connection timed out"), -1, -"SSH into management server from VM should not be successful" + +# SSH failure may result in one of the following three error messages +ssh_failure_result_set = ["ssh: connect to host %s port 22: No route to host" % self.virtual_machineB.ssh_ip, + "ssh: connect to host %s port 22: Connection timed out" % self.virtual_machineB.ssh_ip, + "Host key verification failed."] + +self.assertFalse(set(res).isdisjoint(ssh_failure_result_set), +"SSH into VM of other account should not be successful" ) return
git commit: updated refs/heads/master to 186b82a
Updated Branches: refs/heads/master c29cd9d3c -> 186b82ae3 CLOUDSTACK-5148: Fix test_createSharedNetwork_projectSpecific VM was being created with accountid and also project. By doing this create vm or any other resource will fail. Only specify project in which resource is created. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/186b82ae Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/186b82ae Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/186b82ae Branch: refs/heads/master Commit: 186b82ae3a420ae4d79efd2b04c4892fb9656f6f Parents: c29cd9d Author: Girish Shilamkar Authored: Thu Nov 14 21:16:01 2013 -0500 Committer: Girish Shilamkar Committed: Thu Nov 14 21:16:01 2013 -0500 -- test/integration/component/test_shared_networks.py | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/186b82ae/test/integration/component/test_shared_networks.py -- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 66a9d26..28468c9 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -1696,25 +1696,19 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("Shared Network created: %s" % self.network.id) -try: +with self.assertRaises(Exception): self.project2_admin_account_virtual_machine = VirtualMachine.create( self.api_client, self.services["virtual_machine"], - accountid=self.admin_account.name, - domainid=self.admin_account.domainid, networkids=self.network.id, projectid=self.project2.id, serviceofferingid=self.service_offering.id ) -self.fail("Virtual Machine got created in admin account with network specified but the network used is of scope project and the project2 is not assigned for the network.") -except Exception as e: -self.debug("Virtual Machine creation failed as network used have scoped only for project project1. Exception: %s" % e) - +self.debug("Deploying a vm to project other than the one in which \ + network is created raised an Exception as expected") self.project1_admin_account_virtual_machine = VirtualMachine.create( self.api_client, self.services["virtual_machine"], - accountid=self.admin_account.name, - domainid=self.admin_account.domainid, networkids=self.network.id, projectid=self.project1.id, serviceofferingid=self.service_offering.id
git commit: updated refs/heads/4.3 to 7be48e7
Updated Branches: refs/heads/4.3 9565f4ac3 -> 7be48e7d3 CLOUDSTACK-5148: Fix test_createSharedNetwork_projectSpecific VM was being created with accountid and also project. By doing this create vm or any other resource will fail. Only specify project in which resource is created. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7be48e7d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7be48e7d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7be48e7d Branch: refs/heads/4.3 Commit: 7be48e7d3526166df52a0b0ed77c35ab190a0114 Parents: 9565f4a Author: Girish Shilamkar Authored: Thu Nov 14 21:16:01 2013 -0500 Committer: Girish Shilamkar Committed: Thu Nov 14 21:25:53 2013 -0500 -- test/integration/component/test_shared_networks.py | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7be48e7d/test/integration/component/test_shared_networks.py -- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 66a9d26..28468c9 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -1696,25 +1696,19 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("Shared Network created: %s" % self.network.id) -try: +with self.assertRaises(Exception): self.project2_admin_account_virtual_machine = VirtualMachine.create( self.api_client, self.services["virtual_machine"], - accountid=self.admin_account.name, - domainid=self.admin_account.domainid, networkids=self.network.id, projectid=self.project2.id, serviceofferingid=self.service_offering.id ) -self.fail("Virtual Machine got created in admin account with network specified but the network used is of scope project and the project2 is not assigned for the network.") -except Exception as e: -self.debug("Virtual Machine creation failed as network used have scoped only for project project1. Exception: %s" % e) - +self.debug("Deploying a vm to project other than the one in which \ + network is created raised an Exception as expected") self.project1_admin_account_virtual_machine = VirtualMachine.create( self.api_client, self.services["virtual_machine"], - accountid=self.admin_account.name, - domainid=self.admin_account.domainid, networkids=self.network.id, projectid=self.project1.id, serviceofferingid=self.service_offering.id
git commit: updated refs/heads/4.2 to 7671d0f
Updated Branches: refs/heads/4.2 6ac099e44 -> 7671d0fc3 CLOUDSTACK-5148: Fix test_createSharedNetwork_projectSpecific VM was being created with accountid and also project. By doing this create vm or any other resource will fail. Only specify project in which resource is created. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/7671d0fc Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/7671d0fc Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/7671d0fc Branch: refs/heads/4.2 Commit: 7671d0fc35e07d5b356f53e0fc5d8c82177a9044 Parents: 6ac099e Author: Girish Shilamkar Authored: Thu Nov 14 21:16:01 2013 -0500 Committer: Girish Shilamkar Committed: Thu Nov 14 21:26:48 2013 -0500 -- test/integration/component/test_shared_networks.py | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7671d0fc/test/integration/component/test_shared_networks.py -- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 66a9d26..28468c9 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -1696,25 +1696,19 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("Shared Network created: %s" % self.network.id) -try: +with self.assertRaises(Exception): self.project2_admin_account_virtual_machine = VirtualMachine.create( self.api_client, self.services["virtual_machine"], - accountid=self.admin_account.name, - domainid=self.admin_account.domainid, networkids=self.network.id, projectid=self.project2.id, serviceofferingid=self.service_offering.id ) -self.fail("Virtual Machine got created in admin account with network specified but the network used is of scope project and the project2 is not assigned for the network.") -except Exception as e: -self.debug("Virtual Machine creation failed as network used have scoped only for project project1. Exception: %s" % e) - +self.debug("Deploying a vm to project other than the one in which \ + network is created raised an Exception as expected") self.project1_admin_account_virtual_machine = VirtualMachine.create( self.api_client, self.services["virtual_machine"], - accountid=self.admin_account.name, - domainid=self.admin_account.domainid, networkids=self.network.id, projectid=self.project1.id, serviceofferingid=self.service_offering.id
git commit: updated refs/heads/4.2 to a95bea0
Updated Branches: refs/heads/4.2 7671d0fc3 -> a95bea08e CLOUDSTACK-5180: Increasing the timeout for uploading volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a95bea08 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a95bea08 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a95bea08 Branch: refs/heads/4.2 Commit: a95bea08e4c41e359c137068245d04bae4d1dff4 Parents: 7671d0f Author: Gaurav Aradhye Authored: Fri Nov 15 16:20:46 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:20:46 2013 +0530 -- tools/marvin/marvin/integration/lib/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a95bea08/tools/marvin/marvin/integration/lib/base.py -- diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py index a3a5f58..b03c552 100755 --- a/tools/marvin/marvin/integration/lib/base.py +++ b/tools/marvin/marvin/integration/lib/base.py @@ -742,7 +742,7 @@ class Volume: cmd.url = services["url"] return Volume(apiclient.uploadVolume(cmd).__dict__) -def wait_for_upload(self, apiclient, timeout=5, interval=60): +def wait_for_upload(self, apiclient, timeout=10, interval=60): """Wait for upload""" # Sleep to ensure template is in proper state before download time.sleep(interval)
git commit: updated refs/heads/4.3 to 08208cf
Updated Branches: refs/heads/4.3 7be48e7d3 -> 08208cf42 CLOUDSTACK-5180: Increasing the timeout for uploading volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/08208cf4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/08208cf4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/08208cf4 Branch: refs/heads/4.3 Commit: 08208cf427f9957514e3bcc624272c6781a1189a Parents: 7be48e7 Author: Gaurav Aradhye Authored: Fri Nov 15 16:20:46 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:22:24 2013 +0530 -- tools/marvin/marvin/integration/lib/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08208cf4/tools/marvin/marvin/integration/lib/base.py -- diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py index a3a5f58..b03c552 100755 --- a/tools/marvin/marvin/integration/lib/base.py +++ b/tools/marvin/marvin/integration/lib/base.py @@ -742,7 +742,7 @@ class Volume: cmd.url = services["url"] return Volume(apiclient.uploadVolume(cmd).__dict__) -def wait_for_upload(self, apiclient, timeout=5, interval=60): +def wait_for_upload(self, apiclient, timeout=10, interval=60): """Wait for upload""" # Sleep to ensure template is in proper state before download time.sleep(interval)
git commit: updated refs/heads/master to c141e41
Updated Branches: refs/heads/master 4f302c124 -> c141e418e CLOUDSTACK-5180: Increasing the timeout for uploading volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c141e418 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c141e418 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c141e418 Branch: refs/heads/master Commit: c141e418e927dadc90a87ad4e1a939091cfbe54e Parents: 4f302c1 Author: Gaurav Aradhye Authored: Fri Nov 15 16:20:46 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:23:18 2013 +0530 -- tools/marvin/marvin/integration/lib/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c141e418/tools/marvin/marvin/integration/lib/base.py -- diff --git a/tools/marvin/marvin/integration/lib/base.py b/tools/marvin/marvin/integration/lib/base.py index a3a5f58..b03c552 100755 --- a/tools/marvin/marvin/integration/lib/base.py +++ b/tools/marvin/marvin/integration/lib/base.py @@ -742,7 +742,7 @@ class Volume: cmd.url = services["url"] return Volume(apiclient.uploadVolume(cmd).__dict__) -def wait_for_upload(self, apiclient, timeout=5, interval=60): +def wait_for_upload(self, apiclient, timeout=10, interval=60): """Wait for upload""" # Sleep to ensure template is in proper state before download time.sleep(interval)
git commit: updated refs/heads/master to a6c2c6a
Updated Branches: refs/heads/master c141e418e -> a6c2c6a26 CLOUDSTACK-5147: Removing basic and sg tags from the test case which is invalid for basic zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a6c2c6a2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a6c2c6a2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a6c2c6a2 Branch: refs/heads/master Commit: a6c2c6a261af4871b0a8872f43068f15cc1da3cd Parents: c141e41 Author: Gaurav Aradhye Authored: Fri Nov 15 16:25:10 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:25:10 2013 +0530 -- test/integration/component/test_resource_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a6c2c6a2/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 377aa74..07fc5a5 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1401,7 +1401,7 @@ class TestMaxAccountNetworks(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "simulator", -"api", "basic", "eip", "sg"]) +"api", "eip"]) def test_maxAccountNetworks(self): """Test Limit number of guest account specific networks """
git commit: updated refs/heads/4.3 to cfe3aab
Updated Branches: refs/heads/4.3 08208cf42 -> cfe3aabdc CLOUDSTACK-5147: Removing basic and sg tags from the test case which is invalid for basic zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cfe3aabd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cfe3aabd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cfe3aabd Branch: refs/heads/4.3 Commit: cfe3aabdc79a0702f5f12ca6b11266acf054cd6e Parents: 08208cf Author: Gaurav Aradhye Authored: Fri Nov 15 16:25:10 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:26:05 2013 +0530 -- test/integration/component/test_resource_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cfe3aabd/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 377aa74..07fc5a5 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1401,7 +1401,7 @@ class TestMaxAccountNetworks(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "simulator", -"api", "basic", "eip", "sg"]) +"api", "eip"]) def test_maxAccountNetworks(self): """Test Limit number of guest account specific networks """
git commit: updated refs/heads/4.2 to 057a65e
Updated Branches: refs/heads/4.2 a95bea08e -> 057a65e9a CLOUDSTACK-5147: Removing basic and sg tags from the test case which is invalid for basic zone Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/057a65e9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/057a65e9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/057a65e9 Branch: refs/heads/4.2 Commit: 057a65e9a9df80592e1360dce8dfffaddacebd02 Parents: a95bea0 Author: Gaurav Aradhye Authored: Fri Nov 15 16:25:10 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:26:33 2013 +0530 -- test/integration/component/test_resource_limits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/057a65e9/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 377aa74..07fc5a5 100644 --- a/test/integration/component/test_resource_limits.py +++ b/test/integration/component/test_resource_limits.py @@ -1401,7 +1401,7 @@ class TestMaxAccountNetworks(cloudstackTestCase): return @attr(tags=["advanced", "advancedns", "simulator", -"api", "basic", "eip", "sg"]) +"api", "eip"]) def test_maxAccountNetworks(self): """Test Limit number of guest account specific networks """
git commit: updated refs/heads/4.2 to 5b2de67
Updated Branches: refs/heads/4.2 057a65e9a -> 5b2de6767 CLOUDSTACK-5179: Fixed test script issue related to detach volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/5b2de676 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/5b2de676 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/5b2de676 Branch: refs/heads/4.2 Commit: 5b2de676732ad8f8180782348cde656821728696 Parents: 057a65e Author: Gaurav Aradhye Authored: Fri Nov 15 16:31:05 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:31:05 2013 +0530 -- test/integration/component/test_stopped_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/5b2de676/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 4514bb7..4ba94bf 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -770,7 +770,7 @@ class TestDeployVM(cloudstackTestCase): type='DATADISK', account=self.account.name, domainid=self.account.domainid, - listall=True + virtualmachineid=self.virtual_machine_2.id ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/4.3 to e862928
Updated Branches: refs/heads/4.3 cfe3aabdc -> e86292830 CLOUDSTACK-5179: Fixed test script issue related to detach volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e8629283 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e8629283 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e8629283 Branch: refs/heads/4.3 Commit: e8629283000fbf7874309903da647e341854a7c6 Parents: cfe3aab Author: Gaurav Aradhye Authored: Fri Nov 15 16:31:05 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:33:01 2013 +0530 -- test/integration/component/test_stopped_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8629283/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 5c1b4de..e700c46 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -771,7 +771,7 @@ class TestDeployVM(cloudstackTestCase): type='DATADISK', account=self.account.name, domainid=self.account.domainid, - listall=True + virtualmachineid=self.virtual_machine_2.id ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/master to 8a1918d
Updated Branches: refs/heads/master a6c2c6a26 -> 8a1918dbe CLOUDSTACK-5179: Fixed test script issue related to detach volume Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/8a1918db Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/8a1918db Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/8a1918db Branch: refs/heads/master Commit: 8a1918dbe1c5fbbb60c21fa89d880a99e7b33bd6 Parents: a6c2c6a Author: Gaurav Aradhye Authored: Fri Nov 15 16:31:05 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:33:37 2013 +0530 -- test/integration/component/test_stopped_vm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8a1918db/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 4514bb7..4ba94bf 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -770,7 +770,7 @@ class TestDeployVM(cloudstackTestCase): type='DATADISK', account=self.account.name, domainid=self.account.domainid, - listall=True + virtualmachineid=self.virtual_machine_2.id ) self.assertEqual( isinstance(volumes, list),
git commit: updated refs/heads/master to 09c0370
Updated Branches: refs/heads/master 8a1918dbe -> 09c0370d7 CLOUDSTACK-2243: base_image_updation - Adding tags to test cases Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/09c0370d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/09c0370d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/09c0370d Branch: refs/heads/master Commit: 09c0370d70721e07ff02cd907a2cab2cabc9ae5b Parents: 8a1918d Author: Girish Shilamkar Authored: Fri Nov 15 16:53:33 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:53:33 2013 +0530 -- test/integration/component/test_base_image_updation.py | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/09c0370d/test/integration/component/test_base_image_updation.py -- diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py index 8a99350..b70bea5 100644 --- a/test/integration/component/test_base_image_updation.py +++ b/test/integration/component/test_base_image_updation.py @@ -281,6 +281,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_01_deploy_instance_with_is_volatile_offering(self): """ Test deploy an instance with service offerings with IsVolatile set. """ @@ -311,6 +312,7 @@ class TestBaseImageUpdate(cloudstackTestCase): ) return +@attr(tags=["advanced", "basic"]) def test_02_reboot_instance_with_is_volatile_offering(self): """ Test rebooting instances created with isVolatile service offerings """ @@ -388,6 +390,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_03_restore_vm_with_new_template(self): """ Test restoring a vm with different template than the one it was created with """ @@ -503,6 +506,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_04_reoccuring_snapshot_rules(self): """ 1) Create a VM using the Service offering IsVolatile enabled
git commit: updated refs/heads/4.3 to 729bf51
Updated Branches: refs/heads/4.3 e86292830 -> 729bf5107 CLOUDSTACK-2243: base_image_updation - Adding tags to test cases Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/729bf510 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/729bf510 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/729bf510 Branch: refs/heads/4.3 Commit: 729bf51070812db93611a732d2956207584fc3d2 Parents: e862928 Author: Girish Shilamkar Authored: Fri Nov 15 16:53:33 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:54:33 2013 +0530 -- test/integration/component/test_base_image_updation.py | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/729bf510/test/integration/component/test_base_image_updation.py -- diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py index 8a99350..b70bea5 100644 --- a/test/integration/component/test_base_image_updation.py +++ b/test/integration/component/test_base_image_updation.py @@ -281,6 +281,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_01_deploy_instance_with_is_volatile_offering(self): """ Test deploy an instance with service offerings with IsVolatile set. """ @@ -311,6 +312,7 @@ class TestBaseImageUpdate(cloudstackTestCase): ) return +@attr(tags=["advanced", "basic"]) def test_02_reboot_instance_with_is_volatile_offering(self): """ Test rebooting instances created with isVolatile service offerings """ @@ -388,6 +390,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_03_restore_vm_with_new_template(self): """ Test restoring a vm with different template than the one it was created with """ @@ -503,6 +506,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_04_reoccuring_snapshot_rules(self): """ 1) Create a VM using the Service offering IsVolatile enabled
git commit: updated refs/heads/4.2 to ac9c4b0
Updated Branches: refs/heads/4.2 5b2de6767 -> ac9c4b023 CLOUDSTACK-2243: base_image_updation - Adding tags to test cases Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ac9c4b02 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ac9c4b02 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ac9c4b02 Branch: refs/heads/4.2 Commit: ac9c4b0233070748e2a489df5005e65c8f890356 Parents: 5b2de67 Author: Girish Shilamkar Authored: Fri Nov 15 16:53:33 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 16:55:26 2013 +0530 -- test/integration/component/test_base_image_updation.py | 4 1 file changed, 4 insertions(+) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac9c4b02/test/integration/component/test_base_image_updation.py -- diff --git a/test/integration/component/test_base_image_updation.py b/test/integration/component/test_base_image_updation.py index 8a99350..b70bea5 100644 --- a/test/integration/component/test_base_image_updation.py +++ b/test/integration/component/test_base_image_updation.py @@ -281,6 +281,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_01_deploy_instance_with_is_volatile_offering(self): """ Test deploy an instance with service offerings with IsVolatile set. """ @@ -311,6 +312,7 @@ class TestBaseImageUpdate(cloudstackTestCase): ) return +@attr(tags=["advanced", "basic"]) def test_02_reboot_instance_with_is_volatile_offering(self): """ Test rebooting instances created with isVolatile service offerings """ @@ -388,6 +390,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_03_restore_vm_with_new_template(self): """ Test restoring a vm with different template than the one it was created with """ @@ -503,6 +506,7 @@ class TestBaseImageUpdate(cloudstackTestCase): return +@attr(tags=["advanced", "basic"]) def test_04_reoccuring_snapshot_rules(self): """ 1) Create a VM using the Service offering IsVolatile enabled
git commit: updated refs/heads/4.3 to 03fea0c
Updated Branches: refs/heads/4.3 729bf5107 -> 03fea0c4d Fix marvin to refer to correct random_gen() function Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/03fea0c4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/03fea0c4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/03fea0c4 Branch: refs/heads/4.3 Commit: 03fea0c4dfc9b1d927ded7c8f83f3148bf6c74ed Parents: 729bf51 Author: Girish Shilamkar Authored: Fri Nov 15 17:10:40 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 17:12:20 2013 +0530 -- tools/marvin/marvin/cloudstackTestClient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03fea0c4/tools/marvin/marvin/cloudstackTestClient.py -- diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 3e833c7..8909b94 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -23,6 +23,7 @@ import random import string import hashlib from configGenerator import ConfigManager +from marvin.integration.lib.utils import random_gen ''' @Desc : CloudStackTestClient is encapsulated class for getting various \ @@ -124,7 +125,7 @@ class cloudstackTestClient(object): createAcctCmd = createAccount.createAccountCmd() createAcctCmd.accounttype = acctType createAcctCmd.domainid = domId -createAcctCmd.email = "test-" + self.random_gen()\ +createAcctCmd.email = "test-" + random_gen()\ + "@cloudstack.org" createAcctCmd.firstname = UserName createAcctCmd.lastname = UserName
git commit: updated refs/heads/master to 0b8cc97
Updated Branches: refs/heads/master 09c0370d7 -> 0b8cc9705 Fix marvin to refer to correct random_gen() function Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0b8cc970 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0b8cc970 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0b8cc970 Branch: refs/heads/master Commit: 0b8cc9705f2a5d91e3bde503e89465d513b70f9f Parents: 09c0370 Author: Girish Shilamkar Authored: Fri Nov 15 17:10:40 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 17:13:12 2013 +0530 -- tools/marvin/marvin/cloudstackTestClient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0b8cc970/tools/marvin/marvin/cloudstackTestClient.py -- diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index 0f96a2c..8a41fad 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -23,6 +23,7 @@ import random import string import hashlib from configGenerator import ConfigManager +from marvin.integration.lib.utils import random_gen ''' @Desc : CloudStackTestClient is encapsulated class for getting various \ @@ -125,7 +126,7 @@ class cloudstackTestClient(object): createAcctCmd = createAccount.createAccountCmd() createAcctCmd.accounttype = acctType createAcctCmd.domainid = domId -createAcctCmd.email = "test-" + self.random_gen()\ +createAcctCmd.email = "test-" + random_gen()\ + "@cloudstack.org" createAcctCmd.firstname = UserName createAcctCmd.lastname = UserName
git commit: updated refs/heads/4.2 to 454d9b0
Updated Branches: refs/heads/4.2 ac9c4b023 -> 454d9b04c Fix marvin to refer to correct random_gen() function Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/454d9b04 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/454d9b04 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/454d9b04 Branch: refs/heads/4.2 Commit: 454d9b04c4531c3f3fdd405169f200fe3600bcad Parents: ac9c4b0 Author: Girish Shilamkar Authored: Fri Nov 15 17:10:40 2013 +0530 Committer: Girish Shilamkar Committed: Fri Nov 15 17:10:40 2013 +0530 -- tools/marvin/marvin/cloudstackTestClient.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/454d9b04/tools/marvin/marvin/cloudstackTestClient.py -- diff --git a/tools/marvin/marvin/cloudstackTestClient.py b/tools/marvin/marvin/cloudstackTestClient.py index b3826a7..3eb6939 100644 --- a/tools/marvin/marvin/cloudstackTestClient.py +++ b/tools/marvin/marvin/cloudstackTestClient.py @@ -23,6 +23,7 @@ import random import string import hashlib from configGenerator import ConfigManager +from marvin.integration.lib.utils import random_gen ''' @Desc : CloudStackTestClient is encapsulated class for getting various \ @@ -135,7 +136,7 @@ class cloudstackTestClient(object): createAcctCmd = createAccount.createAccountCmd() createAcctCmd.accounttype = acctType createAcctCmd.domainid = domId -createAcctCmd.email = "test-" + self.random_gen()\ +createAcctCmd.email = "test-" + random_gen()\ + "@cloudstack.org" createAcctCmd.firstname = UserName createAcctCmd.lastname = UserName
git commit: updated refs/heads/master to 02c1552
Updated Branches: refs/heads/master 7791d6307 -> 02c15528c CLOUDSTACK-5185: test_egress_fw_rules - failed the test case if vm deployment failed instead of going on executing rest Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/02c15528 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/02c15528 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/02c15528 Branch: refs/heads/master Commit: 02c15528c8ad5a40998cc8d910560ce759c5d039 Parents: 7791d63 Author: Ashutosh K Authored: Sat Nov 16 14:57:59 2013 +0530 Committer: Girish Shilamkar Committed: Sat Nov 16 14:57:59 2013 +0530 -- test/integration/component/test_egress_fw_rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02c15528/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 0aed957..56ac366 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -214,7 +214,7 @@ class TestEgressFWRules(cloudstackTestCase): networkids=[str(self.network.id)], projectid=project.id if project else None) except Exception as e: -self.debug('error=%s' % e) +self.fail("Virtual machine deployment failed with exception: %s" % e) self.debug("Deployed instance in account: %s" % self.account.name) def exec_script_on_user_vm(self, script, exec_cmd_params, expected_result, negative_test=False):
git commit: updated refs/heads/4.3 to 249f853
Updated Branches: refs/heads/4.3 637fccc07 -> 249f85348 CLOUDSTACK-5185: test_egress_fw_rules - failed the test case if vm deployment failed instead of going on executing rest Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/249f8534 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/249f8534 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/249f8534 Branch: refs/heads/4.3 Commit: 249f853484f88f59bfeb2ccd114206c1ccd77bb8 Parents: 637fccc Author: Ashutosh K Authored: Sat Nov 16 14:57:59 2013 +0530 Committer: Girish Shilamkar Committed: Sat Nov 16 15:00:20 2013 +0530 -- test/integration/component/test_egress_fw_rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/249f8534/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 0aed957..56ac366 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -214,7 +214,7 @@ class TestEgressFWRules(cloudstackTestCase): networkids=[str(self.network.id)], projectid=project.id if project else None) except Exception as e: -self.debug('error=%s' % e) +self.fail("Virtual machine deployment failed with exception: %s" % e) self.debug("Deployed instance in account: %s" % self.account.name) def exec_script_on_user_vm(self, script, exec_cmd_params, expected_result, negative_test=False):
git commit: updated refs/heads/4.2 to 80dfd0f
Updated Branches: refs/heads/4.2 d65c3a70c -> 80dfd0f97 CLOUDSTACK-5185: test_egress_fw_rules - failed the test case if vm deployment failed instead of going on executing rest Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/80dfd0f9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/80dfd0f9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/80dfd0f9 Branch: refs/heads/4.2 Commit: 80dfd0f97ec611d8dee63ad74f6f1ecf74647b99 Parents: d65c3a7 Author: Ashutosh K Authored: Sat Nov 16 14:57:59 2013 +0530 Committer: Girish Shilamkar Committed: Sat Nov 16 15:01:28 2013 +0530 -- test/integration/component/test_egress_fw_rules.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/80dfd0f9/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 0aed957..56ac366 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -214,7 +214,7 @@ class TestEgressFWRules(cloudstackTestCase): networkids=[str(self.network.id)], projectid=project.id if project else None) except Exception as e: -self.debug('error=%s' % e) +self.fail("Virtual machine deployment failed with exception: %s" % e) self.debug("Deployed instance in account: %s" % self.account.name) def exec_script_on_user_vm(self, script, exec_cmd_params, expected_result, negative_test=False):
git commit: updated refs/heads/4.2 to 4df0c4a
Updated Branches: refs/heads/4.2 80dfd0f97 -> 4df0c4a7b CLOUDSTACK-5187: Fix test_vpc_vm_life_cycle recover tests The vms were recovered without deleting the vms first therefore the API failed. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4df0c4a7 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4df0c4a7 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4df0c4a7 Branch: refs/heads/4.2 Commit: 4df0c4a7b5d873e68ed4228e63e466d2a64bf369 Parents: 80dfd0f Author: Girish Shilamkar Authored: Fri Nov 15 23:33:44 2013 -0500 Committer: Girish Shilamkar Committed: Fri Nov 15 23:33:44 2013 -0500 -- .../component/test_vpc_vm_life_cycle.py | 26 1 file changed, 10 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4df0c4a7/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 60a8971..beb5b99 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -651,15 +651,13 @@ class TestVMLifeCycleVPC(cloudstackTestCase): """ Test recover an instance in VPC networks """ -# Validate the following -# 1. Recover the virtual machines. -# 2. Vm should be in stopped state. State both the instances -# 3. Make sure that all the PF,LB and Static NAT rules on this VM -#works as expected. -# 3. Make sure that we are able to access google.com from this user Vm +self.debug("Deleted instacnes ..") +try: +self.vm_1.delete(self.apiclient) +self.vm_2.delete(self.apiclient) +except Exception as e: +self.fail("Failed to stop the virtual instances, %s" % e) -self.debug("Recovering the expunged virtual machines in account: %s" % -self.account.name) try: self.vm_1.recover(self.apiclient) self.vm_2.recover(self.apiclient) @@ -1421,15 +1419,11 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): """ Test recover an instance in VPC networks """ -# Validate the following -# 1. Recover the virtual machines. -# 2. Vm should be in stopped state. State both the instances -# 3. Make sure that all the PF,LB and Static NAT rules on this VM -#works as expected. -# 3. Make sure that we are able to access google.com from this user Vm +try: +self.vm_2.delete(self.apiclient) +except Exception as e: +self.fail("Failed to destroy the virtual instances, %s" % e) -self.debug("Recovering the expunged virtual machines in account: %s" % -self.account.name) try: self.vm_2.recover(self.apiclient) except Exception as e:
git commit: updated refs/heads/4.3 to 944ecca
Updated Branches: refs/heads/4.3 249f85348 -> 944eccaf1 CLOUDSTACK-5187: Fix test_vpc_vm_life_cycle recover tests The vms were recovered without deleting the vms first therefore the API failed. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/944eccaf Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/944eccaf Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/944eccaf Branch: refs/heads/4.3 Commit: 944eccaf17f7944345b70560be02f30c00b832a7 Parents: 249f853 Author: Girish Shilamkar Authored: Fri Nov 15 23:33:44 2013 -0500 Committer: Girish Shilamkar Committed: Fri Nov 15 23:38:12 2013 -0500 -- .../component/test_vpc_vm_life_cycle.py | 26 1 file changed, 10 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/944eccaf/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 8e79f95..bcd37e7 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -652,15 +652,13 @@ class TestVMLifeCycleVPC(cloudstackTestCase): """ Test recover an instance in VPC networks """ -# Validate the following -# 1. Recover the virtual machines. -# 2. Vm should be in stopped state. State both the instances -# 3. Make sure that all the PF,LB and Static NAT rules on this VM -#works as expected. -# 3. Make sure that we are able to access google.com from this user Vm +self.debug("Deleted instacnes ..") +try: +self.vm_1.delete(self.apiclient) +self.vm_2.delete(self.apiclient) +except Exception as e: +self.fail("Failed to stop the virtual instances, %s" % e) -self.debug("Recovering the expunged virtual machines in account: %s" % -self.account.name) try: self.vm_1.recover(self.apiclient) self.vm_2.recover(self.apiclient) @@ -1422,15 +1420,11 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): """ Test recover an instance in VPC networks """ -# Validate the following -# 1. Recover the virtual machines. -# 2. Vm should be in stopped state. State both the instances -# 3. Make sure that all the PF,LB and Static NAT rules on this VM -#works as expected. -# 3. Make sure that we are able to access google.com from this user Vm +try: +self.vm_2.delete(self.apiclient) +except Exception as e: +self.fail("Failed to destroy the virtual instances, %s" % e) -self.debug("Recovering the expunged virtual machines in account: %s" % -self.account.name) try: self.vm_2.recover(self.apiclient) except Exception as e:
git commit: updated refs/heads/master to e2051de
Updated Branches: refs/heads/master 02c15528c -> e2051de98 CLOUDSTACK-5187: Fix test_vpc_vm_life_cycle recover tests The vms were recovered without deleting the vms first therefore the API failed. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e2051de9 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e2051de9 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e2051de9 Branch: refs/heads/master Commit: e2051de98e1460f8e0ce723b42331566a00e2ba1 Parents: 02c1552 Author: Girish Shilamkar Authored: Fri Nov 15 23:33:44 2013 -0500 Committer: Girish Shilamkar Committed: Fri Nov 15 23:38:57 2013 -0500 -- .../component/test_vpc_vm_life_cycle.py | 26 1 file changed, 10 insertions(+), 16 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e2051de9/test/integration/component/test_vpc_vm_life_cycle.py -- diff --git a/test/integration/component/test_vpc_vm_life_cycle.py b/test/integration/component/test_vpc_vm_life_cycle.py index 60a8971..beb5b99 100644 --- a/test/integration/component/test_vpc_vm_life_cycle.py +++ b/test/integration/component/test_vpc_vm_life_cycle.py @@ -651,15 +651,13 @@ class TestVMLifeCycleVPC(cloudstackTestCase): """ Test recover an instance in VPC networks """ -# Validate the following -# 1. Recover the virtual machines. -# 2. Vm should be in stopped state. State both the instances -# 3. Make sure that all the PF,LB and Static NAT rules on this VM -#works as expected. -# 3. Make sure that we are able to access google.com from this user Vm +self.debug("Deleted instacnes ..") +try: +self.vm_1.delete(self.apiclient) +self.vm_2.delete(self.apiclient) +except Exception as e: +self.fail("Failed to stop the virtual instances, %s" % e) -self.debug("Recovering the expunged virtual machines in account: %s" % -self.account.name) try: self.vm_1.recover(self.apiclient) self.vm_2.recover(self.apiclient) @@ -1421,15 +1419,11 @@ class TestVMLifeCycleSharedNwVPC(cloudstackTestCase): """ Test recover an instance in VPC networks """ -# Validate the following -# 1. Recover the virtual machines. -# 2. Vm should be in stopped state. State both the instances -# 3. Make sure that all the PF,LB and Static NAT rules on this VM -#works as expected. -# 3. Make sure that we are able to access google.com from this user Vm +try: +self.vm_2.delete(self.apiclient) +except Exception as e: +self.fail("Failed to destroy the virtual instances, %s" % e) -self.debug("Recovering the expunged virtual machines in account: %s" % -self.account.name) try: self.vm_2.recover(self.apiclient) except Exception as e:
git commit: updated refs/heads/4.3 to ac16007
Updated Branches: refs/heads/4.3 944eccaf1 -> ac160079f CLOUDSTACK-5186: Increasing the waiting time for router to come up Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ac160079 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ac160079 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ac160079 Branch: refs/heads/4.3 Commit: ac160079f1d6c775eebdbc1f83bddfa423527354 Parents: 944ecca Author: Gaurav Aradhye Authored: Sat Nov 16 17:11:32 2013 +0530 Committer: Girish Shilamkar Committed: Sat Nov 16 17:11:32 2013 +0530 -- test/integration/component/test_egress_fw_rules.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ac160079/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 56ac366..6dcc2c4d 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -280,15 +280,15 @@ class TestEgressFWRules(cloudstackTestCase): self.debug("%s %s" % (script_file, exec_cmd_params)) exec_success = False -#Timeout set to 3 minutes -timeout = 180 +#Timeout set to 6 minutes +timeout = 360 while timeout: self.debug('sleep %s seconds for egress rule to affect on Router.' % self.services['sleep']) time.sleep(self.services['sleep']) result = ssh.execute("%s %s" % (script_file, exec_cmd_params)) self.debug('Result is=%s' % result) self.debug('Expected result is=%s' % expected_result) - + if str(result).strip() == expected_result: exec_success = True break @@ -301,9 +301,9 @@ class TestEgressFWRules(cloudstackTestCase): else: # Failed due to some other error break #end while - + if timeout == 0: -self.fail("Router network failed to come up after 3 minutes.") +self.fail("Router network failed to come up after 6 minutes.") ssh.execute('rm -rf %s' % script_file)
git commit: updated refs/heads/4.2 to 04807f2
Updated Branches: refs/heads/4.2 4df0c4a7b -> 04807f2b5 CLOUDSTACK-5186: Increasing the waiting time for router to come up Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/04807f2b Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/04807f2b Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/04807f2b Branch: refs/heads/4.2 Commit: 04807f2b51242172d1a87f34cb096aef8149f1d9 Parents: 4df0c4a Author: Gaurav Aradhye Authored: Sat Nov 16 17:11:32 2013 +0530 Committer: Girish Shilamkar Committed: Sat Nov 16 17:14:23 2013 +0530 -- test/integration/component/test_egress_fw_rules.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/04807f2b/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 56ac366..6dcc2c4d 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -280,15 +280,15 @@ class TestEgressFWRules(cloudstackTestCase): self.debug("%s %s" % (script_file, exec_cmd_params)) exec_success = False -#Timeout set to 3 minutes -timeout = 180 +#Timeout set to 6 minutes +timeout = 360 while timeout: self.debug('sleep %s seconds for egress rule to affect on Router.' % self.services['sleep']) time.sleep(self.services['sleep']) result = ssh.execute("%s %s" % (script_file, exec_cmd_params)) self.debug('Result is=%s' % result) self.debug('Expected result is=%s' % expected_result) - + if str(result).strip() == expected_result: exec_success = True break @@ -301,9 +301,9 @@ class TestEgressFWRules(cloudstackTestCase): else: # Failed due to some other error break #end while - + if timeout == 0: -self.fail("Router network failed to come up after 3 minutes.") +self.fail("Router network failed to come up after 6 minutes.") ssh.execute('rm -rf %s' % script_file)
git commit: updated refs/heads/master to 438cf4e
Updated Branches: refs/heads/master e2051de98 -> 438cf4ea6 CLOUDSTACK-5186: Increasing the waiting time for router to come up Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/438cf4ea Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/438cf4ea Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/438cf4ea Branch: refs/heads/master Commit: 438cf4ea63873d422ea23ff2ff4810e122770230 Parents: e2051de Author: Gaurav Aradhye Authored: Sat Nov 16 17:11:32 2013 +0530 Committer: Girish Shilamkar Committed: Sat Nov 16 17:15:14 2013 +0530 -- test/integration/component/test_egress_fw_rules.py | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/438cf4ea/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 56ac366..6dcc2c4d 100644 --- a/test/integration/component/test_egress_fw_rules.py +++ b/test/integration/component/test_egress_fw_rules.py @@ -280,15 +280,15 @@ class TestEgressFWRules(cloudstackTestCase): self.debug("%s %s" % (script_file, exec_cmd_params)) exec_success = False -#Timeout set to 3 minutes -timeout = 180 +#Timeout set to 6 minutes +timeout = 360 while timeout: self.debug('sleep %s seconds for egress rule to affect on Router.' % self.services['sleep']) time.sleep(self.services['sleep']) result = ssh.execute("%s %s" % (script_file, exec_cmd_params)) self.debug('Result is=%s' % result) self.debug('Expected result is=%s' % expected_result) - + if str(result).strip() == expected_result: exec_success = True break @@ -301,9 +301,9 @@ class TestEgressFWRules(cloudstackTestCase): else: # Failed due to some other error break #end while - + if timeout == 0: -self.fail("Router network failed to come up after 3 minutes.") +self.fail("Router network failed to come up after 6 minutes.") ssh.execute('rm -rf %s' % script_file)
git commit: updated refs/heads/4.2 to 465ac16
Updated Branches: refs/heads/4.2 04807f2b5 -> 465ac1625 CLOUDSTACK-5194: portable ip - Improving cleanup code to avoid cascading failures Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/465ac162 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/465ac162 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/465ac162 Branch: refs/heads/4.2 Commit: 465ac16258df78cd6277d480e9319c24897a024c Parents: 04807f2 Author: Gaurav Aradhye Authored: Tue Nov 19 11:18:33 2013 +0530 Committer: Girish Shilamkar Committed: Tue Nov 19 11:18:33 2013 +0530 -- test/integration/component/test_portable_ip.py | 40 ++--- 1 file changed, 18 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/465ac162/test/integration/component/test_portable_ip.py -- diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index 14b6dac..d397ec4 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -235,8 +235,9 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase): self.debug("Trying to create portable ip range with non root-admin api client, should raise exception") with self.assertRaises(Exception): -PortablePublicIpRange.create(self.api_client_user, +portable_ip_range = PortablePublicIpRange.create(self.api_client_user, portable_ip_range_services) +self.cleanup.append(portable_ip_range) return @@ -258,8 +259,9 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase): self.debug("Trying to create portable ip range with wrong region id") with self.assertRaises(Exception): -PortablePublicIpRange.create(self.apiclient, +portable_ip_range = PortablePublicIpRange.create(self.apiclient, portable_ip_range_services) +self.cleanup.append(portable_ip_range) return @@ -687,8 +689,6 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Associated default public ip address: %s" % publicipaddress.ipaddress.ipaddress) - - self.debug("Associating public ip address with network: %s with isportable=False" % self.network.id) publicipaddressnotportable = PublicIPAddress.create( self.apiclient, @@ -727,7 +727,7 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Trying to associate portable public ip with invalid zone id, this should fail") with self.assertRaises(Exception): -PublicIPAddress.create( +publicipaddress = PublicIPAddress.create( self.apiclient, accountid=self.account.name, zoneid = -1, @@ -735,6 +735,7 @@ class TestAssociatePublicIp(cloudstackTestCase): regionid = self.region.id, isportable=True ) +publicipaddress.delete(self.apiclient) self.debug("Associating ip address failed") return @@ -815,14 +816,15 @@ class TestAssociatePublicIp(cloudstackTestCase): except Exception as e: self.fail("Exception while SSHing : %s" % e) -self.debug("Deleting firewall rule") -fw_rule.delete(self.apiclient) +finally: +self.debug("Deleting firewall rule") +fw_rule.delete(self.apiclient) -self.debug("Deleting NAT rule") -nat_rule.delete(self.apiclient) +self.debug("Deleting NAT rule") +nat_rule.delete(self.apiclient) -self.debug("disassocoating portable ip: %s" % portableip.ipaddress.ipaddress) -portableip.delete(self.apiclient) +self.debug("disassocoating portable ip: %s" % portableip.ipaddress.ipaddress) +portableip.delete(self.apiclient) return @attr(tags=["advanced"]) @@ -858,7 +860,7 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Trying to associate portable public ip when no free ips available, this should fail") with self.assertRaises(Exception): -PublicIPAddress.create( +portableipaddress = PublicIPAddress.create( self.apiclient,
git commit: updated refs/heads/master to 67b071b
Updated Branches: refs/heads/master 2587e42db -> 67b071bea CLOUDSTACK-5194: portable ip - Improving cleanup code to avoid cascading failures Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/67b071be Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/67b071be Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/67b071be Branch: refs/heads/master Commit: 67b071beaac34eb5c4427f120ed3f0d5baabb75b Parents: 2587e42 Author: Gaurav Aradhye Authored: Tue Nov 19 11:18:33 2013 +0530 Committer: Girish Shilamkar Committed: Tue Nov 19 11:21:33 2013 +0530 -- test/integration/component/test_portable_ip.py | 40 ++--- 1 file changed, 18 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/67b071be/test/integration/component/test_portable_ip.py -- diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index 14b6dac..d397ec4 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -235,8 +235,9 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase): self.debug("Trying to create portable ip range with non root-admin api client, should raise exception") with self.assertRaises(Exception): -PortablePublicIpRange.create(self.api_client_user, +portable_ip_range = PortablePublicIpRange.create(self.api_client_user, portable_ip_range_services) +self.cleanup.append(portable_ip_range) return @@ -258,8 +259,9 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase): self.debug("Trying to create portable ip range with wrong region id") with self.assertRaises(Exception): -PortablePublicIpRange.create(self.apiclient, +portable_ip_range = PortablePublicIpRange.create(self.apiclient, portable_ip_range_services) +self.cleanup.append(portable_ip_range) return @@ -687,8 +689,6 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Associated default public ip address: %s" % publicipaddress.ipaddress.ipaddress) - - self.debug("Associating public ip address with network: %s with isportable=False" % self.network.id) publicipaddressnotportable = PublicIPAddress.create( self.apiclient, @@ -727,7 +727,7 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Trying to associate portable public ip with invalid zone id, this should fail") with self.assertRaises(Exception): -PublicIPAddress.create( +publicipaddress = PublicIPAddress.create( self.apiclient, accountid=self.account.name, zoneid = -1, @@ -735,6 +735,7 @@ class TestAssociatePublicIp(cloudstackTestCase): regionid = self.region.id, isportable=True ) +publicipaddress.delete(self.apiclient) self.debug("Associating ip address failed") return @@ -815,14 +816,15 @@ class TestAssociatePublicIp(cloudstackTestCase): except Exception as e: self.fail("Exception while SSHing : %s" % e) -self.debug("Deleting firewall rule") -fw_rule.delete(self.apiclient) +finally: +self.debug("Deleting firewall rule") +fw_rule.delete(self.apiclient) -self.debug("Deleting NAT rule") -nat_rule.delete(self.apiclient) +self.debug("Deleting NAT rule") +nat_rule.delete(self.apiclient) -self.debug("disassocoating portable ip: %s" % portableip.ipaddress.ipaddress) -portableip.delete(self.apiclient) +self.debug("disassocoating portable ip: %s" % portableip.ipaddress.ipaddress) +portableip.delete(self.apiclient) return @attr(tags=["advanced"]) @@ -858,7 +860,7 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Trying to associate portable public ip when no free ips available, this should fail") with self.assertRaises(Exception): -PublicIPAddress.create( +portableipaddress = PublicIPAddress.create( self.apiclient,
git commit: updated refs/heads/4.3 to 85d3be7
Updated Branches: refs/heads/4.3 9a97c064b -> 85d3be79d CLOUDSTACK-5194: portable ip - Improving cleanup code to avoid cascading failures Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/85d3be79 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/85d3be79 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/85d3be79 Branch: refs/heads/4.3 Commit: 85d3be79d0665e1cca050d64982e64fb4008dd0b Parents: 9a97c06 Author: Gaurav Aradhye Authored: Tue Nov 19 11:18:33 2013 +0530 Committer: Girish Shilamkar Committed: Tue Nov 19 11:20:37 2013 +0530 -- test/integration/component/test_portable_ip.py | 40 ++--- 1 file changed, 18 insertions(+), 22 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/85d3be79/test/integration/component/test_portable_ip.py -- diff --git a/test/integration/component/test_portable_ip.py b/test/integration/component/test_portable_ip.py index a532b36..dda6555 100644 --- a/test/integration/component/test_portable_ip.py +++ b/test/integration/component/test_portable_ip.py @@ -235,8 +235,9 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase): self.debug("Trying to create portable ip range with non root-admin api client, should raise exception") with self.assertRaises(Exception): -PortablePublicIpRange.create(self.api_client_user, +portable_ip_range = PortablePublicIpRange.create(self.api_client_user, portable_ip_range_services) +self.cleanup.append(portable_ip_range) return @@ -258,8 +259,9 @@ class TestCreatePortablePublicIpRanges(cloudstackTestCase): self.debug("Trying to create portable ip range with wrong region id") with self.assertRaises(Exception): -PortablePublicIpRange.create(self.apiclient, +portable_ip_range = PortablePublicIpRange.create(self.apiclient, portable_ip_range_services) +self.cleanup.append(portable_ip_range) return @@ -687,8 +689,6 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Associated default public ip address: %s" % publicipaddress.ipaddress.ipaddress) - - self.debug("Associating public ip address with network: %s with isportable=False" % self.network.id) publicipaddressnotportable = PublicIPAddress.create( self.apiclient, @@ -727,7 +727,7 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Trying to associate portable public ip with invalid zone id, this should fail") with self.assertRaises(Exception): -PublicIPAddress.create( +publicipaddress = PublicIPAddress.create( self.apiclient, accountid=self.account.name, zoneid = -1, @@ -735,6 +735,7 @@ class TestAssociatePublicIp(cloudstackTestCase): regionid = self.region.id, isportable=True ) +publicipaddress.delete(self.apiclient) self.debug("Associating ip address failed") return @@ -817,14 +818,15 @@ class TestAssociatePublicIp(cloudstackTestCase): except Exception as e: self.fail("Exception while SSHing : %s" % e) -self.debug("Deleting firewall rule") -fw_rule.delete(self.apiclient) +finally: +self.debug("Deleting firewall rule") +fw_rule.delete(self.apiclient) -self.debug("Deleting NAT rule") -nat_rule.delete(self.apiclient) +self.debug("Deleting NAT rule") +nat_rule.delete(self.apiclient) -self.debug("disassocoating portable ip: %s" % portableip.ipaddress.ipaddress) -portableip.delete(self.apiclient) +self.debug("disassocoating portable ip: %s" % portableip.ipaddress.ipaddress) +portableip.delete(self.apiclient) return @attr(tags=["advanced"]) @@ -860,7 +862,7 @@ class TestAssociatePublicIp(cloudstackTestCase): self.debug("Trying to associate portable public ip when no free ips available, this should fail") with self.assertRaises(Exception): -PublicIPAddress.create( +portableipaddress = PublicIPAddress.create( self.apiclient,
git commit: updated refs/heads/master to 6aca7de
Updated Branches: refs/heads/master 273c912bb -> 6aca7de29 CLOUDSTACK-5215: Correcting and refactoring code related to getting free vlan Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/6aca7de2 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/6aca7de2 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/6aca7de2 Branch: refs/heads/master Commit: 6aca7de291e01a3a4641331ad1fedd6f0e70bd96 Parents: 273c912 Author: Gaurav Aradhye Authored: Thu Nov 21 10:53:27 2013 +0530 Committer: Girish Shilamkar Committed: Thu Nov 21 10:53:27 2013 +0530 -- .../component/test_shared_networks.py | 78 ++-- .../component/test_vpc_vm_life_cycle.py | 32 +--- .../component/test_vpc_vms_deployment.py| 39 ++ tools/marvin/marvin/integration/lib/common.py | 48 4 files changed, 99 insertions(+), 98 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/6aca7de2/test/integration/component/test_shared_networks.py -- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 28468c9..9b76702 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -36,7 +36,8 @@ from marvin.integration.lib.utils import (cleanup_resources, from marvin.integration.lib.common import (get_domain, get_zone, get_template, - wait_for_cleanup) + wait_for_cleanup, + get_free_vlan) import random import netaddr @@ -259,33 +260,6 @@ class TestSharedNetworks(cloudstackTestCase): return -def getFreeVlan(self, apiclient, zoneid): -""" -Find an unallocated VLAN outside the range allocated to the physical network. - -@note: This does not guarantee that the VLAN is available for use in -the deployment's network gear -@return: physical_network, shared_vlan_tag -""" -list_physical_networks_response = PhysicalNetwork.list( -apiclient, -zoneid=zoneid -) -assert isinstance(list_physical_networks_response, list) -assert len(list_physical_networks_response) > 0, "No physical networks found in zone %s" % zoneid - -physical_network = list_physical_networks_response[0] -vlans = xsplit(physical_network.vlan, ['-', ',']) - -assert len(vlans) > 0 -assert int(vlans[0]) < int(vlans[-1]), "VLAN range %s was improperly split" % physical_network.vlan -shared_ntwk_vlan = int(vlans[-1]) + random.randrange(1, 20) -if shared_ntwk_vlan > 4095: -shared_ntwk_vlan = int(vlans[0]) - random.randrange(1, 20) -assert shared_ntwk_vlan > 0, "VLAN chosen %s is invalid < 0" % shared_ntwk_vlan -self.debug("Attempting free VLAN %s for shared network creation" % shared_ntwk_vlan) -return physical_network, shared_ntwk_vlan - @attr(tags=["advanced", "advancedns"]) def test_sharedNetworkOffering_01(self): """ Test shared network Offering 01 """ @@ -703,7 +677,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("User type account created: %s" % self.user_account.name) -physical_network, shared_vlan = self.getFreeVlan(self.api_client, self.zone.id) +physical_network, shared_vlan = get_free_vlan(self.api_client, self.zone.id) +if shared_vlan is None: +self.fail("Failed to get free vlan id for shared network") self.debug("Physical network found: %s" % physical_network.id) @@ -972,7 +948,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("User type account created: %s" % self.user_account.name) -physical_network, shared_vlan = self.getFreeVlan(self.api_client, self.zone.id) +physical_network, shared_vlan = get_free_vlan(self.api_client, self.zone.id) +if shared_vlan is None: +self.fail("Failed to get free vlan id for shared network") self.debug("Physical Network found: %s" % physical_network.id) @@ -1281,7 +1259,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("Domain user account created: %s" % self.domain_user_account.id) -ph
git commit: updated refs/heads/4.3 to 0253fe5
Updated Branches: refs/heads/4.3 ff24ed0c8 -> 0253fe5d3 CLOUDSTACK-5215: Correcting and refactoring code related to getting free vlan Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/0253fe5d Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/0253fe5d Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/0253fe5d Branch: refs/heads/4.3 Commit: 0253fe5d3bcaebfd7d23da5404a071588235b8d4 Parents: ff24ed0 Author: Gaurav Aradhye Authored: Thu Nov 21 10:53:27 2013 +0530 Committer: Girish Shilamkar Committed: Thu Nov 21 10:59:35 2013 +0530 -- .../component/test_shared_networks.py | 78 ++-- .../component/test_vpc_vm_life_cycle.py | 32 +--- .../component/test_vpc_vms_deployment.py| 39 ++ tools/marvin/marvin/integration/lib/common.py | 48 4 files changed, 99 insertions(+), 98 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/0253fe5d/test/integration/component/test_shared_networks.py -- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 28468c9..9b76702 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -36,7 +36,8 @@ from marvin.integration.lib.utils import (cleanup_resources, from marvin.integration.lib.common import (get_domain, get_zone, get_template, - wait_for_cleanup) + wait_for_cleanup, + get_free_vlan) import random import netaddr @@ -259,33 +260,6 @@ class TestSharedNetworks(cloudstackTestCase): return -def getFreeVlan(self, apiclient, zoneid): -""" -Find an unallocated VLAN outside the range allocated to the physical network. - -@note: This does not guarantee that the VLAN is available for use in -the deployment's network gear -@return: physical_network, shared_vlan_tag -""" -list_physical_networks_response = PhysicalNetwork.list( -apiclient, -zoneid=zoneid -) -assert isinstance(list_physical_networks_response, list) -assert len(list_physical_networks_response) > 0, "No physical networks found in zone %s" % zoneid - -physical_network = list_physical_networks_response[0] -vlans = xsplit(physical_network.vlan, ['-', ',']) - -assert len(vlans) > 0 -assert int(vlans[0]) < int(vlans[-1]), "VLAN range %s was improperly split" % physical_network.vlan -shared_ntwk_vlan = int(vlans[-1]) + random.randrange(1, 20) -if shared_ntwk_vlan > 4095: -shared_ntwk_vlan = int(vlans[0]) - random.randrange(1, 20) -assert shared_ntwk_vlan > 0, "VLAN chosen %s is invalid < 0" % shared_ntwk_vlan -self.debug("Attempting free VLAN %s for shared network creation" % shared_ntwk_vlan) -return physical_network, shared_ntwk_vlan - @attr(tags=["advanced", "advancedns"]) def test_sharedNetworkOffering_01(self): """ Test shared network Offering 01 """ @@ -703,7 +677,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("User type account created: %s" % self.user_account.name) -physical_network, shared_vlan = self.getFreeVlan(self.api_client, self.zone.id) +physical_network, shared_vlan = get_free_vlan(self.api_client, self.zone.id) +if shared_vlan is None: +self.fail("Failed to get free vlan id for shared network") self.debug("Physical network found: %s" % physical_network.id) @@ -972,7 +948,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("User type account created: %s" % self.user_account.name) -physical_network, shared_vlan = self.getFreeVlan(self.api_client, self.zone.id) +physical_network, shared_vlan = get_free_vlan(self.api_client, self.zone.id) +if shared_vlan is None: +self.fail("Failed to get free vlan id for shared network") self.debug("Physical Network found: %s" % physical_network.id) @@ -1281,7 +1259,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("Domain user account created: %s" % self.domain_user_account.id) -physical_net
git commit: updated refs/heads/4.2 to 631743b
Updated Branches: refs/heads/4.2 b2b4b45ae -> 631743b44 CLOUDSTACK-5215: Correcting and refactoring code related to getting free vlan Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/631743b4 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/631743b4 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/631743b4 Branch: refs/heads/4.2 Commit: 631743b44a3cd5e69ff5c1ef6844950bb1074c5c Parents: b2b4b45 Author: Gaurav Aradhye Authored: Thu Nov 21 10:53:27 2013 +0530 Committer: Girish Shilamkar Committed: Thu Nov 21 11:00:15 2013 +0530 -- .../component/test_shared_networks.py | 78 ++-- .../component/test_vpc_vm_life_cycle.py | 32 +--- .../component/test_vpc_vms_deployment.py| 39 ++ tools/marvin/marvin/integration/lib/common.py | 48 4 files changed, 99 insertions(+), 98 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/631743b4/test/integration/component/test_shared_networks.py -- diff --git a/test/integration/component/test_shared_networks.py b/test/integration/component/test_shared_networks.py index 28468c9..9b76702 100644 --- a/test/integration/component/test_shared_networks.py +++ b/test/integration/component/test_shared_networks.py @@ -36,7 +36,8 @@ from marvin.integration.lib.utils import (cleanup_resources, from marvin.integration.lib.common import (get_domain, get_zone, get_template, - wait_for_cleanup) + wait_for_cleanup, + get_free_vlan) import random import netaddr @@ -259,33 +260,6 @@ class TestSharedNetworks(cloudstackTestCase): return -def getFreeVlan(self, apiclient, zoneid): -""" -Find an unallocated VLAN outside the range allocated to the physical network. - -@note: This does not guarantee that the VLAN is available for use in -the deployment's network gear -@return: physical_network, shared_vlan_tag -""" -list_physical_networks_response = PhysicalNetwork.list( -apiclient, -zoneid=zoneid -) -assert isinstance(list_physical_networks_response, list) -assert len(list_physical_networks_response) > 0, "No physical networks found in zone %s" % zoneid - -physical_network = list_physical_networks_response[0] -vlans = xsplit(physical_network.vlan, ['-', ',']) - -assert len(vlans) > 0 -assert int(vlans[0]) < int(vlans[-1]), "VLAN range %s was improperly split" % physical_network.vlan -shared_ntwk_vlan = int(vlans[-1]) + random.randrange(1, 20) -if shared_ntwk_vlan > 4095: -shared_ntwk_vlan = int(vlans[0]) - random.randrange(1, 20) -assert shared_ntwk_vlan > 0, "VLAN chosen %s is invalid < 0" % shared_ntwk_vlan -self.debug("Attempting free VLAN %s for shared network creation" % shared_ntwk_vlan) -return physical_network, shared_ntwk_vlan - @attr(tags=["advanced", "advancedns"]) def test_sharedNetworkOffering_01(self): """ Test shared network Offering 01 """ @@ -703,7 +677,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("User type account created: %s" % self.user_account.name) -physical_network, shared_vlan = self.getFreeVlan(self.api_client, self.zone.id) +physical_network, shared_vlan = get_free_vlan(self.api_client, self.zone.id) +if shared_vlan is None: +self.fail("Failed to get free vlan id for shared network") self.debug("Physical network found: %s" % physical_network.id) @@ -972,7 +948,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("User type account created: %s" % self.user_account.name) -physical_network, shared_vlan = self.getFreeVlan(self.api_client, self.zone.id) +physical_network, shared_vlan = get_free_vlan(self.api_client, self.zone.id) +if shared_vlan is None: +self.fail("Failed to get free vlan id for shared network") self.debug("Physical Network found: %s" % physical_network.id) @@ -1281,7 +1259,9 @@ class TestSharedNetworks(cloudstackTestCase): self.debug("Domain user account created: %s" % self.domain_user_account.id) -physical_net
git commit: updated refs/heads/master to db2ea0a
Updated Branches: refs/heads/master 6aca7de29 -> db2ea0a16 CLOUDSTACK-5204: test_routers - fixed ssh issue Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/db2ea0a1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/db2ea0a1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/db2ea0a1 Branch: refs/heads/master Commit: db2ea0a16a1eac0a76318250355f4575c0681a29 Parents: 6aca7de Author: Ashutosh K Authored: Thu Nov 21 11:06:34 2013 +0530 Committer: Girish Shilamkar Committed: Thu Nov 21 11:06:34 2013 +0530 -- test/integration/component/test_routers.py | 16 1 file changed, 8 insertions(+), 8 deletions(-) -- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/db2ea0a1/test/integration/component/test_routers.py -- diff --git a/test/integration/component/test_routers.py b/test/integration/component/test_routers.py index b41cc6f..5f1ebc6 100644 --- a/test/integration/component/test_routers.py +++ b/test/integration/component/test_routers.py @@ -70,7 +70,7 @@ class Services: "natrule": { "privateport": 22, -"publicport": 222, +"publicport": 22, "protocol": "TCP" }, "lbrule": @@ -79,7 +79,7 @@ class Services: "alg": "roundrobin", # Algorithm used for load balancing "privateport": 22, -"publicport": , +"publicport": 22, "protocol": 'TCP', }, "fw_rule": { @@ -700,7 +700,7 @@ class TestRouterStopCreatePF(cloudstackTestCase): # 4. listPublicIpAddresses account=user, domainid=1 - pick ipaddressid # 5. createPortForwardingRule (ipaddressid from step 5.) #a. for port 22 (ssh) for user VM deployed in step 1. -#b. public port 222 , private port 22 +#b. public port 22 , private port 22 # 6. startRouter stopped for this account # 7. wait for listRouters to show router as Running @@ -759,6 +759,7 @@ class TestRouterStopCreatePF(cloudstackTestCase): True, "Check for list public IPs response return valid data" ) + public_ip = public_ips[0] # Open up firewall port for SSH @@ -823,12 +824,11 @@ class TestRouterStopCreatePF(cloudstackTestCase): self.debug("SSH into VM with ID: %s" % nat_rule.ipaddress) -self.vm_1.ssh_port = nat_rule.publicport -self.vm_1.get_ssh_client(nat_rule.ipaddress) +self.vm_1.get_ssh_client(ipaddress=nat_rule.ipaddress, port=self.services["natrule"]["publicport"]) except Exception as e: self.fail( "SSH Access failed for %s: %s" % \ - (self.vm_1.ipaddress, e) + (nat_rule.ipaddress, e) ) return @@ -905,10 +905,10 @@ class TestRouterStopCreateLB(cloudstackTestCase): """ # validate the following # 1. listLoadBalancerRules (publicipid=ipaddressid of source NAT) -# 2. rule should be for port as applied and +# 2. rule should be for port 22 as applied and #should be in state=Active # 3. ssh access should be allowed to the userVMs over the source NAT IP -#and port +#and port 22 # Get router details associated for that account routers = list_routers(