Skip to content
Permalink
Browse files
Included The Examples section in README.md. Included reference to Rac…
…kspace open cloud UK in comments.
  • Loading branch information
Everett Toews committed Oct 3, 2012
1 parent 6075200 commit 1791b92651b720ce6ed63d65e017913f9fa9e717
Show file tree
Hide file tree
Showing 14 changed files with 47 additions and 14 deletions.
@@ -33,6 +33,24 @@ SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
```

## The Examples

Start with the [rackspace package](https://github.com/jclouds/jclouds-examples/tree/master/rackspace/src/main/java/org/jclouds/examples/rackspace). There you will find general purpose examples of things that are useful across all services.

* [Logging](https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java) - How to enable and configure logging
* [Authentication](https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/Authentication.java) - How you can use your credentials to authenticate with the Rackspace open cloud

The [cloudfiles package](https://github.com/jclouds/jclouds-examples/tree/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudfiles) demonstrates how to accomplish common tasks for putting files in and getting files from the cloud.

* [CloudFilesPublish](https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudfiles/CloudFilesPublish.java) - An end to end example of publishing a file on the internet with Cloud Files.
* Other examples of creating, updating, listing, and deleting containers/objects.

The [cloudservers package](https://github.com/jclouds/jclouds-examples/tree/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers) demonstrates how to accomplish common tasks for working with servers in the cloud.

* [CloudServersPublish](https://github.com/jclouds/jclouds-examples/blob/master/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java) - An end to end example of publishing a web page on the internet with Cloud Servers.
* Other examples of creating, manipulating, listing and deleting servers.


## Command Line
To run these examples from the command line follow these instructions.

@@ -68,7 +68,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];
@@ -69,7 +69,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];
@@ -48,6 +48,8 @@ public class CloudFilesPublish {
private CloudFilesClient rackspace;

/**
* 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
*/
@@ -69,7 +71,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "cloudfiles-uk"
String provider = "cloudfiles-us";

String username = args[0];
@@ -58,7 +58,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "cloudfiles-uk"
String provider = "cloudfiles-us";

String username = args[0];
@@ -69,7 +69,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "cloudfiles-uk"
String provider = "cloudfiles-us";

String username = args[0];
@@ -61,7 +61,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "cloudfiles-uk"
String provider = "cloudfiles-us";

String username = args[0];
@@ -56,7 +56,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "cloudfiles-uk"
String provider = "cloudfiles-us";

String username = args[0];
@@ -60,7 +60,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "cloudfiles-uk"
String provider = "cloudfiles-us";

String username = args[0];
@@ -83,7 +83,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];
@@ -195,7 +196,7 @@ protected void blockUntilServerInState(String serverId, Status status,
* @return The Flavor Id with 512 MB of RAM
*/
private String getFlavorId() {
System.out.println("Hardware Profiles (Flavors)");
System.out.println("Flavors");

FlavorApi flavorApi = nova.getApi().getFlavorApiForZone(ZONE);
FluentIterable<? extends Flavor> flavors = flavorApi.listInDetail().concat();
@@ -73,7 +73,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];
@@ -60,7 +60,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];
@@ -60,7 +60,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];
@@ -69,7 +69,8 @@ public static void main(String[] args) {
}

private void init(String[] args) {
// The provider configures jclouds to use the Rackspace open cloud
// The provider configures jclouds to use the Rackspace open cloud (US)
// to use the Rackspace open cloud (UK) set the provider to "rackspace-cloudservers-uk"
String provider = "rackspace-cloudservers-us";

String username = args[0];

0 comments on commit 1791b92

Please sign in to comment.