-
Notifications
You must be signed in to change notification settings - Fork 180
[rfr] Adds Fixed IP support to os-floating-ips #403
[rfr] Adds Fixed IP support to os-floating-ips #403
Conversation
Any update on this one? It changes the existing code quite a bit, so is there a better way to add this functionality without having to change the existing code so much? |
Sorry for the delay; I didn't know if this was ready for review. The only problem right now is backward compatibility. Maybe you could create new functions named |
Oops - my bad. I'll note if PRs are ready to go in the future. :) Yes, that does make sense. I'll re-work this going that route. Thanks! |
👍 |
This commit enables the ability to specify a fixed IP when associating a floating IP to an instance. If a fixed IP is not specified, Nova will attempt to associate the floating IP to the first detected fixed IP, as it did prior to this patch.
@jrperritt Finally getting around to this! Clean commit with a new approach. The existing functions, |
@@ -79,7 +112,33 @@ func Associate(client *gophercloud.ServiceClient, serverId, fip string) Associat | |||
return res | |||
} | |||
|
|||
// AssociateFloatingIP pairs an allocated floating IP with an instance. | |||
func AssociateFloatingIP(client *gophercloud.ServiceClient, opts AssociateOpts) AssociateResult { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to name this AssociateInstance
so that when it called it would be floatingip.AssociateInstance
instead of floatingip.AssociateFloatingIP
? Similar proposal for DisassociateFloatingIP
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I debated this when I originally wrote it and decided to wait and see if someone else flagged it :)
Thanks for sticking with this; I'm sorry it took me so long to circle back around to it. +2 |
[rfr] Adds Fixed IP support to os-floating-ips
No problem at all! Thanks! |
This commit enables the ability to specify a fixed IP when associating a
floating IP to an instance. If a fixed IP is not specified, Nova will
attempt to associate the floating IP to the first detected fixed IP, as it
did prior to this patch.