You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by sa...@apache.org on 2013/10/18 02:32:02 UTC
[1/2] git commit: updated refs/heads/4.2 to 15b7b10
Updated Branches:
refs/heads/4.2 833229c41 -> 15b7b1082
test_stopped_vm.py tries to clean up ISOs that are already deleted as part of Account Deletion. Do not add account owned iso objects to the cleanup list.
(cherry picked from commit 2ecf272dac0853f791b01d730a6d1bbc5dc3a1de)
Signed-off-by: Sangeetha <sa...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/92bb0ac3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/92bb0ac3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/92bb0ac3
Branch: refs/heads/4.2
Commit: 92bb0ac3a5d80ea13c494357bf3fc0c8675b642d
Parents: 833229c
Author: Chandan Purushothama <Ch...@citrix.com>
Authored: Fri Oct 11 15:13:50 2013 -0700
Committer: Sangeetha <sa...@citrix.com>
Committed: Thu Oct 17 20:15:02 2013 -0700
----------------------------------------------------------------------
test/integration/component/test_stopped_vm.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92bb0ac3/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 7903f0e..7fdefc9 100644
--- a/test/integration/component/test_stopped_vm.py
+++ b/test/integration/component/test_stopped_vm.py
@@ -647,7 +647,7 @@ class TestDeployVM(cloudstackTestCase):
self.debug("Successfully created ISO with ID: %s" % iso.id)
try:
iso.download(self.apiclient)
- self.cleanup.append(iso)
+
except Exception as e:
self.fail("Exception while downloading ISO %s: %s"\
% (iso.id, e))
@@ -1092,9 +1092,9 @@ class TestDeployHaEnabledVM(cloudstackTestCase):
domainid=self.account.domainid
)
try:
- # Dowanload the ISO
+ # Download the ISO
self.iso.download(self.apiclient)
- self.cleanup.append(self.iso)
+
except Exception as e:
raise Exception("Exception while downloading ISO %s: %s"\
% (self.iso.id, e))
[2/2] git commit: updated refs/heads/4.2 to 15b7b10
Posted by sa...@apache.org.
Cloudstack:4407 - Pending changes - Use extractTemplate API to get hypervisor specific template information.
(cherry picked from commit 4747b2abfe8e44ab4b07b31e203b821d4236e5b0)
Signed-off-by: Sangeetha <sa...@citrix.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/15b7b108
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/15b7b108
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/15b7b108
Branch: refs/heads/4.2
Commit: 15b7b10828bd3eddc926c0794d2429edf4f1890b
Parents: 92bb0ac
Author: Girish Shilamkar <gi...@clogeny.com>
Authored: Thu Sep 5 02:32:11 2013 -0400
Committer: Sangeetha <sa...@citrix.com>
Committed: Thu Oct 17 20:15:20 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/15b7b108/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/15b7b108/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/15b7b108/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: