Class AbstractKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource,T extends KubernetesCommand<R>>
java.lang.Object
org.citrusframework.kubernetes.command.AbstractKubernetesCommand<R,T>
- All Implemented Interfaces:
KubernetesCommand<R>
- Direct Known Subclasses:
AbstractClientCommand,Info
public abstract class AbstractKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource,T extends KubernetesCommand<R>>
extends Object
implements KubernetesCommand<R>
- Since:
- 2.7
- Author:
- Christoph Deppisch
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor initializing the command name. -
Method Summary
Modifier and TypeMethodDescriptionProvides access to this command result if any.getLabels(String labelExpression, TestContext context) Reads labels from expression string.getName()Gets the Kubernetes command name.protected StringgetParameter(String parameterName, TestContext context) Gets the kubernetes command parameter.Gets the command parameters.Gets the command result callback.getWithoutLabels(String labelExpression, TestContext context) Reads without labels from expression string.protected booleanhasParameter(String parameterName) Checks existence of command parameter.Sets the label parameter.Sets the label parameter.Sets the name parameter.Sets the namespace parameter.protected voidsetCommandResult(CommandResult<R> commandResult) Sets the command result if any.voidsetParameters(Map<String, Object> parameters) Sets the command parameters.validate(CommandResultCallback<R> callback) Adds validation callback with command result.withoutLabel(String key) Sets the without label parameter.withoutLabel(String key, String value) Sets the without label parameter.Adds command parameter to current command.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.citrusframework.kubernetes.command.KubernetesCommand
execute
-
Constructor Details
-
AbstractKubernetesCommand
Default constructor initializing the command name.- Parameters:
name-
-
-
Method Details
-
hasParameter
Checks existence of command parameter.- Parameters:
parameterName-- Returns:
-
getParameter
Gets the kubernetes command parameter.- Returns:
-
getCommandResult
Description copied from interface:KubernetesCommandProvides access to this command result if any.- Specified by:
getCommandResultin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
setCommandResult
Sets the command result if any.- Parameters:
commandResult-
-
getName
Description copied from interface:KubernetesCommandGets the Kubernetes command name.- Specified by:
getNamein interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
getParameters
Description copied from interface:KubernetesCommandGets the command parameters.- Specified by:
getParametersin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
setParameters
Sets the command parameters.- Parameters:
parameters-
-
withParam
Adds command parameter to current command.- Parameters:
name-value-- Returns:
-
validate
Description copied from interface:KubernetesCommandAdds validation callback with command result.- Specified by:
validatein interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
getResultCallback
Description copied from interface:KubernetesCommandGets the command result callback.- Specified by:
getResultCallbackin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
label
Description copied from interface:KubernetesCommandSets the label parameter.- Specified by:
labelin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
label
Description copied from interface:KubernetesCommandSets the label parameter.- Specified by:
labelin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
namespace
Description copied from interface:KubernetesCommandSets the namespace parameter.- Specified by:
namespacein interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
name
Description copied from interface:KubernetesCommandSets the name parameter.- Specified by:
namein interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
withoutLabel
Description copied from interface:KubernetesCommandSets the without label parameter.- Specified by:
withoutLabelin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
withoutLabel
Description copied from interface:KubernetesCommandSets the without label parameter.- Specified by:
withoutLabelin interfaceKubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>- Returns:
-
getLabels
Reads labels from expression string.- Parameters:
labelExpression-context-- Returns:
-
getWithoutLabels
Reads without labels from expression string.- Parameters:
labelExpression-context-- Returns:
-