@Test public void testStringPortRangetoIntPortArray() { String portRange = "1-100"; int[] intArray = Ints.toArray(ContiguousSet.create(Range.closed(1, 100), DiscreteDomain.integers())); Assert.assertEquals(intArray, JcloudsLocation.toIntPortArray(portRange)); }
@VisibleForTesting static int[] toIntPortArray(Object v) { PortRange portRange = PortRanges.fromIterable(Collections.singletonList(v)); int[] portArray = ArrayUtils.toPrimitive(Iterables.toArray(portRange, Integer.class)); return portArray; }
JcloudsLocation extends AbstractCloudMachineProvisioningLocation implements
        JcloudsLocationConfig, MachineManagementMixins.RichMachineProvisioningLocation<MachineLocation>,
        LocationWithObjectStore, MachineManagementMixins.SuspendResumeLocation { @VisibleForTesting static int[] toIntPortArray(Object v) { PortRange portRange = PortRanges.fromIterable(Collections.singletonList(v)); int[] portArray = ArrayUtils.toPrimitive(Iterables.toArray(portRange, Integer.class)); return portArray; } }
JcloudsLocation extends AbstractCloudMachineProvisioningLocation implements
        JcloudsLocationConfig, MachineManagementMixins.RichMachineProvisioningLocation<MachineLocation>,
        LocationWithObjectStore, MachineManagementMixins.SuspendResumeLocation { @VisibleForTesting static int[] toIntPortArray(Object v) { PortRange portRange = PortRanges.fromIterable(Collections.singletonList(v)); int[] portArray = ArrayUtils.toPrimitive(Iterables.toArray(portRange, Integer.class)); return portArray; } JcloudsLocation();  JcloudsLocation(Map<?,?> conf); }
JcloudsLocation extends AbstractCloudMachineProvisioningLocation implements
        JcloudsLocationConfig, MachineManagementMixins.RichMachineProvisioningLocation<MachineLocation>,
        LocationWithObjectStore, MachineManagementMixins.SuspendResumeLocation { @VisibleForTesting static int[] toIntPortArray(Object v) { PortRange portRange = PortRanges.fromIterable(Collections.singletonList(v)); int[] portArray = ArrayUtils.toPrimitive(Iterables.toArray(portRange, Integer.class)); return portArray; } JcloudsLocation();  JcloudsLocation(Map<?,?> conf); @Override @Deprecated JcloudsLocation configure(Map<?,?> properties); @Override void init(); @Override JcloudsLocation newSubLocation(Map<?,?> newFlags); @Override JcloudsLocation newSubLocation(Class<? extends AbstractCloudMachineProvisioningLocation> type, Map<?,?> newFlags); @Override String toString(); @Override String toVerboseString(); String getProvider(); String getIdentity(); String getCredential(); String getRegion(); String getEndpoint(); String getUser(ConfigBag config); boolean isWindows(Template template, ConfigBag config); boolean isWindows(Image image, ConfigBag config); boolean isWindows(NodeMetadata node, ConfigBag config); boolean isLocationFirewalldEnabled(SshMachineLocation location); void setDefaultImageId(String val); void setTagMapping(Map<String,Map<String, ? extends Object>> val); @Override Map<String,Object> getProvisioningFlags(Collection<String> tags); static final Set<ConfigKey<?>> getAllSupportedProperties(); ComputeService getComputeService(); ComputeService getComputeService(Map<?,?> flags); ComputeService getComputeService(ConfigBag config); @Deprecated Set<? extends ComputeMetadata> listNodes(); @Deprecated Set<? extends ComputeMetadata> listNodes(Map<?,?> flags); @Override Map<String, MachineManagementMixins.MachineMetadata> listMachines(); @Override MachineManagementMixins.MachineMetadata getMachineMetadata(MachineLocation l); @Override void killMachine(String cloudServiceId); @Override void killMachine(MachineLocation l); MachineLocation obtain(); MachineLocation obtain(TemplateBuilder tb); MachineLocation obtain(Map<?,?> flags, TemplateBuilder tb); @Override MachineLocation obtain(Map<?,?> flags); @Override void suspendMachine(MachineLocation rawLocation); @Override MachineLocation resumeMachine(Map<?, ?> flags); Template buildTemplate(ComputeService computeService, ConfigBag config); @Deprecated JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata); @Deprecated JcloudsSshMachineLocation rebindMachine(Map<?,?> flags, NodeMetadata metadata); @Deprecated JcloudsSshMachineLocation rebindMachine(ConfigBag setup); MachineLocation registerMachine(ConfigBag setup); @Deprecated JcloudsSshMachineLocation rebindMachine(Map<?, ?> flags); MachineLocation registerMachine(Map<?,?> flags); @Override void release(MachineLocation rawMachine); static File asFile(Object o); static String fileAsString(Object o); @Override PersistenceObjectStore newPersistenceObjectStore(String container); }
JcloudsLocation extends AbstractCloudMachineProvisioningLocation implements
        JcloudsLocationConfig, MachineManagementMixins.RichMachineProvisioningLocation<MachineLocation>,
        LocationWithObjectStore, MachineManagementMixins.SuspendResumeLocation { @VisibleForTesting static int[] toIntPortArray(Object v) { PortRange portRange = PortRanges.fromIterable(Collections.singletonList(v)); int[] portArray = ArrayUtils.toPrimitive(Iterables.toArray(portRange, Integer.class)); return portArray; } JcloudsLocation();  JcloudsLocation(Map<?,?> conf); @Override @Deprecated JcloudsLocation configure(Map<?,?> properties); @Override void init(); @Override JcloudsLocation newSubLocation(Map<?,?> newFlags); @Override JcloudsLocation newSubLocation(Class<? extends AbstractCloudMachineProvisioningLocation> type, Map<?,?> newFlags); @Override String toString(); @Override String toVerboseString(); String getProvider(); String getIdentity(); String getCredential(); String getRegion(); String getEndpoint(); String getUser(ConfigBag config); boolean isWindows(Template template, ConfigBag config); boolean isWindows(Image image, ConfigBag config); boolean isWindows(NodeMetadata node, ConfigBag config); boolean isLocationFirewalldEnabled(SshMachineLocation location); void setDefaultImageId(String val); void setTagMapping(Map<String,Map<String, ? extends Object>> val); @Override Map<String,Object> getProvisioningFlags(Collection<String> tags); static final Set<ConfigKey<?>> getAllSupportedProperties(); ComputeService getComputeService(); ComputeService getComputeService(Map<?,?> flags); ComputeService getComputeService(ConfigBag config); @Deprecated Set<? extends ComputeMetadata> listNodes(); @Deprecated Set<? extends ComputeMetadata> listNodes(Map<?,?> flags); @Override Map<String, MachineManagementMixins.MachineMetadata> listMachines(); @Override MachineManagementMixins.MachineMetadata getMachineMetadata(MachineLocation l); @Override void killMachine(String cloudServiceId); @Override void killMachine(MachineLocation l); MachineLocation obtain(); MachineLocation obtain(TemplateBuilder tb); MachineLocation obtain(Map<?,?> flags, TemplateBuilder tb); @Override MachineLocation obtain(Map<?,?> flags); @Override void suspendMachine(MachineLocation rawLocation); @Override MachineLocation resumeMachine(Map<?, ?> flags); Template buildTemplate(ComputeService computeService, ConfigBag config); @Deprecated JcloudsSshMachineLocation rebindMachine(NodeMetadata metadata); @Deprecated JcloudsSshMachineLocation rebindMachine(Map<?,?> flags, NodeMetadata metadata); @Deprecated JcloudsSshMachineLocation rebindMachine(ConfigBag setup); MachineLocation registerMachine(ConfigBag setup); @Deprecated JcloudsSshMachineLocation rebindMachine(Map<?, ?> flags); MachineLocation registerMachine(Map<?,?> flags); @Override void release(MachineLocation rawMachine); static File asFile(Object o); static String fileAsString(Object o); @Override PersistenceObjectStore newPersistenceObjectStore(String container); static final Logger LOG; static final String ROOT_USERNAME; static final List<String> ROOT_ALIASES; static final List<String> COMMON_USER_NAMES_TO_TRY; static final Map<ConfigKey<?>,CustomizeTemplateBuilder> SUPPORTED_TEMPLATE_BUILDER_PROPERTIES; static final Map<ConfigKey<?>,CustomizeTemplateOptions> SUPPORTED_TEMPLATE_OPTIONS_PROPERTIES; }