Package cz.xtf.junit5.model
Class DockerImageMetadata
- java.lang.Object
-
- cz.xtf.junit5.model.DockerImageMetadata
-
public class DockerImageMetadata extends Object
Represents Docker image metadata by exposing convenience methods to access them and provides a cache to optimize retrievals.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringcommand()Returns default container command on Config/Cmd path If command consists of more parts, the space-separated string of all those parts is returned.List<String>commandList()Returns default container command on Config/Cmd path - return all parts as a listMap<String,String>envs()Returns image environments of Config/Env pathSet<Integer>exposedPorts(String protocol)Returns integer set of exposed ports by specified protocol (eg.static DockerImageMetadataget(OpenShift openShift, Image image)Get docker image metadata for image in openshift namespace.static DockerImageMetadataget(OpenShift openShift, String imageUrl)Get docker image metadata for image in openshift namespace.Map<String,String>labels()Returns image labels of Config/Labels path
-
-
-
Method Detail
-
get
public static DockerImageMetadata get(OpenShift openShift, String imageUrl)
Get docker image metadata for image in openshift namespace. Metadata are cached.
-
get
public static DockerImageMetadata get(OpenShift openShift, Image image)
Get docker image metadata for image in openshift namespace. Metadata are cached.
-
labels
public Map<String,String> labels()
Returns image labels of Config/Labels path- Returns:
- map of labels
-
envs
public Map<String,String> envs()
Returns image environments of Config/Env path- Returns:
- map of environment variables
-
command
public String command()
Returns default container command on Config/Cmd path If command consists of more parts, the space-separated string of all those parts is returned.- Returns:
- default command
-
commandList
public List<String> commandList()
Returns default container command on Config/Cmd path - return all parts as a list- Returns:
- default command list
-
-