You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by ev...@apache.org on 2013/10/24 23:55:11 UTC

git commit: Corrected CentOS and some spelling and formatting errors.

Updated Branches:
  refs/heads/master 3b3278238 -> 0d9920567


Corrected CentOS and some spelling and formatting errors.


Project: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/commit/0d992056
Tree: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/tree/0d992056
Diff: http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/diff/0d992056

Branch: refs/heads/master
Commit: 0d9920567ef5362d28c591a1dc8300850a9d6c7a
Parents: 3b32782
Author: Everett Toews <ev...@rackspace.com>
Authored: Thu Oct 24 08:01:21 2013 -0500
Committer: Everett Toews <ev...@rackspace.com>
Committed: Thu Oct 24 16:55:02 2013 -0500

----------------------------------------------------------------------
 .../cloudblockstorage/CreateVolumeAndAttach.java  |  6 +++---
 .../cloudservers/CloudServersPublish.java         | 18 +++++++++---------
 .../rackspace/cloudservers/CreateServer.java      | 18 +++++++++---------
 3 files changed, 21 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/blob/0d992056/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
----------------------------------------------------------------------
diff --git a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
index 93ddb35..2863005 100644
--- a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
+++ b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudblockstorage/CreateVolumeAndAttach.java
@@ -119,13 +119,13 @@ public class CreateVolumeAndAttach implements Closeable {
    }
 
    private NodeMetadata createServer() throws RunNodesException, TimeoutException {
+      System.out.format("Create Server%n");
+
       Template template = computeService.templateBuilder()
             .locationId(ZONE)
-            .osDescriptionMatches(".*CentOS 6.2.*")
+            .osDescriptionMatches(".*CentOS 6.4.*")
             .minRam(512).build();
 
-      System.out.format("Create Server%n");
-
       Set<? extends NodeMetadata> nodes = computeService.createNodesInGroup(NAME, 1, template);
       NodeMetadata nodeMetadata = nodes.iterator().next();
       String publicAddress = nodeMetadata.getPublicAddresses().iterator().next();

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/blob/0d992056/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
----------------------------------------------------------------------
diff --git a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
index 8c7ae34..81a6764 100644
--- a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
+++ b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CloudServersPublish.java
@@ -96,7 +96,7 @@ public class CloudServersPublish implements Closeable {
 
       Iterable<Module> modules = ImmutableSet.<Module> of(new SshjSshClientModule());
 
-      // These properties control how often jclouds polls for a status udpate
+      // These properties control how often jclouds polls for a status update
       Properties overrides = new Properties();
       overrides.setProperty(POLL_INITIAL_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
       overrides.setProperty(POLL_MAX_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
@@ -110,21 +110,21 @@ public class CloudServersPublish implements Closeable {
    }
 
    private Set<? extends NodeMetadata> createServer() throws RunNodesException, TimeoutException {
+      System.out.format("Create Server%n");
+
       Template template = computeService.templateBuilder()
             .locationId(ZONE)
-            .osDescriptionMatches(".*CentOS 6.2.*")
+            .osDescriptionMatches(".*CentOS 6.4.*")
             .minRam(512)
             .build();
 
-      System.out.format("Create Server");
-
       // This method will continue to poll for the server status and won't return until this server is ACTIVE
       // If you want to know what's happening during the polling, enable logging.
       // See /jclouds-example/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java
       Set<? extends NodeMetadata> nodes = computeService.createNodesInGroup(NAME, numServers, template);
 
       for (NodeMetadata nodeMetadata: nodes) {
-         System.out.format("  ", nodeMetadata);
+         System.out.format("  %s%n", nodeMetadata);
       }
 
       return nodes;
@@ -135,7 +135,7 @@ public class CloudServersPublish implements Closeable {
          String publicAddress = nodeMetadata.getPublicAddresses().iterator().next();
          String privateAddress = nodeMetadata.getPrivateAddresses().iterator().next();
 
-         System.out.format("Configure And Start Webserver%n");
+         System.out.format("  Configure And Start Webserver%n");
 
          awaitSsh(publicAddress);
 
@@ -155,9 +155,9 @@ public class CloudServersPublish implements Closeable {
 
          computeService.runScriptOnNode(nodeMetadata.getId(), script, options);
 
-         System.out.format("  Login: ssh %s@%s%n", nodeMetadata.getCredentials().getUser(), publicAddress);
-         System.out.format("  Password: %s%n", nodeMetadata.getCredentials().getPassword());
-         System.out.format("  Go to http://%s%n", publicAddress);
+         System.out.format("    Login: ssh %s@%s%n", nodeMetadata.getCredentials().getUser(), publicAddress);
+         System.out.format("    Password: %s%n", nodeMetadata.getCredentials().getPassword());
+         System.out.format("    Go to http://%s%n", publicAddress);
       }
    }
 

http://git-wip-us.apache.org/repos/asf/incubator-jclouds-examples/blob/0d992056/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CreateServer.java
----------------------------------------------------------------------
diff --git a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CreateServer.java b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CreateServer.java
index 5b92190..9b62fe1 100644
--- a/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CreateServer.java
+++ b/rackspace/src/main/java/org/jclouds/examples/rackspace/cloudservers/CreateServer.java
@@ -68,7 +68,7 @@ public class CreateServer implements Closeable {
    }
 
    public CreateServer(String username, String apiKey) {
-      // These properties control how often jclouds polls for a status udpate
+      // These properties control how often jclouds polls for a status update
       Properties overrides = new Properties();
       overrides.setProperty(POLL_INITIAL_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
       overrides.setProperty(POLL_MAX_PERIOD, POLL_PERIOD_TWENTY_SECONDS);
@@ -93,14 +93,14 @@ public class CreateServer implements Closeable {
     *     .build();
     */
    private void createServer() throws RunNodesException, TimeoutException {
+      System.out.format("Create Server%n");
+
       Template template = computeService.templateBuilder()
             .locationId(getLocationId())
             .fromHardware(getHardware())
             .fromImage(getImage())
             .build();
 
-      System.out.format("Create Server%n");
-
       // This method will continue to poll for the server status and won't return until this server is ACTIVE
       // If you want to know what's happening during the polling, enable logging. See
       // /jclouds-example/rackspace/src/main/java/org/jclouds/examples/rackspace/Logging.java
@@ -120,12 +120,12 @@ public class CreateServer implements Closeable {
     * @return The first available Location
     */
    private String getLocationId() {
-      System.out.format("Locations%n");
+      System.out.format("  Locations%n");
 
       Set<? extends Location> locations = computeService.listAssignableLocations();
 
       for (Location location: locations) {
-         System.out.format("  %s%n", location);
+         System.out.format("    %s%n", location);
       }
 
       return locations.iterator().next().getId();
@@ -137,13 +137,13 @@ public class CreateServer implements Closeable {
     * @return The Hardware with 512 MB of RAM
     */
    private Hardware getHardware() {
-      System.out.format("Hardware Profiles (Flavors)%n");
+      System.out.format("  Hardware Profiles (Flavors)%n");
 
       Set<? extends Hardware> profiles = computeService.listHardwareProfiles();
       Hardware result = null;
 
       for (Hardware profile: profiles) {
-         System.out.format("  %s%n", profile);
+         System.out.format("    %s%n", profile);
          if (profile.getRam() == 512) {
             result = profile;
          }
@@ -163,13 +163,13 @@ public class CreateServer implements Closeable {
     * @return An Ubuntu 12.04 Image 
     */
    private Image getImage() {
-      System.out.format("Images%n");
+      System.out.format("  Images%n");
 
       Set<? extends Image> images = computeService.listImages();
       Image result = null;
 
       for (Image image: images) {
-         System.out.format("  %s%n", image);
+         System.out.format("    %s%n", image);
          if (image.getOperatingSystem().getName().equals("Ubuntu 12.04 LTS (Precise Pangolin)")) {
             result = image;
          }