@Test public void getContainerInfo() throws Exception { String testContainer = manager.startContainer(busyboxImageName, Constants.CONTAINER_TYPE_SYSTEM, null, sleepCommand); assertNotNull(testContainer); services.add(testContainer); Service infoFromMananger = manager.getContainerInfo(testContainer); Service containerInfo = dockerClient.inspectService(testContainer); manager.removeContainer(testContainer); services.remove(testContainer); assertEquals(infoFromMananger.id(), containerInfo.id()); }
@Override public Service getContainerInfo(String serviceName) throws InterruptedException, DockerException { if (serviceName == null) { return null; } Service info = null; try { info = dockerClient.inspectService(serviceName); } catch (ServiceNotFoundException e) { } return info; }
ContainerManagerImpl implements ContainerManager { @Override public Service getContainerInfo(String serviceName) throws InterruptedException, DockerException { if (serviceName == null) { return null; } Service info = null; try { info = dockerClient.inspectService(serviceName); } catch (ServiceNotFoundException e) { } return info; } }
ContainerManagerImpl implements ContainerManager { @Override public Service getContainerInfo(String serviceName) throws InterruptedException, DockerException { if (serviceName == null) { return null; } Service info = null; try { info = dockerClient.inspectService(serviceName); } catch (ServiceNotFoundException e) { } return info; } ContainerManagerImpl(); }
ContainerManagerImpl implements ContainerManager { @Override public Service getContainerInfo(String serviceName) throws InterruptedException, DockerException { if (serviceName == null) { return null; } Service info = null; try { info = dockerClient.inspectService(serviceName); } catch (ServiceNotFoundException e) { } return info; } ContainerManagerImpl(); void pullImage(String imageName); @Deprecated String startContainer(String imageName); @Deprecated String startContainer(String imageName, String[] command); String startContainer(String imageName, String type, String parent); @Override String startContainer(String imageName, String containerType, String parentId, String[] command); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] command); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
    String[] netAliases, String[] command); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] command, boolean pullImage); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] netAliases, String[] command, boolean pullImage); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] netAliases, String[] command, String experimentId); @Override void removeContainer(String serviceName); @Deprecated @Override void stopContainer(String containerId); @Deprecated @Override void stopParentAndChildren(String parentId); @Override void removeParentAndChildren(String parent); @Override Service getContainerInfo(String serviceName); @Override List<Service> getContainers(Service.Criteria criteria); @Override Integer getContainerExitCode(String serviceName); @Deprecated @Override String getContainerId(String name); @Deprecated @Override String getContainerName(String containerId); @Override void addContainerObserver(ContainerStateObserver containerObserver); static boolean containsVersionTag(String imageName); @Override ContainerStats getStats(String containerId); }
ContainerManagerImpl implements ContainerManager { @Override public Service getContainerInfo(String serviceName) throws InterruptedException, DockerException { if (serviceName == null) { return null; } Service info = null; try { info = dockerClient.inspectService(serviceName); } catch (ServiceNotFoundException e) { } return info; } ContainerManagerImpl(); void pullImage(String imageName); @Deprecated String startContainer(String imageName); @Deprecated String startContainer(String imageName, String[] command); String startContainer(String imageName, String type, String parent); @Override String startContainer(String imageName, String containerType, String parentId, String[] command); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] command); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
    String[] netAliases, String[] command); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] command, boolean pullImage); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] netAliases, String[] command, boolean pullImage); @Override String startContainer(String imageName, String containerType, String parentId, String[] env,
            String[] netAliases, String[] command, String experimentId); @Override void removeContainer(String serviceName); @Deprecated @Override void stopContainer(String containerId); @Deprecated @Override void stopParentAndChildren(String parentId); @Override void removeParentAndChildren(String parent); @Override Service getContainerInfo(String serviceName); @Override List<Service> getContainers(Service.Criteria criteria); @Override Integer getContainerExitCode(String serviceName); @Deprecated @Override String getContainerId(String name); @Deprecated @Override String getContainerName(String containerId); @Override void addContainerObserver(ContainerStateObserver containerObserver); static boolean containsVersionTag(String imageName); @Override ContainerStats getStats(String containerId); static final String DEPLOY_ENV_KEY; static final String DOCKER_AUTOPULL_ENV_KEY; static final String LOGGING_GELF_ADDRESS_KEY; static final String USER_NAME_KEY; static final String USER_EMAIL_KEY; static final String USER_PASSWORD_KEY; static final String REGISTRY_URL_KEY; static final String HOBBIT_DOCKER_NETWORK; static final String LOGGING_TAG; static final Set<String> NEW_TASKS_STATES; static final Set<String> UNFINISHED_TASK_STATES; }