public Image findAnImage(Image image) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to find an image..."); dockerResponse = driver.findAnImage(image); handleDockerAPIError(dockerResponse); image = objectMapper.readValue(dockerResponse.getBody(), Image.class); } catch (FatalDockerJSONException | IOException e) { throw new DockerJSONException(e.getMessage(), e); } return image; }
public Image findAnImage(Image image) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to find an image..."); dockerResponse = driver.findAnImage(image); handleDockerAPIError(dockerResponse); image = objectMapper.readValue(dockerResponse.getBody(), Image.class); } catch (FatalDockerJSONException | IOException e) { throw new DockerJSONException(e.getMessage(), e); } return image; }
/** * @param container * @throws DockerJSONException */ public void stopContainer(DockerContainer container) throws DockerJSONException { try { logger.info("The client attempts to stop a container..."); DockerResponse dockerResponse = driver.stop(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
/** * @param container * @throws DockerJSONException */ public void stopContainer(DockerContainer container) throws DockerJSONException { try { logger.info("The client attempts to stop a container..."); DockerResponse dockerResponse = driver.stop(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
/** * @param container * @throws DockerJSONException */ public void createContainer(DockerContainer container) throws DockerJSONException { try { logger.info("The client attempts to create a container..."); DockerResponse dockerResponse = driver.create(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
/** * @param container * @throws DockerJSONException */ public void createContainer(DockerContainer container) throws DockerJSONException { try { logger.info("The client attempts to create a container..."); DockerResponse dockerResponse = driver.create(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
/** * @param container * @throws DockerJSONException */ public void startContainer(DockerContainer container) throws DockerJSONException { try { logger.info("The client attempts to start a container..."); DockerResponse dockerResponse = driver.start(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
/** * @param container * @throws DockerJSONException */ public void startContainer(DockerContainer container) throws DockerJSONException { try { logger.info("The client attempts to start a container..."); DockerResponse dockerResponse = driver.start(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
/** * @param container * @return * @throws DockerJSONException */ public DockerResponse killContainer(DockerContainer container) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to kill a container..."); dockerResponse = driver.kill(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
/** * @param container * @return * @throws DockerJSONException */ public DockerResponse removeContainer(DockerContainer container) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to remove a container..."); dockerResponse = driver.remove(container); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
public void connectToNetwork(String id, String containerId) throws DockerJSONException, ServiceException { try { logger.info("The client attempts to add container to a network..."); Network network = findNetwork(id); DockerResponse dockerResponse = driver.connectToNetwork(network, containerId); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } catch (IOException e) { throw new ServiceException(e.getMessage(), e); } }
public void connectToNetwork(String id, String containerId) throws DockerJSONException, ServiceException { try { logger.info("The client attempts to add container to a network..."); Network network = findNetwork(id); DockerResponse dockerResponse = driver.connectToNetwork(network, containerId); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } catch (IOException e) { throw new ServiceException(e.getMessage(), e); } }
public Network findNetwork(String id) throws DockerJSONException, IOException { try { logger.info("The client attempts to find a network..."); Network network = new Network(); network.setId(id); DockerResponse dockerResponse = driver.findNetwork(network); handleDockerAPIError(dockerResponse); return objectMapper.readValue(dockerResponse.getBody(), Network.class); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
public Network findNetwork(String id) throws DockerJSONException, IOException { try { logger.info("The client attempts to find a network..."); Network network = new Network(); network.setId(id); DockerResponse dockerResponse = driver.findNetwork(network); handleDockerAPIError(dockerResponse); return objectMapper.readValue(dockerResponse.getBody(), Network.class); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } }
public DockerResponse findVolume(String name) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to find a volume..."); Volume volume = new Volume(); volume.setName(name); dockerResponse = driver.findVolume(volume); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
public DockerResponse removeNetwork(String id) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to remove a network..."); Network network = new Network(); network.setId(id); dockerResponse = driver.removeNetwork(network); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
public DockerResponse removeNetwork(String id) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to remove a network..."); Network network = new Network(); network.setId(id); dockerResponse = driver.removeNetwork(network); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
public DockerResponse removeVolume(String name) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to find a volume..."); Volume volume = new Volume(); volume.setName(name); dockerResponse = driver.removeVolume(volume); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
public DockerResponse findVolume(String name) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to find a volume..."); Volume volume = new Volume(); volume.setName(name); dockerResponse = driver.findVolume(volume); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }
public DockerResponse removeVolume(String name) throws DockerJSONException { DockerResponse dockerResponse = null; try { logger.info("The client attempts to find a volume..."); Volume volume = new Volume(); volume.setName(name); dockerResponse = driver.removeVolume(volume); handleDockerAPIError(dockerResponse); } catch (FatalDockerJSONException e) { throw new DockerJSONException(e.getMessage(), e); } return dockerResponse; }