Tabnine Logo
Binding.getInternalIP
Code IndexAdd Tabnine to your IDE (free)

How to use
getInternalIP
method
in
org.arquillian.cube.spi.Binding

Best Java code snippets using org.arquillian.cube.spi.Binding.getInternalIP (Showing top 5 results out of 315)

origin: arquillian/arquillian-cube

public void createCubeSystemProperties(@Observes AfterStart afterStart, CubeRegistry cubeRegistry) {
  String cubeId = afterStart.getCubeId();
  final DockerCube cube = cubeRegistry.getCube(cubeId, DockerCube.class);
  final Binding bindings = cube.bindings();
  final String cubePrefix = String.format("%s.%s", PREFIX, cubeId);
  System.setProperty(String.format("%s.ip", cubePrefix), bindings.getIP());
  System.setProperty(String.format("%s.internal.ip", cubePrefix), bindings.getInternalIP());
  for (Binding.PortBinding portBinding : bindings.getPortBindings()) {
    final int exposedPort = portBinding.getExposedPort();
    final Integer boundPort = portBinding.getBindingPort();
    System.setProperty(String.format("%s.port.%d", cubePrefix, exposedPort), boundPort.toString());
  }
}
origin: org.arquillian.cube/arquillian-cube-docker

public void createCubeSystemProperties(@Observes AfterStart afterStart, CubeRegistry cubeRegistry) {
  String cubeId = afterStart.getCubeId();
  final DockerCube cube = cubeRegistry.getCube(cubeId, DockerCube.class);
  final Binding bindings = cube.bindings();
  final String cubePrefix = String.format("%s.%s", PREFIX, cubeId);
  System.setProperty(String.format("%s.ip", cubePrefix), bindings.getIP());
  System.setProperty(String.format("%s.internal.ip", cubePrefix), bindings.getInternalIP());
  for (Binding.PortBinding portBinding : bindings.getPortBindings()) {
    final int exposedPort = portBinding.getExposedPort();
    final Integer boundPort = portBinding.getBindingPort();
    System.setProperty(String.format("%s.port.%d", cubePrefix, exposedPort), boundPort.toString());
  }
}
origin: org.arquillian.cube/arquillian-cube-docker

  private synchronized void containerStarted() {
    final Binding bindings = bindings();
    containerIP = bindings.getIP();
    internalIP = bindings.getInternalIP();
    for (PortBinding portBinding : bindings.getPortBindings()) {
      final int exposedPort = portBinding.getExposedPort();
      final Integer boundPort = portBinding.getBindingPort();
      boundPorts.add(exposedPort);
      if (boundPort != null && containerIP != null) {
        // just overwrite existing entries
        mappedPorts.put(exposedPort, new PortAddressImpl(containerIP, boundPort));
      }
    }
  }
}
origin: arquillian/arquillian-cube

  private synchronized void containerStarted() {
    final Binding bindings = bindings();
    containerIP = bindings.getIP();
    internalIP = bindings.getInternalIP();
    for (PortBinding portBinding : bindings.getPortBindings()) {
      final int exposedPort = portBinding.getExposedPort();
      final Integer boundPort = portBinding.getBindingPort();
      boundPorts.add(exposedPort);
      if (boundPort != null && containerIP != null) {
        // just overwrite existing entries
        mappedPorts.put(exposedPort, new PortAddressImpl(containerIP, boundPort));
      }
    }
  }
}
origin: arquillian/arquillian-cube

@Before
public void setupContainers() {
  when(dockerClientExecutor.getDockerServerIp()).thenReturn("192.168.99.100");
  when(cubeRegistry.getCube("image", DockerCube.class)).thenReturn(dockerCube);
  when(dockerCube.bindings()).thenReturn(binding);
  when(binding.getIP()).thenReturn("192.168.99.100");
  when(binding.getInternalIP()).thenReturn("172.0.10.0");
  when(portBinding.getExposedPort()).thenReturn(8080);
  when(portBinding.getBindingPort()).thenReturn(8080);
  Set<Binding.PortBinding> portBindings = new HashSet<>();
  portBindings.add(portBinding);
  when(binding.getPortBindings()).thenReturn(portBindings);
}
org.arquillian.cube.spiBindinggetInternalIP

Popular methods of Binding

  • <init>
  • addPortBinding
  • getIP
  • getPortBindings

Popular in Java

  • Updating database using SQL prepared statement
  • getSupportFragmentManager (FragmentActivity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • compareTo (BigDecimal)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now