Package org.jclouds.byon

Examples of org.jclouds.byon.Node$Builder


   @Override
   public Node load(final String id) throws Exception {

      if (id.equals("host")) {
         final Node hostNode = Node.builder().id("host").name("host installing virtualbox").hostname("localhost")
               .osFamily(OsFamily.LINUX.toString()).osDescription(System.getProperty("os.name"))
               .osVersion(System.getProperty("os.version")).group("ssh").username(System.getProperty("user.name"))
               .credentialUrl(privateKeyFile()).build();
         return hostNode;
      }

      final IMachine machine = manager.getVBox().findMachine(id);
      final String ipAddress = iMachineToIpAddress.apply(machine);
      final String osTypeId = machine.getOSTypeId();
      final IGuestOSType guestOSType = manager.getVBox().getGuestOSType(osTypeId);

      final Node node = Node.builder().id(machine.getId()).name(machine.getName())
            .description(machine.getDescription()).loginPort(22).group(System.getProperty(VIRTUALBOX_MACHINE_GROUP))
            .username(System.getProperty(VIRTUALBOX_MACHINE_USERNAME))
            .credential(System.getProperty(VIRTUALBOX_MACHINE_CREDENTIAL))
            .sudoPassword(System.getProperty(VIRTUALBOX_MACHINE_CREDENTIAL))
            .locationId(System.getProperty(VIRTUALBOX_MACHINE_LOCATION)).os64Bit(guestOSType.getIs64Bit())
View Full Code Here


   }

   @Override
   public NodeMetadata getNode(String id) {
     
      Node node = null;
      try {
         node = nodes.get().getUnchecked(id);
      } catch (UncheckedExecutionException e) {

      }
View Full Code Here

   @Override
   public Node load(final String id) throws Exception {

      if (id.equals("host")) {
         final Node hostNode = Node.builder().id("host").name("host installing virtualbox").hostname("localhost")
               .osFamily(OsFamily.LINUX.toString()).osDescription(System.getProperty("os.name"))
               .osVersion(System.getProperty("os.version")).group("ssh").username(System.getProperty("user.name"))
               .credentialUrl(privateKeyFile()).build();
         return hostNode;
      }

      final IMachine machine = manager.getVBox().findMachine(id);
      final String ipAddress = iMachineToIpAddress.apply(machine);
      final String osTypeId = machine.getOSTypeId();
      final IGuestOSType guestOSType = manager.getVBox().getGuestOSType(osTypeId);

      final Node node = Node.builder().id(machine.getId()).name(machine.getName())
            .description(machine.getDescription()).loginPort(22).group(System.getProperty(VIRTUALBOX_MACHINE_GROUP))
            .username(System.getProperty(VIRTUALBOX_MACHINE_USERNAME))
            .credential(System.getProperty(VIRTUALBOX_MACHINE_CREDENTIAL))
            .sudoPassword(System.getProperty(VIRTUALBOX_MACHINE_CREDENTIAL))
            .locationId(System.getProperty(VIRTUALBOX_MACHINE_LOCATION)).os64Bit(guestOSType.getIs64Bit())
View Full Code Here

   }

   @Override
   public NodeMetadata getNode(String id) {
     
      Node node = null;
      try {
         node = nodes.get().getUnchecked(id);
      } catch (UncheckedExecutionException e) {

      }
View Full Code Here

   }

   @Override
   public NodeMetadata getNode(String id) {
     
      Node node = null;
      try {
         node = nodes.get().getUnchecked(id);
      } catch (UncheckedExecutionException e) {

      }
View Full Code Here

   }

   @Override
   public NodeMetadata getNode(String id) {
     
      Node node = null;
      try {
         node = nodes.get().getUnchecked(id);
      } catch (UncheckedExecutionException e) {

      }
View Full Code Here

   }

   @Override
   public NodeMetadata getNode(String id) {

      Node node = null;
      try {
         node = nodes.get().getUnchecked(id);
      } catch (UncheckedExecutionException e) {

      }
View Full Code Here

TOP

Related Classes of org.jclouds.byon.Node$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.