本文整理汇总了Java中com.spotify.docker.client.LogStream.readFully方法的典型用法代码示例。如果您正苦于以下问题:Java LogStream.readFully方法的具体用法?Java LogStream.readFully怎么用?Java LogStream.readFully使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.spotify.docker.client.LogStream
的用法示例。
在下文中一共展示了LogStream.readFully方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRules
import com.spotify.docker.client.LogStream; //导入方法依赖的package包/类
@Given("^added custom flow rules")
public void addRules() throws Exception {
Container mininetContainer = dockerClient.listContainers()
.stream()
.filter(container -> container.image().startsWith(MININET_CONTAINER_PREFIX))
.findFirst().orElseThrow(() -> new IllegalStateException("Floodlight controller should be active"));
final String[] commands = {"ovs-ofctl", "-O", "Openflow13", "add-flow", SWITCH_NAME, RULE};
ExecCreation execCreation = dockerClient.execCreate(mininetContainer.id(), commands,
DockerClient.ExecCreateParam.attachStdout(), DockerClient.ExecCreateParam.attachStderr());
final LogStream output = dockerClient.execStart(execCreation.id());
final String execOutput = output.readFully();
assertTrue(StringUtils.isEmpty(execOutput));
}