String.format("s3proxy/%s jclouds/%s java/%s", Main.class.getPackage().getImplementationVersion(), JcloudsVersion.get(), System.getProperty("java.version")));
@Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; }
@Override public int run(InputStream in, PrintStream out, PrintStream err, List<String> args) throws Exception { InputStream input = getClass().getResourceAsStream("/version-banner.txt"); if (input == null) { err.printf("Cannot determine version number\n"); return -1; } out.write(IOUtils.toByteArray(input)); out.println("jclouds " + JcloudsVersion.get().toString()); return 0; }
public static Properties defaultProperties() { Properties props = new Properties(); // TODO: move this to ApiMetadata final int numUserThreads = 50; props.setProperty(PROPERTY_ISO3166_CODES, ""); props.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT, 20 + ""); props.setProperty(PROPERTY_MAX_CONNECTIONS_PER_HOST, 0 + ""); props.setProperty(PROPERTY_SO_TIMEOUT, 60000 + ""); props.setProperty(PROPERTY_CONNECTION_TIMEOUT, 60000 + ""); // Successfully tested 50 user threads with BlobStore.clearContainer. props.setProperty(PROPERTY_USER_THREADS, numUserThreads + ""); props.setProperty(PROPERTY_SCHEDULER_THREADS, 10 + ""); props.setProperty(PROPERTY_MAX_CONNECTION_REUSE, 75 + ""); props.setProperty(PROPERTY_MAX_SESSION_FAILURES, 2 + ""); props.setProperty(PROPERTY_SESSION_INTERVAL, 60 + ""); props.setProperty(PROPERTY_PRETTY_PRINT_PAYLOADS, "true"); props.setProperty(PROPERTY_STRIP_EXPECT_HEADER, "false"); props.setProperty(PROPERTY_USER_AGENT, String.format("jclouds/%s java/%s", JcloudsVersion.get(), System.getProperty("java.version"))); props.setProperty(PROPERTY_CONNECTION_CLOSE_HEADER, "false"); // By default, we allow maximum parallel deletes to be equal to the number // of user threads since one thread is used to delete on blob. props.setProperty(PROPERTY_MAX_PARALLEL_DELETES, numUserThreads + ""); props.setProperty(PROPERTY_IDEMPOTENT_METHODS, "DELETE,GET,HEAD,OPTIONS,PUT"); return props; }
public static Properties defaultProperties() { Properties props = new Properties(); // TODO: move this to ApiMetadata final int numUserThreads = 50; props.setProperty(PROPERTY_ISO3166_CODES, ""); props.setProperty(PROPERTY_MAX_CONNECTIONS_PER_CONTEXT, 20 + ""); props.setProperty(PROPERTY_MAX_CONNECTIONS_PER_HOST, 0 + ""); props.setProperty(PROPERTY_SO_TIMEOUT, 60000 + ""); props.setProperty(PROPERTY_CONNECTION_TIMEOUT, 60000 + ""); // Successfully tested 50 user threads with BlobStore.clearContainer. props.setProperty(PROPERTY_USER_THREADS, numUserThreads + ""); props.setProperty(PROPERTY_SCHEDULER_THREADS, 10 + ""); props.setProperty(PROPERTY_MAX_CONNECTION_REUSE, 75 + ""); props.setProperty(PROPERTY_MAX_SESSION_FAILURES, 2 + ""); props.setProperty(PROPERTY_SESSION_INTERVAL, 60 + ""); props.setProperty(PROPERTY_PRETTY_PRINT_PAYLOADS, "true"); props.setProperty(PROPERTY_STRIP_EXPECT_HEADER, "false"); props.setProperty(PROPERTY_USER_AGENT, String.format("jclouds/%s java/%s", JcloudsVersion.get(), System.getProperty("java.version"))); props.setProperty(PROPERTY_CONNECTION_CLOSE_HEADER, "false"); // By default, we allow maximum parallel deletes to be equal to the number // of user threads since one thread is used to delete on blob. props.setProperty(PROPERTY_MAX_PARALLEL_DELETES, numUserThreads + ""); props.setProperty(PROPERTY_IDEMPOTENT_METHODS, "DELETE,GET,HEAD,OPTIONS,PUT"); return props; }
protected Builder() { id("byon") .name("Bring Your Own Node (BYON) API") .identityName("Unused") .defaultIdentity("foo") .defaultCredential("bar") .defaultEndpoint("file://byon.yaml") .documentation(URI.create("https://github.com/jclouds/jclouds/tree/master/apis/byon")) .version(String.format("%s.%s", JcloudsVersion.get().majorVersion, JcloudsVersion.get().minorVersion)) .buildVersion(JcloudsVersion.get().toString()) .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.<Class<? extends Module>>of(YamlNodeStoreModule.class, BYONComputeServiceContextModule.class)); }
protected Builder() { id("byon") .name("Bring Your Own Node (BYON) API") .identityName("Unused") .defaultIdentity("foo") .defaultCredential("bar") .defaultEndpoint("file://byon.yaml") .documentation(URI.create("https://github.com/jclouds/jclouds/tree/master/apis/byon")) .version(String.format("%s.%s", JcloudsVersion.get().majorVersion, JcloudsVersion.get().minorVersion)) .buildVersion(JcloudsVersion.get().toString()) .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.<Class<? extends Module>>of(YamlNodeStoreModule.class, BYONComputeServiceContextModule.class)); }
protected Builder() { id("byon") .name("Bring Your Own Node (BYON) API") .identityName("Unused") .defaultIdentity("foo") .defaultCredential("bar") .defaultEndpoint("file://byon.yaml") .documentation(URI.create("https://github.com/jclouds/jclouds/tree/master/apis/byon")) .version(String.format("%s.%s", JcloudsVersion.get().majorVersion, JcloudsVersion.get().minorVersion)) .buildVersion(JcloudsVersion.get().toString()) .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.<Class<? extends Module>>of(YamlNodeStoreModule.class, BYONComputeServiceContextModule.class)); }
protected Builder() { id("byon") .name("Bring Your Own Node (BYON) API") .identityName("Unused") .defaultIdentity("foo") .defaultCredential("bar") .defaultEndpoint("file://byon.yaml") .documentation(URI.create("https://github.com/jclouds/jclouds/tree/master/apis/byon")) .version(String.format("%s.%s", JcloudsVersion.get().majorVersion, JcloudsVersion.get().minorVersion)) .buildVersion(JcloudsVersion.get().toString()) .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.<Class<? extends Module>>of(YamlNodeStoreModule.class, BYONComputeServiceContextModule.class)); }
protected Builder() { id("byon") .name("Bring Your Own Node (BYON) API") .identityName("Unused") .defaultIdentity("foo") .defaultCredential("bar") .defaultEndpoint("file://byon.yaml") .documentation(URI.create("https://github.com/jclouds/jclouds/tree/master/apis/byon")) .version(String.format("%s.%s", JcloudsVersion.get().majorVersion, JcloudsVersion.get().minorVersion)) .buildVersion(JcloudsVersion.get().toString()) .view(ComputeServiceContext.class) .defaultModules(ImmutableSet.<Class<? extends Module>>of(YamlNodeStoreModule.class, BYONComputeServiceContextModule.class)); }
String.format("s3proxy/%s jclouds/%s java/%s", Main.class.getPackage().getImplementationVersion(), JcloudsVersion.get(), System.getProperty("java.version")));
String.format("s3proxy/%s jclouds/%s java/%s", Main.class.getPackage().getImplementationVersion(), JcloudsVersion.get(), System.getProperty("java.version")));
private String recreateZone(String name) { clearAndDeleteHostedZonesNamed(name); String nonce = name + " @ " + new Date(); String comment = name + " for " + JcloudsVersion.get(); NewHostedZone newHostedZone = api.getHostedZoneApi() .createWithReferenceAndComment(name, nonce, comment); getAnonymousLogger().info("created zone: " + newHostedZone); assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone); return newHostedZone.getZone().getId(); }
private String recreateZone(String name) { clearAndDeleteHostedZonesNamed(name); String nonce = name + " @ " + new Date(); String comment = name + " for " + JcloudsVersion.get(); NewHostedZone newHostedZone = api.getHostedZoneApi() .createWithReferenceAndComment(name, nonce, comment); getAnonymousLogger().info("created zone: " + newHostedZone); assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone); return newHostedZone.getZone().getId(); }
@Test public void testCreateAndDeleteHostedZone() { String name = System.getProperty("user.name").replace('.', '-') + ".zone.route53test.jclouds.org."; String nonce = name + " @ " + new Date(); String comment = name + " for " + JcloudsVersion.get(); NewHostedZone newHostedZone = api().createWithReferenceAndComment(name, nonce, comment); getAnonymousLogger().info("created zone: " + newHostedZone); try { checkHostedZone(newHostedZone.getZone()); assertEquals(newHostedZone.getChange().getStatus(), PENDING, "invalid status on zone " + newHostedZone); assertTrue(!newHostedZone.getNameServers().isEmpty(), "no name servers for zone " + newHostedZone); assertEquals(newHostedZone.getZone().getName(), name); assertEquals(newHostedZone.getZone().getCallerReference(), nonce); assertEquals(newHostedZone.getZone().getComment().get(), comment); assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone); } finally { Change delete = api().delete(newHostedZone.getZone().getId()); assertTrue(inSync.apply(delete), "delete didn't sync " + delete); } }
@Test public void testCreateAndDeleteHostedZone() { String name = System.getProperty("user.name").replace('.', '-') + ".zone.route53test.jclouds.org."; String nonce = name + " @ " + new Date(); String comment = name + " for " + JcloudsVersion.get(); NewHostedZone newHostedZone = api().createWithReferenceAndComment(name, nonce, comment); getAnonymousLogger().info("created zone: " + newHostedZone); try { checkHostedZone(newHostedZone.getZone()); assertEquals(newHostedZone.getChange().getStatus(), PENDING, "invalid status on zone " + newHostedZone); assertTrue(newHostedZone.getNameServers().size() > 0, "no name servers for zone " + newHostedZone); assertEquals(newHostedZone.getZone().getName(), name); assertEquals(newHostedZone.getZone().getCallerReference(), nonce); assertEquals(newHostedZone.getZone().getComment().get(), comment); assertTrue(inSync.apply(newHostedZone.getChange()), "zone didn't sync " + newHostedZone); } finally { Change delete = api().delete(newHostedZone.getZone().getId()); assertTrue(inSync.apply(delete), "delete didn't sync " + delete); } }