You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Harikrishna Patnala <ha...@citrix.com> on 2013/11/28 07:51:49 UTC

Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/
-----------------------------------------------------------

Review request for cloudstack and Nitin Mehta.


Bugs: CLOUDSTACK-4904
    https://issues.apache.org/jira/browse/CLOUDSTACK-4904


Repository: cloudstack-git


Description
-------

CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Added supported for listing all templates/ISOs with showremoved = true


Diffs
-----

  api/src/org/apache/cloudstack/api/ApiConstants.java 6f919c1 
  api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
  api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
  server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
  server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
  server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 

Diff: https://reviews.apache.org/r/15902/diff/


Testing
-------

Tested locally.

http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true

In the below API response "win" template is removed.

<listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>

<template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
<name>win</name>
<displaytext>win</displaytext>
</template>

<template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
<name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
<displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
</template>

<template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
<name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>


Thanks,

Harikrishna Patnala


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/#review30210
-----------------------------------------------------------


Commit 4907a8f6faf17294f4ca58e05cee9faaf77a385b in branch refs/heads/4.3 from Harikrishna Patnala
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=4907a8f ]

CLOUDSTACK-4904: Unable to see a derieved template if the
 parent template is deleted
Signed off by : nitin mehta<ni...@citrix.com>


- ASF Subversion and Git Services


On Nov. 28, 2013, 6:51 a.m., Harikrishna Patnala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15902/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2013, 6:51 a.m.)
> 
> 
> Review request for cloudstack and Nitin Mehta.
> 
> 
> Bugs: CLOUDSTACK-4904
>     https://issues.apache.org/jira/browse/CLOUDSTACK-4904
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted
> 
> Added supported for listing all templates/ISOs with showremoved = true
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java 6f919c1 
>   api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
>   api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
>   server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
>   server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 
> 
> Diff: https://reviews.apache.org/r/15902/diff/
> 
> 
> Testing
> -------
> 
> Tested locally.
> 
> http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true
> 
> In the below API response "win" template is removed.
> 
> <listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>
> 
> <template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
> <name>win</name>
> <displaytext>win</displaytext>
> </template>
> 
> <template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
> <displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
> </template>
> 
> <template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>
> 
> 
> Thanks,
> 
> Harikrishna Patnala
> 
>


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by ASF Subversion and Git Services <as...@urd.zones.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/#review30243
-----------------------------------------------------------


Commit 326a46d0ac0307bd30b5d6e4162bc3cc41f974d4 in branch refs/heads/4.3 from Nitin Mehta
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=326a46d ]

Revert "CLOUDSTACK-4904: Unable to see a derieved template if the"

This reverts commit 4907a8f6faf17294f4ca58e05cee9faaf77a385b.


- ASF Subversion and Git Services


On Nov. 28, 2013, 6:51 a.m., Harikrishna Patnala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15902/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2013, 6:51 a.m.)
> 
> 
> Review request for cloudstack and Nitin Mehta.
> 
> 
> Bugs: CLOUDSTACK-4904
>     https://issues.apache.org/jira/browse/CLOUDSTACK-4904
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted
> 
> Added supported for listing all templates/ISOs with showremoved = true
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java 6f919c1 
>   api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
>   api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
>   server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
>   server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 
> 
> Diff: https://reviews.apache.org/r/15902/diff/
> 
> 
> Testing
> -------
> 
> Tested locally.
> 
> http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true
> 
> In the below API response "win" template is removed.
> 
> <listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>
> 
> <template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
> <name>win</name>
> <displaytext>win</displaytext>
> </template>
> 
> <template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
> <displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
> </template>
> 
> <template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>
> 
> 
> Thanks,
> 
> Harikrishna Patnala
> 
>


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by Harikrishna Patnala <ha...@citrix.com>.

> On Dec. 16, 2013, 6:51 p.m., Nitin Mehta wrote:
> > server/src/com/cloud/api/query/QueryManagerImpl.java, line 2857
> > <https://reviews.apache.org/r/15902/diff/2/?file=396910#file396910line2857>
> >
> >     Should this be findByIdIncludingRemoved as well ? See bug 5221 as per the comment here. Did you check that ?

Yes Nitin, this may need to be fixed.

But there is another problem apart from this.

I came to know that the template_View schema is defined such that entries in the template_view are only active templates.

CREATE VIEW `cloud`.`template_view` AS
   select 
        vm_template.id,
        vm_template.uuid,
        vm_template.unique_name,
        vm_template.name,
        ....
where
        vm_template.state='Active';

In CS when we remove templates we mark them as inactive in DB. Then template_view doesnot contains the removed entries, which means we cannot retrieve removed entries by any search criteria.

Alex added that where clause on master/4.3
 
        commit abbae2aa87471274cffa35b54ae8157c1efaade9 (4.3 commit)
        Author: Alex Huang <al...@citrix.com>
        Date:   Mon Aug 26 17:30:58 2013 -0700  
        
        Fixed the problem with offerings and templates.  These two items due to a previous patch all the way back in 2.1.x versions uses the removed column  incorrectly.  No one fixed since then.  Hence, there's a bunch of findbyidincludingremoved calls in the cloudstack code around these two items.

Some how my code worked when I submitted my patch. But later came across this issue.

Can you suggest me on this ?
Thank you


- Harikrishna


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/#review30461
-----------------------------------------------------------


On Dec. 16, 2013, 8:54 a.m., Harikrishna Patnala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15902/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2013, 8:54 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala and Nitin Mehta.
> 
> 
> Bugs: CLOUDSTACK-4904
>     https://issues.apache.org/jira/browse/CLOUDSTACK-4904
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted
> 
> Added supported for listing all templates/ISOs with showremoved = true
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java e08923c 
>   api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
>   api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
>   server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
>   server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 
> 
> Diff: https://reviews.apache.org/r/15902/diff/
> 
> 
> Testing
> -------
> 
> Tested locally.
> 
> http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true
> 
> In the below API response "win" template is removed.
> 
> <listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>
> 
> <template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
> <name>win</name>
> <displaytext>win</displaytext>
> </template>
> 
> <template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
> <displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
> </template>
> 
> <template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>
> 
> 
> Thanks,
> 
> Harikrishna Patnala
> 
>


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by Nitin Mehta <ni...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/#review30461
-----------------------------------------------------------



server/src/com/cloud/api/query/QueryManagerImpl.java
<https://reviews.apache.org/r/15902/#comment58276>

    Should this be findByIdIncludingRemoved as well ? See bug 5221 as per the comment here. Did you check that ?


- Nitin Mehta


On Dec. 16, 2013, 8:54 a.m., Harikrishna Patnala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15902/
> -----------------------------------------------------------
> 
> (Updated Dec. 16, 2013, 8:54 a.m.)
> 
> 
> Review request for cloudstack, Kishan Kavala and Nitin Mehta.
> 
> 
> Bugs: CLOUDSTACK-4904
>     https://issues.apache.org/jira/browse/CLOUDSTACK-4904
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted
> 
> Added supported for listing all templates/ISOs with showremoved = true
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java e08923c 
>   api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
>   api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
>   server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
>   server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 
> 
> Diff: https://reviews.apache.org/r/15902/diff/
> 
> 
> Testing
> -------
> 
> Tested locally.
> 
> http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true
> 
> In the below API response "win" template is removed.
> 
> <listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>
> 
> <template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
> <name>win</name>
> <displaytext>win</displaytext>
> </template>
> 
> <template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
> <displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
> </template>
> 
> <template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>
> 
> 
> Thanks,
> 
> Harikrishna Patnala
> 
>


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by Harikrishna Patnala <ha...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/
-----------------------------------------------------------

(Updated Dec. 16, 2013, 8:54 a.m.)


Review request for cloudstack, Kishan Kavala and Nitin Mehta.


Bugs: CLOUDSTACK-4904
    https://issues.apache.org/jira/browse/CLOUDSTACK-4904


Repository: cloudstack-git


Description
-------

CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Added supported for listing all templates/ISOs with showremoved = true


Diffs
-----

  api/src/org/apache/cloudstack/api/ApiConstants.java e08923c 
  api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
  api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
  server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
  server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
  server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 

Diff: https://reviews.apache.org/r/15902/diff/


Testing
-------

Tested locally.

http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true

In the below API response "win" template is removed.

<listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>

<template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
<name>win</name>
<displaytext>win</displaytext>
</template>

<template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
<name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
<displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
</template>

<template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
<name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>


Thanks,

Harikrishna Patnala


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by Harikrishna Patnala <ha...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/
-----------------------------------------------------------

(Updated Dec. 16, 2013, 8:53 a.m.)


Review request for cloudstack, Kishan Kavala and Nitin Mehta.


Bugs: CLOUDSTACK-4904
    https://issues.apache.org/jira/browse/CLOUDSTACK-4904


Repository: cloudstack-git


Description
-------

CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Added supported for listing all templates/ISOs with showremoved = true


Diffs
-----

  api/src/org/apache/cloudstack/api/ApiConstants.java e08923c 
  api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
  api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
  server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
  server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
  server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 

Diff: https://reviews.apache.org/r/15902/diff/


Testing
-------

Tested locally.

http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true

In the below API response "win" template is removed.

<listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>

<template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
<name>win</name>
<displaytext>win</displaytext>
</template>

<template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
<name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
<displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
</template>

<template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
<name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>


Thanks,

Harikrishna Patnala


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by Harikrishna Patnala <ha...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/
-----------------------------------------------------------

(Updated Dec. 12, 2013, 2:07 p.m.)


Review request for cloudstack and Nitin Mehta.


Changes
-------

Updated the patch so that it will not hit the following regression.
CLOUDSTACK-5221
[Automation] [BVT] list ISO and template calls fails, 


Similar regression happened on 4.2 when this fix went into 4.2. I have fixed this on 4.2     
CLOUDSTACK-4927
[Automation][BVT] ISO and Template test cases failing duing listiso api call 

    


Bugs: CLOUDSTACK-4904
    https://issues.apache.org/jira/browse/CLOUDSTACK-4904


Repository: cloudstack-git


Description
-------

CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Added supported for listing all templates/ISOs with showremoved = true


Diffs (updated)
-----

  api/src/org/apache/cloudstack/api/ApiConstants.java e08923c 
  api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
  api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
  server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
  server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
  server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 

Diff: https://reviews.apache.org/r/15902/diff/


Testing
-------

Tested locally.

http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true

In the below API response "win" template is removed.

<listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>

<template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
<name>win</name>
<displaytext>win</displaytext>
</template>

<template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
<name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
<displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
</template>

<template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
<name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>


Thanks,

Harikrishna Patnala


Re: Review Request 15902: CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted

Posted by Nitin Mehta <ni...@citrix.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15902/#review30209
-----------------------------------------------------------

Ship it!


Ship It!

- Nitin Mehta


On Nov. 28, 2013, 6:51 a.m., Harikrishna Patnala wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15902/
> -----------------------------------------------------------
> 
> (Updated Nov. 28, 2013, 6:51 a.m.)
> 
> 
> Review request for cloudstack and Nitin Mehta.
> 
> 
> Bugs: CLOUDSTACK-4904
>     https://issues.apache.org/jira/browse/CLOUDSTACK-4904
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> CLOUDSTACK-4904: Unable to see a derieved template if the parent template is deleted
> 
> Added supported for listing all templates/ISOs with showremoved = true
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/ApiConstants.java 6f919c1 
>   api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java c3f558b 
>   api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java 4b34909 
>   server/src/com/cloud/api/query/QueryManagerImpl.java 58df38c 
>   server/src/com/cloud/api/query/dao/TemplateJoinDao.java f73f5bd 
>   server/src/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 468fb83 
> 
> Diff: https://reviews.apache.org/r/15902/diff/
> 
> 
> Testing
> -------
> 
> Tested locally.
> 
> http://localhost:8096/client/api?command=listTemplates&listAll=true&page=1&pagesize=20&templatefilter=all&_=1385533457469&showremoved=true
> 
> In the below API response "win" template is removed.
> 
> <listtemplatesresponse cloud-stack-version="4.3.0-SNAPSHOT"><count>3</count>
> 
> <template><id>f0fdb4d8-fd2f-4fc2-9590-6b45689d2a29</id>
> <name>win</name>
> <displaytext>win</displaytext>
> </template>
> 
> <template><id>7240316e-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>CentOS 5.6(64-bit) no GUI (XenServer)</name>
> <displaytext>CentOS 5.6(64-bit) no GUI (XenServer)</displaytext>
> </template>
> 
> <template><id>723ff2c6-5299-11e3-b8bd-9d3b4dd13283</id>
> <name>SystemVM Template (XenServer)</name><displaytext>SystemVM Template (XenServer)</displaytext><ispublic>false</ispublic><created>2013-11-21T16:16:00+0530</created><isready>true</isready><passwordenabled>false</passwordenabled><format>VHD</format><isfeatured>false</isfeatured><crossZones>true</crossZones><ostypeid>72487d10-5299-11e3-b8bd-9d3b4dd13283</ostypeid><ostypename>Debian GNU/Linux 7(32-bit)</ostypename><account>system</account><zoneid>0b267864-376e-43ab-8804-57a1a6b9a135</zoneid><zonename>xen</zonename><status>Download Complete</status><size>2101252608</size><templatetype>SYSTEM</templatetype><hypervisor>XenServer</hypervisor><domain>ROOT</domain><domainid>730b0240-5299-11e3-b8bd-9d3b4dd13283</domainid><isextractable>false</isextractable><checksum>fb1b6e032a160d86f2c28feb5add6d83</checksum><sshkeyenabled>false</sshkeyenabled><isdynamicallyscalable>false</isdynamicallyscalable></template></listtemplatesresponse>
> 
> 
> Thanks,
> 
> Harikrishna Patnala
> 
>