Class AbstractCreateCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource,D extends io.fabric8.kubernetes.api.model.Doneable<R>,T extends KubernetesCommand<R>>
java.lang.Object
org.citrusframework.kubernetes.command.AbstractKubernetesCommand<R,T>
org.citrusframework.kubernetes.command.AbstractClientCommand<io.fabric8.kubernetes.client.dsl.ClientMixedOperation<R,? extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D,? extends io.fabric8.kubernetes.client.dsl.ClientResource<R,D>>,R,T>
org.citrusframework.kubernetes.command.AbstractCreateCommand<R,D,T>
- All Implemented Interfaces:
KubernetesCommand<R>
- Direct Known Subclasses:
CreatePod,CreateService
public abstract class AbstractCreateCommand<R extends io.fabric8.kubernetes.api.model.KubernetesResource,D extends io.fabric8.kubernetes.api.model.Doneable<R>,T extends KubernetesCommand<R>>
extends AbstractClientCommand<io.fabric8.kubernetes.client.dsl.ClientMixedOperation<R,? extends io.fabric8.kubernetes.api.model.KubernetesResourceList,D,? extends io.fabric8.kubernetes.client.dsl.ClientResource<R,D>>,R,T>
- Since:
- 2.7
- Author:
- Christoph Deppisch
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractCreateCommand(String name) Default constructor initializing the command name. -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(io.fabric8.kubernetes.client.dsl.ClientMixedOperation<R, ? extends io.fabric8.kubernetes.api.model.KubernetesResourceList, D, ? extends io.fabric8.kubernetes.client.dsl.ClientResource<R, D>> operation, TestContext context) Execute the mixed operationGets the resource.Gets the template.protected InputStreamgetTemplateAsStream(TestContext context) Create input stream from template resource and add test variable support.Gets the templateResource.voidsetResource(R resource) Sets the resource.voidsetTemplate(String template) Sets the template.voidsetTemplateResource(Resource templateResource) Sets the templateResource.protected abstract Dspecify(D pod, TestContext context) Specify pod to create.Methods inherited from class org.citrusframework.kubernetes.command.AbstractClientCommand
execute, operationMethods inherited from class org.citrusframework.kubernetes.command.AbstractKubernetesCommand
getCommandResult, getLabels, getName, getParameter, getParameters, getResultCallback, getWithoutLabels, hasParameter, label, label, name, namespace, setCommandResult, setParameters, validate, withoutLabel, withoutLabel, withParam
-
Constructor Details
-
AbstractCreateCommand
Default constructor initializing the command name.- Parameters:
name-
-
-
Method Details
-
execute
public void execute(io.fabric8.kubernetes.client.dsl.ClientMixedOperation<R, ? extends io.fabric8.kubernetes.api.model.KubernetesResourceList, D, ? extends io.fabric8.kubernetes.client.dsl.ClientResource<R, D>> operation, TestContext context) Description copied from class:AbstractClientCommandExecute the mixed operation- Specified by:
executein classAbstractClientCommand<io.fabric8.kubernetes.client.dsl.ClientMixedOperation<R extends io.fabric8.kubernetes.api.model.KubernetesResource,? extends io.fabric8.kubernetes.api.model.KubernetesResourceList, D extends io.fabric8.kubernetes.api.model.Doneable<R>, ? extends io.fabric8.kubernetes.client.dsl.ClientResource<R extends io.fabric8.kubernetes.api.model.KubernetesResource, D extends io.fabric8.kubernetes.api.model.Doneable<R>>>, R extends io.fabric8.kubernetes.api.model.KubernetesResource, T extends KubernetesCommand<R>>
-
specify
Specify pod to create.- Parameters:
pod-context-- Returns:
-
getTemplateAsStream
Create input stream from template resource and add test variable support.- Parameters:
context-- Returns:
-
getTemplate
Gets the template.- Returns:
-
setTemplate
Sets the template.- Parameters:
template-
-
getTemplateResource
Gets the templateResource.- Returns:
-
setTemplateResource
Sets the templateResource.- Parameters:
templateResource-
-
getResource
Gets the resource.- Returns:
-
setResource
Sets the resource.- Parameters:
resource-
-