Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC42310F5E for ; Fri, 15 Nov 2013 09:12:54 +0000 (UTC) Received: (qmail 41059 invoked by uid 500); 15 Nov 2013 09:12:10 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 41022 invoked by uid 500); 15 Nov 2013 09:12:07 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 40758 invoked by uid 99); 15 Nov 2013 09:11:44 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Nov 2013 09:11:44 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 6FF3482E575; Fri, 15 Nov 2013 09:11:44 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: girish@apache.org To: commits@cloudstack.apache.org Message-Id: <7224c22d2bdf4c4fb96b7bd70a4f0a85@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to 186b82a Date: Fri, 15 Nov 2013 09:11:44 +0000 (UTC) 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