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

[LIBCLOUD-703] packet bare metal cloud provider integration #527

Closed
wants to merge 1 commit into
base: trunk
from

Conversation

Projects
None yet
2 participants
@crunchywelch
Contributor

crunchywelch commented May 22, 2015

I humbly submit this PR which adds support for our bare metal cloud hosting platform, Packet. Let me know if this looks ok, or if it requires additional work. The JIRA issue is here:

https://issues.apache.org/jira/browse/LIBCLOUD-703

Thanks!

@crunchywelch

This comment has been minimized.

Show comment
Hide comment
@crunchywelch

crunchywelch May 22, 2015

Contributor

I have faxed in my ICLA today as well. Thanks!

Contributor

crunchywelch commented May 22, 2015

I have faxed in my ICLA today as well. Thanks!

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami May 22, 2015

Member

Great, thanks.

I will try to have a look ASAP (hopefully over the weekend).

Member

Kami commented May 22, 2015

Great, thanks.

I will try to have a look ASAP (hopefully over the weekend).

@@ -55,6 +55,7 @@ Provider list volumes create volume destroy volume
`Opsource`_ no no no no no no no
`Outscale INC`_ yes yes yes yes yes yes yes
`Outscale SAS`_ yes yes yes yes yes yes yes
`Packet`_ no no no no no no no

This comment has been minimized.

@Kami

Kami May 23, 2015

Member

Just for a future reference - in case you updated those files manually, they are generated automatically using ./contrib/generate_provider_feature_matrix_table.py script.

@Kami

Kami May 23, 2015

Member

Just for a future reference - in case you updated those files manually, they are generated automatically using ./contrib/generate_provider_feature_matrix_table.py script.

This comment has been minimized.

@crunchywelch

crunchywelch May 23, 2015

Contributor

cool, gtk thanks

@crunchywelch

crunchywelch May 23, 2015

Contributor

cool, gtk thanks

@crunchywelch

This comment has been minimized.

Show comment
Hide comment
@crunchywelch

crunchywelch May 23, 2015

Contributor

thanks @Kami, will make some adjustments!

Contributor

crunchywelch commented May 23, 2015

thanks @Kami, will make some adjustments!

@crunchywelch

This comment has been minimized.

Show comment
Hide comment
@crunchywelch

crunchywelch May 23, 2015

Contributor

Ok, I think I got all those notes, lmk if you see anything else I should adjust!

Cheers,

Contributor

crunchywelch commented May 23, 2015

Ok, I think I got all those notes, lmk if you see anything else I should adjust!

Cheers,

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami May 24, 2015

Member

I tries to test the driver using a dummy token and looks like an API returns 404 on invalid token. Something like 401 would be better and then Libcloud would also correctly throw InvalidCreds exception.

Or maybe exception is related to the project not existing? In any case, 401 would be more appropriate (and hopefully token validation happens before project validation anyway) :)

# -------- begin 140127380731600 request ----------
curl -i -X GET -H 'Host: api.packet.net' -H 'X-LC-Request-ID: 140127380731600' -H 'Accept-Encoding: gzip,deflate' -H 'X-Consumer-Token: kcrhMn7hwG8Ceo2hAhGFa2qpxLBvVHxEjS9ue8iqmsNkeeB2iQgMq4dNc1893pYu' -H 'X-Auth-Token: accesskeyid' -H 'Content-Type: application/json' -H 'User-Agent: libcloud/0.17.1-dev (Packet) ' --compress 'https://api.packet.net:443/projects/aaaaa/devices?include=plan'
# -------- begin 140127380731600:140127380758680 response ----------
HTTP/1.1 404 Not Found
Status: 404 Not Found
X-Request-Id: ec216d58-04b5-432b-92ad-60efc377e9fd
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server: nginx/1.6.2
X-Runtime: 0.005357
Cache-Control: no-cache
Date: Sun, 24 May 2015 14:49:02 GMT
X-Frame-Options: SAMEORIGIN
Content-Type: application/json; charset=utf-8

15
{"error":"Not found"}
0

# -------- end 140127380731600:140127380758680 response ----------
Member

Kami commented May 24, 2015

I tries to test the driver using a dummy token and looks like an API returns 404 on invalid token. Something like 401 would be better and then Libcloud would also correctly throw InvalidCreds exception.

Or maybe exception is related to the project not existing? In any case, 401 would be more appropriate (and hopefully token validation happens before project validation anyway) :)

# -------- begin 140127380731600 request ----------
curl -i -X GET -H 'Host: api.packet.net' -H 'X-LC-Request-ID: 140127380731600' -H 'Accept-Encoding: gzip,deflate' -H 'X-Consumer-Token: kcrhMn7hwG8Ceo2hAhGFa2qpxLBvVHxEjS9ue8iqmsNkeeB2iQgMq4dNc1893pYu' -H 'X-Auth-Token: accesskeyid' -H 'Content-Type: application/json' -H 'User-Agent: libcloud/0.17.1-dev (Packet) ' --compress 'https://api.packet.net:443/projects/aaaaa/devices?include=plan'
# -------- begin 140127380731600:140127380758680 response ----------
HTTP/1.1 404 Not Found
Status: 404 Not Found
X-Request-Id: ec216d58-04b5-432b-92ad-60efc377e9fd
X-Xss-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Transfer-Encoding: chunked
Server: nginx/1.6.2
X-Runtime: 0.005357
Cache-Control: no-cache
Date: Sun, 24 May 2015 14:49:02 GMT
X-Frame-Options: SAMEORIGIN
Content-Type: application/json; charset=utf-8

15
{"error":"Not found"}
0

# -------- end 140127380731600:140127380758680 response ----------

@asfgit asfgit closed this in 4d51ede May 24, 2015

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami May 24, 2015

Member

I made a minor change (projectid, project_id -> ex_project_id since project id argument is not part of the standard API) and merged driver into trunk.

Thanks.

Member

Kami commented May 24, 2015

I made a minor change (projectid, project_id -> ex_project_id since project id argument is not part of the standard API) and merged driver into trunk.

Thanks.

@crunchywelch

This comment has been minimized.

Show comment
Hide comment
@crunchywelch

crunchywelch May 24, 2015

Contributor

great, thanks ! Do I need to provide the patch on the jira issue next? Looking at step 11 here:

http://libcloud.readthedocs.org/en/latest/development.html

Contributor

crunchywelch commented May 24, 2015

great, thanks ! Do I need to provide the patch on the jira issue next? Looking at step 11 here:

http://libcloud.readthedocs.org/en/latest/development.html

@Kami

This comment has been minimized.

Show comment
Hide comment
@Kami

Kami May 24, 2015

Member

No, it's fine, I already merged it using a patch from Github :)

Member

Kami commented May 24, 2015

No, it's fine, I already merged it using a patch from Github :)

@crunchywelch

This comment has been minimized.

Show comment
Hide comment
@crunchywelch

crunchywelch May 26, 2015

Contributor

Sweet, thanks man! And thank you for being a maintainer!

On Sun, May 24, 2015 at 5:26 PM, Tomaz Muraus notifications@github.com
wrote:

No, it's fine, I already merged it using a patch from Github :)


Reply to this email directly or view it on GitHub
#527 (comment).

Aaron Welch

SVP of Product

212.933.9785 x301
welch@packet.net

Contributor

crunchywelch commented May 26, 2015

Sweet, thanks man! And thank you for being a maintainer!

On Sun, May 24, 2015 at 5:26 PM, Tomaz Muraus notifications@github.com
wrote:

No, it's fine, I already merged it using a patch from Github :)


Reply to this email directly or view it on GitHub
#527 (comment).

Aaron Welch

SVP of Product

212.933.9785 x301
welch@packet.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment