Examples of privateAddresses()


Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

         if (Throwables2.getFirstThrowableOfType(e, ResourceNotFoundException.class) == null) {
            Throwables.propagateIfPossible(e.getCause());
            throw e;
         }
      }
      return builder.privateAddresses(privateAddresses).publicAddresses(publicAddresses).build();
   }
}
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

      builder.location(location.get());
      builder.imageId(template.getImage().getId());
      builder.operatingSystem(template.getImage().getOperatingSystem());
      builder.status(Status.PENDING);
      builder.publicAddresses(ImmutableSet.<String> of(publicIpPrefix + id));
      builder.privateAddresses(ImmutableSet.<String> of(privateIpPrefix + id));
      builder.credentials(LoginCredentials.builder().user("root").password(passwordPrefix + id).build());
      NodeMetadata node = builder.build();
      nodes.put(node.getId(), node);
      setStateOnNodeAfterDelay(Status.RUNNING, node, 100);
      return new NodeWithInitialCredentials(node);
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

      builder.operatingSystem(toComputeOs(from, null));
      builder.hardware(hardwareForVApp.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      Set<String> addresses = getIpsFromVApp(from);
      builder.publicAddresses(filter(addresses, not(IsPrivateIPAddress.INSTANCE)));
      builder.privateAddresses(filter(addresses, IsPrivateIPAddress.INSTANCE));

      // normally, we don't affect the credential store when reading vApps.
      // However, login user, etc, is actually in the metadata, so lets see
      Credentials fromApi = getCredentialsFrom(from);
      if (fromApi != null && !credentialStore.containsKey("node#" + from.getHref().toASCIIString()))
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

      if (input.getIp() != null) {
         builder.publicAddresses(ImmutableSet.of(input.getIp()));
      }
      if (input.getPrivateIp() != null) {
         builder.privateAddresses(ImmutableSet.of(input.getPrivateIp()));
      }

      // DigitalOcean does not provide a way to get the credentials.
      // Try to return them from the credential store
      Credentials credentials = credentialStore.get("node#" + input.getId());
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

      builder.hardware(hardware);

      // Networking configuration
      Iterable<Ip<?, ?>> nics = vm.listAttachedNics();
      builder.privateAddresses(ips(filter(nics, Predicates.instanceOf(PrivateIp.class))));
      builder.publicAddresses(ips(filter(nics, Predicates.not(Predicates.instanceOf(PrivateIp.class)))));

      // Node state
      VirtualMachineState state = vm.getState();
      builder.status(virtualMachineStateToNodeState.apply(state));
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

         if (Throwables2.getFirstThrowableOfType(e, ResourceNotFoundException.class) == null) {
            Throwables.propagateIfPossible(e.getCause());
            throw e;
         }
      }
      return builder.privateAddresses(privateAddresses).publicAddresses(publicAddresses).build();
   }
}
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

            return Strings.emptyToNull(arg0.getIp());
         }

      }), Predicates.notNull());
      builder.publicAddresses(Iterables.filter(addresses, Predicates.not(IsPrivateIPAddress.INSTANCE)));
      builder.privateAddresses(Iterables.filter(addresses, IsPrivateIPAddress.INSTANCE));
      return builder.build();
   }

   protected OperatingSystem parseOperatingSystem(ServerDetails from) {
      try {
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

      // These are null for 'bad' guest orders in the HALTED state.
      if (from.getPrimaryIpAddress() != null)
         builder.publicAddresses(ImmutableSet.<String> of(from.getPrimaryIpAddress()));
      if (from.getPrimaryBackendIpAddress() != null)
         builder.privateAddresses(ImmutableSet.<String> of(from.getPrimaryBackendIpAddress()));
      return builder.build();
   }

   @Singleton
   public static class GetHardwareForVirtualGuest {
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

         builder.operatingSystem(osBuilder.build());
      }
      builder.hardware(hardwareForVCloudExpressVApp.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      builder.publicAddresses(computeClient.getPublicAddresses(from.getHref()));
      builder.privateAddresses(computeClient.getPrivateAddresses(from.getHref()));
      builder.group(nodeNamingConvention.groupInUniqueNameOrNull(from.getName()));
      builder.credentials(LoginCredentials.fromCredentials(credentialStore
               .get("node#" + from.getHref().toASCIIString())));
      return builder.build();
   }
View Full Code Here

Examples of org.jclouds.compute.domain.NodeMetadataBuilder.privateAddresses()

      if (input.getIp() != null) {
         builder.publicAddresses(ImmutableSet.of(input.getIp()));
      }
      if (input.getPrivateIp() != null) {
         builder.privateAddresses(ImmutableSet.of(input.getPrivateIp()));
      }

      // DigitalOcean does not provide a way to get the credentials.
      // Try to return them from the credential store
      Credentials credentials = credentialStore.get("node#" + input.getId());
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.