Package org.jclouds.docker.features
Interface NetworkApi
@Consumes("application/json")
@Path("/v{jclouds.api-version}/networks")
public interface NetworkApi
-
Method Summary
Modifier and TypeMethodDescriptionvoid
connectContainerToNetwork
(String networkIdOrName, String containerIdOrName) createNetwork
(Network network) void
disconnectContainerFromNetwork
(String networkIdOrName, String containerIdOrName) inspectNetwork
(String networkIdOrName) Return low-level information on the network idvoid
removeNetwork
(String networkIdOrName)
-
Method Details
-
listNetworks
- Returns:
- a set of networks
-
createNetwork
- 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.
-