RE: https://issues.apache.org/jira/browse/CLOUDSTACK-1942
I added this feature this morning, but before I present the diff to review board, I'd like to have some feedback on the approach. I just want to make sure how I did it is ok from the maintainers perspective so I'm not wasting anyones time. 1. Add an optional parameter to api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java allowing you to pass in a UUID of the specific IP you want to add. 2. Make AssociateIPAddrCmd either use the provided IP or use the existing "getEntity()" call it is using now. 3. Update "allocateIP" to have a new optional argument, the Long (id) of IpAddress. 4. Update the NetworkManager and NetworkService interfaces to include the new parameter 5. Update the MockNetworkManager and MockNetworkService implementations to include the new parameter. 6. Update the NetworkServiceImplementation to include the new parameter and pass it through. 7. Update NetworkManagerImpl: Use the existing functionality of "fetchNewPublicIp" and pass in the String "requestedIp" based on the Long id of IpAddress (I used ApiDBUtils to fetch the object out and transform it into a string). I tested the code passing the UUID of the IP I wanted to attach as well as leaving it off, verifying the pre-existing method worked normally. If there is an alternative approach you'd rather me take to accomplish this task, please let me know, otherwise I'll be happy to post the diff to review board. Thanks, -Ryan Dietrich