<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi, Zhengyu,<div class=""><br class=""></div><div class="">We discussed this in yesterday Nova API meeting. We think it should get consistent in API-WG.</div><div class=""><br class=""></div><div class="">And there already have patch for pagination guideline <a href="https://review.openstack.org/190743" class="">https://review.openstack.org/190743</a> , and there also have some discussion on limits.</div><div class="">So we are better waiting the guideline get consistent before fix it.</div><div class=""><br class=""></div><div class="">Thanks</div><div class="">Alex</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Sep 23, 2015, at 9:18 AM, Zhenyu Zheng <<a href="mailto:zhengzhenyulixi@gmail.com" class="">zhengzhenyulixi@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="ltr" class="">Any thoughts on this?</div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Sep 14, 2015 at 11:53 AM, Zhenyu Zheng <span dir="ltr" class=""><<a href="mailto:zhengzhenyulixi@gmail.com" target="_blank" class="">zhengzhenyulixi@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hi, Thanks for your reply, after check again and I agree with you. I think we should come up with a conclusion about how we should treat this limit=0 across nova. And that's also why I sent out this mail. I will register this topic in the API meeting open discussion section, my be a BP in M to fix this.<div class=""><br class=""></div><div class="">BR,</div><div class=""><br class=""></div><div class="">Zheng</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sat, Sep 12, 2015 at 12:07 AM, Kevin L. Mitchell <span dir="ltr" class=""><<a href="mailto:kevin.mitchell@rackspace.com" target="_blank" class="">kevin.mitchell@rackspace.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 2015-09-11 at 15:41 +0800, Zhenyu Zheng wrote:<br class="">
> Hi, I found out that nova currently handles list with limit=0 quite<br class="">
> different for different objects.<br class="">
><br class="">
> Especially when list servers:<br class="">
><br class="">
> According to the code:<br class="">
> <a href="http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/common.py#n206" rel="noreferrer" target="_blank" class="">http://git.openstack.org/cgit/openstack/nova/tree/nova/api/openstack/common.py#n206</a><br class="">
><br class="">
> when limit = 0, it should apply as max_limit, but currently, in:<br class="">
> <a href="http://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py#n1930" rel="noreferrer" target="_blank" class="">http://git.openstack.org/cgit/openstack/nova/tree/nova/db/sqlalchemy/api.py#n1930</a><br class="">
><br class="">
> we directly return [], this is quite different with comment in the api<br class="">
> code.<br class="">
><br class="">
><br class="">
> I checked other objects:<br class="">
><br class="">
> when list security groups and server groups, it will return as no<br class="">
> limit has been set. And for flavors it returns []. I will continue to<br class="">
> try out other APIs if needed.<br class="">
><br class="">
> I think maybe we should make a rule for all objects, at least fix the<br class="">
> servers to make it same in api and db code.<br class="">
><br class="">
> I have reported a bug in launchpad:<br class="">
><br class="">
> <a href="https://bugs.launchpad.net/nova/+bug/1494617" rel="noreferrer" target="_blank" class="">https://bugs.launchpad.net/nova/+bug/1494617</a><br class="">
><br class="">
><br class="">
> Any suggestions?<br class="">
<br class="">
</span>After seeing the test failures that showed up on your proposed fix, I'm<br class="">
thinking that the proposed change reads like an API change, requiring a<br class="">
microversion bump.  That said, I approve of increased consistency across<br class="">
the API, and perhaps the behavior on limit=0 is something the API group<br class="">
needs to discuss a guideline for?<br class="">
<span class=""><font color="#888888" class="">--<br class="">
Kevin L. Mitchell <<a href="mailto:kevin.mitchell@rackspace.com" target="_blank" class="">kevin.mitchell@rackspace.com</a>><br class="">
Rackspace<br class="">
<br class="">
<br class="">
__________________________________________________________________________<br class="">
OpenStack Development Mailing List (not for usage questions)<br class="">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org/?subject:unsubscribe" rel="noreferrer" target="_blank" class="">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" target="_blank" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="">
</font></span></blockquote></div><br class=""></div>
</div></div></blockquote></div><br class=""></div>
__________________________________________________________________________<br class="">OpenStack Development Mailing List (not for usage questions)<br class="">Unsubscribe: <a href="mailto:OpenStack-dev-request@lists.openstack.org" class="">OpenStack-dev-request@lists.openstack.org</a>?subject:unsubscribe<br class=""><a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" class="">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class=""></div></blockquote></div><br class=""></div></body></html>