Class CreateService
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<io.fabric8.kubernetes.api.model.Service,io.fabric8.kubernetes.api.model.DoneableService,CreateService>
org.citrusframework.kubernetes.command.CreateService
- All Implemented Interfaces:
KubernetesCommand<io.fabric8.kubernetes.api.model.Service>
public class CreateService
extends AbstractCreateCommand<io.fabric8.kubernetes.api.model.Service,io.fabric8.kubernetes.api.model.DoneableService,CreateService>
- Since:
- 2.7
- Author:
- Christoph Deppisch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the nodePort.getPort()Gets the port.Gets the protocol.Gets the selector.io.fabric8.kubernetes.api.model.ServiceGets the service.Gets the targetPort.protected io.fabric8.kubernetes.client.dsl.ClientMixedOperation<io.fabric8.kubernetes.api.model.Service,? extends io.fabric8.kubernetes.api.model.KubernetesResourceList, io.fabric8.kubernetes.api.model.DoneableService, ? extends io.fabric8.kubernetes.client.dsl.ClientResource<io.fabric8.kubernetes.api.model.Service, io.fabric8.kubernetes.api.model.DoneableService>> operation(KubernetesClient kubernetesClient, TestContext context) Subclasses provide operation to call.voidsetNodePort(String nodePort) Sets the nodePort.voidSets the port.voidsetProtocol(String protocol) Sets the protocol.voidsetSelector(String selector) Sets the selector.setService(io.fabric8.kubernetes.api.model.Service service) Sets the service.voidsetTargetPort(String targetPort) Sets the targetPort.protected io.fabric8.kubernetes.api.model.DoneableServicespecify(io.fabric8.kubernetes.api.model.DoneableService service, TestContext context) Specify pod to create.Methods inherited from class org.citrusframework.kubernetes.command.AbstractCreateCommand
execute, getResource, getTemplate, getTemplateAsStream, getTemplateResource, setResource, setTemplate, setTemplateResourceMethods inherited from class org.citrusframework.kubernetes.command.AbstractClientCommand
executeMethods 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
-
CreateService
public CreateService()Default constructor initializing the command name.
-
-
Method Details
-
operation
protected io.fabric8.kubernetes.client.dsl.ClientMixedOperation<io.fabric8.kubernetes.api.model.Service,? extends io.fabric8.kubernetes.api.model.KubernetesResourceList, operationio.fabric8.kubernetes.api.model.DoneableService, ? extends io.fabric8.kubernetes.client.dsl.ClientResource<io.fabric8.kubernetes.api.model.Service, io.fabric8.kubernetes.api.model.DoneableService>> (KubernetesClient kubernetesClient, TestContext context) Description copied from class:AbstractClientCommandSubclasses provide operation to call.- Specified by:
operationin classAbstractClientCommand<io.fabric8.kubernetes.client.dsl.ClientMixedOperation<io.fabric8.kubernetes.api.model.Service,? extends io.fabric8.kubernetes.api.model.KubernetesResourceList, io.fabric8.kubernetes.api.model.DoneableService, ? extends io.fabric8.kubernetes.client.dsl.ClientResource<io.fabric8.kubernetes.api.model.Service, io.fabric8.kubernetes.api.model.DoneableService>>, io.fabric8.kubernetes.api.model.Service, CreateService> - Returns:
-
specify
protected io.fabric8.kubernetes.api.model.DoneableService specify(io.fabric8.kubernetes.api.model.DoneableService service, TestContext context) Description copied from class:AbstractCreateCommandSpecify pod to create.- Specified by:
specifyin classAbstractCreateCommand<io.fabric8.kubernetes.api.model.Service,io.fabric8.kubernetes.api.model.DoneableService, CreateService> - Returns:
-
getSelector
Gets the selector.- Returns:
-
setSelector
Sets the selector.- Parameters:
selector-
-
getPort
Gets the port.- Returns:
-
setPort
Sets the port.- Parameters:
port-
-
getTargetPort
Gets the targetPort.- Returns:
-
setTargetPort
Sets the targetPort.- Parameters:
targetPort-
-
getNodePort
Gets the nodePort.- Returns:
-
setNodePort
Sets the nodePort.- Parameters:
nodePort-
-
getProtocol
Gets the protocol.- Returns:
-
setProtocol
Sets the protocol.- Parameters:
protocol-
-
getService
public io.fabric8.kubernetes.api.model.Service getService()Gets the service.- Returns:
-
setService
Sets the service.- Parameters:
service-
-