public static CreateDockerContainerMetadata newInstance( ContainerConfig containerConfig, ContainerCreateStatus status) { List<String> warnings = new ArrayList<String>(); String[] warningArray = status.getWarnings(); if (warningArray != null) { Collections.addAll(warnings, warningArray); } return new CreateDockerContainerMetadata(status.getId(), warnings); }
public static CreateDockerContainerMetadata newInstance( ContainerConfig containerConfig, DockerCreateOptions options, ContainerCreateStatus status, String containerType) { List<String> warnings = new ArrayList<String>(); String[] warningArray = status.getWarnings(); if (warningArray != null) { Collections.addAll(warnings, warningArray); } CreateDockerContainerMetadata metadata = new CreateDockerContainerMetadata(status.getId(), warnings); String containerId = options.getName(); metadata.setContainerName(containerId); metadata.setContainerType(containerType); metadata.setOverridenResolver(ZkDefs.MANUAL_IP); metadata.setCreateOptions(options); return metadata; }