Package org.jclouds.virtualbox.domain

Examples of org.jclouds.virtualbox.domain.NetworkAdapter$Builder


      IsoSpec isoSpec = IsoSpec.builder()
                               .sourcePath(operatingSystemIso)
                               .installationScript(keystrokeSequence)
                               .build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder()
                                                    .networkAttachmentType(NetworkAttachmentType.NAT)
                                                    .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder()
                                                                      .addNetworkAdapter(networkAdapter)
                                                                      .build();
View Full Code Here


    iNetworkAdapter.setBridgedInterface(hostInterface);
    iNetworkAdapter.setEnabled(true);
    machine.saveSettings();

    replay(machine, iNetworkAdapter);
    NetworkAdapter networkAdapter = NetworkAdapter.builder()
        .networkAttachmentType(NetworkAttachmentType.Bridged).build();
    NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard
        .builder().addNetworkAdapter(networkAdapter).build();

    new AttachBridgedAdapterToMachine(networkInterfaceCard).apply(machine);
View Full Code Here

               .attachISO(1, 1, guestAdditionsIso).build();

      VmSpec vmSpec = VmSpec.builder().id(vmId).name(vmName).memoryMB(512).controller(ideController).cleanUpMode(mode)
               .osTypeId("Debian").forceOverwrite(true).build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.NAT)
               .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
               .build();

      NetworkSpec networkSpec = NetworkSpec.builder().addNIC(networkInterfaceCard).build();
View Full Code Here

      this.scriptRunnerFactory = scriptRunnerFactory;
      this.hostSupplier = hostSupplier;
   }

   public NetworkSpec createNetworkSpecWhenVboxIsLocalhost() {
      NetworkAdapter natAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.NAT).build();

      NetworkInterfaceCard natIfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(natAdapter).slot(1L).build();
      NetworkAdapter hostOnlyAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.HostOnly)
            .build();
      // create new hostOnly interface if needed, otherwise use the one already
      // there with dhcp enabled ...
      String hostOnlyIfName = getHostOnlyIfOrCreate();
      NetworkInterfaceCard hostOnlyIfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(hostOnlyAdapter)
View Full Code Here

            .addHostInterfaceName(hostOnlyIfName).slot(0L).build();
      return createNetworkSpecForHostOnlyNATNICs(natIfaceCard, hostOnlyIfaceCard);
   }

   public NetworkInterfaceCard createHostOnlyNIC(long port) {
      NetworkAdapter hostOnlyAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.HostOnly)
            .build();
      // create new hostOnly interface if needed, otherwise use the one already
      // there with dhcp enabled ...
      String hostOnlyIfName = getHostOnlyIfOrCreate();
      return NetworkInterfaceCard.builder().addNetworkAdapter(hostOnlyAdapter).addHostInterfaceName(hostOnlyIfName)
View Full Code Here

      VmSpec vmSpecification = VmSpec.builder().id(currentImage.id).name(vmName).memoryMB(512)
            .osTypeId(getOsTypeId(currentImage.os_family, currentImage.os_64bit)).controller(ideController)
            .forceOverwrite(true).guestUser(currentImage.username).guestPassword(currentImage.credential)
            .cleanUpMode(CleanupMode.Full).build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.NAT)
            .tcpRedirectRule(providerSupplier.get().getHost(), NetworkUtils.MASTER_PORT, "", 22).build();

      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
            .slot(0L).build();
View Full Code Here

      IsoSpec isoSpec = IsoSpec
               .builder()
               .sourcePath(operatingSystemIso)
               .installationScript(keystrokeSequence).build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.NAT)
               .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
               .build();

      NetworkSpec networkSpec = NetworkSpec.builder().addNIC(networkInterfaceCard).build();
View Full Code Here

      IsoSpec isoSpec = IsoSpec
               .builder()
               .sourcePath(operatingSystemIso)
               .installationScript(keystrokeSequence).build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.NAT)
               .tcpRedirectRule("127.0.0.1", 2222, "", 22).build();
      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
               .build();

      NetworkSpec networkSpec = NetworkSpec.builder().addNIC(networkInterfaceCard).build();
View Full Code Here

                                 .autoDelete(true).build()).attachISO(1, 1, guestAdditionsIso).build();

      instanceVmSpec = VmSpec.builder().id(instanceName).name(instanceName).osTypeId("").memoryMB(512)
               .cleanUpMode(CleanupMode.Full).controller(ideController).forceOverwrite(true).build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder()
            .networkAttachmentType(NetworkAttachmentType.HostOnly)
             .build();
      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
            .addHostInterfaceName("vboxnet0").slot(0L).build();
View Full Code Here

      IsoSpec isoSpec = IsoSpec
               .builder()
               .sourcePath(operatingSystemIso)
               .installationScript(keystrokeSequence).build();

      NetworkAdapter networkAdapter = NetworkAdapter.builder().networkAttachmentType(NetworkAttachmentType.HostOnly)
               .build();
      NetworkInterfaceCard networkInterfaceCard =  NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
            .addHostInterfaceName("vboxnet0").slot(0L).build();
      NetworkSpec networkSpec = NetworkSpec.builder().addNIC(networkInterfaceCard).build();
      machineSpec = MasterSpec.builder().iso(isoSpec).vm(instanceVmSpec).network(networkSpec).build();
View Full Code Here

TOP

Related Classes of org.jclouds.virtualbox.domain.NetworkAdapter$Builder

Copyright © 2018 www.massapicom. 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.