Hey,

As I'm the one who found this bug I'd like to take a stab at coding a solution. 
The JIRA issue can be found here:

https://issues.apache.org/jira/browse/JCLOUDS-607

It's currently marked as not assigned to anyone but I didn't know if anyone had 
done any preliminary work looking at this and/or is doing anything behind the 
scenes and/or has any ideas as to best go about solving the issue. Taking a 
look at things my thinking was going this direction (this is a thousand foot 
POV so I don't have all the nitty-gritty details worked out yet just an idea):

        1.) Add method 'floatingIpPoolNames(Set<String>)' to 
NovaTemplateOptions.
        2.) This of course will be passed to a Template via 
'Template.options(novaTemplateOptions).build()'
        3.) Further down the call chain, and in class 
'AllocateAndAddFloatingipToNode', and specifically around line 81 which makes a 
call to 'floatingApi.create()', check if we have any ip-pools defined. 
Implementation might got something like this:

                        if <some-pools-defined> then:
                                for(String poolName : somePoolIterator) 
//allows for passing multiple pools
                                        ip = floatingApi.allocate(poolName);
                                        if ip != null
                                                break;
                         else:
                                floatingApi.create()

How the NovaTemplateOptions will get from step 2 to 3 I honestly don't know yet 
as I've not gone through the source but I'm assuming it's relatively painless. 
Thoughts?

Thanks,
Chris

Reply via email to