Skip to content
Permalink
Browse files
Remove trailing whitespace
  • Loading branch information
maxlinc authored and gaul committed Jun 27, 2014
1 parent ce3365b commit e9e44825d7eb607a8b2e94cfd17873148ea4d847
Showing 72 changed files with 517 additions and 517 deletions.
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -30,14 +30,14 @@
import com.google.common.io.Closeables;

/**
* To authenticate using jclouds you need to provide your credentials to a Context as in the init() method below.
* Authentication occurs on your first actual interaction with the Rackspace Cloud (i.e. the very first time
* To authenticate using jclouds you need to provide your credentials to a Context as in the init() method below.
* Authentication occurs on your first actual interaction with the Rackspace Cloud (i.e. the very first time
* you call a method that needs to talk to the cloud). Once you are authenticated you receive a token that is
* cached and you won't reauthenticate for subsequent calls. If your token expires before the JVM quits, jclouds
* will automatically handle reauthentication and get a new token for you.
*
*
* If authentication doesn't work, the call will result in an org.jclouds.rest.AuthorizationException
*
*
* This example demostrates how you would authenticate via username and password or API key. The default is
* authentication via API key, which is used in the rest of the examples in this package.
*/
@@ -46,10 +46,10 @@ public class Authentication implements Closeable {

/**
* To get a username and API key see http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key or password
* [Optional] The third argument (args[2]) must be "password" if password authentication is used,
* [Optional] The third argument (args[2]) must be "password" if password authentication is used,
* otherwise default to using API key.
*/
public static void main(String[] args) throws IOException {
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -33,11 +33,11 @@
/**
* This example shows you how to log what jclouds is doing. This is extremely useful for debugging, submitting bug
* reports, getting help, and figuring exactly what the HTTP requests and resonses look like.
*
*
* In this example we use the Simple Logging Facade for Java (SLF4J). The implementation of SLF4J that we'll use is
* Logback so you'll need to download the Logback JARs from http://logback.qos.ch/download.html and put them on your
* classpath.
*
*
* The last key ingredient is the file /jclouds-examples/rackspace/src/main/resources/logback.xml which configures
* the logging. As it is configured right now it will log wire input/output and headers to standard out (STDOUT).
* This means that you will be able to see on your console everything that is sent in the request (marked by ">>")
@@ -48,7 +48,7 @@ public class Logging implements Closeable {

/**
* To get a username and API key see http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/
@@ -77,7 +77,7 @@ public Logging(String username, String apiKey) {
nova = ContextBuilder.newBuilder(provider)
.credentials(username, apiKey)
.modules(modules) // don't forget to add the modules to your context!
.buildApi(NovaApi.class);
.buildApi(NovaApi.class);
}

private void getConfiguredZones() {
@@ -39,7 +39,7 @@ public class SmokeTest {
/**
* To get a username and API key see
* http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -89,7 +89,7 @@ private void autoscaleCleanup() {

if (!(p.getTarget().equals("0") && p.getTargetType().equals(ScalingPolicyTargetType.DESIRED_CAPACITY))) {
System.out.format("Removing servers %n");

// Update policy to 0 servers
CreateScalingPolicy scalingPolicy = CreateScalingPolicy.builder()
.cooldown(3)
@@ -98,10 +98,10 @@ private void autoscaleCleanup() {
.targetType(ScalingPolicyTargetType.DESIRED_CAPACITY)
.target("0")
.build();

pa.update(policyId, scalingPolicy);
Uninterruptibles.sleepUninterruptibly(5, TimeUnit.SECONDS);

try {
pa.execute(policyId);
} catch (Exception e) {
@@ -116,7 +116,7 @@ private void autoscaleCleanup() {
}
}
}

}

/**
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -82,7 +82,7 @@ public CreatePolicy(String username, String apiKey) {
.buildApi(AutoscaleApi.class);

groupApi = autoscaleApi.getGroupApiForZone(ZONE);
}
}

private void createPolicy() {
System.out.format("Create Autoscale Group%n");
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -37,7 +37,7 @@
import com.google.common.util.concurrent.Uninterruptibles;

/**
* This example executes a scaling policy in two ways:
* This example executes a scaling policy in two ways:
* - Authenticated API call using jclouds.
* - Anonymously using just the webhook URL.
*/
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -75,7 +75,7 @@ public class CreateVolumeAndAttach implements Closeable {

/**
* To get a username and API key see http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -41,8 +41,8 @@ public class DeleteSnapshot implements Closeable {
/**
* To get a username and API key see
* http://www.jclouds.org/documentation/quickstart/rackspace/
*
* The first argument (args[0]) must be your username
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/
public static void main(String[] args) throws IOException {
@@ -51,10 +51,10 @@ public static void main(String[] args) throws IOException {
try {
Snapshot snapshot = deleteSnapshot.getSnapshot();
deleteSnapshot.deleteSnapshot(snapshot);
}
}
catch (Exception e) {
e.printStackTrace();
}
}
finally {
deleteSnapshot.close();
}
@@ -82,7 +82,7 @@ private Snapshot getSnapshot() {

private void deleteSnapshot(Snapshot snapshot) throws TimeoutException {
System.out.format("Delete Snapshot%n");

boolean result = snapshotApi.delete(snapshot.getId());

// Wait for the snapshot to be deleted before moving on
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -41,7 +41,7 @@ public class DeleteVolume implements Closeable {
/**
* To get a username and API key see
* http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -70,7 +70,7 @@ public class DetachVolume implements Closeable {
/**
* To get a username and API key see
* http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/
@@ -6,9 +6,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -39,7 +39,7 @@ public class ListSnapshots implements Closeable {
/**
* To get a username and API key see
* http://www.jclouds.org/documentation/quickstart/rackspace/
*
*
* The first argument (args[0]) must be your username
* The second argument (args[1]) must be your API key
*/

0 comments on commit e9e4482

Please sign in to comment.