jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Turli <andrea.tu...@gmail.com>
Subject Re: Upgrading an application to jclouds 2.1.0
Date Thu, 01 Mar 2018 18:12:54 GMT
Hi,

I think the commit message is slightly misleading, it should read
`remote ServerPredicates as the functionality is duplicated`

in fact [1] serves the same purpose. At [2] you can find an example of
how jclouds uses it now

Sorry for any inconvenience,
Andrea

[1]: https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/config/NovaComputeServiceContextModule.java#L197-L204
[2]: https://github.com/jclouds/jclouds/blob/master/apis/openstack-nova/src/main/java/org/jclouds/openstack/nova/v2_0/compute/NovaComputeServiceAdapter.java#L138

On Thu, Mar 1, 2018 at 6:58 PM, Fritz Elfert <fritz@fritz-elfert.de> wrote:
> Hi,
>
> I want to upgrade a small administrative application for an internal
> OpenStack environment to jclouds-2.1.0, however I'm stuck due to missing
> ServerPredicates.
>
> In the commit message of aa11765bee8e5e7f2d062ba8123c0dced822f071,
> Andrea Turli states:
>
> "- remove ServerPredicates as it is now duplicated"
>
> but I can't find another ServerPredicates class?!
>
> So: how is the following code supposed to be implemented using
> jclouds-2.1.0 resp. what is the replacement for ServerPredicates?
>
> ===================================== snip ==========================
> private void doSomethingWhileServerRunning(final Server s) {
>         final String sid = s.getId();
>         while (!ServerPredicates.awaitStatus(sapi,
> Server.Status.SHUTOFF, 30, 5).apply(sid)) {
>         /* do something with the server console ... */
>         }
> ...
> ===================================== snip ==========================
>
> Thanks in Advance.
>
> -Fritz

Mime
View raw message