Browse Source

Rackspace documentation + unit test refactoring

git-svn-id: http://framework.zend.com/svn/framework/standard/trunk@24698 44c647ce-9c0f-0410-b52a-842ac1e357ba
ezimuel 14 years ago
parent
commit
80dfe3388c

+ 435 - 0
documentation/manual/en/module_specs/Zend_Service_Rackspace.xml

@@ -0,0 +1,435 @@
+<?xml version="1.0" encoding="utf-8"?>
+<sect1 id="zend.service.rackspace">
+    <title>Zend_Service_Rackspace</title>
+
+    <sect2 id="zend.service.rackspace.introduction">
+        <title>Introduction</title>
+
+        <para>
+            The <classname>Zend_Service_Rackspace</classname> is a class that
+            provides a simple <acronym>API</acronym> to manage the Rackspace services
+            Cloud Files and Cloud Servers.
+        </para>
+        
+        <note><title>Load balancers service</title>
+            
+
+            <para>
+                The load balancers service of Rackspace is not implemented yet.
+                We are planning to release it in the next future.
+            </para>
+        </note>
+    </sect2>
+
+    <sect2 id="zend.service.rackspace.registering">
+        <title>Registering with Rackspace</title>
+
+        <para>
+            Before you can get started with <classname>Zend_Service_Rackspace</classname>, you must
+            first register for an account. Please see the
+            <ulink url="http://www.rackspace.com/cloud/">Cloud services</ulink>
+            page on the Rackspace website for more information.
+        </para>
+
+        <para>
+            After registering, you can get the Username and the API Key from the Rackspace management
+            console under the menu "Your Account" &gt; "API Access".
+            These informations are required to use the <classname>Zend_Service_Rackspace</classname>
+            classes.
+        </para>
+    </sect2>
+
+    <sect2 id="zend.service.rackspace.feature.files">
+        <title>Cloud Files</title>
+
+        <para>
+            The Cloud Files is a service to store any files in a cloud environment.
+            A user can store an unlimited quantity of files and each file can be as
+            large as 5 gigabytes. The files can be private or public. The private files
+            can be accessed using the API of Rackspace. The public files are accessed using
+            a <acronym>CDN</acronym> (Content Delivery Network).
+            Rackspace exposes a <acronym>REST</acronym> API to manage the Cloud Files.
+        </para>
+
+        <para>
+            <classname>Zend_Service_Rackspace_Files</classname> provides the following functionality:
+
+            <itemizedlist>
+                <listitem>
+                    <para>
+                        Upload files programmatically for tight integration with your application
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        Enable Cloud Files CDN integration on any container for public distribution
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        Create Containers programmatically
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        Retrieve lists of containers and files
+                    </para>
+                </listitem>
+            </itemizedlist>
+        </para>
+    </sect2>
+
+    <sect2 id="zend.service.rackspace.feature.servers">
+        <title>Cloud Servers</title>
+
+        <para>
+            Rackspace Cloud Servers is a compute service that provides server capacity in the cloud.
+            Cloud Servers come in different flavors of memory, disk space, and CPU.
+        </para>
+
+        <para>
+            <classname>Zend_Service_Rackspace_Servers</classname> provides the following functionality:
+
+            <itemizedlist>
+                <listitem>
+                    <para>
+                        Create/delete new servers
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        List and get information on each server
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        Manage the public/private IP addresses of a server
+                    </para>
+                </listitem>
+
+                <listitem>
+                    <para>
+                        Resize the server capacity
+                    </para>
+                </listitem>
+                
+                <listitem>
+                    <para>
+                        Reboot a server
+                    </para>
+                </listitem>
+                
+                <listitem>
+                    <para>
+                        Create new images for a server
+                    </para>
+                </listitem>
+                
+                <listitem>
+                    <para>
+                        Manage the backup of a server
+                    </para>
+                </listitem>
+                
+                <listitem>
+                    <para>
+                        Create a group of server to share the IP addresses for High Availability architecture
+                    </para>
+                </listitem>
+            </itemizedlist>
+        </para>
+    </sect2>
+
+    <sect2 id="zend.service.rackspace.methods">
+        <title>Available Methods</title>
+ 
+        <para>
+            Eeach service class (Files, Servers) of Rackspace extends the <classname>Zend_Service_Rackspace</classname> abstract class.
+            This class contains a set of public methods shared with all the service.
+            This public methods are reported as follow:
+        </para>    
+        
+        <variablelist>
+            <varlistentry id="zend.service.rackspace.files.methods.authenticate">
+                <term>
+                    <methodsynopsis>
+                        <methodname>authenticate</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Authenticate the Rackspace API using the user and the key specified in the concrete class
+                        that extend <classname>Zend_Service_Rackspace</classname>.
+                        Return <emphasis>true</emphasis> in case of success and <emphasis>false</emphasis> in case of error.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-auth-url">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getAuthUrl</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the authentication URL of Rackspace.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-cdn-url">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getCdnUrl</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the URL for the CDN.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-error-code">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getErrorCode</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the last HTTP error code.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-error-msg">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getErrorMsg</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the last error message.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-http-client">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getHttpClient</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the HTTP client used to call the API of the Rackspace.
+                        Returns a <classname>Zend_Http_Client</classname> instance.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-key">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getKey</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the authentication key.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-management-url">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getManagementUrl</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the URL for the management services.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-storage-url">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getStorageUrl</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the URL for the storage (files) service.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-token">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getToken</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the token returned after a successful authentication.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-user">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getUser</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the user authenticated with the Rackspace service.
+                        Returns a string.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.is-successful">
+                <term>
+                    <methodsynopsis>
+                        <methodname>isSuccessful</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return <emphasis>true</emphasis> if the last service call was successful, false otherwise.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.set-auth-url">
+                <term>
+                    <methodsynopsis>
+                        <methodname>setAuthUrl</methodname>
+                        <methodparam>
+                            <funcparams>string $url</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Set the authentication URL to be used.
+                    </para>
+                    <para>
+                        <emphasis>$url</emphasis> is the URL for the authentication
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.set-key">
+                <term>
+                    <methodsynopsis>
+                        <methodname>setKey</methodname>
+                        <methodparam>
+                            <funcparams>string $key</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Set the key for the API authentication.
+                    </para>
+                    <para>
+                        <emphasis>$key</emphasis> is the key string for the authentication
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.set-user">
+                <term>
+                    <methodsynopsis>
+                        <methodname>setUser</methodname>
+                        <methodparam>
+                            <funcparams>string $user</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Set the user for the API authentication.
+                    </para>
+                    <para>
+                        <emphasis>$user</emphasis> is the user string for the authentication
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </sect2>    
+</sect1>

+ 916 - 0
documentation/manual/en/module_specs/Zend_Service_Rackspace_Files.xml

@@ -0,0 +1,916 @@
+<?xml version="1.0" encoding="utf-8"?>
+<sect1 id="zend.service.rackspace.files">
+    <title>Zend_Service_Rackspace_Files</title>
+
+    <sect2 id="zend.service.rackspace.files.intro">
+        <title>Overview</title>
+
+        <para>
+            The <classname>Zend_Service_Rackspace_Files</classname> is a class that provides a
+            simple <acronym>API</acronym> to manage the <ulink url="http://www.rackspace.com/cloud/cloud_hosting_products/files/">Rackspace
+                Cloud Files</ulink>.
+        </para>
+    </sect2>
+
+
+    <sect2 id="zend.service.rackspace.files.quick-start">
+        <title>Quick Start</title>
+        
+        <para>
+            To use this class you have to pass the username and the API's key of Rackspace in the
+            construction of the class.
+        </para>
+        
+         <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user,$key);
+]]></programlisting>
+        
+        <para>
+            A container is a storage compartment for your data and provides a way for you to organize
+            your data. You can think of a container as a folder in Windows® or a directory in UNIX®.
+            The primary difference between a container and these other file system concepts is that
+            containers cannot be nested. You can, however, create an unlimited number of containers
+            within your account. Data must be stored in a container so you must have at least one
+            container defined in your account prior to uploading data.
+        </para>
+        
+        <para>
+            The only restrictions on container names is that they cannot contain a forward slash (/)
+            and must be less than 256 bytes in length (please note that the length restriction applies to
+            the name using the URL encoded format).
+        </para>
+        
+        <para>
+            The containers are managed using the class <classname>Zend_Service_Rackspace_Files_Container</classname>.
+        </para>
+        
+        <para>
+            An object (file) is the basic storage entity and any optional metadata that represents the files
+            you store in the Cloud Files system. When you upload data to Cloud Files, the data is stored
+            as-is (no compression or encryption) and consists of a location (container), the object's
+            name, and any metadata consisting of key/value pairs. For instance, you may chose to store
+            a backup of your digital photos and organize them into albums. In this case, each object
+            could be tagged with metadata such as Album : Caribbean Cruise or Album :
+            Aspen Ski Trip.
+        </para>
+        
+        <para>
+            The only restriction on object names is that they must be less than 1024 bytes in length
+            after URL encoding. Cloud Files has a limit on the size of a single uploaded object;
+            by default this is 5 GB. For metadata, you should not exceed 90 individual key/value pairs
+            for any one object and the total byte length of all key/value pairs should not exceed 4KB (4096 bytes).
+        </para>
+        
+        <para>
+            The objects are managed using the class <classname>Zend_Service_Rackspace_Files_Object</classname>.
+        </para>
+        
+        <para>
+            To create a new container you can use the <emphasis>createContainer</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[  
+$container= $rackspace->createContainer('test');
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+printf("Name: %s",$container->getName());
+]]></programlisting>
+
+        <para>
+            This example create a container with name <emphasis>test</emphasis>. The result of <emphasis>createContainer</emphasis>
+            is a new instance of <classname>Zend_Service_Rackspace_Files_Container</classname>.
+        </para>
+        
+        <para>
+            To store an object (file) in a container you can use the <emphasis>storeObject</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[
+$name= 'example.jpg';
+$file= file_get_contents($name);
+
+$metadata= array (
+    'foo' => 'bar'
+);
+
+$rackspace->storeObject('test',$name,$file,$metadata);
+
+if ($rackspace->isSuccessful()) {
+    echo 'Object stored successfully';
+} else {
+    printf("ERROR: %s",$rackspace->getErrorMsg());
+}
+]]></programlisting>
+
+        <para>
+            This example store a file image <emphasis>example.jpg</emphasis> in the container <emphasis>test</emphasis>
+            with the metadata specified in the array <emphasis>$metadata</emphasis>.
+        </para>
+        
+        <para>
+            To delete an object (file) you can use the <emphasis>deleteObject</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[           
+$rackspace->deleteObject('test','example.jpg');
+
+if ($rackspace->isSuccessful()) {
+    echo 'Object deleted successfully';
+} else {
+    printf("ERROR: %s",$rackspace->getErrorMsg());
+}
+]]></programlisting>
+
+        <para>
+            This example delete the object <emphasis>example.jpg</emphasis> in the container <emphasis>test</emphasis>.
+        </para>
+        
+        <para>
+            To publish a container as <acronym>CDN</acronym> (Content Delivery Network) you can use the <emphasis>enableCdnContainer</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[     
+$cdnInfo= $rackspace->enableCdnContainer('test');
+
+if ($rackspace->isSuccessful()) {
+    print_r($cdnInfo);
+} else {
+    printf("ERROR: %s",$rackspace->getErrorMsg());
+}
+]]></programlisting>
+
+        <para>
+            This example publish the container <emphasis>test</emphasis> as <acronym>CDN</acronym>.
+            If the operation is successfull returns an associative arrays with the following values:
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>
+                    <emphasis>cdn_uri</emphasis>, the url of the CDN container;
+                </para>
+            </listitem>
+            <listitem>
+                <para>
+                    <emphasis>cdn_uri_ssl</emphasis>, the ssl url of the CDN container;
+                </para>
+            </listitem>            
+        </itemizedlist>  
+    </sect2>
+ 
+    <sect2 id="zend.service.rackspace.files.methods">
+        <title>Available Methods</title>
+        
+        <variablelist>
+            <varlistentry id="zend.service.rackspace.files.methods.copy-object">
+                <term>
+                    <methodsynopsis>
+                        <methodname>copyObject</methodname>
+                        <methodparam>
+                            <funcparams>string $container_source,string $obj_source,string $container_dest,string $obj_dest,$metadata=array(),string $content_type=null</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Copy an object from a container to another. 
+                        The return is <emphasis>true</emphasis> in case of success and <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        The <emphasis>$container_source</emphasis> is the name of the source container.
+                    </para>    
+                    <para>
+                        The <emphasis>$obj_source</emphasis> is the name of the source object.   
+                    </para>
+                    <para>
+                        The <emphasis>$container_dest</emphasis> is the name of the destination container.   
+                    </para>
+                    <para>
+                        The <emphasis>$obj_dest</emphasis> is the name of the destination object.   
+                    </para>
+                    <para>
+                        The <emphasis>$metadata</emphasis> array contains the metadata information related to the destination object.   
+                    </para>    
+                    <para>
+                        The <emphasis>$content_type</emphasis> is the optional content type of the destination object (file).
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.create-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>createContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container, $metadata=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Create a container. The return is an instance of <classname>Zend_Service_Rackspace_Files_Container</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container to create.
+                    </para>    
+                    <para>
+                        The <emphasis>$metadata</emphasis> array contains the metadata information related to the container.   
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.delete-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>deleteContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Delete a container. The return is <emphasis>true</emphasis> in case of success and <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container to delete.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.delete-object">
+                <term>
+                    <methodsynopsis>
+                        <methodname>deleteObject</methodname>
+                        <methodparam>
+                            <funcparams>string $container,string $object</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Delete an object in a specific container. Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$object</emphasis> is the name of the object to delete.
+                    </para>   
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.enable-cdn-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>enableCdnContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container,integer $ttl=900</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Publish a container as <acronym>CDN</acronym> (Content Delivery Network). Return an associative array contains the CDN url and SSL url.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$ttl</emphasis> is the time to live for the CDN cache content. The default value is 15 minutes (900 seconds).
+                        The minimum TTL that can be set is 15 minutes (900 seconds); the maximum TTL is
+                        50 years (range of 900 to 1577836800 seconds).
+                    </para>   
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-cdn-containers">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getCdnContainers</methodname>
+                        <methodparam>
+                            <funcparams>$options=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Returns all the CDN containers available. The return is an instance of <classname>Zend_Service_Rackspace_Files_ContainerList</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$options</emphasis> contains the following optional parameters:
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <emphasis>limit</emphasis>, for an integer value n, limits the number of results to at most n values.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>marker</emphasis>, given a string value x, return object names greater in value than the specified marker.
+                                </para>
+                            </listitem>
+                        </itemizedlist>    
+                    </para>
+                </listitem>
+            </varlistentry>
+        
+            <varlistentry id="zend.service.rackspace.files.methods.get-containers">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getContainers</methodname>
+                        <methodparam>
+                            <funcparams>$options=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Returns all the containers available. The return is an instance of <classname>Zend_Service_Rackspace_Files_ContainerList</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$options</emphasis> contains the following optional parameters:
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <emphasis>limit</emphasis>, for an integer value n, limits the number of results to at most n values.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>marker</emphasis>, given a string value x, return object names greater in value than the specified marker.
+                                </para>
+                            </listitem>
+                        </itemizedlist>    
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Returns the container specified as instance of  <classname>Zend_Service_Rackspace_Files_Container</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-count-containers">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getCountContainers</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the total count of containers.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-count-objects">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getCountObjects</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the count of objects contained in all the containers.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-info-cdn-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getInfoCdnContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the information of a CDN container. The result is an associative array with all the CDN information.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-info-containers">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getInfoContainers</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the information about all the containers available.
+                        Return an associative array with the following values:
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <emphasis>tot_containers</emphasis>, the total number of containers stored
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>size_containers</emphasis>, the total size, in byte, of all the containers.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>tot_objects</emphasis>, the total number of objects (file) stored in all the containers.
+                                </para>
+                            </listitem>
+                        </itemizedlist> 
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-metadata-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getMetadataContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the metadata information of a container. The result is an associative array with all the metadata keys/values.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-metadata-object">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getMetadataObject</methodname>
+                        <methodparam>
+                            <funcparams>string $container, string $object</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Get the metadata information of an object. The result is an associative array with all the metadata keys/values.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>  
+                    <para>
+                        The <emphasis>$object</emphasis> is the name of the object.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-objects">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getObjects</methodname>
+                        <methodparam>
+                            <funcparams>string $container, $options=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Returns all the objects of a container. The return is an instance of <classname>Zend_Service_Rackspace_Files_ObjectList</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$options</emphasis> contains the following optional parameters:
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <emphasis>limit</emphasis>, for an integer value n, limits the number of results
+                                    to at most n values.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>marker</emphasis>, given a string value x, return object names greater
+                                    in value than the specified marker.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>prefix</emphasis>, for a string value x, causes the results to be
+                                    limited to object names beginning with the substring x.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>path</emphasis>, for a string value x, return the object names nested
+                                    in the pseudo path.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>delimiter</emphasis>, for a character c, return all the object names
+                                    nested in the container (without the need for the directory marker objects).
+                                </para>
+                            </listitem>
+                        </itemizedlist>    
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-object">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getObject</methodname>
+                        <methodparam>
+                            <funcparams>string $container, string $object, $headers=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Returns an object of a container. The return is an instance of <classname>Zend_Service_Rackspace_Files_Object</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$object</emphasis> is the name of the object.
+                    </para>
+                    <para>
+                        The <emphasis>$headers</emphasis> contains the following optional parameters (See the <ulink url="http://www.ietf.org/rfc/rfc2616.txt">RFC-2616</ulink> for more info):
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <emphasis>If-Match</emphasis>, a client that has one or more entities previously
+                                    obtained from the resource can verify that one of those entities is
+                                    current by including a list of their associated entity tags in the
+                                    If-Match header field. 
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>If-None-Match</emphasis>, a client that has one or more entities previously
+                                    obtained from the resource can verify that none of those entities is
+                                    current by including a list of their associated entity tags in the
+                                    If-None-Match header field.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>If-Modified-Since</emphasis>, if the requested variant has not been modified
+                                    since the time specified in this field, an entity will not be returned from the server.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>If-Unmodified-Since</emphasis>, if the requested resource has not been modified
+                                    since the time specified in this field, the server SHOULD perform the
+                                    requested operation as if the If-Unmodified-Since header were not present.
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>Range</emphasis>, Rackspace supports a sub-set of Range and do not adhere to the full RFC-2616 specification. We support
+                                    specifying OFFSET-LENGTH where either OFFSET or LENGTH can be optional (not both at
+                                    the same time). The following are supported forms of the header:
+                                    <itemizedlist>
+                                        <listitem>
+                                            <para>
+                                                <emphasis>Range: bytes=-5</emphasis>, last five bytes of the object
+                                            </para>
+                                        </listitem>
+                                        <listitem>
+                                            <para>
+                                                <emphasis>Range: bytes=10-15</emphasis>, the five bytes after a 10-byte offset
+                                            </para>
+                                        </listitem>   
+                                        <listitem>
+                                            <para>
+                                                <emphasis>Range: bytes=32-</emphasis>, all data after the first 32 bytes of the object
+                                            </para>
+                                        </listitem>
+                                    </itemizedlist>    
+                                </para>
+                            </listitem>
+                        </itemizedlist>    
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.files.methods.get-size-containers">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getSizeContainers</methodname>
+                        <methodparam>
+                            <funcparams/>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the size, in bytes, of all the containers.
+                    </para>
+                </listitem>
+            </varlistentry>
+        
+            <varlistentry id="zend.service.rackspace.files.methods.set-metadata-object">
+                <term>
+                    <methodsynopsis>
+                        <methodname>setMetadataObject</methodname>
+                        <methodparam>
+                            <funcparams>string $container,string $object, array $metadata</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Update metadata information to the object (all the previous metadata will be deleted). 
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$object</emphasis> is the name of the object to store.
+                    </para>
+                    <para>
+                        The <emphasis>$metadata</emphasis> array contains the metadata information related to the object.   
+                    </para>    
+                </listitem>
+            </varlistentry>
+        
+            <varlistentry id="zend.service.rackspace.files.methods.store-object">
+                <term>
+                    <methodsynopsis>
+                        <methodname>storeObject</methodname>
+                        <methodparam>
+                            <funcparams>string $container,string $object,string $file,$metadata=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Store an object in a specific container. Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$object</emphasis> is the name of the object to store.
+                    </para>
+                    <para>
+                        The <emphasis>$file</emphasis> is the content of the object to store.
+                    </para>
+                    <para>
+                        The <emphasis>$metadata</emphasis> array contains the metadata information related to the object to store.   
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+             <varlistentry id="zend.service.rackspace.files.methods.update-cdn-container">
+                <term>
+                    <methodsynopsis>
+                        <methodname>updateCdnContainer</methodname>
+                        <methodparam>
+                            <funcparams>string $container,integer $ttl=null,$cdn_enabled=null,$log=null</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Update the attribute of a <acronym>CDN</acronym> container. Return an associative array contains the CDN url and SSL url.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        The <emphasis>$container</emphasis> is the name of the container.
+                    </para>
+                    <para>
+                        The <emphasis>$ttl</emphasis> is the time to live for the CDN cache content. The default value is 15 minutes (900 seconds).
+                        The minimum TTL that can be set is 15 minutes (900 seconds); the maximum TTL is
+                        50 years (range of 900 to 1577836800 seconds).
+                    </para>   
+                    <para>
+                        The <emphasis>$cdn_enabled</emphasis> is the flag to swith on/off the CDN. <emphasis>True</emphasis> switch on, <emphasis>false</emphasis> switch off.
+                    </para>
+                    <para>
+                        The <emphasis>$log</emphasis> enable or disable the log retention. <emphasis>True</emphasis> switch on, <emphasis>false</emphasis> switch off.
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </sect2>
+ 
+    <sect2 id="zend.service.rackspace.files.examples">
+        <title>Examples</title>
+        
+        <example id="zend.service.rackspace.files.examples.authenticate">
+            <title>Authenticate</title>
+ 
+            <para>Check if the username and the key are valid for the Rackspace authentication.</para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user,$key);
+
+if ($rackspace->authenticate()) {
+    printf("Authenticated with token: %s",$rackspace->getToken());
+} else {
+    printf("ERROR: %s",$rackspace->getErrorMsg());
+}
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.files.examples.get-object">
+            <title>Get an object</title>
+            
+            <para>Get an image file (<emphasis>example.gif</emphasis>) from the cloud and render it in the browser</para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user,$key);
+
+$object= $rackspace->getObject('test','example.gif');
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+}
+
+header('Content-type: image/gif');
+echo $object->getFile();
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.files.examples.create-container">
+            <title>Create a container with metadata</title>
+ 
+            <para>Create a container (<emphasis>test</emphasis>) with some metadata information (<emphasis>$metadata</emphasis>)</para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user,$key);
+
+$metadata= array (
+    'foo'  => 'bar',
+    'foo2' => 'bar2',
+);
+
+$container= $rackspace->createContainer('test',$metadata);
+
+if ($rackspace->isSuccessful()) {
+    echo 'Container created successfully';
+}    
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.files.examples.get-metadata-container">
+            <title>Get the metadata of a container</title>
+            
+            <para>Get the metadata of the container <emphasis>test</emphasis></para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user, $key);
+
+$container= $rackspace->getContainer('test');
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: ' . $rackspace->getErrorMsg());
+}
+
+$metadata= $container->getMetadata();
+print_r($metadata);
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.files.examples.store-object-container">
+            <title>Store an object in a container</title>
+ 
+            <para>Store an object using a <classname>Zend_Service_Rackspace_Files_Container</classname> instance</para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user, $key);
+
+$container= $rackspace->getContainer('test');
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: ' . $rackspace->getErrorMsg());
+}
+
+$file     = file_get_contents('test.jpg');
+$metadata = array (
+    'foo' => 'bar',
+);
+
+if ($container->addObject('test.jpg', $file, $metadata)) {
+    echo 'Object stored successfully';
+} 
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.files.examples.check-cdn-enabled">
+            <title>Check if a container is CDN enabled</title>
+ 
+            <para>Check if the <emphasis>test</emphasis> container is CDN enabled. If it is not we enable it.</para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Files($user, $key);
+
+$container= $rackspace->getContainer('test');
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: ' . $rackspace->getErrorMsg());
+}
+
+if (!$container->isCdnEnabled()) {
+    if (!$container->enableCdn()) {
+        die('ERROR: ' . $rackspace->getErrorMsg());
+    }
+}
+printf(
+    "The container is CDN enabled with the following URLs:\n %s\n %s\n",
+    $container->getCdnUri(), 
+    $container->getCdnUriSsl()
+);
+]]></programlisting>
+        </example>
+    </sect2>
+</sect1>

+ 1049 - 0
documentation/manual/en/module_specs/Zend_Service_Rackspace_Servers.xml

@@ -0,0 +1,1049 @@
+<?xml version="1.0" encoding="utf-8"?>
+<sect1 id="zend.service.rackspace.servers">
+    <title>Zend_Service_Rackspace_Servers</title>
+
+    <sect2 id="zend.service.rackspace.servers.intro">
+        <title>Overview</title>
+
+        <para>
+            The <classname>Zend_Service_Rackspace_Servers</classname> is a class that provides a
+            simple <acronym>API</acronym> to manage the <ulink url="http://www.rackspace.com/cloud/cloud_hosting_products/servers/">Rackspace
+                Cloud Servers</ulink>.  Using this class you can:
+        </para>
+
+        <itemizedlist>
+            <listitem>
+                <para>
+                    Create new servers
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    List and get information on each server
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Delete a server
+                </para>
+            </listitem>
+            
+            <listitem>
+                <para>
+                    Manage the public/private IP addresses of a server
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Resize the server capacity
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Reboot a server
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Create new images for a server
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Manage the backup of a server
+                </para>
+            </listitem>
+
+            <listitem>
+                <para>
+                    Create a group of server to share the IP addresses for High Availability architecture
+                </para>
+            </listitem>
+        </itemizedlist> 
+    </sect2>
+
+    <sect2 id="zend.service.rackspace.servers.terminology">
+        <title>Terminology</title>
+        
+        <para>
+            A <emphasis>server</emphasis> is a virtual machine instance in the Cloud Servers system. Flavor and image are
+            requisite elements when creating a server.
+        </para>
+        
+        <para>
+            A <emphasis>server</emphasis> is managed using the the class <classname>Zend_Service_Rackspace_Servers_Server</classname>.
+        </para>
+        
+        <para>
+            A <emphasis>flavor</emphasis> is an available hardware configuration for a server. Each flavor has a unique
+            combination of disk space, memory capacity and priority for CPU time.
+        </para>
+        
+        <para>
+            An <emphasis>image</emphasis> is a collection of files used to create or rebuild a server. Rackspace provides a
+            number of pre-built OS images by default. You may also create custom images from cloud
+            servers you have launched. These custom images are useful for backup purposes or for
+            producing “gold” server images if you plan to deploy a particular server configuration
+            frequently.
+        </para>
+        
+        <para>
+            An <emphasis>image</emphasis> is managed using the the class <classname>Zend_Service_Rackspace_Servers_Image</classname>.
+        </para>
+        
+        <para>
+            A <emphasis>backup schedule</emphasis> can be defined to create server images at regular intervals (daily and
+            weekly). Backup schedules are configurable per server.
+        </para>
+        
+        <para>
+            <emphasis>Public IP addresses</emphasis> can be shared across multiple servers for use in various high availability
+            scenarios. When an IP address is shared to another server, the cloud network restrictions
+            are modified to allow each server to listen to and respond on that IP address (you may
+            optionally specify that the target server network configuration be modified). Shared
+            IP addresses can be used with many standard heartbeat facilities (e.g. keepalived) that
+            monitor for failure and manage IP failover.
+        </para>    
+        
+        <para>
+            A <emphasis>shared IP group</emphasis> is a collection of servers that can share IPs with other members of the
+            group. Any server in a group can share one or more public IPs with any other server in the
+            group. With the exception of the first server in a shared IP group, servers must be launched
+            into shared IP groups. A server may only be a member of one shared IP group.
+        </para>    
+        
+        <para>
+            A <emphasis>shared IP group</emphasis> is managed using the the class <classname>Zend_Service_Rackspace_Servers_SharedIpGroup</classname>.
+        </para>
+    </sect2>
+    
+    <sect2 id="zend.service.rackspace.servers.quick-start">
+        <title>Quick Start</title>
+        
+        <para>
+            To use this class you have to pass the username and the API's key
+            of Rackspace in the construction of the class.
+        </para>
+        
+         <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Servers($user,$key);
+]]></programlisting>
+                
+        <para>
+            To create a new server you can use the <emphasis>createServer</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[  
+$data = array (
+    'name'     => 'test',
+    'imageId'  => '49',
+    'flavorId' => '1',
+);
+
+$server= $rackspace->createServer($data);
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+printf("Server name    : %s\n",$server->getName());
+printf("Server Id      : %s\n",$server->getId());
+printf("Admin password : %s\n",$server->getAdminPass());
+]]></programlisting>
+
+        <para>
+            This example create a server with name <emphasis>test</emphasis>, imageId 49, and
+            flavorId 1. The attributes <emphasis>name</emphasis>, <emphasis>imageId</emphasis> and
+            <emphasis>flavorId</emphasis> are required to create a new server.  The result of
+            <emphasis>createServer</emphasis> is an instance of
+            <classname>Zend_Service_Rackspace_Servers_Server</classname>.
+        </para>
+        
+        <para>
+            To get the public and private IP addresses of a server you can use the
+            <emphasis>getServerIp</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[
+$id  = '20054631';
+$ips = $rackspace->getServerIp($id);
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+echo "Private IPs:\n";
+print_r($ips['private']);
+echo "Public IPs:\n";
+print_r($ips['public']);
+]]></programlisting>
+
+        <para>
+            This example get the IP addresses of the server with Id <emphasis>20054631</emphasis>.
+            The result of <emphasis>getServerIp</emphasis> is an associative arrays with keys
+            'private' and 'public' contains all the private IP addresses and the public IP addresses
+            of the server.
+        </para>
+        
+        <para>
+            To get the list of all the available servers you can use the
+            <emphasis>listServers</emphasis> method.
+        </para>
+        
+        <programlisting language="php"><![CDATA[           
+$servers= $rackspace->listServer(true);
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+foreach ($servers as $srv) {
+    printf("Name      : %s\n",$srv->getName());
+    printf("Server Id : %s\n",$srv->getId());
+    printf("Image  Id : %s\n",$srv->getImageId());
+    printf("Flavor Id : %s\n",$srv->getFlavorId());
+    printf("Status    : %s (%d\%)\n",$srv->getStatus(),$srv->getProgress());
+}
+]]></programlisting>
+            
+    </sect2>
+ 
+    <sect2 id="zend.service.rackspace.servers.methods">
+        <title>Available Methods</title>
+ 
+        <variablelist>
+            <varlistentry id="zend.service.rackspace.servers.methods.change-backup-schedule">
+                <term>
+                    <methodsynopsis>
+                        <methodname>changeBackupSchedule</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $weekly, string $daily</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        This operation creates a new backup schedule or updates an existing backup schedule for
+                        the specified server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the ID of the server
+                    </para>    
+                    <para>
+                        <emphasis>$weekly</emphasis>, the day of the week for the backup (for instance "THURSDAY")
+                    </para>
+                    <para>
+                        <emphasis>$daily</emphasis>, specify the hours for the backup (for instance "H_0400_0600")
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.change-server-name">
+                <term>
+                    <methodsynopsis>
+                        <methodname>changeServerName</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $name</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Change the name of a server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the ID of the server
+                    </para>    
+                    <para>
+                        <emphasis>$name</emphasis> is an optional parameter that specify the new name of the server
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.change-server-password">
+                <term>
+                    <methodsynopsis>
+                        <methodname>changeServerPassword</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $password</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Change the admin password of a server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the ID of the server
+                    </para>    
+                    <para>
+                        <emphasis>$password</emphasis> is an optional parameter that specify the new admin password of the server
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.confirm-resize-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>confirmResizeServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Confirm the resize of a server. During a resize operation, the original server is saved for a period of time to allow roll
+                        back if there is a problem. Once the newly resized server is tested and has been confirmed
+                        to be functioning properly, use this operation to confirm the resize. After confirmation,
+                        the original server is removed and cannot be rolled back to. All resizes are automatically
+                        confirmed after 24 hours if they are not explicitly confirmed or reverted.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.create-image">
+                <term>
+                    <methodsynopsis>
+                        <methodname>createImage</methodname>
+                        <methodparam>
+                            <funcparams>string $serverId,string $name</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Create an image from a server.
+                        Return a new instance of <classname>Zend_Service_Rackspace_Servers_Image</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$serverId</emphasis> is the Id of the server to use to create the image.
+                    </para>    
+                    <para>
+                        <emphasis>$name</emphasis>, is the name of image to create
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.create-shared-ip-group">
+                <term>
+                    <methodsynopsis>
+                        <methodname>createSharedIpGroup</methodname>
+                        <methodparam>
+                            <funcparams>string $name, string $serverId</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        This operation creates a new shared IP group. Please note, on a create request, the shared IP
+                        group can be created empty or can be initially populated with a single server.
+                        Return the shared IP group as instance of <classname>Zend_Service_Rackspace_Servers_SharedIpGroup</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$name</emphasis> is the name of the shared IP group to create.
+                    </para>    
+                    <para>
+                        <emphasis>$serverId</emphasis> is the Id of the server.
+                    </para> 
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.create-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>createServer</methodname>
+                        <methodparam>
+                            <funcparams>array $data, $metadata=array(),$files=array()</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Create a server with the attributes specified in <emphasis>$data</emphasis>. You can specify also
+                        optional parameters: <emphasis>metadata</emphasis> and <emphasis>files</emphasis>.
+                        Metadata is an array contains key/value of metadata related to the server and files is an array
+                        contains the paths of some files to upload into the server. The syntax used for the uploading
+                        of the files is 'serverPath' =&gt; 'localPath'.
+                        Return a new instance of <classname>Zend_Service_Rackspace_Servers_Server</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$data</emphasis> contains the parameters for the server.
+                        The required attributes to create a new server are:
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <emphasis>name</emphasis>, contains the name of the server
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>flavorId</emphasis>, contains the flavor's Id to use
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <emphasis>imageId</emphasis>, contains the image's Id to use
+                                </para>
+                            </listitem>
+                        </itemizedlist>   
+                    </para>    
+                    <para>
+                        <emphasis>$metadata</emphasis>, contains the array of metadata information
+                    </para>
+                    <para>
+                        <emphasis>$files</emphasis>, contains the path of the files to upload in the server
+                        using the syntax 'serverPath' =&gt; 'localPath'.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.disable-backup-schedule">
+                <term>
+                    <methodsynopsis>
+                        <methodname>disableBackupSchedule</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Disable the backup of a server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.delete-image">
+                <term>
+                    <methodsynopsis>
+                        <methodname>deleteImage</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Delete a image.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the image.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.delete-shared-ip-group">
+                <term>
+                    <methodsynopsis>
+                        <methodname>deleteSharedIpGroup</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Delete a shared IP group.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the shared IP group.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.delete-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>deleteServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Delete a server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-backup-schedule">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getBackupSchedule</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the backup schedule of a server. The return is an associative array with the following values: enabled, weekly, daily.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-flavor">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getFlavor</methodname>
+                        <methodparam>
+                            <funcparams>string $flavorId</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the information about a flavor. The return is an associative array with the following values: id, ram, disk, name.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$flavorId</emphasis> is the Id of the flavor.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-image">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getImage</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return an image as instance of <classname>Zend_Service_Rackspace_Servers_Image</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the image.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-shared-ip-group">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getSharedIpGroup</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the shared IP group as instance of <classname>Zend_Service_Rackspace_Servers_SharedIpGroup</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the Id of the shared IP group.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the server specified by the Id as instance of <classname>Zend_Service_Rackspace_Servers_Server</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-server-ip">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getServerIp</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the public and private IP addresses of a server.
+                        Return an associative array contains the key <emphasis>'public'</emphasis> and <emphasis>'private'</emphasis> for the IP addresses.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-server-private-ip">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getServerPrivateIp</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the private IP addresses of the server.
+                        Return an associative array contains the IP addresses.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.get-server-public-ip">
+                <term>
+                    <methodsynopsis>
+                        <methodname>getServerPublicIp</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return the public IP addresses of the server.
+                        Return an associative array contains the IP addresses.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.list-flavors">
+                <term>
+                    <methodsynopsis>
+                        <methodname>listFlavors</methodname>
+                        <methodparam>
+                            <funcparams>boolean $details=false</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return all the available flavors as associative array. 
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        If <emphasis>$details</emphasis> is <emphasis>true</emphasis> return a detailed list, if is <emphasis>false</emphasis> return only the <emphasis>name</emphasis> and the <emphasis>Id</emphasis> of the flavor.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.list-images">
+                <term>
+                    <methodsynopsis>
+                        <methodname>listImages</methodname>
+                        <methodparam>
+                            <funcparams>boolean $details=false</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return all the available images as instance of <classname>Zend_Service_Rackspace_Servers_ImageList</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        If <emphasis>$details</emphasis> is <emphasis>true</emphasis> return a detailed list, if is <emphasis>false</emphasis> return only the <emphasis>name</emphasis> and the <emphasis>Id</emphasis> of the Image.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.list-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>listServer</methodname>
+                        <methodparam>
+                            <funcparams>boolean $details=false</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return all the available servers with a new instance of <classname>Zend_Service_Rackspace_Servers_ServerList</classname>.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        If <emphasis>$details</emphasis> is <emphasis>true</emphasis> return a detailed list, if is <emphasis>false</emphasis> return only the <emphasis>name</emphasis> and the <emphasis>Id</emphasis> of the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.list-shared-ip-groups">
+                <term>
+                    <methodsynopsis>
+                        <methodname>listSharedIpGroups</methodname>
+                        <methodparam>
+                            <funcparams>boolean $details=false</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Return all the shared IP groups as instance of <classname>Zend_Service_Rackspace_Servers_SharedIpGroupList</classname>
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        If <emphasis>$details</emphasis> is <emphasis>true</emphasis> return a detailed list, if is <emphasis>false</emphasis> return only the <emphasis>name</emphasis> and the <emphasis>Id</emphasis> of the shared IP group.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.reboot-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>rebootServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id, boolean $hard=false</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Reboot a server. 
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>
+                    <para>
+                        If <emphasis>$hard</emphasis> is <emphasis>false</emphasis> (default) the server is rebooted in soft mode. 
+                        That means the operating system is signaled to restart, which allows for a graceful shutdown of
+                        all processes. If <emphasis>$hard</emphasis> is <emphasis>true</emphasis> the server is rebooted in hard mode.
+                        A hard reboot is the equivalent of power cycling the server.
+                    </para>    
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.rebuild-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>rebuildServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $imageId</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Rebuild a server. The rebuild function removes all data on the server and replaces it with the specified image,
+                        server's Id and IP addresses will remain the same.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>
+                    <para>
+                        <emphasis>$imageId</emphasis> is the new Image Id of the server.
+                    </para>  
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.resize-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>resizeServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $flavorId</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Resize a server. The resize function converts an existing server to a different flavor, in essence, scaling the
+                        server up or down. The original server is saved for a period of time to allow rollback if there
+                        is a problem. All resizes should be tested and explicitly confirmed, at which time the original
+                        server is removed. All resizes are automatically confirmed after 24 hours if they are not
+                        explicitly confirmed or reverted.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>
+                    <para>
+                        <emphasis>$flavorId</emphasis> is the new flavor Id of the server.
+                    </para>  
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.revert-resize-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>revertResizeServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Revert the resize of a server. During a resize operation, the original server is saved for a period of time to allow for roll
+                        back if there is a problem. If you determine there is a problem with a newly resized server,
+                        use this operation to revert the resize and roll back to the original server. All resizes are
+                        automatically confirmed after 24 hours if they have not already been confirmed explicitly or
+                        reverted.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para>
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.share-ip-address">
+                <term>
+                    <methodsynopsis>
+                        <methodname>shareIpAddress</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $ip, string $groupId, boolean $configure=true</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Share an IP address for a server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para> 
+                    <para>
+                        <emphasis>$ip</emphasis> is the IP address to share.
+                    </para> 
+                    <para>
+                        <emphasis>$groupId</emphasis> is the group Id to use.
+                    </para> 
+                    <para>
+                        If <emphasis>$configure</emphasis> attribute is set to true, the server is configured
+                        with the new address, though the address is not enabled. Note that configuring the server
+                        does require a reboot.
+                    </para>     
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.unshare-ip-address">
+                <term>
+                    <methodsynopsis>
+                        <methodname>unshareIpAddress</methodname>
+                        <methodparam>
+                            <funcparams>string $id, string $ip</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Unshare an IP address for a server.
+                        Return <emphasis>true</emphasis> in case of success, <emphasis>false</emphasis> in case of error.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is Id of the server.
+                    </para> 
+                    <para>
+                        <emphasis>$ip</emphasis> is the IP address to share.
+                    </para> 
+                </listitem>
+            </varlistentry>
+            
+            <varlistentry id="zend.service.rackspace.servers.methods.update-server">
+                <term>
+                    <methodsynopsis>
+                        <methodname>updateServer</methodname>
+                        <methodparam>
+                            <funcparams>string $id,string $name=null,string $password=null</funcparams>
+                        </methodparam>
+                    </methodsynopsis>
+                </term>
+                
+                <listitem>
+                    <para>
+                        Change the name or/and the admin password of a server.
+                        In case of error the return is <emphasis>false</emphasis>.
+                    </para>
+                    <para>
+                        <emphasis>$id</emphasis> is the ID of the server
+                    </para>    
+                    <para>
+                        <emphasis>$name</emphasis> is an optional parameter that specify the new name of the server
+                    </para>
+                    <para>
+                        <emphasis>$password</emphasis> is an optional parameter that specify the new admin password of the server
+                    </para>
+                </listitem>
+            </varlistentry>
+        </variablelist>
+    </sect2>
+ 
+    <sect2 id="zend.service.rackspace.servers.examples">
+        <title>Examples</title>
+ 
+        <example id="zend.service.rackspace.servers.examples.authenticate">
+            <title>Authenticate</title>
+ 
+            <para>Check if the username and the key are valid for the Rackspace authentication.</para>
+ 
+            <programlisting language="php"><![CDATA[
+$user = 'username';
+$key  = 'secret key';
+
+$rackspace = new Zend_Service_Rackspace_Servers($user,$key);
+
+if ($rackspace->authenticate()) {
+    printf("Authenticated with token: %s",$rackspace->getToken());
+} else {
+    printf("ERROR: %s",$rackspace->getErrorMsg());
+}
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.servers.examples.create-server">
+            <title>Create a server with metadata information and upload of a file</title>
+            
+            <para>
+                Create a server with some metadata information and upload the file <emphasis>build.sh</emphasis>
+                from the local path <emphasis>/home/user</emphasis> to the remote path <emphasis>/root</emphasis>.
+             </para>   
+ 
+            <programlisting language="php"><![CDATA[
+$data = array (
+    'name'     => 'test',
+    'imageId'  => '49',
+    'flavorId' => '1',
+);
+$metadata = array (
+    'foo' => 'bar',
+);
+$files = array (   
+    '/root/build.sh' => '/home/user/build.sh',
+);
+$server= $rackspace->createServer($data,$metadata,$files);
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+$publicIp= $server->getPublicIp();
+
+printf("Server name    : %s\n",$server->getName());
+printf("Server Id      : %s\n",$server->getId());
+printf("Public IP      : %s\n",$publicIp[0]);
+printf("Admin password : %s\n",$server->getAdminPass());
+]]></programlisting>
+        </example>
+        
+        <example id="zend.service.rackspace.servers.examples.reboot-server">
+            <title>Reboot a server</title>
+            
+            <para>
+                Reboot a server in hard mode (is the equivalent of power cycling the server).
+             </para>   
+ 
+            <programlisting language="php"><![CDATA[
+$flavors= $rackspace->rebootServer('server id',true)
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+echo "The server has been rebooted successfully";
+]]></programlisting>
+        </example>
+
+        <example id="zend.service.rackspace.servers.examples.list-flavors">
+            <title>List all the available flavors</title>
+ 
+            <para>
+                List all the available flavors with all the detailed information.
+             </para>   
+ 
+            <programlisting language="php"><![CDATA[
+$flavors= $rackspace->listFlavors(true);
+
+if (!$rackspace->isSuccessful()) {
+    die('ERROR: '.$rackspace->getErrorMsg());
+} 
+
+print_r($flavors);
+]]></programlisting>
+        </example>
+    </sect2>
+</sect1>

+ 62 - 0
tests/Zend/Service/Rackspace/AllTests.php

@@ -0,0 +1,62 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Service_Nirvanix
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id $
+ */
+
+if (!defined('PHPUnit_MAIN_METHOD')) {
+    define('PHPUnit_MAIN_METHOD', 'Zend_Service_Rackspace_AllTests::main');
+}
+
+require_once 'Zend/Service/Rackspace/OfflineTest.php';
+require_once 'Zend/Service/Rackspace/Files/AllTests.php';
+require_once 'Zend/Service/Rackspace/Servers/AllTests.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Service_Rackspace
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @group      Zend_Service
+ * @group      Zend_Service_Rackspace
+ */
+class Zend_Service_Rackspace_AllTests
+{
+    public static function main()
+    {
+        PHPUnit_TextUI_TestRunner::run(self::suite());
+    }
+
+    public static function suite()
+    {
+        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_Rackspace');
+
+        $suite->addTest(Zend_Service_Rackspace_Files_AllTests::suite());
+        $suite->addTest(Zend_Service_Rackspace_Servers_AllTests::suite());
+        
+        $suite->addTestSuite('Zend_Service_Rackspace_OfflineTest');
+
+        return $suite;
+    }
+}
+
+if (PHPUnit_MAIN_METHOD == 'Zend_Service_Rackspace_AllTests::main') {
+    Zend_Service_Rackspace_AllTests::main();
+}

+ 57 - 0
tests/Zend/Service/Rackspace/Files/AllTests.php

@@ -0,0 +1,57 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Service_Nirvanix
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id $
+ */
+
+if (!defined('PHPUnit_MAIN_METHOD')) {
+    define('PHPUnit_MAIN_METHOD', 'Zend_Service_Rackspace_Files_AllTests::main');
+}
+
+require_once 'Zend/Service/Rackspace/Files/OfflineTest.php';
+require_once 'Zend/Service/Rackspace/Files/OnlineTest.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Service_Rackspace_Files
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Service_Rackspace_Files_AllTests
+{
+    public static function main()
+    {
+        PHPUnit_TextUI_TestRunner::run(self::suite());
+    }
+
+    public static function suite()
+    {
+        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_Rackspace_Files');
+
+        $suite->addTestSuite('Zend_Service_Rackspace_Files_OfflineTest');
+        $suite->addTestSuite('Zend_Service_Rackspace_Files_OnlineTest');
+
+        return $suite;
+    }
+}
+
+if (PHPUnit_MAIN_METHOD == 'Zend_Service_Rackspace_Files_AllTests::main') {
+    Zend_Service_Rackspace_Files_AllTests::main();
+}

+ 43 - 46
tests/Zend/Service/Rackspace/Files/OnlineTest.php

@@ -42,88 +42,85 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
      *
      * @var Zend_Service_Rackspace_Files
      */
-    protected static $rackspace;
+    protected $rackspace;
     /**
      * Socket based HTTP client adapter
      *
      * @var Zend_Http_Client_Adapter_Socket
      */
-    protected static $httpClientAdapterSocket;
+    protected $httpClientAdapterSocket;
     /**
      * Metadata for container/object test
      * 
      * @var array 
      */
-    protected static $metadata;
+    protected $metadata;
     /**
      * Another metadata for container/object test
      * 
      * @var array 
      */
-    protected static $metadata2;
+    protected $metadata2;
+    
     /**
-     * SetUpBerofeClass
+     * Set up the test case
+     *
+     * @return void
      */
-    public static function setUpBeforeClass()
+    public function setUp()
     {
+        
         if (!constant('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_ENABLED')) {
-            self::markTestSkipped('Zend_Service_Rackspace_Files_OnlineTest tests are not enabled');
+            $this->markTestSkipped('Zend_Service_Rackspace_Files_OnlineTest tests are not enabled');
         }
         if(!defined('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER') || !defined('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_KEY')) {
-            self::markTestSkipped('Constants User and Key have to be set.');
+             $this->markTestSkipped('Constants User and Key have to be set.');
         }
 
-        self::$rackspace = new Zend_Service_Rackspace_Files(TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER,
+        $this->rackspace = new Zend_Service_Rackspace_Files(TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER,
                                        TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_KEY);
 
-        self::$httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket();
+        $this->httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket();
 
-        self::$rackspace->getHttpClient()
+        $this->rackspace->getHttpClient()
                         ->setAdapter(self::$httpClientAdapterSocket);
         
-        self::$metadata =  array (
+        $this->metadata =  array (
             'foo'  => 'bar',
             'foo2' => 'bar2'
         );
         
-        self::$metadata2 = array (
+        $this->metadata2 = array (
             'hello' => 'world'
         );
-    }
-    /**
-     * Set up the test case
-     *
-     * @return void
-     */
-    public function setUp()
-    {
+        
         // terms of use compliance: safe delay between each test
-        sleep(1);
+        sleep(2);
     }
     
     public function testCreateContainer()
     {
-        $container= self::$rackspace->createContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,self::$metadata);
+        $container= $this->rackspace->createContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,$this->metadata);
         $this->assertTrue($container!==false);
         $this->assertEquals($container->getName(),TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
     }
 
     public function testGetCountContainers()
     {
-        $num= self::$rackspace->getCountContainers();
+        $num= $this->rackspace->getCountContainers();
         $this->assertTrue($num>0);
     }
     
     public function testGetContainer()
     {
-        $container= self::$rackspace->getContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
+        $container= $this->rackspace->getContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
         $this->assertTrue($container!==false);
         $this->assertEquals($container->getName(),TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
     }
     
     public function testGetContainers()
     {
-        $containers= self::$rackspace->getContainers();
+        $containers= $this->rackspace->getContainers();
         $this->assertTrue($containers!==false);
         $found=false;
         foreach ($containers as $container) {
@@ -137,16 +134,16 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
     
     public function testGetMetadataContainer()
     {
-        $data= self::$rackspace->getMetadataContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
+        $data= $this->rackspace->getMetadataContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
         $this->assertTrue($data!==false);
         $this->assertEquals($data['name'],TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
-        $this->assertEquals($data['metadata'],self::$metadata);
+        $this->assertEquals($data['metadata'],$this->metadata);
         
     }
     
     public function testGetInfoAccount()
     {
-        $data= self::$rackspace->getInfoAccount();
+        $data= $this->rackspace->getInfoAccount();
         $this->assertTrue($data!==false);
         $this->assertTrue($data['tot_containers']>0);
     }
@@ -154,16 +151,16 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
     public function testStoreObject()
     {
         $content= 'This is a test!';
-        $result= self::$rackspace->storeObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, 
+        $result= $this->rackspace->storeObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, 
                                                TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME,
                                                $content,
-                                               self::$metadata);
+                                               $this->metadata);
         $this->assertTrue($result);
     }
     
     public function testGetObject()
     {
-        $object= self::$rackspace->getObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, 
+        $object= $this->rackspace->getObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME, 
                                              TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME);
         $this->assertTrue($object!==false);
         $this->assertEquals($object->getName(),TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME);
@@ -171,7 +168,7 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
 
     public function testCopyObject()
     {
-        $result= self::$rackspace->copyObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
+        $result= $this->rackspace->copyObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
                                               TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME,
                                               TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
                                               TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME.'-copy');
@@ -180,7 +177,7 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
 
     public function testGetObjects()
     {
-        $objects= self::$rackspace->getObjects(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
+        $objects= $this->rackspace->getObjects(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
         $this->assertTrue($objects!==false);
         
         $this->assertEquals($objects[0]->getName(),TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME);
@@ -189,37 +186,37 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
     
     public function testGetSizeContainers()
     {
-        $size= self::$rackspace->getSizeContainers();
+        $size= $this->rackspace->getSizeContainers();
         $this->assertTrue($size!==false);
         $this->assertTrue(is_numeric($size));
     }
     
     public function testGetCountObjects()
     {
-        $count= self::$rackspace->getCountObjects();
+        $count= $this->rackspace->getCountObjects();
         $this->assertTrue($count!==false);
         $this->assertTrue(is_numeric($count));
     }
     
     public function testSetMetadataObject()
     {
-        $result= self::$rackspace->setMetadataObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
+        $result= $this->rackspace->setMetadataObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
                                                      TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME,
-                                                     self::$metadata2);
+                                                     $this->metadata2);
         $this->assertTrue($result);
     }
     
     public function testGetMetadataObject()
     {
-        $data= self::$rackspace->getMetadataObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
+        $data= $this->rackspace->getMetadataObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
                                                    TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME);
         $this->assertTrue($data!==false);
-        $this->assertEquals($data['metadata'],self::$metadata2);
+        $this->assertEquals($data['metadata'],$this->metadata2);
     }
     
     public function testEnableCdnContainer()
     {
-        $data= self::$rackspace->enableCdnContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
+        $data= $this->rackspace->enableCdnContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME);
         $this->assertTrue($data!==false);
         $this->assertTrue(is_array($data));
         $this->assertTrue(!empty($data['cdn_uri']));
@@ -228,7 +225,7 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
     
     public function testGetCdnContainers()
     {
-        $containers= self::$rackspace->getCdnContainers();
+        $containers= $this->rackspace->getCdnContainers();
         $this->assertTrue($containers!==false);
         $found= false;
         foreach ($containers as $container) {
@@ -242,26 +239,26 @@ class Zend_Service_Rackspace_Files_OnlineTest extends PHPUnit_Framework_TestCase
     
     public function testUpdateCdnContainer()
     {
-        $data= self::$rackspace->updateCdnContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,null,false);
+        $data= $this->rackspace->updateCdnContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,null,false);
         $this->assertTrue($data!==false);
     }
 
     
     public function testDeleteObject()
     {
-        $this->assertTrue(self::$rackspace->deleteObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
+        $this->assertTrue($this->rackspace->deleteObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
                                                          TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME));
     }
     
     public function testDeleteObject2()
     {
-        $this->assertTrue(self::$rackspace->deleteObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
+        $this->assertTrue($this->rackspace->deleteObject(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME,
                                                          TESTS_ZEND_SERVICE_RACKSPACE_OBJECT_NAME.'-copy'));
     }
     
     public function testDeleteContainer()
     {
-        $this->assertTrue(self::$rackspace->deleteContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME));
+        $this->assertTrue($this->rackspace->deleteContainer(TESTS_ZEND_SERVICE_RACKSPACE_CONTAINER_NAME));
     }
   
 }

+ 57 - 0
tests/Zend/Service/Rackspace/Servers/AllTests.php

@@ -0,0 +1,57 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category   Zend
+ * @package    Zend_Service_Nirvanix
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ * @version    $Id $
+ */
+
+if (!defined('PHPUnit_MAIN_METHOD')) {
+    define('PHPUnit_MAIN_METHOD', 'Zend_Service_Rackspace_Servers_AllTests::main');
+}
+
+require_once 'Zend/Service/Rackspace/Servers/OfflineTest.php';
+require_once 'Zend/Service/Rackspace/Servers/OnlineTest.php';
+
+/**
+ * @category   Zend
+ * @package    Zend_Service_Rackspace_Servers
+ * @subpackage UnitTests
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license    http://framework.zend.com/license/new-bsd     New BSD License
+ */
+class Zend_Service_Rackspace_Servers_AllTests
+{
+    public static function main()
+    {
+        PHPUnit_TextUI_TestRunner::run(self::suite());
+    }
+
+    public static function suite()
+    {
+        $suite = new PHPUnit_Framework_TestSuite('Zend Framework - Zend_Service_Rackspace_Servers');
+
+        $suite->addTestSuite('Zend_Service_Rackspace_Servers_OfflineTest');
+        $suite->addTestSuite('Zend_Service_Rackspace_Servers_OnlineTest');
+
+        return $suite;
+    }
+}
+
+if (PHPUnit_MAIN_METHOD == 'Zend_Service_Rackspace_Servers_AllTests::main') {
+    Zend_Service_Rackspace_Servers_AllTests::main();
+}

+ 46 - 72
tests/Zend/Service/Rackspace/Servers/OnlineTest.php

@@ -37,13 +37,13 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      *
      * @var Zend_Service_Rackspace_Servers
      */
-    protected static $rackspace;
+    protected $rackspace;
     /**
      * Check if the resize was successfully done
      * 
      * @var boolean 
      */
-    protected static $resize;
+    protected $resize;
     /**
      * List of flavors available
      * 
@@ -85,34 +85,31 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      *
      * @var Zend_Http_Client_Adapter_Socket
      */
-    protected static $httpClientAdapterSocket;
+    protected $httpClientAdapterSocket;
+
     /**
-     * SetUpBerofeClass
+     * Sets up this test case
+     *
+     * @return void
      */
-    public static function setUpBeforeClass()
+    public function setUp()
     {
         if (!constant('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_ENABLED')) {
-            self::markTestSkipped('Zend_Service_Rackspace_Servers_OnlineTest tests are not enabled');
+            $this->markTestSkipped('Zend_Service_Rackspace_Servers_OnlineTest tests are not enabled');
         }
+        
         if(!defined('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER') || !defined('TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_KEY')) {
-            self::markTestSkipped('Constants User and Key have to be set.');
+            $this->markTestSkipped('Constants User and Key have to be set.');
         }
 
-        self::$rackspace = new Zend_Service_Rackspace_Servers(TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER,
+        $this->rackspace = new Zend_Service_Rackspace_Servers(TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_USER,
                                        TESTS_ZEND_SERVICE_RACKSPACE_ONLINE_KEY);
 
-        self::$httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket();
+        $this->httpClientAdapterSocket = new Zend_Http_Client_Adapter_Socket();
+
+        $this->rackspace->getHttpClient()
+                        ->setAdapter($this->httpClientAdapterSocket);
 
-        self::$rackspace->getHttpClient()
-                        ->setAdapter(self::$httpClientAdapterSocket);
-    }
-    /**
-     * Sets up this test case
-     *
-     * @return void
-     */
-    public function setUp()
-    {
         // terms of use compliance: safe delay between each test
         sleep(2);
     }
@@ -124,12 +121,12 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      * @param integer $timeout
      * @return boolean
      */
-    protected static function waitForStatus($status,$timeout=TESTS_ZEND_SERVICE_RACKSPACE_TIMEOUT)
+    protected function waitForStatus($status,$timeout=TESTS_ZEND_SERVICE_RACKSPACE_TIMEOUT)
     {
         $info['status']= null;
         $i=0;
         while ((strtoupper($info['status'])!==strtoupper($status)) && ($i<$timeout)) {
-            $info= self::$rackspace->getServer(self::$serverId)->toArray();
+            $info= $this->rackspace->getServer(self::$serverId)->toArray();
             $i+=5;
             sleep(5);
         }
@@ -150,7 +147,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
     public function testAuthentication()
     {
         $this->filename= __METHOD__;
-        $this->assertTrue(self::$rackspace->authenticate());
+        $this->assertTrue($this->rackspace->authenticate());
     }
     /**
      * Test create server
@@ -162,19 +159,19 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
             'imageId'  => TESTS_ZEND_SERVICE_RACKSPACE_SERVER_IMAGEID,
             'flavorId' => TESTS_ZEND_SERVICE_RACKSPACE_SERVER_FLAVORID
         );
-        $server= self::$rackspace->createServer($data);
+        $server= $this->rackspace->createServer($data);
         $this->assertTrue($server!==false);
         self::$serverId= $server->getId();
         self::$adminPass= $server->getAdminPass();
         $this->assertEquals(TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME,$server->getName());
-        $this->assertTrue(self::waitForStatus('active'));
+        $this->assertTrue($this->waitForStatus('active'));
     }
     /**
      * Test Get Server
      */
     public function testGetServer()
     {
-        $server= self::$rackspace->getServer(self::$serverId);
+        $server= $this->rackspace->getServer(self::$serverId);
         $this->assertTrue($server!==false);
         $this->assertEquals(TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME,$server->getName());
     }
@@ -183,7 +180,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testListServers()
     {
-        $servers= self::$rackspace->listServers();
+        $servers= $this->rackspace->listServers();
         $this->assertTrue($servers!==false);
     }
     /**
@@ -191,14 +188,14 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testChangeServerName()
     {
-        $this->assertTrue(self::$rackspace->changeServerName(self::$serverId,TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME.'_renamed'));
+        $this->assertTrue($this->rackspace->changeServerName(self::$serverId,TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME.'_renamed'));
     }
     /**
      * Test rechange server name
      */
     public function testRechangeServerName()
     {
-        $this->assertTrue(self::$rackspace->changeServerName(self::$serverId,TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME));
+        $this->assertTrue($this->rackspace->changeServerName(self::$serverId,TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NAME));
     }
     /**
      * Test change admin password
@@ -206,14 +203,14 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
     public function testChangeServerPassword()
     {
         self::$adminPass= md5(time().rand());
-        $this->assertTrue(self::$rackspace->changeServerPassword(self::$serverId,self::$adminPass));
+        $this->assertTrue($this->rackspace->changeServerPassword(self::$serverId,self::$adminPass));
     }
     /**
      * Test get server IP
      */
     public function testGetServerIp()
     {
-        $addresses= self::$rackspace->getServerIp(self::$serverId);
+        $addresses= $this->rackspace->getServerIp(self::$serverId);
         $this->assertTrue(!empty($addresses['public']) && is_array($addresses['public']));
         $this->assertTrue(!empty($addresses['private']) && is_array($addresses['private']));
     }
@@ -222,7 +219,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testGetServerPublicIp()
     {
-        $public= self::$rackspace->getServerPublicIp(self::$serverId);
+        $public= $this->rackspace->getServerPublicIp(self::$serverId);
         $this->assertTrue(!empty($public) && is_array($public));
     }
     /**
@@ -230,7 +227,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testGetServerPrivateIp()
     {
-        $private= self::$rackspace->getServerPrivateIp(self::$serverId);
+        $private= $this->rackspace->getServerPrivateIp(self::$serverId);
         $this->assertTrue(!empty($private) && is_array($private));
     }
     /**
@@ -238,23 +235,23 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testSoftRebootServer()
     {
-        $this->assertTrue(self::$rackspace->rebootServer(self::$serverId));
-        $this->assertTrue(self::waitForStatus('active'));
+        $this->assertTrue($this->rackspace->rebootServer(self::$serverId));
+        $this->assertTrue($this->waitForStatus('active'));
     }
     /**
      * Test hard reboot the server
      */
     public function testHardRebootServer()
     {
-        $this->assertTrue(self::$rackspace->rebootServer(self::$serverId,true));
-        $this->assertTrue(self::waitForStatus('active'));
+        $this->assertTrue($this->rackspace->rebootServer(self::$serverId,true));
+        $this->assertTrue($this->waitForStatus('active'));
     }
     /**
      * Test rebuild the server image
      */
     public function testRebuildServer()
     {
-        $this->assertTrue(self::$rackspace->rebuildServer(self::$serverId,TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NEW_IMAGEID));
+        $this->assertTrue($this->rackspace->rebuildServer(self::$serverId,TESTS_ZEND_SERVICE_RACKSPACE_SERVER_NEW_IMAGEID));
     }
     /**
      * Test resize server
@@ -282,7 +279,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testListFlavors()
     {
-        self::$flavors= self::$rackspace->listFlavors(true);
+        self::$flavors= $this->rackspace->listFlavors(true);
         $this->assertTrue(is_array(self::$flavors) && !empty(self::$flavors));
         $this->assertTrue(isset(self::$flavors[0]['id']));
     }
@@ -291,7 +288,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testGetFlavor()
     {
-        $flavor= self::$rackspace->getFlavor(self::$flavors[0]['id']);
+        $flavor= $this->rackspace->getFlavor(self::$flavors[0]['id']);
         $this->assertTrue(is_array($flavor) && !empty($flavor));
         $this->assertEquals($flavor['id'],self::$flavors[0]['id']);
     }
@@ -300,7 +297,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testListImages()
     {
-        self::$images= self::$rackspace->listImages(true);
+        self::$images= $this->rackspace->listImages(true);
         $this->assertTrue(count(self::$images)>0);
         $image= self::$images[0];
         $imageId= $image->getId();
@@ -312,7 +309,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
     public function testGetImage()
     {
         $image= self::$images[0];
-        $getImage= self::$rackspace->getImage($image->getId());
+        $getImage= $this->rackspace->getImage($image->getId());
         $this->assertEquals($getImage->getId(),$image->getId());
     }
     /**
@@ -320,7 +317,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testGetImageInfo()
     {
-        $image= self::$rackspace->getImage(self::$images[0]->getId())->toArray();
+        $image= $this->rackspace->getImage(self::$images[0]->getId())->toArray();
         $this->assertTrue(is_array($image) && !empty($image));
         $this->assertEquals($image['id'],self::$images[0]->getId());
     }
@@ -329,7 +326,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testCreateImage()
     {
-        $image= self::$rackspace->createImage(self::$serverId, TESTS_ZEND_SERVICE_RACKSPACE_SERVER_IMAGE_NAME);
+        $image= $this->rackspace->createImage(self::$serverId, TESTS_ZEND_SERVICE_RACKSPACE_SERVER_IMAGE_NAME);
         if ($image!==false) {
             self::$imageId= $image->getId();
         }
@@ -342,7 +339,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
     public function testDeleteImage()
     {
         if (isset(self::$imageId)) {
-            $this->assertTrue(self::$rackspace->deleteImage(self::$imageId));
+            $this->assertTrue($this->rackspace->deleteImage(self::$imageId));
         } else {
             $this->markTestSkipped('Delete image skipped because the new image has not been created');
         }
@@ -373,7 +370,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testCreateSharedIpGroup()
     {
-        self::$sharedIpGroup= self::$rackspace->createSharedIpGroup(TESTS_ZEND_SERVICE_RACKSPACE_SERVER_SHARED_IP_GROUP_NAME, self::$serverId);
+        self::$sharedIpGroup= $this->rackspace->createSharedIpGroup(TESTS_ZEND_SERVICE_RACKSPACE_SERVER_SHARED_IP_GROUP_NAME, self::$serverId);
         $this->assertTrue(self::$sharedIpGroup!==false);
         $this->assertEquals(self::$sharedIpGroup->getName(),TESTS_ZEND_SERVICE_RACKSPACE_SERVER_SHARED_IP_GROUP_NAME);
     }
@@ -382,7 +379,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testListSharedIpGroups()
     {
-        $groups= self::$rackspace->listSharedIpGroups(true);
+        $groups= $this->rackspace->listSharedIpGroups(true);
         $this->assertTrue($groups!==false);
     }
     /**
@@ -391,7 +388,7 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
     public function testGetSharedIpGroup()
     {
         $groupId= self::$sharedIpGroup->getId();
-        $group= self::$rackspace->getSharedIpGroup($groupId);
+        $group= $this->rackspace->getSharedIpGroup($groupId);
         $this->assertTrue($group!==false);
         $this->assertEquals($group->getId(), $groupId);   
     }
@@ -400,36 +397,13 @@ class Zend_Service_Rackspace_Servers_OnlineTest extends PHPUnit_Framework_TestCa
      */
     public function testDeleteSharedIpGroup()
     {
-        $this->assertTrue(self::$rackspace->deleteSharedIpGroup(self::$sharedIpGroup->getId())); 
+        $this->assertTrue($this->rackspace->deleteSharedIpGroup(self::$sharedIpGroup->getId())); 
     }
     /**
      * Test delete server
      */
     public function testDeleteServer()
     {
-        $this->assertTrue(self::$rackspace->deleteServer(self::$serverId));
-    }
-}
-
-
-/**
- * @category   Zend
- * @package    Zend_Service_Rackspace_Servers
- * @subpackage UnitTests
- * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @group      Zend_Service
- * @group      Zend_Service_Rackspace
- */
-class Zend_Service_Rackspace_Servers_Skip extends PHPUnit_Framework_TestCase
-{
-    public function setUp()
-    {
-        $this->markTestSkipped('Zend_Service_Rackspace_Servers_OnlineTest is not enabled with an access key ID in '
-                             . 'TestConfiguration.php');
-    }
-
-    public function testNothing()
-    {
+        $this->assertTrue($this->rackspace->deleteServer(self::$serverId));
     }
 }