Interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
- All Known Implementing Classes:
AbstractClientCommand,AbstractCreateCommand,AbstractDeleteCommand,AbstractGetCommand,AbstractKubernetesCommand,AbstractListCommand,AbstractWatchCommand,CreatePod,CreateService,DeletePod,DeleteService,GetPod,GetService,Info,ListEndpoints,ListEvents,ListNamespaces,ListNodes,ListPods,ListReplicationControllers,ListServices,WatchNamespaces,WatchNodes,WatchPods,WatchReplicationControllers,WatchServices
public interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
- Since:
- 2.7
- Author:
- Christoph Deppisch
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(KubernetesClient 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(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.
-
Method Details
-
execute
Executes command with given kubernetes client and test context.- Parameters:
kubernetesClient-context-
-
getName
String getName()Gets the Kubernetes command name.- Returns:
-
getParameters
Gets the command parameters.- Returns:
-
validate
Adds validation callback with command result.- Parameters:
callback-- Returns:
-
getCommandResult
CommandResult<R> getCommandResult()Provides access to this command result if any.- Returns:
-
getResultCallback
CommandResultCallback<R> getResultCallback()Gets the command result callback.- Returns:
-
label
Sets the label parameter.- Parameters:
key-value-- Returns:
-
label
Sets the label parameter.- Parameters:
key-- Returns:
-
namespace
Sets the namespace parameter.- Parameters:
key-- Returns:
-
name
Sets the name parameter.- Parameters:
key-- Returns:
-
withoutLabel
Sets the without label parameter.- Parameters:
key-value-- Returns:
-
withoutLabel
Sets the without label parameter.- Parameters:
key-- Returns:
-