[
https://issues.apache.org/jira/browse/CLOUDSTACK-8973?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15171287#comment-15171287
]
ASF GitHub Bot commented on CLOUDSTACK-8973:
--------------------------------------------
Github user alexandrelimassantana commented on a diff in the pull request:
https://github.com/apache/cloudstack/pull/1424#discussion_r54362098
--- Diff: server/src/com/cloud/template/TemplateManagerImpl.java ---
@@ -1705,6 +1709,14 @@ public VMTemplateVO
createPrivateTemplateRecord(CreateTemplateCmd cmd, Account t
s_logger.debug("This template is getting created from
other template, setting source template Id to: " + sourceTemplateId);
}
}
+
+
+ // ignore passed zoneId if we are using region wide image store
+ List<ImageStoreVO> stores = _imgStoreDao.findRegionImageStores();
+ if (stores != null && stores.size() > 0) {
--- End diff --
Hello @syed
this if condition can be changed to use the Apache's CollectionUtils
isEmpty() method for enhanced readability
https://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/CollectionUtils.html#isEmpty(java.util.Collection)
> Unusual response when creating a template from a snapshot with Swift as
> secondary storage
> -----------------------------------------------------------------------------------------
>
> Key: CLOUDSTACK-8973
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8973
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Affects Versions: 4.4.4
> Reporter: Franz-Philippe Garcia
> Priority: Minor
>
> I am not getting this issue with NFS. When I create a template from a
> snapshot, I get the following response:
> {noformat}
> {
> "queryasyncjobresultresponse":{
> "accountid":"fd8ecd27-b6d6-4086-8644-783f769f68c1",
> "userid":"f9ce0c4a-36c6-4e7e-a49c-d77ecda227b6",
>
> "cmd":"org.apache.cloudstack.api.command.user.template.CreateTemplateCmd",
> "jobstatus":1,
> "jobprocstatus":0,
> "jobresultcode":0,
> "jobresulttype":"object",
> "jobresult":{
> "null":{
> "ispublic":false,
> "isready":false,
> "isfeatured":false,
> "crossZones":false,
> "tags":[
> ]
> }
> },
> "created":"2015-10-20T11:58:07-0400",
> "jobid":"4549d467-d0e0-4ce9-bfdd-c20c174c8ad0"
> }
> }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)