@Test public void testValidArgument() { assertThat(isValidArg("foo:169.254.169.254"), is(true)); }
public static boolean isValidArg(String arg) { final String[] args = arg.split(":"); if (args.length != 2) { return false; } final String ip = args[1]; return InetAddresses.isInetAddress(ip); }
AddExtraHostContainerDecorator implements ContainerDecorator { public static boolean isValidArg(String arg) { final String[] args = arg.split(":"); if (args.length != 2) { return false; } final String ip = args[1]; return InetAddresses.isInetAddress(ip); } }
AddExtraHostContainerDecorator implements ContainerDecorator { public static boolean isValidArg(String arg) { final String[] args = arg.split(":"); if (args.length != 2) { return false; } final String ip = args[1]; return InetAddresses.isInetAddress(ip); } AddExtraHostContainerDecorator(final List<String> extraHosts); }
AddExtraHostContainerDecorator implements ContainerDecorator { public static boolean isValidArg(String arg) { final String[] args = arg.split(":"); if (args.length != 2) { return false; } final String ip = args[1]; return InetAddresses.isInetAddress(ip); } AddExtraHostContainerDecorator(final List<String> extraHosts); @Override void decorateHostConfig(final Job job, final Optional<String> dockerVersion,
                                 final HostConfig.Builder hostConfig); @Override void decorateContainerConfig(final Job job, final ImageInfo imageInfo,
                                      final Optional<String> dockerVersion,
                                      final ContainerConfig.Builder containerConfig); static boolean isValidArg(String arg); }
AddExtraHostContainerDecorator implements ContainerDecorator { public static boolean isValidArg(String arg) { final String[] args = arg.split(":"); if (args.length != 2) { return false; } final String ip = args[1]; return InetAddresses.isInetAddress(ip); } AddExtraHostContainerDecorator(final List<String> extraHosts); @Override void decorateHostConfig(final Job job, final Optional<String> dockerVersion,
                                 final HostConfig.Builder hostConfig); @Override void decorateContainerConfig(final Job job, final ImageInfo imageInfo,
                                      final Optional<String> dockerVersion,
                                      final ContainerConfig.Builder containerConfig); static boolean isValidArg(String arg);  }