Examples of privateAddresses()


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

                      .build());
      builder.status(toPortableStatus.apply(container.getState()));
      builder.imageId(container.getImage());
      builder.loginPort(getLoginPort(container));
      builder.publicAddresses(getPublicIpAddresses());
      builder.privateAddresses(getPrivateIpAddresses(container));
      builder.location(Iterables.getOnlyElement(locations.get()));
      Image image = images.get().get(container.getImage());
      builder.imageId(image.getId());
      builder.operatingSystem(image.getOperatingSystem());
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 (from.getStatus() == null)
         System.out.println("status null for: " + from.getId() + ": "
               + from.getName());

      builder.status(vServerToStatus.get(from.getStatus()));
      builder.privateAddresses(ImmutableSet.<String> of());
      builder.publicAddresses(ImmutableSet.<String> of());

      //
      // if (from.getIps() != null) {
      //
View Full Code Here

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

            builder.location(parseLocation(server));
            List<String> ips = Lists.newArrayList();
            if (server.getVnics() != null && server.getVnics().iterator().next().getPrivateIp() != null) {
               ips.add(server.getVnics().iterator().next().getPrivateIp());
            }
            builder.privateAddresses(ips);
         }
      }
      if (from.getTemplate() != null) {
         // when creating a new node
         builder.location(from.getTemplate().getLocation());
View Full Code Here

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

      // TODO build from resource allocation section
      // builder.hardware(findHardwareForVM.apply(from));
      builder.status(VAPPSTATUS_TO_NODESTATE.get(from.getStatus()));
      Set<String> addresses = Utils.getIpsFromVM(from);
      builder.publicAddresses(filter(addresses, not(IsPrivateIPAddress.INSTANCE)));
      builder.privateAddresses(filter(addresses, IsPrivateIPAddress.INSTANCE));
      return builder.build();
   }
}
View Full Code Here

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

      builder.operatingSystem(toComputeOs(from));
      builder.hardware(hardwareForVm.apply(from));
      builder.status(vAppStatusToNodeStatus.get(from.getStatus()));
      Set<String> addresses = getIpsFromVm(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()

      try {
         if (from.getState() == VM.State.RUNNING) {
            Optional<String> ip = from.getPublicAddress();
            if (ip.isPresent()) {
               builder.publicAddresses(ImmutableSet.<String> of(ip.get()));
               builder.privateAddresses(ImmutableSet.<String> of(ip.get()));
            }
         }
      } catch (Exception ex) {
         // None?
      }
View Full Code Here

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

            .slashEncode());
      builder.operatingSystem(findOperatingSystemForMachineOrNull(machineInDatacenter));
      builder.hardware(findHardwareForMachineOrNull(machineInDatacenter));
      builder.status(toPortableNodeStatus.get(from.getState()));
      builder.publicAddresses(filter(from.getIps(), not(InetAddresses2.IsPrivateIPAddress.INSTANCE)));
      builder.privateAddresses(filter(from.getIps(), InetAddresses2.IsPrivateIPAddress.INSTANCE));
      return builder.build();
   }

   protected Hardware findHardwareForMachineOrNull(final MachineInDatacenter machineInDatacenter) {
      return tryFind(hardwares.get(), new Predicate<Hardware>() {
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()

         addressesBuilder.add(instance.getPrivateIpAddress());

      Set<String> addresses = addressesBuilder.build();

      builder.publicAddresses(filter(addresses, not(IsPrivateIPAddress.INSTANCE)));
      builder.privateAddresses(filter(addresses, IsPrivateIPAddress.INSTANCE));
      builder.hardware(parseHardware(instance));
      Location location = getLocationForAvailabilityZoneOrRegion(instance);
      builder.location(location);
      builder.imageId(instance.getRegion() + "/" + instance.getImageId());
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.