org.testifyproject.github.dockerjava.jaxrs.InspectVolumeCmdExec Maven / Gradle / Ivy
package org.testifyproject.testifyproject.github.dockerjava.jaxrs;
import javax.ws.rs.client.WebTarget;
import javax.ws.rs.core.MediaType;
import org.testifyproject.slf4j.Logger;
import org.testifyproject.slf4j.LoggerFactory;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectVolumeCmd;
import org.testifyproject.testifyproject.github.dockerjava.api.org.testifyproject.testifyprojectmand.InspectVolumeResponse;
import org.testifyproject.testifyproject.github.dockerjava.core.DockerClientConfig;
public class InspectVolumeCmdExec extends AbstrSyncDockerCmdExec implements
InspectVolumeCmd.Exec {
private static final Logger LOGGER = LoggerFactory.getLogger(InspectVolumeCmdExec.class);
public InspectVolumeCmdExec(WebTarget baseResource, DockerClientConfig dockerClientConfig) {
super(baseResource, dockerClientConfig);
}
@Override
protected InspectVolumeResponse execute(InspectVolumeCmd org.testifyproject.testifyprojectmand) {
WebTarget webResource = getBaseResource().path("/volumes/{name}").resolveTemplate("name", org.testifyproject.testifyprojectmand.getName());
LOGGER.trace("GET: {}", webResource);
return webResource.request().accept(MediaType.APPLICATION_JSON).get(InspectVolumeResponse.class);
}
}