Class ServerScope
java.lang.Object
jenkins.plugins.openstack.compute.ServerScope
- Direct Known Subclasses:
ServerScope.Build
,ServerScope.Node
,ServerScope.Time
,ServerScope.Unlimited
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public abstract class ServerScope
extends Object
Server can be scoped to certain Jenkins entities to constrain its lifetime.
Openstack plugin will clean the instance after it is considered out of scope.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
static final class
Server is scoped to Jenkins node of the name equal to the specifier.static final class
static final class
Opt-out of any cleanup performed by the plugin. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Contribute additional criteria for equality.boolean
static ServerScope
extract
(org.openstack4j.model.compute.Server server) Get the scope of a server.getValue()
Get Metadata value that represent this scope.int
hashCode()
abstract boolean
isOutOfScope
(org.openstack4j.model.compute.Server server) Determine whether the server is out of scope or not.static ServerScope
toString()
-
Field Details
-
METADATA_KEY
Name of the openstack metadata key- See Also:
-
name
-
specifier
-
-
Method Details
-
parse
- Throws:
IllegalArgumentException
-
extract
@Nonnull public static ServerScope extract(org.openstack4j.model.compute.Server server) throws IllegalStateException Get the scope of a server.- Returns:
- The scope or null if there is none declared.
- Throws:
IllegalStateException
- In case the scope can not be parsed.
-
toString
-
getValue
Get Metadata value that represent this scope. -
hashCode
public int hashCode() -
equals
-
_equals
Contribute additional criteria for equality. This is mostly useful for testing as the implementations are not expected to have mutable state or any state not represented by specifier. -
isOutOfScope
public abstract boolean isOutOfScope(@Nonnull org.openstack4j.model.compute.Server server) Determine whether the server is out of scope or not.
-