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

[jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Adds new method to `VirtualGuestApi` that allows the user to set the object-mask, therefore enabling arbitrary fields to be returned; for example the `NetworkVlan` object. Includes unit and live tests.
You can view, comment on, or merge this pull request online at:

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

-- Commit Summary --

  * Add new Softlayer API method to return arbitrary VirtualGuest fields

-- File Changes --

    M providers/softlayer/src/main/java/org/jclouds/softlayer/features/VirtualGuestApi.java (19)
    M providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestApiLiveTest.java (11)
    M providers/softlayer/src/test/java/org/jclouds/softlayer/features/VirtualGuestApiMockTest.java (38)
    A providers/softlayer/src/test/java/org/jclouds/softlayer/parse/VirtualGuestFilteredParseTest.java (50)
    A providers/softlayer/src/test/resources/virtual_guest_get_filtered.json (10)

-- Patch Links --

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

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

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

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Andrea Turli <no...@github.com>.
thanks @grkvlt ! I think it makes sense to have such a method. Probably it should be the only mechanism supported *but* in order to do that we need to improve the domain objects (moving to AutoValue for sure) so that they actually support arbitrary fields.

Main problem is that DTO are quite complex in SoftLayer and they not only support `local properties` but also `relational and count properties` because of the rich query language they support from API.
There is a risk that the query passed using *Filtered method may be valid but requires a field that is not modelled in the domain class. See [VirtualGuest def](http://sldn.softlayer.com/reference/datatypes/SoftLayer_Virtual_Guest) and [VirtualGuest jclouds](https://github.com/jclouds/jclouds/blob/master/providers/softlayer/src/main/java/org/jclouds/softlayer/domain/VirtualGuest.java)

Wdyt?

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Andrew Donald Kennedy <no...@github.com>.
NP thanks @nacx 

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Ignasi Barrera <no...@github.com>.
Pushed to [master](http://git-wip-us.apache.org/repos/asf/jclouds/commit/cf0e659c) and [1.9.x](http://git-wip-us.apache.org/repos/asf/jclouds/commit/b7020439). Thanks @grkvlt and apologies for the delay!

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Andrea Turli <an...@gmail.com>.
Agreed! https://issues.apache.org/jira/browse/JCLOUDS-984

On Tue, Aug 4, 2015 at 11:18 AM Ignasi Barrera <no...@github.com>
wrote:

> If the properties in the DTO are fixed, even if they are many, I'd model
> all them in the domain object to allow that. A proper builder should leave
> the domain object interface clean enough to make it usable.
> Mind opening a JIRA to track and discuss this?
> I'll merge the PR once 1.9.1 is released.
>
> —
>
>
> Reply to this email directly or view it on GitHub
> <https://github.com/jclouds/jclouds/pull/832#issuecomment-127538729>.
>

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Ignasi Barrera <no...@github.com>.
If the properties in the DTO are fixed, even if they are many, I'd model all them in the domain object to allow that. A proper builder should leave the domain object interface clean enough to make it usable.
Mind opening a JIRA to track and discuss this?
I'll merge the PR once 1.9.1 is released.

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Andrew Donald Kennedy <no...@github.com>.
@andreaturli Who should I ask to review this?

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

Re: [jclouds] Add new Softlayer API method to return arbitrary VirtualGuest fields (#832)

Posted by Ignasi Barrera <no...@github.com>.
Lgtm. Does it make sense to provide "filtered" methods for all methods in SoftLayer?

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