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 6A88711CE7 for ; Sun, 24 Aug 2014 14:04:29 +0000 (UTC) Received: (qmail 98605 invoked by uid 500); 24 Aug 2014 14:04:23 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 98488 invoked by uid 500); 24 Aug 2014 14:04:23 -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 98143 invoked by uid 99); 24 Aug 2014 14:04:23 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Aug 2014 14:04:23 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id D4E69955CD3; Sun, 24 Aug 2014 14:04:22 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Sun, 24 Aug 2014 14:04:41 -0000 Message-Id: In-Reply-To: <585a1505e501427b9b78fa468ab4ac2c@git.apache.org> References: <585a1505e501427b9b78fa468ab4ac2c@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/50] [abbrv] git commit: updated refs/heads/saml2 to ba68616 Test script to verify if there is an error in editing a network without network domain Signed-off-by: sanjeev Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/51bfd562 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/51bfd562 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/51bfd562 Branch: refs/heads/saml2 Commit: 51bfd56244d09701e4cc0368fb5fb4bc35343a94 Parents: 3773ff0 Author: sanjeev Authored: Tue Aug 12 17:08:11 2014 +0530 Committer: sanjeev Committed: Fri Aug 22 11:07:28 2014 +0530 ---------------------------------------------------------------------- .../component/test_network_offering.py | 64 ++++++++++++++++++++ 1 file changed, 64 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/51bfd562/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 2c9a057..9a7c786 100644 --- a/test/integration/component/test_network_offering.py +++ b/test/integration/component/test_network_offering.py @@ -112,6 +112,19 @@ class Services: "SourceNat": 'VirtualRouter', }, }, + "network_offering_withoutDNS" : { + "name": 'NW offering without DNS', + "displaytext": 'NW offering without DNS', + "guestiptype": 'Isolated', + "supportedservices": 'SourceNat,StaticNat,Dhcp', + "traffictype": 'GUEST', + "availability": 'Optional', + "serviceProviderList": { + "Dhcp": 'VirtualRouter', + "SourceNat": 'VirtualRouter', + "StaticNat": 'VirtualRouter', + }, + }, "network": { "name": "Test Network", "displaytext": "Test Network", @@ -851,6 +864,57 @@ class TestNOVirtualRouter(cloudstackTestCase): self.debug("Deployed VM in network: %s" % self.network.id) return + @attr(tags=["advanced", "selfservice"]) + def test_04_network_without_domain_CS19303(self): + """ + @Desc: Errors editing a network without a network domain specified + @Steps: + Step1: Create a network offering with SourceNAT,staticNAT and dhcp services + Step2: Verify the network offering creation + Step3: Create an isolated network with the offering created in step1 and without a network domain specified + Step4: Verify the network creation + Step5: Edit the network and verify that updating network should not error out + """ + self.debug( + "Creating n/w offering with SourceNat,StaticNat and DHCP services in VR & conserve mode:off" + ) + self.network_offering = NetworkOffering.create( + self.api_client, + self.services["network_offering_withoutDNS"], + conservemode=False + ) + self.assertIsNotNone( + self.network_offering, + "Failed to create NO with Sourcenat,staticnat and dhcp only services" + ) + self.cleanup.append(self.network_offering) + self.debug("Created n/w offering with ID: %s" % self.network_offering.id) + # Enable Network offering + self.network_offering.update(self.apiclient, state='Enabled') + self.debug("Creating nw without dns service using no id: %s" % self.network_offering.id) + self.network = Network.create( + self.apiclient, + self.services["network"], + accountid=self.account.name, + domainid=self.account.domainid, + networkofferingid=self.network_offering.id, + zoneid=self.zone.id + ) + self.assertIsNotNone( + self.network, + "Failed to create network without DNS service and network domain" + ) + self.debug("Created network with NO: %s" % self.network_offering.id) + try: + self.network_update = self.network.update( + self.apiclient, + name="NW without nw domain" + ) + self.debug("Success:Network update has been successful without network domain") + except Exception as e: + self.fail("Error editing a network without network domain specified: %s" % e) + return + class TestNetworkUpgrade(cloudstackTestCase): @classmethod