@Test @Ignore public void testNetwork() { CreateNetworkCmd createNetworkCmd = new CreateNetworkCmd(); createNetworkCmd.setDriver("overlay"); createNetworkCmd.setName("test-test"); ServiceCallResult network = service.createNetwork(createNetworkCmd); System.out.println(network); }
@Override public CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd) { UriComponentsBuilder ub = makeBaseUrl().pathSegment("networks", "create"); return postAction(ub, createNetworkCmd, CreateNetworkResponse.class, null); }
DockerServiceImpl implements DockerService { @Override public CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd) { UriComponentsBuilder ub = makeBaseUrl().pathSegment("networks", "create"); return postAction(ub, createNetworkCmd, CreateNetworkResponse.class, null); } }
DockerServiceImpl implements DockerService { @Override public CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd) { UriComponentsBuilder ub = makeBaseUrl().pathSegment("networks", "create"); return postAction(ub, createNetworkCmd, CreateNetworkResponse.class, null); } @SuppressWarnings("unchecked")  DockerServiceImpl(Builder b); }
DockerServiceImpl implements DockerService { @Override public CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd) { UriComponentsBuilder ub = makeBaseUrl().pathSegment("networks", "create"); return postAction(ub, createNetworkCmd, CreateNetworkResponse.class, null); } @SuppressWarnings("unchecked")  DockerServiceImpl(Builder b); static Builder builder(); @Override String getId(); @Override String getCluster(); @Override String getNode(); @Override List<DockerContainer> getContainers(GetContainersArg arg); @Override boolean isOnline(); @Override List<ImageItem> getImages(GetImagesArg arg); @Override ServiceCallResult createTag(TagImageArg cmd); @Override ContainerDetails getContainer(String id); @Override ServiceCallResult getStatistics(GetStatisticsArg arg); @Override DockerServiceInfo getInfo(); @Override ServiceCallResult startContainer(String id); @Override ServiceCallResult pauseContainer(String id); @Override ServiceCallResult unpauseContainer(String id); @Override ServiceCallResult getContainerLog(GetLogContainerArg arg); @Override ServiceCallResult stopContainer(StopContainerArg arg); @Override ServiceCallResult subscribeToEvents(GetEventsArg arg); @Override ServiceCallResult restartContainer(StopContainerArg arg); @Override CreateContainerResponse createContainer(CreateContainerCmd cmd); @Override ServiceCallResult updateContainer(UpdateContainerCmd cmd); @Override ServiceCallResult renameContainer(String id, String newName); @Override CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd); @Override Network getNetwork(String id); @Override ServiceCallResult deleteNetwork(String id); @Override PruneNetworksResponse pruneNetworks(PruneNetworksArg arg); @Override ServiceCallResult connectNetwork(ConnectNetworkCmd cmd); @Override ServiceCallResult disconnectNetwork(DisconnectNetworkCmd cmd); @Override List<Network> getNetworks(); @Override ServiceCallResult killContainer(KillContainerArg arg); @Override RemoveImageResult removeImage(RemoveImageArg arg); @Override ServiceCallResult deleteContainer(DeleteContainerArg arg); @Override ImageDescriptor pullImage(String name, final Consumer<ProcessEvent> watcher); @Override ImageDescriptor getImage(String name); @Override String getAddress(); @Override ClusterConfig getClusterConfig(); @Override SwarmInspectResponse getSwarm(); @Override SwarmInitResult initSwarm(SwarmInitCmd cmd); @Override ServiceCallResult joinSwarm(SwarmJoinCmd cmd); @Override ServiceCallResult leaveSwarm(SwarmLeaveArg arg); @Override List<SwarmNode> getNodes(GetNodesArg cmd); @Override ServiceCallResult removeNode(RemoveNodeArg arg); @Override ServiceCallResult updateNode(UpdateNodeCmd cmd); @Override List<Service> getServices(GetServicesArg arg); @Override Service getService(String service); @Override ServiceCreateResult createService(CreateServiceArg arg); @Override ServiceUpdateResult updateService(UpdateServiceArg arg); @Override ServiceCallResult deleteService(String service); @Override List<Task> getTasks(GetTasksArg arg); @Override Task getTask(String taskId); @Override List<Volume> getVolumes(GetVolumesArg arg); @Override Volume createVolume(CreateVolumeCmd cmd); @Override ServiceCallResult removeVolume(RemoveVolumeArg arg); @Override ServiceCallResult deleteUnusedVolumes(DeleteUnusedVolumesArg arg); @Override Volume getVolume(String name); @Override String toString(); }
DockerServiceImpl implements DockerService { @Override public CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd) { UriComponentsBuilder ub = makeBaseUrl().pathSegment("networks", "create"); return postAction(ub, createNetworkCmd, CreateNetworkResponse.class, null); } @SuppressWarnings("unchecked")  DockerServiceImpl(Builder b); static Builder builder(); @Override String getId(); @Override String getCluster(); @Override String getNode(); @Override List<DockerContainer> getContainers(GetContainersArg arg); @Override boolean isOnline(); @Override List<ImageItem> getImages(GetImagesArg arg); @Override ServiceCallResult createTag(TagImageArg cmd); @Override ContainerDetails getContainer(String id); @Override ServiceCallResult getStatistics(GetStatisticsArg arg); @Override DockerServiceInfo getInfo(); @Override ServiceCallResult startContainer(String id); @Override ServiceCallResult pauseContainer(String id); @Override ServiceCallResult unpauseContainer(String id); @Override ServiceCallResult getContainerLog(GetLogContainerArg arg); @Override ServiceCallResult stopContainer(StopContainerArg arg); @Override ServiceCallResult subscribeToEvents(GetEventsArg arg); @Override ServiceCallResult restartContainer(StopContainerArg arg); @Override CreateContainerResponse createContainer(CreateContainerCmd cmd); @Override ServiceCallResult updateContainer(UpdateContainerCmd cmd); @Override ServiceCallResult renameContainer(String id, String newName); @Override CreateNetworkResponse createNetwork(CreateNetworkCmd createNetworkCmd); @Override Network getNetwork(String id); @Override ServiceCallResult deleteNetwork(String id); @Override PruneNetworksResponse pruneNetworks(PruneNetworksArg arg); @Override ServiceCallResult connectNetwork(ConnectNetworkCmd cmd); @Override ServiceCallResult disconnectNetwork(DisconnectNetworkCmd cmd); @Override List<Network> getNetworks(); @Override ServiceCallResult killContainer(KillContainerArg arg); @Override RemoveImageResult removeImage(RemoveImageArg arg); @Override ServiceCallResult deleteContainer(DeleteContainerArg arg); @Override ImageDescriptor pullImage(String name, final Consumer<ProcessEvent> watcher); @Override ImageDescriptor getImage(String name); @Override String getAddress(); @Override ClusterConfig getClusterConfig(); @Override SwarmInspectResponse getSwarm(); @Override SwarmInitResult initSwarm(SwarmInitCmd cmd); @Override ServiceCallResult joinSwarm(SwarmJoinCmd cmd); @Override ServiceCallResult leaveSwarm(SwarmLeaveArg arg); @Override List<SwarmNode> getNodes(GetNodesArg cmd); @Override ServiceCallResult removeNode(RemoveNodeArg arg); @Override ServiceCallResult updateNode(UpdateNodeCmd cmd); @Override List<Service> getServices(GetServicesArg arg); @Override Service getService(String service); @Override ServiceCreateResult createService(CreateServiceArg arg); @Override ServiceUpdateResult updateService(UpdateServiceArg arg); @Override ServiceCallResult deleteService(String service); @Override List<Task> getTasks(GetTasksArg arg); @Override Task getTask(String taskId); @Override List<Volume> getVolumes(GetVolumesArg arg); @Override Volume createVolume(CreateVolumeCmd cmd); @Override ServiceCallResult removeVolume(RemoveVolumeArg arg); @Override ServiceCallResult deleteUnusedVolumes(DeleteUnusedVolumesArg arg); @Override Volume getVolume(String name); @Override String toString();  }