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 2015/03/23 05:35:54 UTC
[1/2] git commit: updated refs/heads/volume-upload to 4807828
Repository: cloudstack
Updated Branches:
refs/heads/volume-upload 018023c1e -> 48078289f
Browser Basesd Test Template changes
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f22bd7a7
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f22bd7a7
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f22bd7a7
Branch: refs/heads/volume-upload
Commit: f22bd7a79e1af15d22d3ea3f9cb01ee807d0e38c
Parents: aad9b8a
Author: sailajamada <sa...@citrix.com>
Authored: Mon Mar 23 09:58:02 2015 +0530
Committer: sailajamada <sa...@citrix.com>
Committed: Mon Mar 23 09:58:02 2015 +0530
----------------------------------------------------------------------
.../component/test_browse_templates.py | 46 ++++++++++++--------
1 file changed, 27 insertions(+), 19 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f22bd7a7/test/integration/component/test_browse_templates.py
----------------------------------------------------------------------
diff --git a/test/integration/component/test_browse_templates.py b/test/integration/component/test_browse_templates.py
index 9b1eda0..3df5139 100644
--- a/test/integration/component/test_browse_templates.py
+++ b/test/integration/component/test_browse_templates.py
@@ -147,19 +147,22 @@ class TestBrowseUploadVolume(cloudstackTestCase):
list_template_response = Template.list(
self.apiclient,
- id=up_templateid
- )
+ id=up_templateid,
+ templatefilter="all",
+ zoneid=self.zone.id)
+
self.assertNotEqual(
- list_volume_response,
+ list_template_response,
None,
"Check if template exists in ListTemplates"
)
self.assertEqual(
- list_template_response[0].state,
+ list_template_response[0].status,
templatestate,
- "Check template state in List templates"
+ "Check template status in List templates"
)
+ return
def browse_upload_template(self):
cmd = getUploadParamsForTemplate.getUploadParamsForTemplateCmd()
@@ -171,6 +174,7 @@ class TestBrowseUploadVolume(cloudstackTestCase):
cmd.displaytext=self.templatename+self.account.name+(random.choice(string.ascii_uppercase))
cmd.hypervisor=self.templatehypervisor
cmd.ostypeid=self.templateostypeid
+ cmd.isdynamicallyscalable="false"
#cmd.type="template"
getuploadparamsresponce=self.apiclient.getUploadParamsForTemplate(cmd)
@@ -200,13 +204,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
headers={'X-signature':signt,'X-metadata':metadata,'X-expires':expiredata}
results = requests.post(posturl,files=files,headers=headers,verify=False)
- time.sleep(60)
+ time.sleep(600)
print results.status_code
if results.status_code !=200:
self.fail("Upload is not fine")
- self.validate_uploaded_template(getuploadparamsresponce.id,'Uploaded')
+ self.validate_uploaded_template(getuploadparamsresponce.id,'Download Complete')
return(getuploadparamsresponce)
@@ -262,9 +266,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
templ1=self.uploadtemplate()
templ2=self.uploadtemplate()
templ3=self.uploadtemplate()
- self.validate_uploaded_template(templ1.id,'Uploaded')
- self.validate_uploaded_template(templ2.id,'Uploaded')
- self.validate_uploaded_template(templ3.id,'Uploaded')
+ time.sleep(600)
+ self.validate_uploaded_template(templ1.id,'Download Complete')
+ self.validate_uploaded_template(templ2.id,'Download Complete')
+ self.validate_uploaded_template(templ3.id,'Download Complete')
+ self.delete_template(templ1)
+ self.delete_template(templ2)
+ self.delete_template(templ3)
return
def validate_vm(self,vmdetails,vmstate):
@@ -1113,12 +1121,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
def delete_template(self,templatedetails):
+ print templatedetails
list_template_response = Template.list(
self.apiclient,
- templatefilter=\
- self.testdata["template"]["templatefilter"],
+ templatefilter="all",
id=templatedetails.id,
zoneid=self.zone.id)
+ print list_template_response
self.assertEqual(
isinstance(list_template_response, list),
True,
@@ -1139,15 +1148,13 @@ class TestBrowseUploadVolume(cloudstackTestCase):
(template_response.id, templatedetails.id)
)
- self.debug("Deleting template: %s" % self.template)
- # Delete the template
+ # Delete the template
templatedetails.delete(self.apiclient)
self.debug("Delete template: %s successful" % templatedetails)
list_template_response = Template.list(
self.apiclient,
- templatefilter=\
- self.services["template"]["templatefilter"],
+ templatefilter="all",
id=templatedetails.id,
zoneid=self.zone.id
)
@@ -1254,8 +1261,8 @@ class TestBrowseUploadVolume(cloudstackTestCase):
self.expunge_vm(vm2details)
self.debug("========================= Test 9: Delete the Uploaded Template========================= ")
-
- self.delete_template(browseup_template)
+ print browseup_template
+ #self.delete_template(browseup_template)
self.debug("========================= Test 10: Upload Multiple templates========================= ")
@@ -1267,7 +1274,7 @@ class TestBrowseUploadVolume(cloudstackTestCase):
@attr(tags = ["advanced", "advancedns", "smoke", "basic"], required_hardware="true")
- def test_02_SSVM_Life_Cycle_With_Browser_Template_TPath(self):
+ def xtest_02_SSVM_Life_Cycle_With_Browser_Template_TPath(self):
"""
Test SSVM_Life_Cycle_With_Browser_template_TPath
"""
@@ -1314,6 +1321,7 @@ class TestBrowseUploadVolume(cloudstackTestCase):
return
+
@classmethod
def tearDownClass(self):
try:
[2/2] git commit: updated refs/heads/volume-upload to 4807828
Posted by sa...@apache.org.
Merge branch 'volume-upload' of https://git-wip-us.apache.org/repos/asf/cloudstack into volume-upload
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/48078289
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/48078289
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/48078289
Branch: refs/heads/volume-upload
Commit: 48078289f5942f5c5ecc7338a82272e0df95c93f
Parents: f22bd7a 018023c
Author: sailajamada <sa...@citrix.com>
Authored: Mon Mar 23 09:59:58 2015 +0530
Committer: sailajamada <sa...@citrix.com>
Committed: Mon Mar 23 09:59:58 2015 +0530
----------------------------------------------------------------------
.../template/GetUploadParamsForTemplateCmd.java | 3 +
.../template/HttpTemplateDownloader.java | 4 +-
.../TemplateOrVolumePostUploadCommand.java | 10 ++
.../com/cloud/storage/VolumeApiServiceImpl.java | 4 +-
.../template/HypervisorTemplateAdapter.java | 3 +-
.../com/cloud/template/TemplateManagerImpl.java | 2 +-
.../resource/HttpUploadServerHandler.java | 49 +++++++--
.../resource/NfsSecondaryStorageResource.java | 38 +++++--
.../storage/template/UploadEntity.java | 9 ++
utils/src/com/cloud/utils/ImageStoreUtil.java | 39 -------
.../utils/imagestore/ImageStoreUtil.java | 110 +++++++++++++++++++
.../utils/template/TemplateUtils.java | 97 ----------------
.../utils/imagestore/ImageStoreUtilTest.java | 38 +++++++
13 files changed, 241 insertions(+), 165 deletions(-)
----------------------------------------------------------------------