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 Details

    • AbstractKubernetesCommand

      public AbstractKubernetesCommand(String name)
      Default constructor initializing the command name.
      Parameters:
      name -
  • Method Details

    • hasParameter

      protected boolean hasParameter(String parameterName)
      Checks existence of command parameter.
      Parameters:
      parameterName -
      Returns:
    • getParameter

      protected String getParameter(String parameterName, TestContext context)
      Gets the kubernetes command parameter.
      Returns:
    • getCommandResult

      public CommandResult<R> getCommandResult()
      Description copied from interface: KubernetesCommand
      Provides access to this command result if any.
      Specified by:
      getCommandResult in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • setCommandResult

      protected void setCommandResult(CommandResult<R> commandResult)
      Sets the command result if any.
      Parameters:
      commandResult -
    • getName

      public String getName()
      Description copied from interface: KubernetesCommand
      Gets the Kubernetes command name.
      Specified by:
      getName in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • getParameters

      public Map<String,Object> getParameters()
      Description copied from interface: KubernetesCommand
      Gets the command parameters.
      Specified by:
      getParameters in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • setParameters

      public void setParameters(Map<String,Object> parameters)
      Sets the command parameters.
      Parameters:
      parameters -
    • withParam

      public T withParam(String name, String value)
      Adds command parameter to current command.
      Parameters:
      name -
      value -
      Returns:
    • validate

      public T validate(CommandResultCallback<R> callback)
      Description copied from interface: KubernetesCommand
      Adds validation callback with command result.
      Specified by:
      validate in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • getResultCallback

      public CommandResultCallback<R> getResultCallback()
      Description copied from interface: KubernetesCommand
      Gets the command result callback.
      Specified by:
      getResultCallback in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • label

      public T label(String key, String value)
      Description copied from interface: KubernetesCommand
      Sets the label parameter.
      Specified by:
      label in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • label

      public T label(String key)
      Description copied from interface: KubernetesCommand
      Sets the label parameter.
      Specified by:
      label in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • namespace

      public T namespace(String key)
      Description copied from interface: KubernetesCommand
      Sets the namespace parameter.
      Specified by:
      namespace in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • name

      public T name(String key)
      Description copied from interface: KubernetesCommand
      Sets the name parameter.
      Specified by:
      name in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • withoutLabel

      public T withoutLabel(String key, String value)
      Description copied from interface: KubernetesCommand
      Sets the without label parameter.
      Specified by:
      withoutLabel in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • withoutLabel

      public T withoutLabel(String key)
      Description copied from interface: KubernetesCommand
      Sets the without label parameter.
      Specified by:
      withoutLabel in interface KubernetesCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource>
      Returns:
    • getLabels

      protected Map<String,String> getLabels(String labelExpression, TestContext context)
      Reads labels from expression string.
      Parameters:
      labelExpression -
      context -
      Returns:
    • getWithoutLabels

      protected Map<String,String> getWithoutLabels(String labelExpression, TestContext context)
      Reads without labels from expression string.
      Parameters:
      labelExpression -
      context -
      Returns: