@Singleton public class DockerComputeServiceAdapter extends Object implements ComputeServiceAdapter<Container,Hardware,Image,Location>
DockerApi implementation and
the jclouds ComputeServiceComputeServiceAdapter.NodeAndInitialCredentials<N>| Modifier and Type | Field and Description |
|---|---|
protected Logger |
logger |
static String |
PREFIX_DOCKER_HUB_HOST
Some Docker versions returns host prefix even for images from Docker hub in repoTags field.
|
static String |
SUFFIX_LATEST_VERSION
(Optional) Suffix used, when image version is not used during searching images.
|
| Constructor and Description |
|---|
DockerComputeServiceAdapter(DockerApi api) |
| Modifier and Type | Method and Description |
|---|---|
ComputeServiceAdapter.NodeAndInitialCredentials<Container> |
createNodeWithGroupEncodedIntoName(String group,
String name,
Template template)
ComputeService.createNodesInGroup(String, int, Template) generates the parameters
passed into this method such that each node in the set has a unique name. |
protected static com.google.common.base.Predicate<Image> |
createPredicateMatchingRepoTags(String imageIdOrName) |
void |
destroyNode(String id) |
Image |
getImage(String imageIdOrName)
get a specific image by id
|
Container |
getNode(String id) |
Iterable<Hardware> |
listHardwareProfiles()
Hardware profiles describe available cpu, memory, and disk configurations that can be used to
run a node.
|
Set<Image> |
listImages()
Method based on
ImageApi.listImages(). |
Iterable<Location> |
listLocations() |
Iterable<Container> |
listNodes() |
Iterable<Container> |
listNodesByIds(Iterable<String> ids) |
void |
rebootNode(String id) |
void |
resumeNode(String id) |
void |
suspendNode(String id) |
public static final String PREFIX_DOCKER_HUB_HOST
public static final String SUFFIX_LATEST_VERSION
@Named(value="jclouds.compute") protected Logger logger
@Inject public DockerComputeServiceAdapter(DockerApi api)
public ComputeServiceAdapter.NodeAndInitialCredentials<Container> createNodeWithGroupEncodedIntoName(String group, String name, Template template)
ComputeServiceAdapterComputeService.createNodesInGroup(String, int, Template) generates the parameters
passed into this method such that each node in the set has a unique name.
N. If you are not using library-native objects (such as libvirt Domain) use
JCloudsNativeComputeServiceAdapter instead.
credentialStorecreateNodeWithGroupEncodedIntoName in interface ComputeServiceAdapter<Container,Hardware,Image,Location>group - used to aggregate nodes with identical configurationname - unique supplied name for the node, which has the group encoded into it.template - includes imageId, locationId, and hardwareId used to resume
the instance.ComputeService.createNodesInGroup(String, int, Template)public Iterable<Hardware> listHardwareProfiles()
ComputeServiceAdapterlistHardwareProfiles in interface ComputeServiceAdapter<Container,Hardware,Image,Location>ComputeService.listHardwareProfiles()public Set<Image> listImages()
ImageApi.listImages(). It retrieves additional
information by inspecting each image.listImages in interface ComputeServiceAdapter<Container,Hardware,Image,Location>ComputeServiceAdapter.listImages()public Image getImage(String imageIdOrName)
ComputeServiceAdapterpublic Iterable<Container> listNodesByIds(Iterable<String> ids)
listNodesByIds in interface ComputeServiceAdapter<Container,Hardware,Image,Location>public Iterable<Location> listLocations()
listLocations in interface ComputeServiceAdapter<Container,Hardware,Image,Location>public void destroyNode(String id)
destroyNode in interface ComputeServiceAdapter<Container,Hardware,Image,Location>public void rebootNode(String id)
rebootNode in interface ComputeServiceAdapter<Container,Hardware,Image,Location>public void resumeNode(String id)
resumeNode in interface ComputeServiceAdapter<Container,Hardware,Image,Location>public void suspendNode(String id)
suspendNode in interface ComputeServiceAdapter<Container,Hardware,Image,Location>Copyright © 2009-2016 The Apache Software Foundation. All Rights Reserved.