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 532D1106A2 for ; Tue, 15 Oct 2013 01:08:55 +0000 (UTC) Received: (qmail 25375 invoked by uid 500); 15 Oct 2013 01:08:48 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 25249 invoked by uid 500); 15 Oct 2013 01:08:48 -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 24819 invoked by uid 99); 15 Oct 2013 01:08:47 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Oct 2013 01:08:47 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id CD1128B3ECB; Tue, 15 Oct 2013 01:08:47 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: edison@apache.org To: commits@cloudstack.apache.org Date: Tue, 15 Oct 2013 01:09:10 -0000 Message-Id: <52ac57a4bc514506a1d89db1ff1506a8@git.apache.org> In-Reply-To: <3fb5a19ab057410991bcc5ada4c5c303@git.apache.org> References: <3fb5a19ab057410991bcc5ada4c5c303@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [25/29] git commit: updated refs/heads/pluggable_vm_snapshot to 77fca0c Cloudstack:4407 - Pending changes - Use extractTemplate API to get hypervisor specific template information. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4747b2ab Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4747b2ab Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4747b2ab Branch: refs/heads/pluggable_vm_snapshot Commit: 4747b2abfe8e44ab4b07b31e203b821d4236e5b0 Parents: 2ecf272 Author: Girish Shilamkar Authored: Thu Sep 5 02:32:11 2013 -0400 Committer: Sangeetha Committed: Mon Oct 14 17:21:22 2013 -0700 ---------------------------------------------------------------------- test/integration/component/test_accounts.py | 27 ++++++---- test/integration/component/test_blocker_bugs.py | 52 ++++++++++++-------- test/integration/component/test_stopped_vm.py | 18 +++++-- 3 files changed, 63 insertions(+), 34 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4747b2ab/test/integration/component/test_accounts.py ---------------------------------------------------------------------- diff --git a/test/integration/component/test_accounts.py b/test/integration/component/test_accounts.py index 1af408e..4c73c3a 100644 --- a/test/integration/component/test_accounts.py +++ b/test/integration/component/test_accounts.py @@ -77,13 +77,14 @@ class Services: "template": { "displaytext": "Public Template", "name": "Public template", - "url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2", - "hypervisor": 'XenServer', - "format": 'VHD', + "ostype": 'CentOS 5.3 (64-bit)', + "url": "", + "hypervisor": '', + "format": '', "isfeatured": True, "ispublic": True, "isextractable": True, - "ostype": 'CentOS 5.3 (64-bit)', + "templatefilter": "self" }, "natrule": { "publicport": 22, @@ -731,8 +732,7 @@ class TestTemplateHierarchy(cloudstackTestCase): cls.services = Services().services # Get Zone settings cls.zone = get_zone(cls.api_client, cls.services) - cls.services['mode'] = cls.zone.networktype - cls.services["template"]["zoneid"] = cls.zone.id + cls.services['mode'] = cls.zone.networktype # Create domains, accounts and template cls.domain_1 = Domain.create( @@ -761,11 +761,18 @@ class TestTemplateHierarchy(cloudstackTestCase): domainid=cls.domain_2.id ) + builtin_info = get_builtin_template_info(cls.api_client, cls.zone.id) + cls.services["template"]["url"] = builtin_info[0] + cls.services["template"]["hypervisor"] = builtin_info[1] + cls.services["template"]["format"] = builtin_info[2] + + # Register new template cls.template = Template.register( - cls.api_client, - cls.services["template"], - account=cls.account_1.name, - domainid=cls.domain_1.id + cls.api_client, + cls.services["template"], + zoneid=cls.zone.id, + account=cls.account_1.name, + domainid=cls.domain_1.id ) # Wait for template to download http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4747b2ab/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 2cdc270..62800f8 100644 --- a/test/integration/component/test_blocker_bugs.py +++ b/test/integration/component/test_blocker_bugs.py @@ -67,14 +67,14 @@ class Services: "publicport": 22, "protocol": 'TCP', }, - "templates": { + "template": { "displaytext": 'Template from snapshot', "name": 'Template from snapshot', "ostype": 'CentOS 5.3 (64-bit)', "templatefilter": 'self', - "url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2", - "hypervisor": 'XenServer', - "format": 'VHD', + "url": "", + "hypervisor": '', + "format": '', "isfeatured": True, "ispublic": True, "isextractable": True, @@ -118,7 +118,7 @@ class TestTemplate(cloudstackTestCase): cls.zone = get_zone(cls.api_client, cls.services) cls.services['mode'] = cls.zone.networktype cls.services["virtual_machine"]["zoneid"] = cls.zone.id - cls.services["templates"]["zoneid"] = cls.zone.id + cls.services["template"]["zoneid"] = cls.zone.id cls.service_offering = ServiceOffering.create( cls.api_client, @@ -160,16 +160,26 @@ class TestTemplate(cloudstackTestCase): #2. Deploy VM using this template #3. Deploy VM should return password set in template. + builtin_info = get_builtin_template_info(self.apiclient, self.zone.id) + self.services["template"]["url"] = builtin_info[0] + self.services["template"]["hypervisor"] = builtin_info[1] + self.services["template"]["format"] = builtin_info[2] + self.debug("Registering a new template") + # Register new template template = Template.register( - self.apiclient, - self.services["templates"], - zoneid=self.zone.id, - account=self.account.name, - domainid=self.account.domainid - ) - self.debug("Registering template with ID: %s" % template.id) + self.apiclient, + self.services["template"], + zoneid=self.zone.id, + account=self.account.name, + domainid=self.account.domainid + ) + self.debug( + "Registered a template of format: %s with ID: %s" % ( + self.services["template"]["format"], + template.id + )) try: # Wait for template to download template.download(self.apiclient) @@ -185,7 +195,7 @@ class TestTemplate(cloudstackTestCase): list_template_response = Template.list( self.apiclient, templatefilter=\ - self.services["templates"]["templatefilter"], + self.services["template"]["templatefilter"], id=template.id, zoneid=self.zone.id ) @@ -796,7 +806,7 @@ class TestTemplates(cloudstackTestCase): #Create template from volume template = Template.create( self.apiclient, - self.services["templates"], + self.services["template"], self.volume.id, account=self.account.name, domainid=self.account.domainid @@ -856,7 +866,7 @@ class TestTemplates(cloudstackTestCase): template = Template.create_from_snapshot( self.apiclient, snapshot, - self.services["templates"] + self.services["template"] ) self.cleanup.append(template) @@ -864,7 +874,7 @@ class TestTemplates(cloudstackTestCase): templates = Template.list( self.apiclient, templatefilter=\ - self.services["templates"]["templatefilter"], + self.services["template"]["templatefilter"], id=template.id ) self.assertEqual( @@ -938,14 +948,14 @@ class TestTemplates(cloudstackTestCase): template = Template.create_from_snapshot( self.apiclient, snapshot, - self.services["templates"], + self.services["template"], random_name=False ) self.debug("Created template from snapshot: %s" % template.id) templates = Template.list( self.apiclient, templatefilter=\ - self.services["templates"]["templatefilter"], + self.services["template"]["templatefilter"], id=template.id ) self.assertEqual( @@ -977,14 +987,14 @@ class TestTemplates(cloudstackTestCase): template = Template.create_from_snapshot( self.apiclient, snapshot, - self.services["templates"], + self.services["template"], random_name=False ) templates = Template.list( self.apiclient, templatefilter=\ - self.services["templates"]["templatefilter"], + self.services["template"]["templatefilter"], id=template.id ) self.assertEqual( @@ -1000,7 +1010,7 @@ class TestTemplates(cloudstackTestCase): self.assertEqual( templates[0].name, - self.services["templates"]["name"], + self.services["template"]["name"], "Check the name of the template" ) return http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4747b2ab/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 7fdefc9..3be9151 100644 --- a/test/integration/component/test_stopped_vm.py +++ b/test/integration/component/test_stopped_vm.py @@ -84,9 +84,9 @@ class Services: "mode": 'HTTP_DOWNLOAD', # Downloading existing ISO }, "template": { - "url": "http://download.cloud.com/releases/2.0.0/UbuntuServer-10-04-64bit.vhd.bz2", - "hypervisor": 'XenServer', - "format": 'VHD', + "url": "", + "hypervisor": '', + "format": '', "isfeatured": True, "ispublic": True, "isextractable": True, @@ -1522,6 +1522,13 @@ class TestDeployVMFromTemplate(cloudstackTestCase): self.services["account"], domainid=self.domain.id ) + + builtin_info = get_builtin_template_info(self.apiclient, self.zone.id) + self.services["template"]["url"] = builtin_info[0] + self.services["template"]["hypervisor"] = builtin_info[1] + self.services["template"]["format"] = builtin_info[2] + + # Register new template self.template = Template.register( self.apiclient, self.services["template"], @@ -1529,6 +1536,11 @@ class TestDeployVMFromTemplate(cloudstackTestCase): account=self.account.name, domainid=self.account.domainid ) + self.debug( + "Registered a template of format: %s with ID: %s" % ( + self.services["template"]["format"], + self.template.id + )) try: self.template.download(self.apiclient) except Exception as e: