Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementation of Floating IPs #130

Merged
merged 9 commits into from
Jul 17, 2019

Conversation

gabrik
Copy link
Contributor

@gabrik gabrik commented Jul 17, 2019

This implements the possibility to assing a Floating IP, and IP address in the same network of the physical one of the node, to a running FDU. Solves #111

To enable this 4 new APIs are added:

  • FIMAPI.network.create_floating_ip( nodeid )
  • FIMAPI.network.assign_floating_ip( nodeid, floating ip id, connection point id)
  • FIMAPI.network.retain_floating_ip( nodeid, floating ip id, connection point id)
  • FIMAPI.network.delete_floating_ip( nodeid, floating ip id)

Example of usage:

>>> from fog05 import FIMAPI; a=FIMAPI()
>>> fip = a.network.create_floating_ip('4a560914-1c3e-4966-9fa8-7f0acc903253')
>>> fip
{'result': {'uuid': 'fff134fe-5d6c-402f-983d-1800a610405a', 'ip_version': 'IPV4', 'address': '192.168.86.208/24'}}
>>> a.fdu.instance_info('a5ae5fbb-fb4b-48a8-ac93-2123d5f7b10e')
{'fdu_uuid': '1e57bb0e-cb41-4b23-bca3-1fa761a83c02', 'node': '4a560914-1c3e-4966-9fa8-7f0acc903253', 'uuid': 'a5ae5fbb-fb4b-48a8-ac93-2123d5f7b10e', 'status': 'RUN', 'interfaces': [{'vintf_name': 'eth0', 'status': 'CREATE', 'if_type': 'VIRTIO', 'mac_address': 'be:ef:be:ef:00:01', 'cp_id': 'cc4b97d2-baf7-4006-a928-7710e83c8a7c'}], 'connection_points': [{'uuid': 'cc4b97d2-baf7-4006-a928-7710e83c8a7c', 'status': 'CREATE', 'cp_uuid': 'a47a8819-72e5-4b4e-86fd-fc30c9fda68b'}], 'hypervisor_info': {'network': {'eth0': {'hwaddr': 'be:ef:be:ef:00:01', 'addresses': [{'address': '192.168.234.10'}]}}, 'cpu': {'usage': 2709500253}, 'memory': {'usage': 11534336, 'usage_peak': 20119552, 'swap_usage': 0, 'swap_usage_peak': 0}}, 'accelerators': {'fpga': [], 'gpu': []}, 'io_ports': []}
a.network.assign_floating_ip('4a560914-1c3e-4966-9fa8-7f0acc903253','fff134fe-5d6c-402f-983d-1800a610405a','cc4b97d2-baf7-4006-a928-7710e83c8a7c')
{'result': {'uuid': 'fff134fe-5d6c-402f-983d-1800a610405a', 'ip_version': 'IPV4', 'address': '192.168.86.208/24'}}
>>> a.network.retain_floating_ip('4a560914-1c3e-4966-9fa8-7f0acc903253','fff134fe-5d6c-402f-983d-1800a610405a','cc4b97d2-baf7-4006-a928-7710e83c8a7c')

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
…ating ip

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
@gabrik gabrik added the enhancement New feature or request label Jul 17, 2019
@gabrik gabrik self-assigned this Jul 17, 2019
@gabrik gabrik merged commit c49efbf into eclipse-fog05:master Jul 17, 2019
gabrik added a commit that referenced this pull request Nov 26, 2020
* Update functions to assing floating IPs now uses routers, new APIs for floating IPs

Signed-off-by: gabrik <gabriele.baldoni@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant