public class DockerCloud extends AbstractCloud implements Serializable
DockerSlaveTemplate
contains configuration for running docker image.Modifier and Type | Class and Description |
---|---|
static class |
DockerCloud.DescriptorImpl |
containerCap, provisionedImages, templates
Constructor and Description |
---|
DockerCloud(String name,
List<DockerSlaveTemplate> templates,
int containerCap,
DockerConnector connector) |
Modifier and Type | Method and Description |
---|---|
int |
countCurrentDockerSlaves(DockerSlaveTemplate template)
Counts the number of instances in Docker currently running that are using the specified template.
|
boolean |
equals(Object o) |
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.DockerClient |
getClient()
Connects to Docker.
|
static DockerCloud |
getCloudByName(String name) |
DockerConnector |
getConnector() |
DockerCloud.DescriptorImpl |
getDescriptor() |
int |
hashCode() |
Collection<hudson.slaves.NodeProvisioner.PlannedNode> |
provision(hudson.model.Label label,
int excessWorkload) |
Object |
readResolve() |
String |
runContainer(DockerSlaveTemplate slaveTemplate)
Run docker container for given template
|
DockerCloud |
setConnector(DockerConnector connector) |
String |
toString() |
addTemplate, canProvision, decrementAmiSlaveProvision, getContainerCap, getTemplate, getTemplate, getTemplateById, getTemplates, getTemplates, removeTemplate, setContainerCap, setTemplates
all, checkPermission, getACL, getDisplayName, getSearchUrl, hasPermission
@DataBoundConstructor public DockerCloud(String name, List<DockerSlaveTemplate> templates, int containerCap, @Nonnull DockerConnector connector)
public DockerConnector getConnector()
public DockerCloud setConnector(DockerConnector connector)
public com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.DockerClient getClient()
@Nonnull public Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(@CheckForNull hudson.model.Label label, int excessWorkload)
provision
in class hudson.slaves.Cloud
public String runContainer(DockerSlaveTemplate slaveTemplate) throws com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.DockerException, IOException
com.github.kostyasha.yad_docker_java.com.github.dockerjava.api.exception.DockerException
IOException
public int countCurrentDockerSlaves(DockerSlaveTemplate template) throws Exception
template
- If null, then all instances are counted.Exception
public static DockerCloud getCloudByName(String name)
public Object readResolve()
public DockerCloud.DescriptorImpl getDescriptor()
getDescriptor
in interface hudson.model.Describable<hudson.slaves.Cloud>
getDescriptor
in class hudson.slaves.Cloud
Copyright © 2016–2020. All rights reserved.