Interface KubernetesCommand<T,R,C>
public interface KubernetesCommand<T,R,C>
Command executes an operation on the kubernetes client (e.g. list, create).
Type parameter:
the Kubernetes resource that this command operates with (e.g. Pod, Service, Secret, ...)
the command output that may be validated (e.g. Pod, PodList, InfoResult, ...)
the Kubernetes client implementation
- Since:
- 2.7
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(C kubernetesClient, TestContext context) Executes command with given kubernetes client and test context.Provides access to this command result if any.getName()Gets the Kubernetes command name.Gets the command parameters.Gets the command result callback.Sets the label parameter.Sets the label parameter.Sets the name parameter.Sets the namespace parameter.validate(KubernetesCommandResultCallback<R> callback) Adds validation callback with command result.default voidvalidateCommandResult(TestContext context) Validate command result using the specified command result callback.withoutLabel(String key) Sets the without label parameter.withoutLabel(String key, String value) Sets the without label parameter.
-
Method Details
-
execute
Executes command with given kubernetes client and test context. -
getName
String getName()Gets the Kubernetes command name. -
getParameters
Gets the command parameters. -
validate
Adds validation callback with command result. -
getCommandResult
KubernetesCommandResult<R> getCommandResult()Provides access to this command result if any. -
getResultCallback
KubernetesCommandResultCallback<R> getResultCallback()Gets the command result callback. -
label
Sets the label parameter. -
label
Sets the label parameter. -
namespace
Sets the namespace parameter. -
name
Sets the name parameter. -
withoutLabel
Sets the without label parameter. -
withoutLabel
Sets the without label parameter. -
validateCommandResult
Validate command result using the specified command result callback.
-