You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@jclouds.apache.org by Adrian <no...@github.com> on 2015/07/27 20:34:12 UTC

[jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Requests to chef's API endpoint organizations/<orgname>/clients/<clientname> return the client's public key but the Client model has no attribute to store it. This PR adds the public key attribute to the client model and updates the Client class accordingly.
You can view, comment on, or merge this pull request online at:

  https://github.com/jclouds/jclouds/pull/828

-- Commit Summary --

  * JCLOUDS-967: Chef Client Model update with public key attribute

-- File Changes --

    M apis/chef/src/main/java/org/jclouds/chef/domain/Client.java (28)
    M apis/chef/src/test/java/org/jclouds/chef/functions/ParseClientFromJsonTest.java (15)
    M apis/chef/src/test/resources/client.json (5)

-- Patch Links --

https://github.com/jclouds/jclouds/pull/828.patch
https://github.com/jclouds/jclouds/pull/828.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828

Re: [jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Posted by Ignasi Barrera <no...@github.com>.
>     protected Client(X509Certificate certificate, String orgname, String clientname, String name, boolean validator,
> -         @Nullable PrivateKey privateKey) {
> +         @Nullable PrivateKey privateKey, PublicKey publicKey) {

If the public key is not returned in Chef Server versions < 12 it should be marked as nullable. Otherwise the deserialization of an object missing the public key will fail.

If this is the case, then could you add a test to verify this? In the test class you updated, keep a test for a client without the public key and one for a client that has it set.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828/files#r35579803

Re: [jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Posted by Ignasi Barrera <no...@github.com>.
Jenkins failure was unrelated.
Pushed to master as [eafdeb52](http://git-wip-us.apache.org/repos/asf/jclouds/commit/eafdeb52). Thanks @adrianbn!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828#issuecomment-127909683

Re: [jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Posted by Adrian <no...@github.com>.
Done! Let me know if you need anything else. Thanks!

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828#issuecomment-127553843

Re: [jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Posted by Ignasi Barrera <no...@github.com>.
Thanks @adrianbn! Just one comment; otherwise looks good.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828#issuecomment-125327911

Re: [jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Posted by Ignasi Barrera <no...@github.com>.
Closed #828.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828#event-373924649

Re: [jclouds] JCLOUDS-967: Chef Client Model update with public key attribute (#828)

Posted by Ignasi Barrera <no...@github.com>.
Thanks @adrianbn! lgtm.
I'll merge this PR in a few days, when 1.9.1 is released (I hope this to be by the end of the week) and the 1.9.x branch is unlocked so I can merge it to master and 1.9.x at once.
Mind squashing the commits into a single one meanwhile?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/828#issuecomment-127419381