On Fri, Apr 19, 2013 at 09:51:56AM +0000, Saksham Srivastava wrote:
> 
> 
> > On April 18, 2013, 5:21 p.m., Sateesh Chodapuneedi wrote:
> > > server/src/com/cloud/network/NetworkServiceImpl.java, line 1888
> > > <https://reviews.apache.org/r/10005/diff/1/?file=271870#file271870line1888>
> > >
> > >     This code seems dueplicated because the logic to calculate reserved 
> > > ip range can be used to check if there exists some ip range to be 
> > > reserved or not. If the calculated range is empty then do not attempt to 
> > > reserve. Code to prepare response object already had this logic. May be 
> > > we have to move this to NetUtils and call that from both places.
> 
> Thanks for the comment.
> 
> I have added the logic to NetUtils.java to maker it more generic and usable.
> However the response method does not need to call this boolean function, so 
> making changes only in API checks.

Please see me comment in the review board record.  These new methods are
easily unit tested, so I'd like to see some unit tests to confirm
functionality (positive and negative tests please).

Reply via email to