Ask Your Question
0

How to associate Floating IP with Neutron Net Service API

asked 2017-07-08 03:21:44 -0500

akostadinov gravatar image

updated 2017-07-08 03:22:54 -0500

Hi, I'm adapting an API client fo work with OpenStack 10. One of the things it does is associate a floating IP to a VM. In compute API [1] I read that now Neutron networking service API [2] should be used to do it because the compute call is deprecated.

But in the neutron API I don't see anything about associating Floating IPs. Only I see calls to create them, delete them, edit them, etc. Any pointers?

[1] https://developer.openstack.org/api-ref/compute/?expanded=add-associate-floating-ip-addfloatingip-action-deprecated-detail#add-associate-floating-ip-addfloatingip-action-deprecated (https://developer.openstack.org/api-r...)

[2] https://developer.openstack.org/api-ref/networking/ (https://developer.openstack.org/api-r...)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2017-07-08 09:22:42 -0500

https://developer.openstack.org/api-r...

I agree it's not incredibly intuitive.

edit flag offensive delete link more

Comments

Thank you for taking the time to answer. Unfortunately I didn't see your answer, for some reason notifications didn't work. It is correct but wanted to add some more details in a separate answer.

akostadinov gravatar imageakostadinov ( 2017-07-09 01:07:16 -0500 )edit
0

answered 2017-07-09 01:05:42 -0500

akostadinov gravatar image

I found out. When you create a floating IP, you can specify port_id, or updating a floating IP you can also specify port_id to associate with a machine. To disassociate one can specify the null value for port_id. Same link [2].

  • Obtain networks (neutron networking api) with floating IPs (where router:external is true)
  • obtain instance fixed ip (nova api)
  • Obtain port list (neutron networking api) (find the one with fixed IP same as your VM)
  • Then create or update a floating ip

One could hope for something simpler but so be it.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2017-07-08 03:21:44 -0500

Seen: 574 times

Last updated: Jul 09 '17