Skip to content

implement attach/detach floating IPs for DO#1191

Closed
vdloo wants to merge 1 commit intoapache:trunkfrom
vdloo:implement-attach-detach-floating-ip-for-do
Closed

implement attach/detach floating IPs for DO#1191
vdloo wants to merge 1 commit intoapache:trunkfrom
vdloo:implement-attach-detach-floating-ip-for-do

Conversation

@vdloo
Copy link
Member

@vdloo vdloo commented Mar 19, 2018

add methods to the DigitalOcean_v2_NodeDriver to attach and detach floating IPs from instances uniform to the ex_attach_floating_ip_to_node and ex_detach_floating_ip_from_node methods from the OpenStack_1_1_NodeDriver

see https://developers.digitalocean.com/documentation/v2/#assign-a-floating-ip-to-a-droplet and https://developers.digitalocean.com/documentation/v2/#unassign-a-floating-ip

cc @AlexanderGrooff

@vdloo vdloo force-pushed the implement-attach-detach-floating-ip-for-do branch from dcb8631 to 56611af Compare March 19, 2018 14:54
add methods to the DigitalOcean_v2_NodeDriver to attach and detach floating IPs from instances uniform to the `ex_attach_floating_ip_to_node` and `ex_detach_floating_ip_from_node` methods from the [OpenStack_1_1_NodeDriver](https://github.com/apache/libcloud/blob/2b298b7cd8d17b4b1c0db20292fdb7867a512ac6/libcloud/compute/drivers/openstack.py#L2394)

see https://developers.digitalocean.com/documentation/v2/#assign-a-floating-ip-to-a-droplet and https://developers.digitalocean.com/documentation/v2/#unassign-a-floating-ip
@vdloo vdloo force-pushed the implement-attach-detach-floating-ip-for-do branch from 56611af to b262444 Compare March 19, 2018 15:28
@codecov-io
Copy link

Codecov Report

Merging #1191 into trunk will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##            trunk   #1191      +/-   ##
=========================================
+ Coverage   86.19%   86.2%   +0.01%     
=========================================
  Files         348     348              
  Lines       67266   67292      +26     
  Branches     5958    5958              
=========================================
+ Hits        57980   58010      +30     
+ Misses       6853    6850       -3     
+ Partials     2433    2432       -1
Impacted Files Coverage Δ
libcloud/test/compute/test_digitalocean_v2.py 99.43% <100%> (+0.03%) ⬆️
libcloud/compute/drivers/digitalocean.py 83.84% <100%> (+0.58%) ⬆️
libcloud/test/compute/test_ec2.py 97.93% <0%> (+0.15%) ⬆️
libcloud/test/compute/test_upcloud.py 91.39% <0%> (+1.32%) ⬆️

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 6a8933f...b262444. Read the comment docs.

return (httplib.CREATED, body, {}, httplib.responses[httplib.CREATED])
else:
raise NotImplementedError()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of scope for this pull request, but I'm not a huge fan of this style because the raise path is never exercised and lowers the coverage. I think I'd prefer something like assert method in ['GET', 'POST'] at the beginning of the function. Not sure it's worth the trouble, and for now consistency is better!

@asfgit asfgit closed this in f07c6dd Mar 21, 2018
@pquentin
Copy link
Contributor

Thanks, merged in trunk! ✨

famanson pushed a commit to esplorio/libcloud that referenced this pull request Apr 13, 2018
* 'trunk' of github.com:apache/libcloud: (1281 commits)
  Add changes for apache#1196
  Added ability to define OS disk size for Azure ARM compute
  Add changes for apache#1198
  Google Cloud DNS documentation
  test_s3: Fix lint
  Fix one GCE test
  fix spelling in OpenStack ex_files description
  Add changes for apache#1181
  [LIBCLOUD-985] Add coverage for newer GCE network and subnet creation options.
  LIBCLOUD-986: Fix S3 iteration without prefix
  Add changes for apache#1195
  guess s3 multipart upload content type.
  Add changes for apache#1193
  LIBCLOUD-986: Add prefix option to azure blob list and iterate container methods
  Add changes for apache#1143
  [LIBCLOUD-961] Update GCE public image list.
  Add changes for apache#1190
  fix unexpected body type openstack image sharing
  Add changes for apache#1191
  implement attach/detach floating IPs for DO
  ...
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

Comments