You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Ilia Shakitko <i....@leaseweb.com> on 2014/07/22 14:51:05 UTC

Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

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

Review request for cloudstack and Ilia Shakitko.


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 99b12732 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.

> On July 28, 2014, 12:43 p.m., Rohit Yadav wrote:
> > api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java, lines 205-207
> > <https://reviews.apache.org/r/23805/diff/1/?file=639247#file639247line205>
> >
> >     This was removed.

I deleted it because it's not being used in the code. There is a second method: "public Boolean isAllocatedOnly()" this one is used instead.


> On July 28, 2014, 12:43 p.m., Rohit Yadav wrote:
> > api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java, lines 156-166
> > <https://reviews.apache.org/r/23805/diff/1/?file=639247#file639247line156>
> >
> >     I guess moving it above was a cosmetic change. Please fix that you don't remove/change anything in the move refactor.

Is this still the case according to the written comments below?


> On July 28, 2014, 12:43 p.m., Rohit Yadav wrote:
> > api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java, lines 156-167
> > <https://reviews.apache.org/r/23805/diff/1/?file=639247#file639247line156>
> >
> >     I guess the move refactor was a cosmetic change, but it removed getAllocatedOnly() method. Please fix it, or explain why we need to remove it?

Because it's a duplicated method, isn't it? As well is "isForLoadBalancing" and "getForLoadBalancing" (just noticed, I'll check for these methods usages as well later)


- Ilia


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


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Rohit Yadav <bh...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/#review48842
-----------------------------------------------------------


Looks good, let me get my office lab to work and then I can test. Meanwhile if others may want to test it?

Pardon my ignorance but does this change involve any db table/column change since I see state filter added in publicIpAddressDao?


api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
<https://reviews.apache.org/r/23805/#comment85580>

    I guess moving it above was a cosmetic change. Please fix that you don't remove/change anything in the move refactor.



api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
<https://reviews.apache.org/r/23805/#comment85581>

    I guess the move refactor was a cosmetic change, but it removed getAllocatedOnly() method. Please fix it, or explain why we need to remove it?



api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java
<https://reviews.apache.org/r/23805/#comment85579>

    This was removed.


- Rohit Yadav


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Rohit Yadav <bh...@apache.org>.

> On Aug. 5, 2014, 4:12 p.m., Rohit Yadav wrote:
> > Ship It!

Thanks for the git formatted patch, tested to build. Merged on master:

commit 07f916dfc6fb30dc928b258beeaa761253e43ab9
Author: Ilia Shakitko <i....@tech.leaseweb.com>
Date:   Tue Aug 5 17:58:46 2014 +0200

    CLOUDSTACK-7159 Added "state" parameter to the "listPublicIpAddresses" API call
    
    Signed-off-by: Ilia Shakitko <i....@tech.leaseweb.com>
    Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


- Rohit


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


On Aug. 5, 2014, 4:02 p.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2014, 4:02 p.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 1413272 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Rohit Yadav <bh...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/#review49608
-----------------------------------------------------------

Ship it!


Ship It!

- Rohit Yadav


On Aug. 5, 2014, 4:02 p.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2014, 4:02 p.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 1413272 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@tech.leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/
-----------------------------------------------------------

(Updated Aug. 5, 2014, 4:02 p.m.)


Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.


Changes
-------

New formatted git diff (patch)


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


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs (updated)
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 1413272 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@tech.leaseweb.com>.

> On July 29, 2014, 10:20 a.m., Rohit Yadav wrote:
> > Looks fine, we still need to test it before we land it on master. I unfortunately don't have my hardware (and some parts) setup will try with DevCloud or hope someone else would review, test and ship it :)
> 
> Ilia Shakitko wrote:
>     Maybe we can add a reviewer who is currently working on master branch?
> 
> Rohit Yadav wrote:
>     Hi, I was going to apply it today but your patch is not a git-formatted patch. Please upload a new git formatted patch, ref: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Git#Git-Patches
> 
> Rohit Yadav wrote:
>     ping?
> 
> Ilia Shakitko wrote:
>     Hi. Got it, working on it.

Done


- Ilia


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


On Aug. 5, 2014, 4:02 p.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated Aug. 5, 2014, 4:02 p.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 1413272 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Rohit Yadav <bh...@apache.org>.

> On July 29, 2014, 10:20 a.m., Rohit Yadav wrote:
> > Looks fine, we still need to test it before we land it on master. I unfortunately don't have my hardware (and some parts) setup will try with DevCloud or hope someone else would review, test and ship it :)
> 
> Ilia Shakitko wrote:
>     Maybe we can add a reviewer who is currently working on master branch?
> 
> Rohit Yadav wrote:
>     Hi, I was going to apply it today but your patch is not a git-formatted patch. Please upload a new git formatted patch, ref: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Git#Git-Patches

ping?


- Rohit


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


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.

> On July 29, 2014, 10:20 a.m., Rohit Yadav wrote:
> > Looks fine, we still need to test it before we land it on master. I unfortunately don't have my hardware (and some parts) setup will try with DevCloud or hope someone else would review, test and ship it :)

Maybe we can add a reviewer who is currently working on master branch?


- Ilia


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


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Rohit Yadav <bh...@apache.org>.

> On July 29, 2014, 10:20 a.m., Rohit Yadav wrote:
> > Looks fine, we still need to test it before we land it on master. I unfortunately don't have my hardware (and some parts) setup will try with DevCloud or hope someone else would review, test and ship it :)
> 
> Ilia Shakitko wrote:
>     Maybe we can add a reviewer who is currently working on master branch?

Hi, I was going to apply it today but your patch is not a git-formatted patch. Please upload a new git formatted patch, ref: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Git#Git-Patches


- Rohit


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


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.

> On July 29, 2014, 10:20 a.m., Rohit Yadav wrote:
> > Looks fine, we still need to test it before we land it on master. I unfortunately don't have my hardware (and some parts) setup will try with DevCloud or hope someone else would review, test and ship it :)
> 
> Ilia Shakitko wrote:
>     Maybe we can add a reviewer who is currently working on master branch?
> 
> Rohit Yadav wrote:
>     Hi, I was going to apply it today but your patch is not a git-formatted patch. Please upload a new git formatted patch, ref: https://cwiki.apache.org/confluence/display/CLOUDSTACK/Git#Git-Patches
> 
> Rohit Yadav wrote:
>     ping?

Hi. Got it, working on it.


- Ilia


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


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Rohit Yadav <bh...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/#review48976
-----------------------------------------------------------


Looks fine, we still need to test it before we land it on master. I unfortunately don't have my hardware (and some parts) setup will try with DevCloud or hope someone else would review, test and ship it :)

- Rohit Yadav


On July 28, 2014, 10:12 a.m., Ilia Shakitko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23805/
> -----------------------------------------------------------
> 
> (Updated July 28, 2014, 10:12 a.m.)
> 
> 
> Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.
> 
> 
> Bugs: CLOUDSTACK-7159
>     https://issues.apache.org/jira/browse/CLOUDSTACK-7159
> 
> 
> Repository: cloudstack-git
> 
> 
> Description
> -------
> 
> This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".
> 
> Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.
> 
> I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
> Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.
> 
> This patch is done for "master" branch.
> 
> 
> Diffs
> -----
> 
>   api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
>   server/src/com/cloud/server/ManagementServerImpl.java 99b12732 
> 
> Diff: https://reviews.apache.org/r/23805/diff/
> 
> 
> Testing
> -------
> 
> 1) Build successfull
> 2) No tests broken
> 3) Tested few different calls with cloudmonkey:
> 
> list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
> count = 10
> 
> list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
> count = 100
> 
> list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
> count = 90
> 
> 
> Thanks,
> 
> Ilia Shakitko
> 
>


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/
-----------------------------------------------------------

(Updated July 28, 2014, 10:12 a.m.)


Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, Wei Zhou, and Wido den Hollander.


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


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 99b12732 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/
-----------------------------------------------------------

(Updated July 28, 2014, 10:11 a.m.)


Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Kishan Kavala, Prachi Damle, Rohit Yadav, Ilia Shakitko, and Wei Zhou.


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


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 99b12732 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/
-----------------------------------------------------------

(Updated July 24, 2014, 8:47 a.m.)


Review request for cloudstack, Alena Prokharchyk, Alex Huang, Harikrishna Patnala, Prachi Damle, Rohit Yadav, Ilia Shakitko, and Wei Zhou.


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


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 99b12732 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/
-----------------------------------------------------------

(Updated July 22, 2014, 1:39 p.m.)


Review request for cloudstack, Ilia Shakitko and Wei Zhou.


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


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 99b12732 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko


Re: Review Request 23805: Added "state" parameter to the "listPublicIpAddresses" API call

Posted by Ilia Shakitko <i....@leaseweb.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23805/
-----------------------------------------------------------

(Updated July 22, 2014, 1:39 p.m.)


Review request for cloudstack, Ilia Shakitko and Wei Zhou.


Repository: cloudstack-git


Description
-------

This improvement is introducing a new parameter for the "listPublicIpAddresses" API call - "state".

Few times we've faced an impedemence of having a list of "Free" publicIpAddresses. You have to go thru all the IPs with (allocatedonly = false) and filter out the "Free" once. It's not a big deal, but it's an extra time and traffic between CloudStack and an API consumer.

I also moved few methods out of the 'API Implementation' and put them above as a minor refactoring.
Method "getForLoadBalancing" has been removed because it's not being used in code anywhere else.

This patch is done for "master" branch.


Diffs
-----

  api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java 07ccfe9 
  server/src/com/cloud/server/ManagementServerImpl.java 99b12732 

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


Testing
-------

1) Build successfull
2) No tests broken
3) Tested few different calls with cloudmonkey:

list publicipaddresses forvirtualnetwork=false listall=true page=1 pagesize=0
count = 10

list publicipaddresses forvirtualnetwork=false listall=true allocatedonly=false page=1 pagesize=0
count = 100

list publicipaddresses forvirtualnetwork=false listall=true state=free page=1 pagesize=0
count = 90


Thanks,

Ilia Shakitko