public class ServerPredicates extends Object
Predicates relating to Openstack Server instances.| Constructor and Description |
|---|
ServerPredicates() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.base.Predicate<? super org.openstack4j.model.compute.Server> |
withStateIn(org.openstack4j.model.compute.Server.Status... statuses)
Creates a
Predicate function that returns true for
any Server with a status in a set of allowed values. |
static com.google.common.base.Predicate<org.openstack4j.model.compute.Server> |
withTag(String tag,
String tagValue)
Creates a
Predicate that checks Server instances for the
existence of a given meta data tag. |
public static com.google.common.base.Predicate<org.openstack4j.model.compute.Server> withTag(String tag, String tagValue)
Predicate that checks Server instances for the
existence of a given meta data tag.
The predicate will return true for all Server
instances with a given tag value in its user meta data.tag - The meta data tag.value - The expected value of the meta data tag.true for Server
instances with the given tag value and false for all
other Server instances.public static com.google.common.base.Predicate<? super org.openstack4j.model.compute.Server> withStateIn(org.openstack4j.model.compute.Server.Status... statuses)
Predicate function that returns true for
any Server with a status in a set of allowed values.statuses - The allowed server Server.Statuses.true for Server
instances in a certain state.Copyright © 2011–2015 elastisys. All rights reserved.