Package org.jclouds.docker.features
Interface NetworkApi
-
@Consumes("application/json") @Path("/v{jclouds.api-version}/networks") public interface NetworkApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
connectContainerToNetwork(String networkIdOrName, String containerIdOrName)
Network
createNetwork(Network network)
void
disconnectContainerFromNetwork(String networkIdOrName, String containerIdOrName)
Network
inspectNetwork(String networkIdOrName)
Return low-level information on the network idList<Network>
listNetworks()
void
removeNetwork(String networkIdOrName)
-
-
-
Method Detail
-
createNetwork
@Named("network:create") @POST @Path("/create") Network createNetwork(Network network)
- Parameters:
network
- the network’s configuration (@see BindToJsonPayload)- Returns:
- a new network
-
inspectNetwork
@Named("network:inspect") @GET @Path("/{idOrName}") Network inspectNetwork(@PathParam("idOrName") String networkIdOrName)
Return low-level information on the network id- Parameters:
networkIdOrName
- The id or name of the network to get.- Returns:
- The details of the network or
null
if the network with the given id doesn't exist.
-
removeNetwork
@Named("network:delete") @DELETE @Path("/{idOrName}") void removeNetwork(@PathParam("idOrName") String networkIdOrName)
- Parameters:
networkIdOrName
- The id or name of the network to be removed.
-
connectContainerToNetwork
@Named("network:connectContainer") @POST @Path("/{idOrName}/connect") void connectContainerToNetwork(@PathParam("idOrName") String networkIdOrName, String containerIdOrName)
- Parameters:
networkIdOrName
- The id or name of the network where the container will be attached.
-
disconnectContainerFromNetwork
@Named("network:disconnectContainer") @POST @Path("/{idOrName}/disconnect") void disconnectContainerFromNetwork(@PathParam("idOrName") String networkIdOrName, String containerIdOrName)
- Parameters:
networkIdOrName
- The id or name of the network where the container was attached.
-
-