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

Scaleway Compute Driver #777

Closed
wants to merge 4 commits into from

Conversation

@bonifaido
Copy link
Contributor

commented Apr 25, 2016

Scaleway Compute Driver

Description

This is a simple/pure compute driver for https://www.scaleway.com/

Status

Replace this: describe the PR status. Examples:

  • work in progress

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)
# limitations under the License.

import copy
import json

This comment has been minimized.

Copy link
@tonybaloney

tonybaloney Apr 26, 2016

Contributor

You would need to replace this with

try:
    import simplejson as json
except:
    import json

to keep py2 and py3 compat

extra={'volumes': server['volumes']},
created_at=parse_date(server['creation_date']))

def create_node(self, **kwargs):

This comment has been minimized.

Copy link
@tonybaloney
def destroy_node(self, node):
return self._action(node.id, 'terminate')

def list_volumes(self):

This comment has been minimized.

Copy link
@tonybaloney

tonybaloney Apr 26, 2016

Contributor

any methods that are not overriding functionality in the base NodeDriver should be prepended with ex_ http://libcloud.readthedocs.org/en/latest/development.html#function-and-method-ordering

This comment has been minimized.

Copy link
@bonifaido

bonifaido Jun 6, 2016

Author Contributor

Which method are you referring to exactly? In the same docs I read: “Private” functions / methods (methods prefixed with an underscore).

return self.connection.request('/volumes/%s' % volume.id, method='DELETE').success()

def destroy_volume_snapshot(self, snapshot):
return self.connection.request('/snapshots//%s' % snapshot.id, method='DELETE').success()

This comment has been minimized.

Copy link
@tonybaloney

tonybaloney Apr 26, 2016

Contributor

Missing a blank line to pass flake8

@tonybaloney

This comment has been minimized.

Copy link
Contributor

commented Apr 26, 2016

thanks @bonifaido for the contribution, I've made some comments on the conventions at the project that just need implementing, also it would be great to get docstrings and also a doc page on the driver, explain how the authentication mechanism works.
We also ask for tests and mock responses to be included for new drivers as well as an ICLA to be signed (if you haven't already).

@Kami

This comment has been minimized.

Copy link
Member

commented Jun 4, 2016

@bonifaido How is this PR looking?

If you haven't already, can you please also sign an ICLA (https://libcloud.readthedocs.io/en/latest/development.html#contributing-bigger-changes) so we can move forward? Thanks.

@bonifaido

This comment has been minimized.

Copy link
Contributor Author

commented Jun 7, 2016

Sorry, I haven't submitted the ICLA yet, will do it today.

@bonifaido bonifaido force-pushed the bonifaido:scaleway branch 2 times, most recently from 334f8a4 to 6b07207 Jun 11, 2016

@bonifaido

This comment has been minimized.

Copy link
Contributor Author

commented Jun 11, 2016

Changes are done and squashed, please check them.

@kdeldycke

This comment has been minimized.

Copy link

commented Jun 13, 2016

Thanks @bonifaido for this PR! 💯

BTW, you might find some useful snippets of code in our own python's SDK for mocking the account/token API (example: https://github.com/scaleway/python-scaleway/blob/v1.1.4/scaleway/tests/apis/test_api_account.py#L46-L62 ). Feel free to reuse them!

@kdeldycke

This comment has been minimized.

Copy link

commented Jun 13, 2016

Here is a clean, transparent logo for the documentation.

scaleway-logo-flat-color

method='DELETE').success()

def destroy_volume_snapshot(self, snapshot):
return self.connection.request('/snapshots//%s' % snapshot.id,

This comment has been minimized.

Copy link
@kdeldycke

kdeldycke Jun 15, 2016

Typo here: double slashes.

@tonybaloney

This comment has been minimized.

Copy link
Contributor

commented Jun 24, 2016

@kdeldycke @bonifaido where are we up to with this PR?

@kdeldycke

This comment has been minimized.

Copy link

commented Jun 24, 2016

@tonybaloney Don't know... Did @bonifaido signed the ICLA?

What's missing then? Tests and mocks?

@bonifaido

This comment has been minimized.

Copy link
Contributor Author

commented Jun 29, 2016

Hi, sorry, not yet, I will do it tomorrow!

name=server['name'],
state=NodeState.fromstring(server['state']),
public_ips=[public_ip['address']] if public_ip else [],
private_ips=[private_ip['address']] if private_ip else [],

This comment has been minimized.

Copy link
@taneliva

taneliva Sep 30, 2016

This didn't (any more?) work. The returned structure looked like:

      "public_ip": {
        "dynamic": false,
        "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "address": "A.B.C.D"
      },
      "private_ip": "N.O.P.Q",

So changing this line to private_ips=[private_ip] if private_ip else [], made everything work ok for me.

This comment has been minimized.

Copy link
@bonifaido

bonifaido Oct 2, 2016

Author Contributor

You're right, just fixed it, thanks!

@tonybaloney

This comment has been minimized.

Copy link
Contributor

commented Oct 14, 2016

Thanks @bonifaido is this complete now?

@bonifaido

This comment has been minimized.

Copy link
Contributor Author

commented Oct 26, 2016

There are no tests yet, but I don't have the time right now to write them, so if someone could write some basic tests for it it would be great.

@bonifaido bonifaido force-pushed the bonifaido:scaleway branch from a297425 to 0529710 Oct 29, 2016

@tonybaloney

This comment has been minimized.

Copy link
Contributor

commented Apr 10, 2017

@bonifaido where is this up to?

@bonifaido

This comment has been minimized.

Copy link
Contributor Author

commented Apr 10, 2017

Hello! Sorry I went away with this, but I'm not using the libcloud scaleway driver anymore, so I would be more than happy if somebody could take over this.

@danhunsaker danhunsaker referenced this pull request Oct 5, 2017
4 of 4 tasks complete

@asfgit asfgit closed this in 6de9bb4 Jun 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.