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

Implement floating ips digitalocean #1177

Closed
wants to merge 4 commits into from

Conversation

vdloo
Copy link
Member

@vdloo vdloo commented Mar 4, 2018

Implement ex_create_floating_ip, ex_delete_floating_ip, ex_list_floating_ips and ex_get_floating_ip for the DigitalOcean compute driver

See https://developers.digitalocean.com/documentation/v2/#floating-ips

create a new unassociated floating IP in a region
delete a floating IP by passing the object into conn.ex_delete_floating_ip
or by running .delete on the floating IP object
Throws ValueError if the IP can not be found.

Inspired by ex_get_floating_ip from openstack.py,
but that one does `ip_obj, = [x for x in floating_ips if x.ip_address == ip]`
which will cause an ugly unpacking error if the IP can not be found:
`ValueError: need more than 0 values to unpack`
@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (trunk@5231cec). Click here to learn what that means.
The diff coverage is 97.14%.

Impacted file tree graph

@@           Coverage Diff            @@
##             trunk    #1177   +/-   ##
========================================
  Coverage         ?   86.18%           
========================================
  Files            ?      348           
  Lines            ?    67207           
  Branches         ?     5958           
========================================
  Hits             ?    57925           
  Misses           ?     6851           
  Partials         ?     2431
Impacted Files Coverage Δ
libcloud/test/compute/test_digitalocean_v2.py 99.4% <100%> (ø)
libcloud/compute/drivers/digitalocean.py 83.25% <92.85%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5231cec...da8eaeb. Read the comment docs.

@asfgit asfgit closed this in 4d0f9e0 Mar 9, 2018
@pquentin
Copy link
Contributor

pquentin commented Mar 9, 2018

Thanks! Merged in trunk. ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants