Skip to content

Commit

Permalink
Refactor inspectContainer and add commit(), removeImage()
Browse files Browse the repository at this point in the history
Adds commit() and removeImage() implementations to
OpenShiftConnector. This requires some refactoring of existing
methods (mostly refactoring repeated processes into their own
methods -- e.g. creating an ImageStreamTag and getting image
info from a tag).

Additionally, refactors inspectContainer() method to remove
a call to DockerConnector, instead obtaining the same information
from what's available through the OpenShift API. This fixes an
issue where the IP address of a workspace was unavailable from
the ContainerInfo returned by DockerConnector.

Signed-off-by: Angel Misevski <amisevsk@redhat.com>
  • Loading branch information
amisevsk committed Feb 9, 2017
1 parent 4af07f1 commit fb3b14e
Show file tree
Hide file tree
Showing 3 changed files with 258 additions and 108 deletions.
Expand Up @@ -281,6 +281,7 @@ public void destroy() throws MachineException {
try {
docker.removeImage(RemoveImageParams.create(image).withForce(false));
} catch (IOException ignore) {
LOG.error("IOException during destroy(). Ignoring.");
}
}

Expand Down

0 comments on commit fb3b14e

Please sign in to comment.