commit f8be9ccef05bf7f8ed20aa78ef8201d722d5ab7a
Author: Phillip Toohill <dead2hill@gmail.com>
Date:   Thu Jun 17 16:09:08 2010 -0500

    test commit

diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/Addresses.java b/main/java/net/elasticgrid/rackspace/cloudservers/Addresses.java
index 56a1a09..a350825 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/Addresses.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/Addresses.java
@@ -1,74 +1,74 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import net.elasticgrid.rackspace.cloudservers.internal.Public;
-import net.elasticgrid.rackspace.cloudservers.internal.Private;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.List;
-import java.util.ArrayList;
-
-/**
- * Addresses are either public or private.
- * @author Jerome Bernard
- */
-public class Addresses implements Serializable {
-    private final List<InetAddress> publicAddresses;
-    private final List<InetAddress> privateAddresses;
-
-    public Addresses(List<InetAddress> publicAddresses, List<InetAddress> privateAddresses) {
-        this.publicAddresses = publicAddresses;
-        this.privateAddresses = privateAddresses;
-    }
-
-    public Addresses(net.elasticgrid.rackspace.cloudservers.internal.Addresses addresses) throws UnknownHostException {
-        // populate public addresses list
-        Public publicAddresses = addresses.getPublic();
-        this.publicAddresses = new ArrayList<InetAddress>(publicAddresses.getAddressLists().size());
-        for (net.elasticgrid.rackspace.cloudservers.internal.Address address : publicAddresses.getAddressLists()) {
-            this.publicAddresses.add(InetAddress.getByName(address.getAddr()));
-        }
-        // populate private addresses list
-        Private privateAddresses = addresses.getPrivate();
-        this.privateAddresses = new ArrayList<InetAddress>(privateAddresses.getAddressLists().size());
-        for (net.elasticgrid.rackspace.cloudservers.internal.Address address : privateAddresses.getAddressLists()) {
-            this.privateAddresses.add(InetAddress.getByName(address.getAddr()));
-        }
-    }
-
-    public List<InetAddress> getPublicAddresses() {
-        return publicAddresses;
-    }
-
-    public List<InetAddress> getPrivateAddresses() {
-        return privateAddresses;
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("Addresses");
-        sb.append("{publicAddresses=").append(publicAddresses);
-        sb.append(", privateAddresses=").append(privateAddresses);
-        sb.append('}');
-        return sb.toString();
-    }
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import net.elasticgrid.rackspace.cloudservers.internal.Public;
+import net.elasticgrid.rackspace.cloudservers.internal.Private;
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Addresses are either public or private.
+ * @author Jerome Bernard
+ */
+public class Addresses implements Serializable {
+    private final List<InetAddress> publicAddresses;
+    private final List<InetAddress> privateAddresses;
+
+    public Addresses(List<InetAddress> publicAddresses, List<InetAddress> privateAddresses) {
+        this.publicAddresses = publicAddresses;
+        this.privateAddresses = privateAddresses;
+    }
+
+    public Addresses(net.elasticgrid.rackspace.cloudservers.internal.Addresses addresses) throws UnknownHostException {
+        // populate public addresses list
+        Public publicAddresses = addresses.getPublic();
+        this.publicAddresses = new ArrayList<InetAddress>(publicAddresses.getAddressLists().size());
+        for (net.elasticgrid.rackspace.cloudservers.internal.Address address : publicAddresses.getAddressLists()) {
+            this.publicAddresses.add(InetAddress.getByName(address.getAddr()));
+        }
+        // populate private addresses list
+        Private privateAddresses = addresses.getPrivate();
+        this.privateAddresses = new ArrayList<InetAddress>(privateAddresses.getAddressLists().size());
+        for (net.elasticgrid.rackspace.cloudservers.internal.Address address : privateAddresses.getAddressLists()) {
+            this.privateAddresses.add(InetAddress.getByName(address.getAddr()));
+        }
+    }
+
+    public List<InetAddress> getPublicAddresses() {
+        return publicAddresses;
+    }
+
+    public List<InetAddress> getPrivateAddresses() {
+        return privateAddresses;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("Addresses");
+        sb.append("{publicAddresses=").append(publicAddresses);
+        sb.append(", privateAddresses=").append(privateAddresses);
+        sb.append('}');
+        return sb.toString();
+    }
 }
\ No newline at end of file
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/BackupSchedule.java b/main/java/net/elasticgrid/rackspace/cloudservers/BackupSchedule.java
index 5d5caf9..107efef 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/BackupSchedule.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/BackupSchedule.java
@@ -1,78 +1,78 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import java.io.Serializable;
-
-/**
- * Server backup schedule.
- *
- * @author Jerome Bernard
- */
-public class BackupSchedule implements Serializable {
-    private boolean enabled;
-    private WeeklyBackup weekly;
-    private DailyBackup daily;
-
-    public BackupSchedule(boolean enabled, WeeklyBackup weekly, DailyBackup daily) {
-        this.enabled = enabled;
-        this.weekly = weekly;
-        this.daily = daily;
-    }
-
-    public boolean isEnabled() {
-        return enabled;
-    }
-
-    public WeeklyBackup getWeekly() {
-        return weekly;
-    }
-
-    public DailyBackup getDaily() {
-        return daily;
-    }
-
-    public enum WeeklyBackup implements Serializable {
-        DISABLED("DISABLED"), SUNDAY("SUNDAY"), MONDAY("MONDAY"), TUESDAY("TUESDAY"),
-        WEDNESDAY("WEDNESDAY"), THURSDAY("THURSDAY"), FRIDAY("FRIDAY"),
-        SATURDAY("SATURDAY"), SUNDAY1("SUNDAY");
-        private final String value;
-
-        private WeeklyBackup(String value) {
-            this.value = value;
-        }
-    }
-
-    public enum DailyBackup implements Serializable {
-        DISABLED, H_0000_0200, H_0200_0400, H_0400_0600, H_0600_0800, H_0800_1000,
-        H_1000_1200, H_1200_1400, H_1400_1600, H_1600_1800, H_1800_2000,
-        H_2000_2200, H_2200_0000
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("BackupSchedule");
-        sb.append("{enabled=").append(enabled);
-        sb.append(", weekly=").append(weekly);
-        sb.append(", daily=").append(daily);
-        sb.append('}');
-        return sb.toString();
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import java.io.Serializable;
+
+/**
+ * Server backup schedule.
+ *
+ * @author Jerome Bernard
+ */
+public class BackupSchedule implements Serializable {
+    private boolean enabled;
+    private WeeklyBackup weekly;
+    private DailyBackup daily;
+
+    public BackupSchedule(boolean enabled, WeeklyBackup weekly, DailyBackup daily) {
+        this.enabled = enabled;
+        this.weekly = weekly;
+        this.daily = daily;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public WeeklyBackup getWeekly() {
+        return weekly;
+    }
+
+    public DailyBackup getDaily() {
+        return daily;
+    }
+
+    public enum WeeklyBackup implements Serializable {
+        DISABLED("DISABLED"), SUNDAY("SUNDAY"), MONDAY("MONDAY"), TUESDAY("TUESDAY"),
+        WEDNESDAY("WEDNESDAY"), THURSDAY("THURSDAY"), FRIDAY("FRIDAY"),
+        SATURDAY("SATURDAY"), SUNDAY1("SUNDAY");
+        private final String value;
+
+        private WeeklyBackup(String value) {
+            this.value = value;
+        }
+    }
+
+    public enum DailyBackup implements Serializable {
+        DISABLED, H_0000_0200, H_0200_0400, H_0400_0600, H_0600_0800, H_0800_1000,
+        H_1000_1200, H_1200_1400, H_1400_1600, H_1600_1800, H_1800_2000,
+        H_2000_2200, H_2200_0000
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("BackupSchedule");
+        sb.append("{enabled=").append(enabled);
+        sb.append(", weekly=").append(weekly);
+        sb.append(", daily=").append(daily);
+        sb.append('}');
+        return sb.toString();
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/CloudServersException.java b/main/java/net/elasticgrid/rackspace/cloudservers/CloudServersException.java
index 3e80f1a..2c71aca 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/CloudServersException.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/CloudServersException.java
@@ -1,40 +1,40 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import net.elasticgrid.rackspace.common.RackspaceException;
-
-/**
- * A wrapper exception to simplify catching errors related to Rackspace Cloud Servers activity.
- *
- * @author Jerome Bernard
- */
-public class CloudServersException extends RackspaceException {
-    public CloudServersException(String message) {
-        super(message);
-    }
-
-    public CloudServersException(Throwable cause) {
-        super(cause);
-    }
-
-    public CloudServersException(String message, Throwable cause) {
-        super(message, cause);
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import net.elasticgrid.rackspace.common.RackspaceException;
+
+/**
+ * A wrapper exception to simplify catching errors related to Rackspace Cloud Servers activity.
+ *
+ * @author Jerome Bernard
+ */
+public class CloudServersException extends RackspaceException {
+    public CloudServersException(String message) {
+        super(message);
+    }
+
+    public CloudServersException(Throwable cause) {
+        super(cause);
+    }
+
+    public CloudServersException(String message, Throwable cause) {
+        super(message, cause);
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/File.java b/main/java/net/elasticgrid/rackspace/cloudservers/File.java
index 5ff1cb2..b9ff558 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/File.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/File.java
@@ -1,43 +1,43 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import java.io.Serializable;
-
-/**
- * File description.
- * @author Jerome Bernard
- */
-public class File implements Serializable {
-    private final String path;
-    private final byte[] base64Binary;
-
-    public File(String path, byte[] base64Binary) {
-        this.path = path;
-        this.base64Binary = base64Binary;
-    }
-
-    public String getPath() {
-        return path;
-    }
-
-    public byte[] getBase64Binary() {
-        return base64Binary;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import java.io.Serializable;
+
+/**
+ * File description.
+ * @author Jerome Bernard
+ */
+public class File implements Serializable {
+    private final String path;
+    private final byte[] base64Binary;
+
+    public File(String path, byte[] base64Binary) {
+        this.path = path;
+        this.base64Binary = base64Binary;
+    }
+
+    public String getPath() {
+        return path;
+    }
+
+    public byte[] getBase64Binary() {
+        return base64Binary;
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/Flavor.java b/main/java/net/elasticgrid/rackspace/cloudservers/Flavor.java
index 2666a88..68411f3 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/Flavor.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/Flavor.java
@@ -1,67 +1,67 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import java.io.Serializable;
-
-/**
- * Hardware configuration for a server.
- * @author Jerome Bernard 
- */
-public class Flavor implements Serializable {
-    private final int id;
-    private final String name;
-    private final Integer ram;
-    private final Integer disk;
-
-    public Flavor(int id, String name, Integer ram, Integer disk) {
-        this.id = id;
-        this.name = name;
-        this.ram = ram;
-        this.disk = disk;
-    }
-
-    public int getId() {
-        return id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public Integer getRam() {
-        return ram;
-    }
-
-    public Integer getDisk() {
-        return disk;
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("Flavor");
-        sb.append("{id=").append(id);
-        sb.append(", name='").append(name).append('\'');
-        sb.append(", ram=").append(ram);
-        sb.append(", disk=").append(disk);
-        sb.append('}');
-        return sb.toString();
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import java.io.Serializable;
+
+/**
+ * Hardware configuration for a server.
+ * @author Jerome Bernard 
+ */
+public class Flavor implements Serializable {
+    private final int id;
+    private final String name;
+    private final Integer ram;
+    private final Integer disk;
+
+    public Flavor(int id, String name, Integer ram, Integer disk) {
+        this.id = id;
+        this.name = name;
+        this.ram = ram;
+        this.disk = disk;
+    }
+
+    public int getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Integer getRam() {
+        return ram;
+    }
+
+    public Integer getDisk() {
+        return disk;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("Flavor");
+        sb.append("{id=").append(id);
+        sb.append(", name='").append(name).append('\'');
+        sb.append(", ram=").append(ram);
+        sb.append(", disk=").append(disk);
+        sb.append('}');
+        return sb.toString();
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/HTTPVerb.java b/main/java/net/elasticgrid/rackspace/cloudservers/HTTPVerb.java
index 78c2894..1226cc6 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/HTTPVerb.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/HTTPVerb.java
@@ -1,29 +1,29 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import java.io.Serializable;
-
-/**
- * Enum for HTTP Verb (mostly used by the /limits API call)
- * @author Jerome Bernard
- */
-public enum HTTPVerb implements Serializable {
-    POST, PUT, GET, DELETE, HEAD
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import java.io.Serializable;
+
+/**
+ * Enum for HTTP Verb (mostly used by the /limits API call)
+ * @author Jerome Bernard
+ */
+public enum HTTPVerb implements Serializable {
+    POST, PUT, GET, DELETE, HEAD
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/Image.java b/main/java/net/elasticgrid/rackspace/cloudservers/Image.java
index 631ed5d..6097175 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/Image.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/Image.java
@@ -1,94 +1,94 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * Image: collection of files used to create or rebuild a server.
- *
- * @author Jerome Bernard
- */
-public class Image implements Serializable {
-    private final Integer id;
-    private final String name;
-    private final Integer serverId;
-    private final Date updated;
-    private final Date created;
-    private final Integer progress;
-    private final Status status;
-
-    public Image(Integer id, String name, Integer serverId, Date updated, Date created, Integer progress, Status status) {
-        this.id = id;
-        this.name = name;
-        this.serverId = serverId;
-        this.updated = updated;
-        this.created = created;
-        this.progress = progress;
-        this.status = status;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public Integer getServerId() {
-        return serverId;
-    }
-
-    public Date getUpdated() {
-        return updated;
-    }
-
-    public Date getCreated() {
-        return created;
-    }
-
-    public Integer getProgress() {
-        return progress;
-    }
-
-    public Status getStatus() {
-        return status;
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("Image");
-        sb.append("{id=").append(id);
-        sb.append(", name='").append(name).append('\'');
-        sb.append(", serverId=").append(serverId);
-        sb.append(", updated=").append(updated);
-        sb.append(", created=").append(created);
-        sb.append(", progress=").append(progress);
-        sb.append(", status=").append(status);
-        sb.append('}');
-        return sb.toString();
-    }
-
-    enum Status implements Serializable {
-        UNKNOWN, ACTIVE, SAVING, PREPARING, QUEUED, FAILED
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Image: collection of files used to create or rebuild a server.
+ *
+ * @author Jerome Bernard
+ */
+public class Image implements Serializable {
+    private final Integer id;
+    private final String name;
+    private final Integer serverId;
+    private final Date updated;
+    private final Date created;
+    private final Integer progress;
+    private final Status status;
+
+    public Image(Integer id, String name, Integer serverId, Date updated, Date created, Integer progress, Status status) {
+        this.id = id;
+        this.name = name;
+        this.serverId = serverId;
+        this.updated = updated;
+        this.created = created;
+        this.progress = progress;
+        this.status = status;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public Integer getServerId() {
+        return serverId;
+    }
+
+    public Date getUpdated() {
+        return updated;
+    }
+
+    public Date getCreated() {
+        return created;
+    }
+
+    public Integer getProgress() {
+        return progress;
+    }
+
+    public Status getStatus() {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("Image");
+        sb.append("{id=").append(id);
+        sb.append(", name='").append(name).append('\'');
+        sb.append(", serverId=").append(serverId);
+        sb.append(", updated=").append(updated);
+        sb.append(", created=").append(created);
+        sb.append(", progress=").append(progress);
+        sb.append(", status=").append(status);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    enum Status implements Serializable {
+        UNKNOWN, ACTIVE, SAVING, PREPARING, QUEUED, FAILED
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/Limits.java b/main/java/net/elasticgrid/rackspace/cloudservers/Limits.java
index 01474a7..223a6f6 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/Limits.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/Limits.java
@@ -1,140 +1,140 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import java.io.*;
-import java.util.*;
-
-/**
- * Rackspace API limits.
- * @author Jerome Bernard
- */
-public class Limits implements Serializable {
-    private final List<RateLimit> rateLimits;
-    private final List<AbsoluteLimit> absoluteLimits;
-
-    public Limits(List<RateLimit> rateLimits, List<AbsoluteLimit> absoluteLimits) {
-        this.rateLimits = Collections.unmodifiableList(rateLimits);
-        this.absoluteLimits = Collections.unmodifiableList(absoluteLimits);
-    }
-
-    public List<RateLimit> getRateLimits() {
-        return rateLimits;
-    }
-
-    public List<AbsoluteLimit> getAbsoluteLimits() {
-        return absoluteLimits;
-    }
-
-}
-
-class RateLimit implements Serializable {
-    private final HTTPVerb verb;
-    private final String URI;
-    private final String regex;
-    private final int value;
-    private final int remaining;
-    private final RateLimit.Unit unit;
-    private final long resetTime;
-
-    RateLimit(HTTPVerb verb, String URI, String regex, int value, int remaining, RateLimit.Unit unit, long resetTime) {
-        this.verb = verb;
-        this.URI = URI;
-        this.regex = regex;
-        this.value = value;
-        this.remaining = remaining;
-        this.unit = unit;
-        this.resetTime = resetTime;
-    }
-
-    public HTTPVerb getVerb() {
-        return verb;
-    }
-
-    public String getURI() {
-        return URI;
-    }
-
-    public String getRegex() {
-        return regex;
-    }
-
-    public int getValue() {
-        return value;
-    }
-
-    public int getRemaining() {
-        return remaining;
-    }
-
-    public RateLimit.Unit getUnit() {
-        return unit;
-    }
-
-    public long getResetTime() {
-        return resetTime;
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("RateLimit");
-        sb.append("{verb=").append(verb);
-        sb.append(", URI='").append(URI).append('\'');
-        sb.append(", regex='").append(regex).append('\'');
-        sb.append(", value=").append(value);
-        sb.append(", remaining=").append(remaining);
-        sb.append(", unit=").append(unit);
-        sb.append(", resetTime=").append(resetTime);
-        sb.append('}');
-        return sb.toString();
-    }
-
-    enum Unit implements Serializable {
-        MINUTE, HOUR, DAY
-    }
-}
-
-class AbsoluteLimit implements Serializable {
-    private final String name;
-    private final int value;
-
-    public AbsoluteLimit(String name, int value) {
-        this.name = name;
-        this.value = value;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public int getValue() {
-        return value;
-    }
-
-    @Override
-    public String toString() {
-        final StringBuilder sb = new StringBuilder();
-        sb.append("AbsoluteLimit");
-        sb.append("{name='").append(name).append('\'');
-        sb.append(", value=").append(value);
-        sb.append('}');
-        return sb.toString();
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import java.io.*;
+import java.util.*;
+
+/**
+ * Rackspace API limits.
+ * @author Jerome Bernard
+ */
+public class Limits implements Serializable {
+    private final List<RateLimit> rateLimits;
+    private final List<AbsoluteLimit> absoluteLimits;
+
+    public Limits(List<RateLimit> rateLimits, List<AbsoluteLimit> absoluteLimits) {
+        this.rateLimits = Collections.unmodifiableList(rateLimits);
+        this.absoluteLimits = Collections.unmodifiableList(absoluteLimits);
+    }
+
+    public List<RateLimit> getRateLimits() {
+        return rateLimits;
+    }
+
+    public List<AbsoluteLimit> getAbsoluteLimits() {
+        return absoluteLimits;
+    }
+
+}
+
+class RateLimit implements Serializable {
+    private final HTTPVerb verb;
+    private final String URI;
+    private final String regex;
+    private final int value;
+    private final int remaining;
+    private final RateLimit.Unit unit;
+    private final long resetTime;
+
+    RateLimit(HTTPVerb verb, String URI, String regex, int value, int remaining, RateLimit.Unit unit, long resetTime) {
+        this.verb = verb;
+        this.URI = URI;
+        this.regex = regex;
+        this.value = value;
+        this.remaining = remaining;
+        this.unit = unit;
+        this.resetTime = resetTime;
+    }
+
+    public HTTPVerb getVerb() {
+        return verb;
+    }
+
+    public String getURI() {
+        return URI;
+    }
+
+    public String getRegex() {
+        return regex;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    public int getRemaining() {
+        return remaining;
+    }
+
+    public RateLimit.Unit getUnit() {
+        return unit;
+    }
+
+    public long getResetTime() {
+        return resetTime;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("RateLimit");
+        sb.append("{verb=").append(verb);
+        sb.append(", URI='").append(URI).append('\'');
+        sb.append(", regex='").append(regex).append('\'');
+        sb.append(", value=").append(value);
+        sb.append(", remaining=").append(remaining);
+        sb.append(", unit=").append(unit);
+        sb.append(", resetTime=").append(resetTime);
+        sb.append('}');
+        return sb.toString();
+    }
+
+    enum Unit implements Serializable {
+        MINUTE, HOUR, DAY
+    }
+}
+
+class AbsoluteLimit implements Serializable {
+    private final String name;
+    private final int value;
+
+    public AbsoluteLimit(String name, int value) {
+        this.name = name;
+        this.value = value;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public int getValue() {
+        return value;
+    }
+
+    @Override
+    public String toString() {
+        final StringBuilder sb = new StringBuilder();
+        sb.append("AbsoluteLimit");
+        sb.append("{name='").append(name).append('\'');
+        sb.append(", value=").append(value);
+        sb.append('}');
+        return sb.toString();
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/Personality.java b/main/java/net/elasticgrid/rackspace/cloudservers/Personality.java
index b954408..c62aa7e 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/Personality.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/Personality.java
@@ -1,54 +1,54 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import net.elasticgrid.rackspace.cloudservers.internal.*;
-import java.io.Serializable;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Collections;
-
-/**
- * @author Jerome Bernard
- */
-public class Personality implements Serializable {
-    private final List<File> files;
-
-    public Personality(List<File> files) {
-        this.files = files;
-    }
-
-    public Personality(final net.elasticgrid.rackspace.cloudservers.internal.Personality personality) {
-        this(personalitiesAsFileList(personality));
-    }
-
-    private static List<File> personalitiesAsFileList(final net.elasticgrid.rackspace.cloudservers.internal.Personality personality) {
-        if (personality == null || personality.getPersonalities() == null)
-            return Collections.emptyList();
-        List<File> files = new ArrayList<File>(personality.getPersonalities().size());
-        for (net.elasticgrid.rackspace.cloudservers.internal.File file : personality.getPersonalities()) {
-            files.add(new File(file.getPath(), file.getBase64Binary()));
-        }
-        return files;
-    }
-
-    public List<File> getFiles() {
-        return files;
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import net.elasticgrid.rackspace.cloudservers.internal.*;
+import java.io.Serializable;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Collections;
+
+/**
+ * @author Jerome Bernard
+ */
+public class Personality implements Serializable {
+    private final List<File> files;
+
+    public Personality(List<File> files) {
+        this.files = files;
+    }
+
+    public Personality(final net.elasticgrid.rackspace.cloudservers.internal.Personality personality) {
+        this(personalitiesAsFileList(personality));
+    }
+
+    private static List<File> personalitiesAsFileList(final net.elasticgrid.rackspace.cloudservers.internal.Personality personality) {
+        if (personality == null || personality.getPersonalities() == null)
+            return Collections.emptyList();
+        List<File> files = new ArrayList<File>(personality.getPersonalities().size());
+        for (net.elasticgrid.rackspace.cloudservers.internal.File file : personality.getPersonalities()) {
+            files.add(new File(file.getPath(), file.getBase64Binary()));
+        }
+        return files;
+    }
+
+    public List<File> getFiles() {
+        return files;
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/RebootType.java b/main/java/net/elasticgrid/rackspace/cloudservers/RebootType.java
index 056b716..ccb65ce 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/RebootType.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/RebootType.java
@@ -1,27 +1,27 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-/**
- * Reboot type enum.
- * @author Jerome Bernard
- */
-public enum RebootType {
-    HARD, SOFT
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+/**
+ * Reboot type enum.
+ * @author Jerome Bernard
+ */
+public enum RebootType {
+    HARD, SOFT
+}
diff --git a/main/java/net/elasticgrid/rackspace/cloudservers/SharedIPGroup.java b/main/java/net/elasticgrid/rackspace/cloudservers/SharedIPGroup.java
index fd596b9..c97937e 100644
--- a/main/java/net/elasticgrid/rackspace/cloudservers/SharedIPGroup.java
+++ b/main/java/net/elasticgrid/rackspace/cloudservers/SharedIPGroup.java
@@ -1,73 +1,73 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.cloudservers;
-
-import net.elasticgrid.rackspace.cloudservers.internal.SharedIpGroup;
-import java.io.Serializable;
-import java.util.List;
-
-/**
- * Shared IP group information.
- * @author Jerome Bernard
- */
-public class SharedIPGroup implements Serializable {
-    private final Integer id;
-    private final String name;
-//    private final Integer serverID;
-    private final List<Integer> serverIDs;
-//    private int choiceSelect = -1;
-//    private final static int SERVER_CHOICE = 0;
-//    private final static int SERVERS_CHOICE = 1;
-
-    public SharedIPGroup(Integer id, String name, List<Integer> serverIDs) {
-        this.id = id;
-        this.name = name;
-        this.serverIDs = serverIDs;
-    }
-
-    public Integer getId() {
-        return id;
-    }
-
-    public String getName() {
-        return name;
-    }
-
-    public List<Integer> getServerIDs() {
-        return serverIDs;
-    }
-
-    /*
-    public Integer getServerID() {
-        return serverID;
-    }
-
-    public int getChoiceSelect() {
-        return choiceSelect;
-    }
-
-    public static int getServerChoice() {
-        return SERVER_CHOICE;
-    }
-
-    public static int getServersChoice() {
-        return SERVERS_CHOICE;
-    }
-    */
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.cloudservers;
+
+import net.elasticgrid.rackspace.cloudservers.internal.SharedIpGroup;
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Shared IP group information.
+ * @author Jerome Bernard
+ */
+public class SharedIPGroup implements Serializable {
+    private final Integer id;
+    private final String name;
+//    private final Integer serverID;
+    private final List<Integer> serverIDs;
+//    private int choiceSelect = -1;
+//    private final static int SERVER_CHOICE = 0;
+//    private final static int SERVERS_CHOICE = 1;
+
+    public SharedIPGroup(Integer id, String name, List<Integer> serverIDs) {
+        this.id = id;
+        this.name = name;
+        this.serverIDs = serverIDs;
+    }
+
+    public Integer getId() {
+        return id;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public List<Integer> getServerIDs() {
+        return serverIDs;
+    }
+
+    /*
+    public Integer getServerID() {
+        return serverID;
+    }
+
+    public int getChoiceSelect() {
+        return choiceSelect;
+    }
+
+    public static int getServerChoice() {
+        return SERVER_CHOICE;
+    }
+
+    public static int getServersChoice() {
+        return SERVERS_CHOICE;
+    }
+    */
+}
diff --git a/main/java/net/elasticgrid/rackspace/common/RackspaceConnection.java b/main/java/net/elasticgrid/rackspace/common/RackspaceConnection.java
index ce060e7..1f487c3 100644
--- a/main/java/net/elasticgrid/rackspace/common/RackspaceConnection.java
+++ b/main/java/net/elasticgrid/rackspace/common/RackspaceConnection.java
@@ -1,470 +1,470 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.common;
-
-import net.elasticgrid.rackspace.cloudservers.internal.CloudServersAPIFault;
-import org.apache.commons.io.IOUtils;
-import org.apache.http.Header;
-import org.apache.http.HeaderElement;
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpException;
-import org.apache.http.HttpHost;
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpRequestInterceptor;
-import org.apache.http.HttpResponse;
-import org.apache.http.HttpResponseInterceptor;
-import org.apache.http.HttpVersion;
-import org.apache.http.client.HttpClient;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpRequestBase;
-import org.apache.http.client.methods.HttpPost;
-import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
-import org.apache.http.conn.ClientConnectionManager;
-import org.apache.http.conn.params.ConnManagerParams;
-import org.apache.http.conn.params.ConnRoutePNames;
-import org.apache.http.conn.params.ConnPerRouteBean;
-import org.apache.http.conn.scheme.PlainSocketFactory;
-import org.apache.http.conn.scheme.Scheme;
-import org.apache.http.conn.scheme.SchemeRegistry;
-import org.apache.http.conn.ssl.SSLSocketFactory;
-import org.apache.http.entity.HttpEntityWrapper;
-import org.apache.http.entity.EntityTemplate;
-import org.apache.http.impl.client.DefaultHttpClient;
-import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
-import org.apache.http.params.BasicHttpParams;
-import org.apache.http.params.HttpParams;
-import org.apache.http.params.HttpProtocolParams;
-import org.apache.http.protocol.HttpContext;
-import org.jibx.runtime.BindingDirectory;
-import org.jibx.runtime.IBindingFactory;
-import org.jibx.runtime.IUnmarshallingContext;
-import org.jibx.runtime.JiBXException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.Properties;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import java.util.zip.GZIPInputStream;
-
-/**
- * This class provides common code to the REST connection classes.
- * Logging:
- * <table>
- *   <thead>
- *     <th>Level</th>
- *     <th align="left">Information</th>
- *   </thead>
- *   <tbody>
- *     <tr>
- *       <td>WARNING</td>
- *       <td>Retries, Expired Authentication before the request is automatically retried</td>
- *     </tr>
- *     <tr>
- *       <td>INFO</td>
- *       <td>Request URI &amp; Method</td>
- *     </tr>
- *     <tr>
- *       <td>FINEST</td>
- *       <td>Request Body, Response Body</td>
- *     </tr>
- *   </tbody>
- * </table>
- *
- * @author Jerome Bernard
- */
-public class RackspaceConnection {
-    // this is the number of automatic retries
-    private int maxRetries = 5;
-    private String userAgent = "Elastic-Grid/";
-    private HttpClient hc = null;
-    private int maxConnections = 100;
-    private String proxyHost = null;
-    private int proxyPort;
-    private int connectionManagerTimeout = 0;
-    private int soTimeout = 0;
-    private int connectionTimeout = 0;
-
-    private final String username;
-    private final String apiKey;
-    private String serverManagementURL;
-    private String storageURL;
-    private String cdnManagementURL;
-    private String authToken;
-
-    private boolean authenticated = false;
-
-    private static final String API_AUTH_URL = "https://auth.api.rackspacecloud.com/v1.0";
-
-    private static final Logger logger = Logger.getLogger(RackspaceConnection.class.getName());
-
-    /**
-     * Initializes the Rackspace connection with the Rackspace login information.
-     *
-     * @param username the Rackspace username
-     * @param apiKey   the Rackspace API key
-     * @throws RackspaceException if the credentials are invalid
-     * @throws IOException        if there is a network issue
-     * @see #authenticate()
-     */
-    public RackspaceConnection(String username, String apiKey) throws RackspaceException, IOException {
-        this.username = username;
-        this.apiKey = apiKey;
-        String version;
-        try {
-            Properties props = new Properties();
-            props.load(this.getClass().getClassLoader().getResourceAsStream("version.properties"));
-            version = props.getProperty("version");
-        } catch (Exception ex) {
-            version = "?";
-        }
-        userAgent = userAgent + version + " (" + System.getProperty("os.arch") + "; " + System.getProperty("os.name") + ")";
-        authenticate();
-    }
-
-    /**
-     * Authenticate on Rackspace API. Tokens are only valid for 24 hours, so client code should expect token to expire
-     * and renew them if needed.
-     *
-     * @return the auth token, valid for 24 hours
-     * @throws RackspaceException if the credentials are invalid
-     * @throws IOException        if there is a network issue
-     */
-    public String authenticate() throws RackspaceException, IOException {
-        logger.info("Authenticating to Rackspace API...");
-        HttpGet request = new HttpGet(API_AUTH_URL);
-        request.addHeader("X-Auth-User", username);
-        request.addHeader("X-Auth-Key", apiKey);
-        HttpResponse response = getHttpClient().execute(request);
-        int statusCode = response.getStatusLine().getStatusCode();
-        switch (statusCode) {
-            case 204:
-                if (response.getFirstHeader("X-Server-Management-Url") != null)
-                    serverManagementURL = response.getFirstHeader("X-Server-Management-Url").getValue();
-                if (response.getFirstHeader("X-Storage-Url") != null)
-                    storageURL = response.getFirstHeader("X-Storage-Url").getValue();
-                if (response.getFirstHeader("X-CDN-Management-Url") != null)
-                    cdnManagementURL = response.getFirstHeader("X-CDN-Management-Url").getValue();
-                authToken = response.getFirstHeader("X-Auth-Token").getValue();
-                authenticated = true;
-                return authToken;
-            case 401:
-                throw new RackspaceException("Invalid credentials: " + response.getStatusLine().getReasonPhrase());
-            default:
-                throw new RackspaceException("Unexpected HTTP response");
-        }
-    }
-
-    /**
-     * Make a http request and process the response. This method also performs automatic retries.
-     *
-     * @param request  the HTTP method to use (GET, POST, DELETE, etc)
-     * @param respType the class that represents the desired/expected return type
-     * @return the unmarshalled entity
-     * @throws RackspaceException
-     * @throws IOException        if there is an I/O exception
-     * @throws HttpException      if there is an HTTP exception
-     * @throws JiBXException      if the result can't be unmarshalled
-     */
-    @SuppressWarnings("unchecked")
-    protected <T> T makeRequest(HttpRequestBase request, Class<T> respType)
-            throws HttpException, IOException, JiBXException, RackspaceException {
-
-        if (!authenticated)
-            authenticate();
-
-        // add auth params, and protocol specific headers
-        request.addHeader("X-Auth-Token", getAuthToken());
-
-        // set accept and content-type headers
-        request.setHeader("Accept", "application/xml; charset=UTF-8");
-        request.setHeader("Accept-Encoding", "gzip");
-        request.setHeader("Content-Type", "application/xml; charset=UTF-8");
-
-        // send the request
-        T result = null;
-        boolean done = false;
-        int retries = 0;
-        boolean doRetry = false;
-        RackspaceException error = null;
-        do {
-            HttpResponse response = null;
-            if (retries > 0)
-                logger.log(Level.INFO, "Retry #{0}: querying via {1} {2}",
-                        new Object[]{retries, request.getMethod(), request.getURI()});
-            else
-                logger.log(Level.INFO, "Querying via {0} {1}", new Object[]{request.getMethod(), request.getURI()});
-
-            if (logger.isLoggable(Level.FINEST) && request instanceof HttpEntityEnclosingRequestBase) {
-                HttpEntity entity = ((HttpEntityEnclosingRequestBase) request).getEntity();
-                if (entity instanceof EntityTemplate) {
-                    EntityTemplate template = (EntityTemplate) entity;
-                    ByteArrayOutputStream baos = null;
-                    try {
-                        baos = new ByteArrayOutputStream();
-                        template.writeTo(baos);
-                        logger.log(Level.FINEST, "Request body:\n{0}", baos.toString());
-                    } finally {
-                        IOUtils.closeQuietly(baos);
-                    }
-                }
-            }
-
-            InputStream entityStream = null;
-            HttpEntity entity = null;
-
-            if (logger.isLoggable(Level.FINEST)) {
-                response = getHttpClient().execute(request);
-                entity = response.getEntity();
-                try {
-                    entityStream = entity.getContent();
-                    logger.log(Level.FINEST, "Response body on " + request.getURI()
-                            + " via " + request.getMethod() + ":\n" + IOUtils.toString(entityStream));
-                } finally {
-                    IOUtils.closeQuietly(entityStream);
-                }
-            }
-
-            response = getHttpClient().execute(request);
-            int statusCode = response.getStatusLine().getStatusCode();
-            entity = response.getEntity();
-
-            switch (statusCode) {
-                case 200:
-                case 202:
-                case 203:
-                    try {
-                        entityStream = entity.getContent();
-                        IBindingFactory bindingFactory = BindingDirectory.getFactory(respType);
-                        IUnmarshallingContext unmarshallingCxt = bindingFactory.createUnmarshallingContext();
-                        result = (T) unmarshallingCxt.unmarshalDocument(entityStream, "UTF-8");
-                    } finally {
-                        entity.consumeContent();
-                        IOUtils.closeQuietly(entityStream);
-                    }
-                    done = true;
-                    break;
-                case 503:   // service unavailable
-                    logger.log(Level.WARNING, "Service unavailable on {0} via {1}. Will retry in {2} seconds.",
-                            new Object[]{request.getURI(), request.getMethod(), Math.pow(2.0, retries + 1)});
-                    doRetry = true;
-                    break;
-                case 401:   // unauthorized
-                    logger.warning("Not authenticated or authentication token expired. Authenticating...");
-                    authenticate();
-                    doRetry = true;
-                    break;
-                case 417:
-                    throw new RackspaceException(new IllegalArgumentException("Some parameters are invalid!")); // TODO: temp hack 'til Rackspace API is fixed!
-                case 400:
-                case 500:
-                default:
-                    try {
-                        entityStream = entity.getContent();
-                        IBindingFactory bindingFactory = BindingDirectory.getFactory(CloudServersAPIFault.class);
-                        IUnmarshallingContext unmarshallingCxt = bindingFactory.createUnmarshallingContext();
-                        CloudServersAPIFault fault = (CloudServersAPIFault) unmarshallingCxt.unmarshalDocument(entityStream, "UTF-8");
-                        done = true;
-                        throw new RackspaceException(fault.getCode(), fault.getMessage(), fault.getDetails());
-                    } catch (JiBXException e) {
-                        response = getHttpClient().execute(request);
-                        entity = response.getEntity();
-                        entityStream = entity.getContent();
-                        logger.log(Level.SEVERE, "Can't unmarshal response from " + request.getURI()
-                                + " via " + request.getMethod() + ":" + IOUtils.toString(entityStream));
-                        e.printStackTrace();
-                        throw e;
-                    } finally {
-                        entity.consumeContent();
-                        IOUtils.closeQuietly(entityStream);
-                    }
-            }
-
-            if (doRetry) {
-                retries++;
-                if (retries > maxRetries) {
-                    throw new HttpException("Number of retries exceeded for " + request.getURI(), error);
-                }
-                doRetry = false;
-                try {
-                    Thread.sleep((int) Math.pow(2.0, retries) * 1000);
-                } catch (InterruptedException ex) {
-                    // do nothing
-                }
-            }
-        } while (!done);
-
-        return result;
-    }
-
-    private void configureHttpClient() {
-        HttpParams params = new BasicHttpParams();
-
-        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
-        HttpProtocolParams.setContentCharset(params, "UTF-8");
-        HttpProtocolParams.setUserAgent(params, userAgent);
-        HttpProtocolParams.setUseExpectContinue(params, true);
-
-//        params.setBooleanParameter("http.tcp.nodelay", true);
-//        params.setBooleanParameter("http.coonection.stalecheck", false);
-        ConnManagerParams.setTimeout(params, getConnectionManagerTimeout());
-        ConnManagerParams.setMaxTotalConnections(params, getMaxConnections());
-        ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(getMaxConnections()));
-        params.setIntParameter("http.socket.timeout", getSoTimeout());
-        params.setIntParameter("http.connection.timeout", getConnectionTimeout());
-
-        SchemeRegistry schemeRegistry = new SchemeRegistry();
-        schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
-        schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
-        ClientConnectionManager connMgr = new ThreadSafeClientConnManager(params, schemeRegistry);
-        hc = new DefaultHttpClient(connMgr, params);
-
-        ((DefaultHttpClient) hc).addRequestInterceptor(new HttpRequestInterceptor() {
-            public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
-                if (!request.containsHeader("Accept-Encoding")) {
-                    request.addHeader("Accept-Encoding", "gzip");
-                }
-            }
-        });
-        ((DefaultHttpClient) hc).addResponseInterceptor(new HttpResponseInterceptor() {
-            public void process(HttpResponse response, HttpContext context) throws HttpException, IOException {
-                HttpEntity entity = response.getEntity();
-                if (entity == null)
-                    return;
-                Header ceHeader = entity.getContentEncoding();
-                if (ceHeader != null) {
-                    for (HeaderElement codec : ceHeader.getElements()) {
-                        if (codec.getName().equalsIgnoreCase("gzip")) {
-                            response.setEntity(new GzipDecompressingEntity(response.getEntity()));
-                            return;
-                        }
-                    }
-                }
-            }
-        });
-
-        if (proxyHost != null) {
-            HttpHost proxy = new HttpHost(proxyHost, proxyPort);
-            hc.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
-            logger.info("Proxy Host set to " + proxyHost + ":" + proxyPort);
-        }
-    }
-
-    public String getAuthToken() {
-        return authToken;
-    }
-
-    public String getServerManagementURL() {
-        return serverManagementURL;
-    }
-
-    public String getStorageURL() {
-        return storageURL;
-    }
-
-    public String getCdnManagementURL() {
-        return cdnManagementURL;
-    }
-
-    protected HttpClient getHttpClient() {
-        if (hc == null) {
-            configureHttpClient();
-        }
-        return hc;
-    }
-
-    public void setHttpClient(HttpClient hc) {
-        this.hc = hc;
-    }
-
-    public int getConnectionManagerTimeout() {
-        return connectionManagerTimeout;
-    }
-
-    public void setConnectionManagerTimeout(int timeout) {
-        connectionManagerTimeout = timeout;
-        hc = null;
-    }
-
-    public int getSoTimeout() {
-        return soTimeout;
-    }
-
-    public void setSoTimeout(int timeout) {
-        soTimeout = timeout;
-        hc = null;
-    }
-
-    public int getConnectionTimeout() {
-        return connectionTimeout;
-    }
-
-    public void setConnectionTimeout(int timeout) {
-        connectionTimeout = timeout;
-        hc = null;
-    }
-
-    public int getMaxConnections() {
-        return maxConnections;
-    }
-
-    public void setMaxConnections(int maxConnections) {
-        this.maxConnections = maxConnections;
-        hc = null;
-    }
-
-    public String getProxyHost() {
-        return proxyHost;
-    }
-
-    public void setProxyHost(String proxyHost) {
-        this.proxyHost = proxyHost;
-        hc = null;
-    }
-
-    public int getProxyPort() {
-        return proxyPort;
-    }
-
-    public void setProxyPort(int proxyPort) {
-        this.proxyPort = proxyPort;
-        hc = null;
-    }
-
-    static class GzipDecompressingEntity extends HttpEntityWrapper {
-
-        public GzipDecompressingEntity(final HttpEntity entity) {
-            super(entity);
-        }
-
-        @Override
-        public InputStream getContent() throws IOException, IllegalStateException {
-            // the wrapped entity's getContent() decides about repeatability
-            InputStream wrappedin = wrappedEntity.getContent();
-            return new GZIPInputStream(wrappedin);
-        }
-
-        @Override
-        public long getContentLength() {
-            // length of ungzipped content is not known
-            return -1;
-        }
-
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.common;
+
+import net.elasticgrid.rackspace.cloudservers.internal.CloudServersAPIFault;
+import org.apache.commons.io.IOUtils;
+import org.apache.http.Header;
+import org.apache.http.HeaderElement;
+import org.apache.http.HttpEntity;
+import org.apache.http.HttpException;
+import org.apache.http.HttpHost;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpRequestInterceptor;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpResponseInterceptor;
+import org.apache.http.HttpVersion;
+import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpRequestBase;
+import org.apache.http.client.methods.HttpPost;
+import org.apache.http.client.methods.HttpEntityEnclosingRequestBase;
+import org.apache.http.conn.ClientConnectionManager;
+import org.apache.http.conn.params.ConnManagerParams;
+import org.apache.http.conn.params.ConnRoutePNames;
+import org.apache.http.conn.params.ConnPerRouteBean;
+import org.apache.http.conn.scheme.PlainSocketFactory;
+import org.apache.http.conn.scheme.Scheme;
+import org.apache.http.conn.scheme.SchemeRegistry;
+import org.apache.http.conn.ssl.SSLSocketFactory;
+import org.apache.http.entity.HttpEntityWrapper;
+import org.apache.http.entity.EntityTemplate;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.HttpParams;
+import org.apache.http.params.HttpProtocolParams;
+import org.apache.http.protocol.HttpContext;
+import org.jibx.runtime.BindingDirectory;
+import org.jibx.runtime.IBindingFactory;
+import org.jibx.runtime.IUnmarshallingContext;
+import org.jibx.runtime.JiBXException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.Properties;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.zip.GZIPInputStream;
+
+/**
+ * This class provides common code to the REST connection classes.
+ * Logging:
+ * <table>
+ *   <thead>
+ *     <th>Level</th>
+ *     <th align="left">Information</th>
+ *   </thead>
+ *   <tbody>
+ *     <tr>
+ *       <td>WARNING</td>
+ *       <td>Retries, Expired Authentication before the request is automatically retried</td>
+ *     </tr>
+ *     <tr>
+ *       <td>INFO</td>
+ *       <td>Request URI &amp; Method</td>
+ *     </tr>
+ *     <tr>
+ *       <td>FINEST</td>
+ *       <td>Request Body, Response Body</td>
+ *     </tr>
+ *   </tbody>
+ * </table>
+ *
+ * @author Jerome Bernard
+ */
+public class RackspaceConnection {
+    // this is the number of automatic retries
+    private int maxRetries = 5;
+    private String userAgent = "Elastic-Grid/";
+    private HttpClient hc = null;
+    private int maxConnections = 100;
+    private String proxyHost = null;
+    private int proxyPort;
+    private int connectionManagerTimeout = 0;
+    private int soTimeout = 0;
+    private int connectionTimeout = 0;
+
+    private final String username;
+    private final String apiKey;
+    private String serverManagementURL;
+    private String storageURL;
+    private String cdnManagementURL;
+    private String authToken;
+
+    private boolean authenticated = false;
+
+    private static final String API_AUTH_URL = "https://auth.api.rackspacecloud.com/v1.0";
+
+    private static final Logger logger = Logger.getLogger(RackspaceConnection.class.getName());
+
+    /**
+     * Initializes the Rackspace connection with the Rackspace login information.
+     *
+     * @param username the Rackspace username
+     * @param apiKey   the Rackspace API key
+     * @throws RackspaceException if the credentials are invalid
+     * @throws IOException        if there is a network issue
+     * @see #authenticate()
+     */
+    public RackspaceConnection(String username, String apiKey) throws RackspaceException, IOException {
+        this.username = username;
+        this.apiKey = apiKey;
+        String version;
+        try {
+            Properties props = new Properties();
+            props.load(this.getClass().getClassLoader().getResourceAsStream("version.properties"));
+            version = props.getProperty("version");
+        } catch (Exception ex) {
+            version = "?";
+        }
+        userAgent = userAgent + version + " (" + System.getProperty("os.arch") + "; " + System.getProperty("os.name") + ")";
+        authenticate();
+    }
+
+    /**
+     * Authenticate on Rackspace API. Tokens are only valid for 24 hours, so client code should expect token to expire
+     * and renew them if needed.
+     *
+     * @return the auth token, valid for 24 hours
+     * @throws RackspaceException if the credentials are invalid
+     * @throws IOException        if there is a network issue
+     */
+    public String authenticate() throws RackspaceException, IOException {
+        logger.info("Authenticating to Rackspace API...");
+        HttpGet request = new HttpGet(API_AUTH_URL);
+        request.addHeader("X-Auth-User", username);
+        request.addHeader("X-Auth-Key", apiKey);
+        HttpResponse response = getHttpClient().execute(request);
+        int statusCode = response.getStatusLine().getStatusCode();
+        switch (statusCode) {
+            case 204:
+                if (response.getFirstHeader("X-Server-Management-Url") != null)
+                    serverManagementURL = response.getFirstHeader("X-Server-Management-Url").getValue();
+                if (response.getFirstHeader("X-Storage-Url") != null)
+                    storageURL = response.getFirstHeader("X-Storage-Url").getValue();
+                if (response.getFirstHeader("X-CDN-Management-Url") != null)
+                    cdnManagementURL = response.getFirstHeader("X-CDN-Management-Url").getValue();
+                authToken = response.getFirstHeader("X-Auth-Token").getValue();
+                authenticated = true;
+                return authToken;
+            case 401:
+                throw new RackspaceException("Invalid credentials: " + response.getStatusLine().getReasonPhrase());
+            default:
+                throw new RackspaceException("Unexpected HTTP response");
+        }
+    }
+
+    /**
+     * Make a http request and process the response. This method also performs automatic retries.
+     *
+     * @param request  the HTTP method to use (GET, POST, DELETE, etc)
+     * @param respType the class that represents the desired/expected return type
+     * @return the unmarshalled entity
+     * @throws RackspaceException
+     * @throws IOException        if there is an I/O exception
+     * @throws HttpException      if there is an HTTP exception
+     * @throws JiBXException      if the result can't be unmarshalled
+     */
+    @SuppressWarnings("unchecked")
+    protected <T> T makeRequest(HttpRequestBase request, Class<T> respType)
+            throws HttpException, IOException, JiBXException, RackspaceException {
+
+        if (!authenticated)
+            authenticate();
+
+        // add auth params, and protocol specific headers
+        request.addHeader("X-Auth-Token", getAuthToken());
+
+        // set accept and content-type headers
+        request.setHeader("Accept", "application/xml; charset=UTF-8");
+        request.setHeader("Accept-Encoding", "gzip");
+        request.setHeader("Content-Type", "application/xml; charset=UTF-8");
+
+        // send the request
+        T result = null;
+        boolean done = false;
+        int retries = 0;
+        boolean doRetry = false;
+        RackspaceException error = null;
+        do {
+            HttpResponse response = null;
+            if (retries > 0)
+                logger.log(Level.INFO, "Retry #{0}: querying via {1} {2}",
+                        new Object[]{retries, request.getMethod(), request.getURI()});
+            else
+                logger.log(Level.INFO, "Querying via {0} {1}", new Object[]{request.getMethod(), request.getURI()});
+
+            if (logger.isLoggable(Level.FINEST) && request instanceof HttpEntityEnclosingRequestBase) {
+                HttpEntity entity = ((HttpEntityEnclosingRequestBase) request).getEntity();
+                if (entity instanceof EntityTemplate) {
+                    EntityTemplate template = (EntityTemplate) entity;
+                    ByteArrayOutputStream baos = null;
+                    try {
+                        baos = new ByteArrayOutputStream();
+                        template.writeTo(baos);
+                        logger.log(Level.FINEST, "Request body:\n{0}", baos.toString());
+                    } finally {
+                        IOUtils.closeQuietly(baos);
+                    }
+                }
+            }
+
+            InputStream entityStream = null;
+            HttpEntity entity = null;
+
+            if (logger.isLoggable(Level.FINEST)) {
+                response = getHttpClient().execute(request);
+                entity = response.getEntity();
+                try {
+                    entityStream = entity.getContent();
+                    logger.log(Level.FINEST, "Response body on " + request.getURI()
+                            + " via " + request.getMethod() + ":\n" + IOUtils.toString(entityStream));
+                } finally {
+                    IOUtils.closeQuietly(entityStream);
+                }
+            }
+
+            response = getHttpClient().execute(request);
+            int statusCode = response.getStatusLine().getStatusCode();
+            entity = response.getEntity();
+
+            switch (statusCode) {
+                case 200:
+                case 202:
+                case 203:
+                    try {
+                        entityStream = entity.getContent();
+                        IBindingFactory bindingFactory = BindingDirectory.getFactory(respType);
+                        IUnmarshallingContext unmarshallingCxt = bindingFactory.createUnmarshallingContext();
+                        result = (T) unmarshallingCxt.unmarshalDocument(entityStream, "UTF-8");
+                    } finally {
+                        entity.consumeContent();
+                        IOUtils.closeQuietly(entityStream);
+                    }
+                    done = true;
+                    break;
+                case 503:   // service unavailable
+                    logger.log(Level.WARNING, "Service unavailable on {0} via {1}. Will retry in {2} seconds.",
+                            new Object[]{request.getURI(), request.getMethod(), Math.pow(2.0, retries + 1)});
+                    doRetry = true;
+                    break;
+                case 401:   // unauthorized
+                    logger.warning("Not authenticated or authentication token expired. Authenticating...");
+                    authenticate();
+                    doRetry = true;
+                    break;
+                case 417:
+                    throw new RackspaceException(new IllegalArgumentException("Some parameters are invalid!")); // TODO: temp hack 'til Rackspace API is fixed!
+                case 400:
+                case 500:
+                default:
+                    try {
+                        entityStream = entity.getContent();
+                        IBindingFactory bindingFactory = BindingDirectory.getFactory(CloudServersAPIFault.class);
+                        IUnmarshallingContext unmarshallingCxt = bindingFactory.createUnmarshallingContext();
+                        CloudServersAPIFault fault = (CloudServersAPIFault) unmarshallingCxt.unmarshalDocument(entityStream, "UTF-8");
+                        done = true;
+                        throw new RackspaceException(fault.getCode(), fault.getMessage(), fault.getDetails());
+                    } catch (JiBXException e) {
+                        response = getHttpClient().execute(request);
+                        entity = response.getEntity();
+                        entityStream = entity.getContent();
+                        logger.log(Level.SEVERE, "Can't unmarshal response from " + request.getURI()
+                                + " via " + request.getMethod() + ":" + IOUtils.toString(entityStream));
+                        e.printStackTrace();
+                        throw e;
+                    } finally {
+                        entity.consumeContent();
+                        IOUtils.closeQuietly(entityStream);
+                    }
+            }
+
+            if (doRetry) {
+                retries++;
+                if (retries > maxRetries) {
+                    throw new HttpException("Number of retries exceeded for " + request.getURI(), error);
+                }
+                doRetry = false;
+                try {
+                    Thread.sleep((int) Math.pow(2.0, retries) * 1000);
+                } catch (InterruptedException ex) {
+                    // do nothing
+                }
+            }
+        } while (!done);
+
+        return result;
+    }
+
+    private void configureHttpClient() {
+        HttpParams params = new BasicHttpParams();
+
+        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);
+        HttpProtocolParams.setContentCharset(params, "UTF-8");
+        HttpProtocolParams.setUserAgent(params, userAgent);
+        HttpProtocolParams.setUseExpectContinue(params, true);
+
+//        params.setBooleanParameter("http.tcp.nodelay", true);
+//        params.setBooleanParameter("http.coonection.stalecheck", false);
+        ConnManagerParams.setTimeout(params, getConnectionManagerTimeout());
+        ConnManagerParams.setMaxTotalConnections(params, getMaxConnections());
+        ConnManagerParams.setMaxConnectionsPerRoute(params, new ConnPerRouteBean(getMaxConnections()));
+        params.setIntParameter("http.socket.timeout", getSoTimeout());
+        params.setIntParameter("http.connection.timeout", getConnectionTimeout());
+
+        SchemeRegistry schemeRegistry = new SchemeRegistry();
+        schemeRegistry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));
+        schemeRegistry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));
+        ClientConnectionManager connMgr = new ThreadSafeClientConnManager(params, schemeRegistry);
+        hc = new DefaultHttpClient(connMgr, params);
+
+        ((DefaultHttpClient) hc).addRequestInterceptor(new HttpRequestInterceptor() {
+            public void process(HttpRequest request, HttpContext context) throws HttpException, IOException {
+                if (!request.containsHeader("Accept-Encoding")) {
+                    request.addHeader("Accept-Encoding", "gzip");
+                }
+            }
+        });
+        ((DefaultHttpClient) hc).addResponseInterceptor(new HttpResponseInterceptor() {
+            public void process(HttpResponse response, HttpContext context) throws HttpException, IOException {
+                HttpEntity entity = response.getEntity();
+                if (entity == null)
+                    return;
+                Header ceHeader = entity.getContentEncoding();
+                if (ceHeader != null) {
+                    for (HeaderElement codec : ceHeader.getElements()) {
+                        if (codec.getName().equalsIgnoreCase("gzip")) {
+                            response.setEntity(new GzipDecompressingEntity(response.getEntity()));
+                            return;
+                        }
+                    }
+                }
+            }
+        });
+
+        if (proxyHost != null) {
+            HttpHost proxy = new HttpHost(proxyHost, proxyPort);
+            hc.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
+            logger.info("Proxy Host set to " + proxyHost + ":" + proxyPort);
+        }
+    }
+
+    public String getAuthToken() {
+        return authToken;
+    }
+
+    public String getServerManagementURL() {
+        return serverManagementURL;
+    }
+
+    public String getStorageURL() {
+        return storageURL;
+    }
+
+    public String getCdnManagementURL() {
+        return cdnManagementURL;
+    }
+
+    protected HttpClient getHttpClient() {
+        if (hc == null) {
+            configureHttpClient();
+        }
+        return hc;
+    }
+
+    public void setHttpClient(HttpClient hc) {
+        this.hc = hc;
+    }
+
+    public int getConnectionManagerTimeout() {
+        return connectionManagerTimeout;
+    }
+
+    public void setConnectionManagerTimeout(int timeout) {
+        connectionManagerTimeout = timeout;
+        hc = null;
+    }
+
+    public int getSoTimeout() {
+        return soTimeout;
+    }
+
+    public void setSoTimeout(int timeout) {
+        soTimeout = timeout;
+        hc = null;
+    }
+
+    public int getConnectionTimeout() {
+        return connectionTimeout;
+    }
+
+    public void setConnectionTimeout(int timeout) {
+        connectionTimeout = timeout;
+        hc = null;
+    }
+
+    public int getMaxConnections() {
+        return maxConnections;
+    }
+
+    public void setMaxConnections(int maxConnections) {
+        this.maxConnections = maxConnections;
+        hc = null;
+    }
+
+    public String getProxyHost() {
+        return proxyHost;
+    }
+
+    public void setProxyHost(String proxyHost) {
+        this.proxyHost = proxyHost;
+        hc = null;
+    }
+
+    public int getProxyPort() {
+        return proxyPort;
+    }
+
+    public void setProxyPort(int proxyPort) {
+        this.proxyPort = proxyPort;
+        hc = null;
+    }
+
+    static class GzipDecompressingEntity extends HttpEntityWrapper {
+
+        public GzipDecompressingEntity(final HttpEntity entity) {
+            super(entity);
+        }
+
+        @Override
+        public InputStream getContent() throws IOException, IllegalStateException {
+            // the wrapped entity's getContent() decides about repeatability
+            InputStream wrappedin = wrappedEntity.getContent();
+            return new GZIPInputStream(wrappedin);
+        }
+
+        @Override
+        public long getContentLength() {
+            // length of ungzipped content is not known
+            return -1;
+        }
+
+    }
+}
diff --git a/main/java/net/elasticgrid/rackspace/common/RackspaceException.java b/main/java/net/elasticgrid/rackspace/common/RackspaceException.java
index 698e2b0..c297b76 100644
--- a/main/java/net/elasticgrid/rackspace/common/RackspaceException.java
+++ b/main/java/net/elasticgrid/rackspace/common/RackspaceException.java
@@ -1,64 +1,64 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * 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
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package net.elasticgrid.rackspace.common;
-
-/**
- * A wrapper exception to simplify catching errors related to Rackspace activity.
- *
- * @author Jerome Bernard
- */
-public class RackspaceException extends Exception {
-    private int code;
-    private String details;
-
-    public RackspaceException(String message) {
-        this(message, null);
-    }
-
-    public RackspaceException(int code, String message, String details) {
-        super(message);
-        this.code = code;
-        this.details = details;
-    }
-
-    public RackspaceException(Throwable cause) {
-        super(cause);
-        if (cause instanceof RackspaceException) {
-            this.code = ((RackspaceException) cause).code;
-            this.details = ((RackspaceException) cause).details;
-        }
-    }
-
-    public RackspaceException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public int getCode() {
-        return code;
-    }
-
-    public String getDetails() {
-        return details;
-    }
-
-    @Override
-    public String toString() {
-        return "Error " + getCode() + ": " + super.getMessage() + "\nDetails: " + getDetails();
-    }
-}
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * 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
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package net.elasticgrid.rackspace.common;
+
+/**
+ * A wrapper exception to simplify catching errors related to Rackspace activity.
+ *
+ * @author Jerome Bernard
+ */
+public class RackspaceException extends Exception {
+    private int code;
+    private String details;
+
+    public RackspaceException(String message) {
+        this(message, null);
+    }
+
+    public RackspaceException(int code, String message, String details) {
+        super(message);
+        this.code = code;
+        this.details = details;
+    }
+
+    public RackspaceException(Throwable cause) {
+        super(cause);
+        if (cause instanceof RackspaceException) {
+            this.code = ((RackspaceException) cause).code;
+            this.details = ((RackspaceException) cause).details;
+        }
+    }
+
+    public RackspaceException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDetails() {
+        return details;
+    }
+
+    @Override
+    public String toString() {
+        return "Error " + getCode() + ": " + super.getMessage() + "\nDetails: " + getDetails();
+    }
+}
diff --git a/src/com/rackspace/cloud/files/api/client/Container.java b/src/com/rackspace/cloud/files/api/client/Container.java
new file mode 100644
index 0000000..569b333
--- /dev/null
+++ b/src/com/rackspace/cloud/files/api/client/Container.java
@@ -0,0 +1,131 @@
+package com.rackspace.cloud.files.api.client;
+
+import com.rackspace.cloud.servers.api.client.Entity;
+
+/**
+ * @author Phillip Toohill dead2hill@gmail.com
+ *
+ */
+public class Container extends Entity {
+
+	private static final long serialVersionUID = 5994739895998309675L;
+	
+	// Regular attributes 
+	private String name;
+	private int count;
+	private int bytes;
+	
+	// CDN attributes
+	private boolean cdnEnabled;
+	private int Ttl;
+	public String cdnUrl;
+	public boolean logRetention;
+
+	public String toXML() {
+		String xml = "";
+		xml = "<container xmlns=\"http://docs.rackspacecloud.com/servers/api/v1.0\" name=\"" + getName() 
+			+ "\"></server>";
+		return xml;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * @param name the name to set
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * @return the count
+	 */
+	public int getCount() {
+		return count;
+	}
+
+	/**
+	 * @param count the count to set
+	 */
+	public void setCount(int count) {
+		this.count = count;
+	}
+
+	/**
+	 * @return the bytes
+	 */
+	public int getBytes() {
+		return bytes;
+	}
+
+	/**
+	 * @param bytes the bytes to set
+	 */
+	public void setBytes(int bytes) {
+		this.bytes = bytes;
+	}
+
+	/**
+	 * @return the cdnEnabled
+	 */
+	public boolean isCdnEnabled() {
+		return cdnEnabled;
+	}
+
+	/**
+	 * @param cdnEnabled the cdnEnabled to set
+	 */
+	public void setCdnEnabled(boolean cdnEnabled) {
+		this.cdnEnabled = cdnEnabled;
+	}
+
+	/**
+	 * @return the ttl
+	 */
+	public int getTtl() {
+		return Ttl;
+	}
+
+	/**
+	 * @param ttl the ttl to set
+	 */
+	public void setTtl(int ttl) {
+		Ttl = ttl;
+	}
+
+	/**
+	 * @return the cdnUrl
+	 */
+	public String getCdnUrl() {
+		return cdnUrl;
+	}
+
+	/**
+	 * @param cdnUrl the cdnUrl to set
+	 */
+	public void setCdnUrl(String cdnUrl) {
+		this.cdnUrl = cdnUrl;
+	}
+
+	/**
+	 * @return the logRetention
+	 */
+	public boolean isLogRetention() {
+		return logRetention;
+	}
+
+	/**
+	 * @param logRetention the logRetention to set
+	 */
+	public void setLogRetention(boolean logRetention) {
+		this.logRetention = logRetention;
+	}
+
+	
+}   
+
