Package org.virtualbox_4_2

Examples of org.virtualbox_4_2.VirtualBoxManager.connect()


  VirtualBoxManager connect() {
    LOGGER.debug("connecting to virtual box remote service");
    VirtualBoxManager vboxMgr = VirtualBoxManager.createInstance(null);
    URL url = virtualBox.getManagerUrl();
    vboxMgr.connect(url.toString(), "user", "pwd");
    LOGGER.debug(
        "connection to virtual box remote service established (Version: {})",
        vboxMgr.getVBox().getVersion());
    return vboxMgr;
  }
View Full Code Here


  @Override
  public synchronized void destroy() throws IOException {
    URL url = virtualBox.getManagerUrl();
    final VirtualBoxManager vboxMgr = VirtualBoxManager
        .createInstance(null);
    vboxMgr.connect(url.toString(), "user", "pwd");
    MacAddress mac = null;
    for (Map.Entry<MacAddress, InterfaceAddress> e : MacAddress
        .getAddresses().entrySet()) {
      if (e.getValue().getAddress()
          .equals(Networking.getPrimaryAddress())) {
View Full Code Here

      HardcodedHostToHostNodeMetadata hardcodedHostToHostNodeMetadata = createMock(HardcodedHostToHostNodeMetadata.class);
      NodeMetadata host = new NodeMetadataBuilder().id("host").status(Status.RUNNING).build();
      URI provider = URI.create("http://localhost:18083/");
      expect(client.seconds(3)).andReturn(client);
      expect(client.apply(HostAndPort.fromParts(provider.getHost(), provider.getPort()))).andReturn(true).anyTimes();
      manager.connect(provider.toASCIIString(), "", "");
      expectLastCall().anyTimes();
      replay(manager, runScriptOnNodeFactory, runScriptOnNode, client);
      new StartVBoxIfNotAlreadyRunning((Function) Functions.constant(manager), runScriptOnNodeFactory, client,
               Suppliers.ofInstance(host), Suppliers.ofInstance(provider), hardcodedHostToHostNodeMetadata).start();
      verify(manager, runScriptOnNodeFactory, client);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.