cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seb...@apache.org
Subject [2/8] cleaned up formatting in all the files and removed the deprecated 'managing_networks.rst' file: This closes #13
Date Wed, 28 May 2014 06:45:06 GMT
http://git-wip-us.apache.org/repos/asf/cloudstack-docs-install/blob/f58c8b9f/source/network_setup.rst
----------------------------------------------------------------------
diff --git a/source/network_setup.rst b/source/network_setup.rst
index e85ba46..c995501 100644
--- a/source/network_setup.rst
+++ b/source/network_setup.rst
@@ -13,6 +13,7 @@
    specific language governing permissions and limitations
    under the License.
 
+
 Network Setup
 =============
 
@@ -21,16 +22,21 @@ CloudStack installation. This section contains information to help you
 make decisions and follow the right procedures to get your network set
 up correctly.
 
+
 Basic and Advanced Networking
 -----------------------------
 
 CloudStack provides two styles of networking:.
 
 **Basic**
-      For AWS-style networking. Provides a single network where guest isolation can be provided through layer-3 means such as security groups (IP address source filtering).
+For AWS-style networking. Provides a single network where guest isolation can 
+be provided through layer-3 means such as security groups (IP address source 
+filtering).
 
 **Advanced**
-      For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks, but requires more configuration steps than basic networking.
+For more sophisticated network topologies. This network model provides the 
+most flexibility in defining guest networks, but requires more configuration 
+steps than basic networking.
 
 Each zone has either basic or advanced networking. Once the choice of
 networking model for a zone has been made and configured in CloudStack,
@@ -64,6 +70,7 @@ traffic, you can use separate VLANs. If you are using separate VLANs on
 a single physical network, make sure the VLAN tags are in separate
 numerical ranges.
 
+
 VLAN Allocation Example
 -----------------------
 
@@ -81,6 +88,7 @@ less than 500       Management traffic. Reserved for administrative purposes.  C
 greater than 1000   Reserved for future use
 ==================  =========================================================  =======================================================================
 
+
 Example Hardware Configuration
 ------------------------------
 
@@ -89,6 +97,7 @@ for zone-level layer-3 switching. It assumes VLAN management protocols,
 such as VTP or GVRP, have been disabled. The example scripts must be
 changed appropriately if you choose to use VTP or GVRP.
 
+
 Dell 62xx
 ~~~~~~~~~
 
@@ -99,38 +108,31 @@ Ethernet port 1/g1.
 
 The Dell 62xx Series switch supports up to 1024 VLANs.
 
-#. 
-
-   Configure all the VLANs in the database.
+#. Configure all the VLANs in the database.
 
    .. sourcecode:: bash
 
-       vlan database
-       vlan 200-999
-       exit
-
-#. 
+      vlan database
+      vlan 200-999
+      exit
 
-   Configure Ethernet port 1/g1.
+#. Configure Ethernet port 1/g1.
 
    .. sourcecode:: bash
 
-       interface ethernet 1/g1
-       switchport mode general
-       switchport general pvid 201
-       switchport general allowed vlan add 201 untagged
-       switchport general allowed vlan add 300-999 tagged
-       exit
+      interface ethernet 1/g1
+      switchport mode general
+      switchport general pvid 201
+      switchport general allowed vlan add 201 untagged
+      switchport general allowed vlan add 300-999 tagged
+      exit
 
 The statements configure Ethernet port 1/g1 as follows:
 
--  
+-  VLAN 201 is the native untagged VLAN for port 1/g1.
 
-   VLAN 201 is the native untagged VLAN for port 1/g1.
+-  All VLANs (300-999) are passed to all the pod-level layer-2 switches.
 
--  
-
-   All VLANs (300-999) are passed to all the pod-level layer-2 switches.
 
 Cisco 3750
 ~~~~~~~~~~
@@ -140,53 +142,42 @@ layer-3 switching. These steps assume VLAN 201 is used to route untagged
 private IPs for pod 1, and pod 1’s layer-2 switch is connected to
 GigabitEthernet1/0/1.
 
-#. 
-
-   Setting VTP mode to transparent allows us to utilize VLAN IDs above
+#. Setting VTP mode to transparent allows us to utilize VLAN IDs above
    1000. Since we only use VLANs up to 999, vtp transparent mode is not
    strictly required.
 
    .. sourcecode:: bash
 
-       vtp mode transparent
-       vlan 200-999
-       exit
-
-#. 
+      vtp mode transparent
+      vlan 200-999
+      exit
 
-   Configure GigabitEthernet1/0/1.
+#. Configure GigabitEthernet1/0/1.
 
    .. sourcecode:: bash
 
-       interface GigabitEthernet1/0/1
-       switchport trunk encapsulation dot1q
-       switchport mode trunk
-       switchport trunk native vlan 201
-       exit
+      interface GigabitEthernet1/0/1
+      switchport trunk encapsulation dot1q
+      switchport mode trunk
+      switchport trunk native vlan 201
+      exit
 
 The statements configure GigabitEthernet1/0/1 as follows:
 
--  
+-  VLAN 201 is the native untagged VLAN for port GigabitEthernet1/0/1.
 
-   VLAN 201 is the native untagged VLAN for port GigabitEthernet1/0/1.
-
--  
-
-   Cisco passes all VLANs by default. As a result, all VLANs (300-999)
+-  Cisco passes all VLANs by default. As a result, all VLANs (300-999)
    are passed to all the pod-level layer-2 switches.
 
+
 Layer-2 Switch
 --------------
 
 The layer-2 switch is the access switching layer inside the pod.
 
--  
+-  It should trunk all VLANs into every computing host.
 
-   It should trunk all VLANs into every computing host.
-
--  
-
-   It should switch traffic for the management network containing
+-  It should switch traffic for the management network containing
    computing and storage hosts. The layer-3 switch will serve as the
    gateway for the management network.
 
@@ -201,74 +192,64 @@ Dell 62xx
 The following steps show how a Dell 62xx is configured for pod-level
 layer-2 switching.
 
-#. 
-
-   Configure all the VLANs in the database.
+#. Configure all the VLANs in the database.
 
    .. sourcecode:: bash
 
-       vlan database
-       vlan 300-999
-       exit
+      vlan database
+      vlan 300-999
+      exit
 
-#. 
-
-   VLAN 201 is used to route untagged private IP addresses for pod 1,
+#. VLAN 201 is used to route untagged private IP addresses for pod 1,
    and pod 1 is connected to this layer-2 switch.
 
    .. sourcecode:: bash
 
-       interface range ethernet all
-       switchport mode general
-       switchport general allowed vlan add 300-999 tagged
-       exit
+      interface range ethernet all
+      switchport mode general
+      switchport general allowed vlan add 300-999 tagged
+      exit
 
 The statements configure all Ethernet ports to function as follows:
 
--  
-
-   All ports are configured the same way.
-
--  
+-  All ports are configured the same way.
 
-   All VLANs (300-999) are passed through all the ports of the layer-2
+-  All VLANs (300-999) are passed through all the ports of the layer-2
    switch.
 
+
 Cisco 3750
 ~~~~~~~~~~
 
 The following steps show how a Cisco 3750 is configured for pod-level
 layer-2 switching.
 
-#. 
-
-   Setting VTP mode to transparent allows us to utilize VLAN IDs above
+#. Setting VTP mode to transparent allows us to utilize VLAN IDs above
    1000. Since we only use VLANs up to 999, vtp transparent mode is not
    strictly required.
 
    .. sourcecode:: bash
 
-       vtp mode transparent
-       vlan 300-999
-       exit
-
-#. 
+      vtp mode transparent
+      vlan 300-999
+      exit
 
-   Configure all ports to dot1q and set 201 as the native VLAN.
+#. Configure all ports to dot1q and set 201 as the native VLAN.
 
    .. sourcecode:: bash
 
-       interface range GigabitEthernet 1/0/1-24
-       switchport trunk encapsulation dot1q
-       switchport mode trunk
-       switchport trunk native vlan 201
-       exit
+      interface range GigabitEthernet 1/0/1-24
+      switchport trunk encapsulation dot1q
+      switchport mode trunk
+      switchport trunk native vlan 201
+      exit
 
 By default, Cisco passes all VLANs. Cisco switches complain of the
 native VLAN IDs are different when 2 ports are connected together.
 That’s why you must specify VLAN 201 as the native VLAN on the layer-2
 switch.
 
+
 Hardware Firewall
 -----------------
 
@@ -277,20 +258,17 @@ see Generic Firewall Provisions. Optionally, some deployments may also
 have a Juniper SRX firewall that will be the default gateway for the
 guest networks; see `“External Guest Firewall Integration for Juniper SRX (Optional)” <#external-guest-firewall-integration-for-juniper-srx-optional>`_.
 
+
 Generic Firewall Provisions
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The hardware firewall is required to serve two purposes:
 
--  
-
-   Protect the Management Servers. NAT and port forwarding should be
+-  Protect the Management Servers. NAT and port forwarding should be
    configured to direct traffic from the public Internet to the
    Management Servers.
 
--  
-
-   Route management network traffic between multiple zones. Site-to-site
+-  Route management network traffic between multiple zones. Site-to-site
    VPN should be configured between multiple zones.
 
 To achieve the above purposes you must set up fixed configurations for
@@ -298,11 +276,11 @@ the firewall. Firewall rules and policies need not change as users are
 provisioned into the cloud. Any brand of hardware firewall that supports
 NAT and site-to-site VPN can be used.
 
+
 External Guest Firewall Integration for Juniper SRX (Optional)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 .. note::
-
    Available only for guests using advanced networking.
 
 CloudStack provides for direct management of the Juniper SRX series of
@@ -322,60 +300,39 @@ mode.|
 CloudStack requires the Juniper SRX firewall to be configured as follows:
 
 .. note::
-
    Supported SRX software version is 10.3 or higher.
 
-#. 
-
-   Install your SRX appliance according to the vendor's instructions.
-
-#. 
+#. Install your SRX appliance according to the vendor's instructions.
 
-   Connect one interface to the management network and one interface to
+#. Connect one interface to the management network and one interface to
    the public network. Alternatively, you can connect the same interface
    to both networks and a use a VLAN for the public network.
 
-#. 
+#. Make sure "vlan-tagging" is enabled on the private interface.
 
-   Make sure "vlan-tagging" is enabled on the private interface.
-
-#. 
-
-   Record the public and private interface names. If you used a VLAN for
+#. Record the public and private interface names. If you used a VLAN for
    the public interface, add a ".[VLAN TAG]" after the interface name.
    For example, if you are using ge-0/0/3 for your public interface and
    VLAN tag 301, your public interface name would be "ge-0/0/3.301".
    Your private interface name should always be untagged because the
    CloudStack software automatically creates tagged logical interfaces.
 
-#. 
-
-   Create a public security zone and a private security zone. By
+#. Create a public security zone and a private security zone. By
    default, these will already exist and will be called "untrust" and
    "trust". Add the public interface to the public zone and the private
    interface to the private zone. Note down the security zone names.
 
-#. 
-
-   Make sure there is a security policy from the private zone to the
+#. Make sure there is a security policy from the private zone to the
    public zone that allows all traffic.
 
-#. 
-
-   Note the username and password of the account you want the CloudStack
+#. Note the username and password of the account you want the CloudStack
    software to log in to when it is programming rules.
 
-#. 
-
-   Make sure the "ssh" and "xnm-clear-text" system services are enabled.
+#. Make sure the "ssh" and "xnm-clear-text" system services are enabled.
 
-#. 
+#. If traffic metering is desired:
 
-   If traffic metering is desired:
-
-   #. 
-
-      Create an incoming firewall filter and an outgoing firewall
+   #. Create an incoming firewall filter and an outgoing firewall
       filter. These filters should be the same names as your public
       security zone name and private security zone name respectively.
       The filters should be set to be "interface-specific". For example,
@@ -384,143 +341,95 @@ CloudStack requires the Juniper SRX firewall to be configured as follows:
 
       .. sourcecode:: bash
 
-          root@cloud-srx# show firewall
-          filter trust {
-              interface-specific;
-          }
-          filter untrust {
-              interface-specific;
-          }
-
-   #. 
+         root@cloud-srx# show firewall
+         filter trust {
+             interface-specific;
+         }
+         filter untrust {
+             interface-specific;
+         }
 
-      Add the firewall filters to your public interface. For example, a
+   #. Add the firewall filters to your public interface. For example, a
       sample configuration output (for public interface ge-0/0/3.0,
       public security zone untrust, and private security zone trust) is:
 
       .. sourcecode:: bash
 
-          ge-0/0/3 {
-              unit 0 {
-                  family inet {
-                      filter {
-                          input untrust;
-                          output trust;
-                      }
-                      address 172.25.0.252/16;
-                  }
-              }
-          }
-
-#. 
-
-   Make sure all VLANs are brought to the private interface of the SRX.
-
-#. 
-
-   After the CloudStack Management Server is installed, log in to the
+         ge-0/0/3 {
+             unit 0 {
+                 family inet {
+                     filter {
+                         input untrust;
+                         output trust;
+                     }
+                     address 172.25.0.252/16;
+                 }
+             }
+         }
+
+#. Make sure all VLANs are brought to the private interface of the SRX.
+
+#. After the CloudStack Management Server is installed, log in to the
    CloudStack UI as administrator.
 
-#. 
-
-   In the left navigation bar, click Infrastructure.
-
-#. 
-
-   In Zones, click View More.
-
-#. 
-
-   Choose the zone you want to work with.
+#. In the left navigation bar, click Infrastructure.
 
-#. 
+#. In Zones, click View More.
 
-   Click the Network tab.
+#. Choose the zone you want to work with.
 
-#. 
+#. Click the Network tab.
 
-   In the Network Service Providers node of the diagram, click
+#. In the Network Service Providers node of the diagram, click
    Configure. (You might have to scroll down to see this.)
 
-#. 
+#. Click SRX.
 
-   Click SRX.
+#. Click the Add New SRX button (+) and provide the following:
 
-#. 
+   -  IP Address: The IP address of the SRX.
 
-   Click the Add New SRX button (+) and provide the following:
-
-   -  
-
-      IP Address: The IP address of the SRX.
-
-   -  
-
-      Username: The user name of the account on the SRX that CloudStack
+   -  Username: The user name of the account on the SRX that CloudStack
       should use.
 
-   -  
-
-      Password: The password of the account.
-
-   -  
+   -  Password: The password of the account.
 
-      Public Interface. The name of the public interface on the SRX. For
+   -  Public Interface. The name of the public interface on the SRX. For
       example, ge-0/0/2. A ".x" at the end of the interface indicates
       the VLAN that is in use.
 
-   -  
-
-      Private Interface: The name of the private interface on the SRX.
+   -  Private Interface: The name of the private interface on the SRX.
       For example, ge-0/0/1.
 
-   -  
-
-      Usage Interface: (Optional) Typically, the public interface is
+   -  Usage Interface: (Optional) Typically, the public interface is
       used to meter traffic. If you want to use a different interface,
       specify its name here
 
-   -  
-
-      Number of Retries: The number of times to attempt a command on the
+   -  Number of Retries: The number of times to attempt a command on the
       SRX before failing. The default value is 2.
 
-   -  
-
-      Timeout (seconds): The time to wait for a command on the SRX
+   -  Timeout (seconds): The time to wait for a command on the SRX
       before considering it failed. Default is 300 seconds.
 
-   -  
-
-      Public Network: The name of the public network on the SRX. For
+   -  Public Network: The name of the public network on the SRX. For
       example, trust.
 
-   -  
-
-      Private Network: The name of the private network on the SRX. For
+   -  Private Network: The name of the private network on the SRX. For
       example, untrust.
 
-   -  
+   -  Capacity: The number of networks the device can handle
 
-      Capacity: The number of networks the device can handle
-
-   -  
-
-      Dedicated: When marked as dedicated, this device will be dedicated
+   -  Dedicated: When marked as dedicated, this device will be dedicated
       to a single account. When Dedicated is checked, the value in the
       Capacity field has no significance implicitly, its value is 1
 
-#. 
-
-   Click OK.
+#. Click OK.
 
-#. 
-
-   Click Global Settings. Set the parameter
+#. Click Global Settings. Set the parameter
    external.network.stats.interval to indicate how often you want
    CloudStack to fetch network usage statistics from the Juniper SRX. If
-   you are not using the SRX to gather network usage statistics, set to
-   0.
+   you are not using the SRX to gather network usage statistics, set to 0.
+
 
 External Guest Firewall Integration for Cisco VNMC (Optional)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -532,46 +441,33 @@ and NAT service offered by ASA 1000v Cloud Firewall. Use it in a Cisco
 Nexus 1000v dvSwitch-enabled cluster in CloudStack. In such a
 deployment, you will be able to:
 
--  
-
-   Configure Cisco ASA 1000v firewalls. You can configure one per guest
+-  Configure Cisco ASA 1000v firewalls. You can configure one per guest
    network.
 
--  
-
-   Use Cisco ASA 1000v firewalls to create and apply security profiles
+-  Use Cisco ASA 1000v firewalls to create and apply security profiles
    that contain ACL policy sets for both ingress and egress traffic.
 
--  
-
-   Use Cisco ASA 1000v firewalls to create and apply Source NAT, Port
+-  Use Cisco ASA 1000v firewalls to create and apply Source NAT, Port
    Forwarding, and Static NAT policy sets.
 
 CloudStack supports Cisco VNMC on Cisco Nexus 1000v dvSwich-enabled
 VMware hypervisors.
 
+
 Using Cisco ASA 1000v Firewall, Cisco Nexus 1000v dvSwitch, and Cisco VNMC in a Deployment
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 Guidelines
 '''''''''''
 
--  
-
-   Cisco ASA 1000v firewall is supported only in Isolated Guest
+-  Cisco ASA 1000v firewall is supported only in Isolated Guest
    Networks.
 
--  
-
-   Cisco ASA 1000v firewall is not supported on VPC.
-
--  
+-  Cisco ASA 1000v firewall is not supported on VPC.
 
-   Cisco ASA 1000v firewall is not supported for load balancing.
+-  Cisco ASA 1000v firewall is not supported for load balancing.
 
--  
-
-   When a guest network is created with Cisco VNMC firewall provider, an
+-  When a guest network is created with Cisco VNMC firewall provider, an
    additional public IP is acquired along with the Source NAT IP. The
    Source NAT IP is used for the rules, whereas the additional IP is
    used to for the ASA outside interface. Ensure that this additional
@@ -581,45 +477,32 @@ Guidelines
    NAT. You can find the IP used for the ASA outside interface by
    looking at the Cisco VNMC used in your guest network.
 
--  
-
-   Use the public IP address range from a single subnet. You cannot add
+-  Use the public IP address range from a single subnet. You cannot add
    IP addresses from different subnets.
 
--  
-
-   Only one ASA instance per VLAN is allowed because multiple VLANS
+-  Only one ASA instance per VLAN is allowed because multiple VLANS
    cannot be trunked to ASA ports. Therefore, you can use only one ASA
    instance in a guest network.
 
--  
-
-   Only one Cisco VNMC per zone is allowed.
-
--  
-
-   Supported only in Inline mode deployment with load balancer.
+-  Only one Cisco VNMC per zone is allowed.
 
--  
+-  Supported only in Inline mode deployment with load balancer.
 
-   The ASA firewall rule is applicable to all the public IPs in the
+-  The ASA firewall rule is applicable to all the public IPs in the
    guest network. Unlike the firewall rules created on virtual router, a
    rule created on the ASA device is not tied to a specific public IP.
 
--  
-
-   Use a version of Cisco Nexus 1000v dvSwitch that support the vservice
+-  Use a version of Cisco Nexus 1000v dvSwitch that support the vservice
    command. For example: nexus-1000v.4.2.1.SV1.5.2b.bin
 
    Cisco VNMC requires the vservice command to be available on the Nexus
    switch to create a guest network in CloudStack.
 
+
 Prerequisites
 '''''''''''''
 
-#. 
-
-   Configure Cisco Nexus 1000v dvSwitch in a vCenter environment.
+#. Configure Cisco Nexus 1000v dvSwitch in a vCenter environment.
 
    Create Port profiles for both internal and external network
    interfaces on Cisco Nexus 1000v dvSwitch. Note down the inside port
@@ -627,231 +510,156 @@ Prerequisites
    CloudStack.
 
    For information on configuration, see 
-   `“Configuring a vSphere Cluster with Nexus 1000v Virtual Switch” <hypervisor_installation.html#configuring-a-vsphere-cluster-with-nexus-1000v-virtual-switch>`_.
-
-#. 
-
-   Deploy and configure Cisco VNMC.
-
-   For more information, see `Installing Cisco Virtual Network Management Center <http://www.cisco.com/en/US/docs/switches/datacenter/vsg/sw/4_2_1_VSG_2_1_1/install_upgrade/guide/b_Cisco_VSG_for_VMware_vSphere_Rel_4_2_1_VSG_2_1_1_and_Cisco_VNMC_Rel_2_1_Installation_and_Upgrade_Guide_chapter_011.html>`_
-   and `Configuring Cisco Virtual Network Management Center <http://www.cisco.com/en/US/docs/unified_computing/vnmc/sw/1.2/VNMC_GUI_Configuration/b_VNMC_GUI_Configuration_Guide_1_2_chapter_010.html>`_.
+   `“Configuring a vSphere Cluster with Nexus 1000v Virtual Switch” 
+   <hypervisor_installation.html#configuring-a-vsphere-cluster-with-nexus-1000v-virtual-switch>`_.
 
-#. 
+#. Deploy and configure Cisco VNMC.
 
-   Register Cisco Nexus 1000v dvSwitch with Cisco VNMC.
+   For more information, see 
+   `Installing Cisco Virtual Network Management Center 
+   <http://www.cisco.com/en/US/docs/switches/datacenter/vsg/sw/4_2_1_VSG_2_1_1/install_upgrade/guide/b_Cisco_VSG_for_VMware_vSphere_Rel_4_2_1_VSG_2_1_1_and_Cisco_VNMC_Rel_2_1_Installation_and_Upgrade_Guide_chapter_011.html>`_
+   and `Configuring Cisco Virtual Network Management Center 
+   <http://www.cisco.com/en/US/docs/unified_computing/vnmc/sw/1.2/VNMC_GUI_Configuration/b_VNMC_GUI_Configuration_Guide_1_2_chapter_010.html>`_.
 
-   For more information, see `Registering a Cisco Nexus 1000V with Cisco
-   VNMC <http://www.cisco.com/en/US/docs/switches/datacenter/vsg/sw/4_2_1_VSG_1_2/vnmc_and_vsg_qi/guide/vnmc_vsg_install_5register.html#wp1064301>`_.
+#. Register Cisco Nexus 1000v dvSwitch with Cisco VNMC.
 
-#. 
+   For more information, see `Registering a Cisco Nexus 1000V with Cisco VNMC 
+   <http://www.cisco.com/en/US/docs/switches/datacenter/vsg/sw/4_2_1_VSG_1_2/vnmc_and_vsg_qi/guide/vnmc_vsg_install_5register.html#wp1064301>`_.
 
-   Create Inside and Outside port profiles in Cisco Nexus 1000v
-   dvSwitch.
+#. Create Inside and Outside port profiles in Cisco Nexus 1000v dvSwitch.
 
-   For more information, see `“Configuring a vSphere Cluster with Nexus 1000v Virtual Switch” <hypervisor_installation.html#configuring-a-vsphere-cluster-with-nexus-1000v-virtual-switch>`_.
+   For more information, see 
+   `“Configuring a vSphere Cluster with Nexus 1000v Virtual Switch” 
+   <hypervisor_installation.html#configuring-a-vsphere-cluster-with-nexus-1000v-virtual-switch>`_.
 
-#. 
+#. Deploy and Cisco ASA 1000v appliance.
 
-   Deploy and Cisco ASA 1000v appliance.
-
-   For more information, see `Setting Up the ASA 1000V Using VNMC <http://www.cisco.com/en/US/docs/security/asa/quick_start/asa1000V/setup_vnmc.html>`_.
+   For more information, see `Setting Up the ASA 1000V Using VNMC 
+   <http://www.cisco.com/en/US/docs/security/asa/quick_start/asa1000V/setup_vnmc.html>`_.
 
    Typically, you create a pool of ASA 1000v appliances and register
    them with CloudStack.
 
    Specify the following while setting up a Cisco ASA 1000v instance:
 
-   -  
-
-      VNMC host IP.
-
-   -  
+   -  VNMC host IP.
 
-      Ensure that you add ASA appliance in VNMC mode.
+   -  Ensure that you add ASA appliance in VNMC mode.
 
-   -  
-
-      Port profiles for the Management and HA network interfaces. This
+   -  Port profiles for the Management and HA network interfaces. This
       need to be pre-created on Cisco Nexus 1000v dvSwitch.
 
-   -  
-
-      Internal and external port profiles.
-
-   -  
+   -  Internal and external port profiles.
 
-      The Management IP for Cisco ASA 1000v appliance. Specify the
+   -  The Management IP for Cisco ASA 1000v appliance. Specify the
       gateway such that the VNMC IP is reachable.
 
-   -  
+   -  Administrator credentials
 
-      Administrator credentials
+   -  VNMC credentials
 
-   -  
-
-      VNMC credentials
-
-#. 
-
-   Register Cisco ASA 1000v with VNMC.
+#. Register Cisco ASA 1000v with VNMC.
 
    After Cisco ASA 1000v instance is powered on, register VNMC from the
    ASA console.
 
+
 Using Cisco ASA 1000v Services
 ''''''''''''''''''''''''''''''
 
-#. 
-
-   Ensure that all the prerequisites are met.
+#. Ensure that all the prerequisites are met.
 
    See `“Prerequisites” <#prerequisites>`_.
 
-#. 
-
-   Add a VNMC instance.
+#. Add a VNMC instance.
 
    See `“Adding a VNMC Instance” <#adding-a-vnmc-instance>`_.
 
-#. 
-
-   Add a ASA 1000v instance.
+#. Add a ASA 1000v instance.
 
    See `“Adding an ASA 1000v Instance” <#adding-an-asa-1000v-instance>`_.
 
-#. 
-
-   Create a Network Offering and use Cisco VNMC as the service provider
+#. Create a Network Offering and use Cisco VNMC as the service provider
    for desired services.
 
-   See `“Creating a Network Offering Using Cisco ASA 1000v” <#creating-a-network-offering-using-cisco-asa-1000v>`_.
+   See `“Creating a Network Offering Using Cisco ASA 1000v” 
+   <#creating-a-network-offering-using-cisco-asa-1000v>`_.
 
-#. 
-
-   Create an Isolated Guest Network by using the network offering you
+#. Create an Isolated Guest Network by using the network offering you
    just created.
 
+
 Adding a VNMC Instance
 ^^^^^^^^^^^^^^^^^^^^^^
 
-#. 
-
-   Log in to the CloudStack UI as administrator.
-
-#. 
-
-   In the left navigation bar, click Infrastructure.
+#. Log in to the CloudStack UI as administrator.
 
-#. 
+#. In the left navigation bar, click Infrastructure.
 
-   In Zones, click View More.
+#. In Zones, click View More.
 
-#. 
+#. Choose the zone you want to work with.
 
-   Choose the zone you want to work with.
+#. Click the Physical Network tab.
 
-#. 
-
-   Click the Physical Network tab.
-
-#. 
-
-   In the Network Service Providers node of the diagram, click
+#. In the Network Service Providers node of the diagram, click
    Configure.
 
    You might have to scroll down to see this.
 
-#. 
-
-   Click Cisco VNMC.
-
-#. 
-
-   Click View VNMC Devices.
+#. Click Cisco VNMC.
 
-#. 
+#. Click View VNMC Devices.
 
-   Click the Add VNMC Device and provide the following:
+#. Click the Add VNMC Device and provide the following:
 
-   -  
+   -  Host: The IP address of the VNMC instance.
 
-      Host: The IP address of the VNMC instance.
-
-   -  
-
-      Username: The user name of the account on the VNMC instance that
+   -  Username: The user name of the account on the VNMC instance that
       CloudStack should use.
 
-   -  
-
-      Password: The password of the account.
+   -  Password: The password of the account.
 
-#. 
+#. Click OK.
 
-   Click OK.
 
 Adding an ASA 1000v Instance
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
-#. 
-
-   Log in to the CloudStack UI as administrator.
-
-#. 
-
-   In the left navigation bar, click Infrastructure.
+#. Log in to the CloudStack UI as administrator.
 
-#. 
+#. In the left navigation bar, click Infrastructure.
 
-   In Zones, click View More.
+#. In Zones, click View More.
 
-#. 
+#. Choose the zone you want to work with.
 
-   Choose the zone you want to work with.
+#. Click the Physical Network tab.
 
-#. 
-
-   Click the Physical Network tab.
-
-#. 
-
-   In the Network Service Providers node of the diagram, click
+#. In the Network Service Providers node of the diagram, click
    Configure.
 
    You might have to scroll down to see this.
 
-#. 
-
-   Click Cisco VNMC.
-
-#. 
-
-   Click View ASA 1000v.
+#. Click Cisco VNMC.
 
-#. 
+#. Click View ASA 1000v.
 
-   Click the Add CiscoASA1000v Resource and provide the following:
+#. Click the Add CiscoASA1000v Resource and provide the following:
 
-   -  
-
-      **Host**: The management IP address of the ASA 1000v instance. The
+   -  **Host**: The management IP address of the ASA 1000v instance. The
       IP address is used to connect to ASA 1000V.
 
-   -  
-
-      **Inside Port Profile**: The Inside Port Profile configured on
+   -  **Inside Port Profile**: The Inside Port Profile configured on
       Cisco Nexus1000v dvSwitch.
 
-   -  
-
-      **Cluster**: The VMware cluster to which you are adding the ASA
+   -  **Cluster**: The VMware cluster to which you are adding the ASA
       1000v instance.
 
       Ensure that the cluster is Cisco Nexus 1000v dvSwitch enabled.
 
-#. 
+#. Click OK.
 
-   Click OK.
 
 Creating a Network Offering Using Cisco ASA 1000v
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -859,87 +667,57 @@ Creating a Network Offering Using Cisco ASA 1000v
 To have Cisco ASA 1000v support for a guest network, create a network
 offering as follows:
 
-#. 
-
-   Log in to the CloudStack UI as a user or admin.
-
-#. 
-
-   From the Select Offering drop-down, choose Network Offering.
+#. Log in to the CloudStack UI as a user or admin.
 
-#. 
+#. From the Select Offering drop-down, choose Network Offering.
 
-   Click Add Network Offering.
+#. Click Add Network Offering.
 
-#. 
+#. In the dialog, make the following choices:
 
-   In the dialog, make the following choices:
+   -  **Name**: Any desired name for the network offering.
 
-   -  
-
-      **Name**: Any desired name for the network offering.
-
-   -  
-
-      **Description**: A short description of the offering that can be
+   -  **Description**: A short description of the offering that can be
       displayed to users.
 
-   -  
+   -  **Network Rate**: Allowed data transfer rate in MB per second.
 
-      **Network Rate**: Allowed data transfer rate in MB per second.
-
-   -  
-
-      **Traffic Type**: The type of network traffic that will be carried
+   -  **Traffic Type**: The type of network traffic that will be carried
       on the network.
 
-   -  
-
-      **Guest Type**: Choose whether the guest network is isolated or
+   -  **Guest Type**: Choose whether the guest network is isolated or
       shared.
 
-   -  
-
-      **Persistent**: Indicate whether the guest network is persistent
+   -  **Persistent**: Indicate whether the guest network is persistent
       or not. The network that you can provision without having to
       deploy a VM on it is termed persistent network.
 
-   -  
-
-      **VPC**: This option indicate whether the guest network is Virtual
+   -  **VPC**: This option indicate whether the guest network is Virtual
       Private Cloud-enabled. A Virtual Private Cloud (VPC) is a private,
       isolated part of CloudStack. A VPC can have its own virtual
       network topology that resembles a traditional physical network.
-      For more information on VPCs, see `“About Virtual Private Clouds” <http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/networking2.html#about-virtual-private-clouds>`_.
-
-   -  
+      For more information on VPCs, see `“About Virtual Private Clouds” 
+      <http://docs.cloudstack.apache.org/projects/cloudstack-administration/en/latest/networking2.html#about-virtual-private-clouds>`_.
 
-      **Specify VLAN**: (Isolated guest networks only) Indicate whether
+   -  **Specify VLAN**: (Isolated guest networks only) Indicate whether
       a VLAN should be specified when this offering is used.
 
-   -  
-
-      **Supported Services**: Use Cisco VNMC as the service provider for
+   -  **Supported Services**: Use Cisco VNMC as the service provider for
       Firewall, Source NAT, Port Forwarding, and Static NAT to create an
       Isolated guest network offering.
 
-   -  
-
-      **System Offering**: Choose the system service offering that you
+   -  **System Offering**: Choose the system service offering that you
       want virtual routers to use in this network.
 
-   -  
-
-      **Conserve mode**: Indicate whether to use conserve mode. In this
+   -  **Conserve mode**: Indicate whether to use conserve mode. In this
       mode, network resources are allocated only when the first virtual
       machine starts in the network.
 
-#. 
-
-   Click OK
+#. Click OK
 
    The network offering is created.
 
+
 Reusing ASA 1000v Appliance in new Guest Networks
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -950,47 +728,38 @@ you need to reset the appliance to its factory settings for use in new
 guest networks. As part of this, enable SSH on the appliance and store
 the SSH credentials by registering on VNMC.
 
-#. 
-
-   Open a command line on the ASA appliance:
+#. Open a command line on the ASA appliance:
 
-   #. 
-
-      Run the following:
+   #. Run the following:
 
       .. sourcecode:: bash
 
-          ASA1000V(config)# reload
+         ASA1000V(config)# reload
 
       You are prompted with the following message:
 
       .. sourcecode:: bash
 
-          System config has been modified. Save? [Y]es/[N]o:"
-
-   #. 
+         System config has been modified. Save? [Y]es/[N]o:"
 
-      Enter N.
+   #. Enter N.
 
       You will get the following confirmation message:
 
       .. sourcecode:: bash
 
-          "Proceed with reload? [confirm]"
-
-   #. 
+         "Proceed with reload? [confirm]"
 
-      Restart the appliance.
+   #. Restart the appliance.
 
-#. 
-
-   Register the ASA 1000v appliance with the VNMC:
+#. Register the ASA 1000v appliance with the VNMC:
 
    .. sourcecode:: bash
 
-       ASA1000V(config)# vnmc policy-agent
-       ASA1000V(config-vnmc-policy-agent)# registration host vnmc_ip_address
-       ASA1000V(config-vnmc-policy-agent)# shared-secret key where key is the shared secret for authentication of the ASA 1000V connection to the Cisco VNMC
+      ASA1000V(config)# vnmc policy-agent
+      ASA1000V(config-vnmc-policy-agent)# registration host vnmc_ip_address
+      ASA1000V(config-vnmc-policy-agent)# shared-secret key where key is the shared secret for authentication of the ASA 1000V connection to the Cisco VNMC
+
 
 External Guest Load Balancer Integration (Optional)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -1003,110 +772,69 @@ router.
 To install and enable an external load balancer for CloudStack
 management:
 
-#. 
-
-   Set up the appliance according to the vendor's directions.
+#. Set up the appliance according to the vendor's directions.
 
-#. 
-
-   Connect it to the networks carrying public traffic and management
+#. Connect it to the networks carrying public traffic and management
    traffic (these could be the same network).
 
-#. 
-
-   Record the IP address, username, password, public interface name, and
+#. Record the IP address, username, password, public interface name, and
    private interface name. The interface names will be something like
    "1.1" or "1.2".
 
-#. 
-
-   Make sure that the VLANs are trunked to the management network
+#. Make sure that the VLANs are trunked to the management network
    interface.
 
-#. 
-
-   After the CloudStack Management Server is installed, log in as
+#. After the CloudStack Management Server is installed, log in as
    administrator to the CloudStack UI.
 
-#. 
-
-   In the left navigation bar, click Infrastructure.
-
-#. 
-
-   In Zones, click View More.
-
-#. 
-
-   Choose the zone you want to work with.
+#. In the left navigation bar, click Infrastructure.
 
-#. 
+#. In Zones, click View More.
 
-   Click the Network tab.
+#. Choose the zone you want to work with.
 
-#. 
+#. Click the Network tab.
 
-   In the Network Service Providers node of the diagram, click
+#. In the Network Service Providers node of the diagram, click
    Configure. (You might have to scroll down to see this.)
 
-#. 
+#. Click NetScaler or F5.
 
-   Click NetScaler or F5.
-
-#. 
-
-   Click the Add button (+) and provide the following:
+#. Click the Add button (+) and provide the following:
 
    For NetScaler:
 
-   -  
-
-      IP Address: The IP address of the SRX.
+   -  IP Address: The IP address of the SRX.
 
-   -  
-
-      Username/Password: The authentication credentials to access the
+   -  Username/Password: The authentication credentials to access the
       device. CloudStack uses these credentials to access the device.
 
-   -  
-
-      Type: The type of device that is being added. It could be F5 Big
+   -  Type: The type of device that is being added. It could be F5 Big
       Ip Load Balancer, NetScaler VPX, NetScaler MPX, or NetScaler SDX.
       For a comparison of the NetScaler types, see the CloudStack
       Administration Guide.
 
-   -  
-
-      Public interface: Interface of device that is configured to be
+   -  Public interface: Interface of device that is configured to be
       part of the public network.
 
-   -  
-
-      Private interface: Interface of device that is configured to be
+   -  Private interface: Interface of device that is configured to be
       part of the private network.
 
-   -  
-
-      Number of retries. Number of times to attempt a command on the
+   -  Number of retries. Number of times to attempt a command on the
       device before considering the operation failed. Default is 2.
 
-   -  
-
-      Capacity: The number of networks the device can handle.
+   -  Capacity: The number of networks the device can handle.
 
-   -  
-
-      Dedicated: When marked as dedicated, this device will be dedicated
+   -  Dedicated: When marked as dedicated, this device will be dedicated
       to a single account. When Dedicated is checked, the value in the
       Capacity field has no significance implicitly, its value is 1.
 
-#. 
-
-   Click OK.
+#. Click OK.
 
 The installation and provisioning of the external load balancer is
 finished. You can proceed to add VMs and NAT or load balancing rules.
 
+
 Management Server Load Balancing
 --------------------------------
 
@@ -1134,6 +862,7 @@ VIP for Port 8250 and one of your management servers crashes, the UI is
 still available but the system VMs will not be able to contact the
 management server.
 
+
 Topology Requirements
 ---------------------
 
@@ -1143,28 +872,24 @@ Security Requirements
 The public Internet must not be able to access port 8096 or port 8250 on
 the Management Server.
 
+
 Runtime Internal Communications Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
--  
-
-   The Management Servers communicate with each other to coordinate
+-  The Management Servers communicate with each other to coordinate
    tasks. This communication uses TCP on ports 8250 and 9090.
 
--  
-
-   The console proxy VMs connect to all hosts in the zone over the
+-  The console proxy VMs connect to all hosts in the zone over the
    management traffic network. Therefore the management traffic network
    of any given pod in the zone must have connectivity to the management
    traffic network of all other pods in the zone.
 
--  
-
-   The secondary storage VMs and console proxy VMs connect to the
+-  The secondary storage VMs and console proxy VMs connect to the
    Management Server on port 8250. If you are using multiple Management
    Servers, the load balanced IP address of the Management Servers on
    port 8250 must be reachable.
 
+
 Storage Network Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -1175,6 +900,7 @@ over the storage network, if available. If you choose to place secondary
 storage NFS servers on the storage network, you must make sure there is
 a route from the management traffic network to the storage network.
 
+
 External Firewall Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -1182,37 +908,35 @@ When external firewall integration is in place, the public IP VLAN must
 still be trunked to the Hosts. This is required to support the Secondary
 Storage VM and Console Proxy VM.
 
+
 Advanced Zone Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 With Advanced Networking, separate subnets must be used for private and
 public networks.
 
+
 XenServer Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The Management Servers communicate with XenServer hosts on ports 22
 (ssh), 80 (HTTP), and 443 (HTTPs).
 
+
 VMware Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
--  
-
-   The Management Server and secondary storage VMs must be able to
+-  The Management Server and secondary storage VMs must be able to
    access vCenter and all ESXi hosts in the zone. To allow the necessary
    access through the firewall, keep port 443 open.
 
--  
-
-   The Management Servers communicate with VMware vCenter servers on
+-  The Management Servers communicate with VMware vCenter servers on
    port 443 (HTTPs).
 
--  
-
-   The Management Servers communicate with the System VMs on port 3922
+-  The Management Servers communicate with the System VMs on port 3922
    (ssh) on the management traffic network.
 
+
 Hyper-V Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -1220,16 +944,19 @@ CloudStack Management Server communicates with Hyper-V Agent by using
 HTTPS. For secure communication between the Management Server and the
 Hyper-V host, open port 8250.
 
+
 KVM Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The Management Servers communicate with KVM hosts on port 22 (ssh).
 
+
 LXC Topology Requirements
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 
 The Management Servers communicate with LXC hosts on port 22 (ssh).
 
+
 Guest Network Usage Integration for Traffic Sentinel
 ----------------------------------------------------
 
@@ -1258,16 +985,12 @@ When the Usage Server runs, it collects this data.
 
 To set up the integration between CloudStack and Traffic Sentinel:
 
-#. 
-
-   On your network infrastructure, install Traffic Sentinel and
+#. On your network infrastructure, install Traffic Sentinel and
    configure it to gather traffic data. For installation and
    configuration steps, see inMon documentation at 
    `Traffic Sentinel Documentation <http://inmon.com.>`_.
 
-#. 
-
-   In the Traffic Sentinel UI, configure Traffic Sentinel to accept
+#. In the Traffic Sentinel UI, configure Traffic Sentinel to accept
    script querying from guest users. CloudStack will be the guest user
    performing the remote queries to gather network usage for one or more
    IP addresses.
@@ -1275,29 +998,26 @@ To set up the integration between CloudStack and Traffic Sentinel:
    Click File > Users > Access Control > Reports Query, then select
    Guest from the drop-down list.
 
-#. 
-
-   On CloudStack, add the Traffic Sentinel host by calling the
+#. On CloudStack, add the Traffic Sentinel host by calling the
    CloudStack API command addTrafficMonitor. Pass in the URL of the
    Traffic Sentinel as protocol + host + port (optional); for example,
    http://10.147.28.100:8080. For the addTrafficMonitor command syntax,
-   see the API Reference at `API Documentation <http://cloudstack.apache.org/docs/api/index.html>`_.
+   see the API Reference at `API Documentation 
+   <http://cloudstack.apache.org/docs/api/index.html>`_.
 
    For information about how to call the CloudStack API, see the
-   Developer’s Guide at `CloudStack API Developer's Guide <http://docs.cloudstack.apache.org/en/latest/index.html#developers>`_.
-
-#. 
+   Developer’s Guide at `CloudStack API Developer's Guide 
+   <http://docs.cloudstack.apache.org/en/latest/index.html#developers>`_.
 
-   Log in to the CloudStack UI as administrator.
+#. Log in to the CloudStack UI as administrator.
 
-#. 
-
-   Select Configuration from the Global Settings page, and set the
+#. Select Configuration from the Global Settings page, and set the
    following:
 
    direct.network.stats.interval: How often you want CloudStack to query
    Traffic Sentinel.
 
+
 Setting Zone VLAN and Running VM Maximums
 -----------------------------------------
 
@@ -1323,4 +1043,5 @@ Based on your deployment's needs, choose the appropriate value of
 guest.vlan.bits. Set it as described in Edit the Global Configuration
 Settings (Optional) section and restart the Management Server.
 
+
 .. |parallel-mode.png: adding a firewall and load balancer in parallel mode.| image:: ./_static/images/parallel-mode.png

http://git-wip-us.apache.org/repos/asf/cloudstack-docs-install/blob/f58c8b9f/source/optional_installation.rst
----------------------------------------------------------------------
diff --git a/source/optional_installation.rst b/source/optional_installation.rst
index 5f350f4..1d24f96 100644
--- a/source/optional_installation.rst
+++ b/source/optional_installation.rst
@@ -13,12 +13,14 @@
    specific language governing permissions and limitations
    under the License.
 
+
 Additional Installation Options
 ===============================
 
 The next few sections describe CloudStack features above and beyond the
 basic deployment options.
 
+
 Installing the Usage Server (Optional)
 --------------------------------------
 
@@ -31,52 +33,45 @@ installed on any number of them. The Usage Servers will coordinate usage
 processing. A site that is concerned about availability should install
 Usage Servers on at least two Management Servers.
 
+
 Requirements for Installing the Usage Server
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
--  
-
-   The Management Server must be running when the Usage Server is
+-  The Management Server must be running when the Usage Server is
    installed.
 
--  
-
-   The Usage Server must be installed on the same server as a Management
+-  The Usage Server must be installed on the same server as a Management
    Server.
 
+
 Steps to Install the Usage Server
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-#. 
-
-   Run ./install.sh (NOT VALID, NEED CORRECTION)
+#. Run ./install.sh (NOT VALID, NEED CORRECTION)
 
    .. sourcecode:: bash
 
-       # ./install.sh
+      # ./install.sh
 
    You should see a few messages as the installer prepares, followed by
    a list of choices.
 
-#. 
-
-   Choose "S" to install the Usage Server.
+#. Choose "S" to install the Usage Server.
 
    .. sourcecode:: bash
 
-          > S
-
-#. 
+      > S
 
-   Once installed, start the Usage Server with the following command.
+#. Once installed, start the Usage Server with the following command.
 
    .. sourcecode:: bash
 
-       # service cloudstack-usage start
+      # service cloudstack-usage start
 
 The Administration Guide discusses further configuration of the Usage
 Server.
 
+
 SSL (Optional)
 --------------
 
@@ -90,6 +85,7 @@ like CloudStack to terminate the SSL session, Tomcat’s SSL access may be
 enabled. Tomcat SSL configuration is described at
 http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html.
 
+
 Database Replication (Optional)
 -------------------------------
 
@@ -103,162 +99,131 @@ applies them to a local, redundant copy of the database. The following
 steps are a guide to implementing MySQL replication.
 
 .. note:: 
+   Creating a replica is not a backup solution. You should develop a backup 
+   procedure for the MySQL data that is distinct from replication.
 
-   Creating a replica is not a backup solution. You should develop a backup procedure for the MySQL data that is distinct from replication.
+#. Ensure that this is a fresh install with no data in the master.
 
-#. 
-
-   Ensure that this is a fresh install with no data in the master.
-
-#. 
-
-   Edit my.cnf on the master and add the following in the [mysqld]
+#. Edit my.cnf on the master and add the following in the [mysqld]
    section below datadir.
 
    .. sourcecode:: bash
 
-       log_bin=mysql-bin
-       server_id=1
+      log_bin=mysql-bin
+      server_id=1
 
    The server\_id must be unique with respect to other servers. The
    recommended way to achieve this is to give the master an ID of 1 and
    each slave a sequential number greater than 1, so that the servers
    are numbered 1, 2, 3, etc.
 
-#. 
-
-   Restart the MySQL service. On RHEL/CentOS systems, use:
+#. Restart the MySQL service. On RHEL/CentOS systems, use:
 
    .. sourcecode:: bash
 
-       # service mysqld restart
+      # service mysqld restart
 
    On Debian/Ubuntu systems, use:
 
    .. sourcecode:: bash
 
-       # service mysql restart
-
-#. 
+      # service mysql restart
 
-   Create a replication account on the master and give it privileges. We
+#. Create a replication account on the master and give it privileges. We
    will use the "cloud-repl" user with the password "password". This
    assumes that master and slave run on the 172.16.1.0/24 network.
 
    .. sourcecode:: bash
 
-       # mysql -u root
-       mysql> create user 'cloud-repl'@'172.16.1.%' identified by 'password';
-       mysql> grant replication slave on *.* TO 'cloud-repl'@'172.16.1.%';
-       mysql> flush privileges;
-       mysql> flush tables with read lock;
+      # mysql -u root
+      mysql> create user 'cloud-repl'@'172.16.1.%' identified by 'password';
+      mysql> grant replication slave on *.* TO 'cloud-repl'@'172.16.1.%';
+      mysql> flush privileges;
+      mysql> flush tables with read lock;
 
-#. 
+#. Leave the current MySQL session running.
 
-   Leave the current MySQL session running.
+#. In a new shell start a second MySQL session.
 
-#. 
-
-   In a new shell start a second MySQL session.
-
-#. 
-
-   Retrieve the current position of the database.
+#. Retrieve the current position of the database.
 
    .. sourcecode:: bash
 
-       # mysql -u root
-       mysql> show master status;
-       +------------------+----------+--------------+------------------+
-       | File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
-       +------------------+----------+--------------+------------------+
-       | mysql-bin.000001 |      412 |              |                  |
-       +------------------+----------+--------------+------------------+
-
-#. 
-
-   Note the file and the position that are returned by your instance.
+      # mysql -u root
+      mysql> show master status;
+      +------------------+----------+--------------+------------------+
+      | File             | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+      +------------------+----------+--------------+------------------+
+      | mysql-bin.000001 |      412 |              |                  |
+      +------------------+----------+--------------+------------------+
 
-#. 
+#. Note the file and the position that are returned by your instance.
 
-   Exit from this session.
+#. Exit from this session.
 
-#. 
-
-   Complete the master setup. Returning to your first session on the
+#. Complete the master setup. Returning to your first session on the
    master, release the locks and exit MySQL.
 
    .. sourcecode:: bash
 
-       mysql> unlock tables;
-
-#. 
+      mysql> unlock tables;
 
-   Install and configure the slave. On the slave server, run the
+#. Install and configure the slave. On the slave server, run the
    following commands.
 
    .. sourcecode:: bash
 
-       # yum install mysql-server
-       # chkconfig mysqld on
-
-#. 
+      # yum install mysql-server
+      # chkconfig mysqld on
 
-   Edit my.cnf and add the following lines in the [mysqld] section below
+#. Edit my.cnf and add the following lines in the [mysqld] section below
    datadir.
 
    .. sourcecode:: bash
 
-       server_id=2
-       innodb_rollback_on_timeout=1
-       innodb_lock_wait_timeout=600
+      server_id=2
+      innodb_rollback_on_timeout=1
+      innodb_lock_wait_timeout=600
 
-#. 
-
-   Restart MySQL. Use "mysqld" on RHEL/CentOS systems:
+#. Restart MySQL. Use "mysqld" on RHEL/CentOS systems:
 
    .. sourcecode:: bash
 
-       # service mysqld restart
+      # service mysqld restart
 
    On Ubuntu/Debian systems use "mysql."
 
    .. sourcecode:: bash
 
-       # service mysql restart
-
-#. 
+      # service mysql restart
 
-   Instruct the slave to connect to and replicate from the master.
+#. Instruct the slave to connect to and replicate from the master.
    Replace the IP address, password, log file, and position with the
    values you have used in the previous steps.
 
    .. sourcecode:: bash
 
-       mysql> change master to
-           -> master_host='172.16.1.217',
-           -> master_user='cloud-repl',
-           -> master_password='password',
-           -> master_log_file='mysql-bin.000001',
-           -> master_log_pos=412;
+      mysql> change master to
+          -> master_host='172.16.1.217',
+          -> master_user='cloud-repl',
+          -> master_password='password',
+          -> master_log_file='mysql-bin.000001',
+          -> master_log_pos=412;
 
-#. 
-
-   Then start replication on the slave.
+#. Then start replication on the slave.
 
    .. sourcecode:: bash
 
-       mysql> start slave;
-
-#. 
+      mysql> start slave;
 
-   Optionally, open port 3306 on the slave as was done on the master
+#. Optionally, open port 3306 on the slave as was done on the master
    earlier.
 
    This is not required for replication to work. But if you choose not
    to do this, you will need to do it when failover to the replica
    occurs.
 
+
 Failover
 ~~~~~~~~
 
@@ -267,33 +232,23 @@ implement manual failover for the Management Servers. CloudStack
 failover from one MySQL instance to another is performed by the
 administrator. In the event of a database failure you should:
 
-#. 
-
-   Stop the Management Servers (via service cloudstack-management stop).
-
-#. 
+#. Stop the Management Servers (via service cloudstack-management stop).
 
-   Change the replica's configuration to be a master and restart it.
+#. Change the replica's configuration to be a master and restart it.
 
-#. 
-
-   Ensure that the replica's port 3306 is open to the Management
+#. Ensure that the replica's port 3306 is open to the Management
    Servers.
 
-#. 
-
-   Make a change so that the Management Server uses the new database.
+#. Make a change so that the Management Server uses the new database.
    The simplest process here is to put the IP address of the new
    database server into each Management Server's
    /etc/cloudstack/management/db.properties.
 
-#. 
-
-   Restart the Management Servers:
+#. Restart the Management Servers:
 
    .. sourcecode:: bash
 
-       # service cloudstack-management start
+      # service cloudstack-management start
 
 
 Amazon Web Services Interface
@@ -311,51 +266,44 @@ compatible interface provides the EC2 SOAP and Query APIs as well as the
 S3 REST API.
 
 .. note::
-
-   This service was previously enabled by separate software called CloudBridge. It is now fully integrated with the CloudStack management server.
+   This service was previously enabled by separate software called CloudBridge. 
+   It is now fully integrated with the CloudStack management server.
 
 .. warning::
-
-   The compatible interface for the EC2 Query API and the S3 API are Work In Progress. The S3 compatible API offers a way to store data on the management         server file system, it is not an implementation of the S3 backend.
+   The compatible interface for the EC2 Query API and the S3 API are Work In 
+   Progress. The S3 compatible API offers a way to store data on the 
+   management server file system, it is not an implementation of the S3 
+   backend.
 
 Limitations
 
--  
+-  Supported only in zones that use basic networking.
 
-   Supported only in zones that use basic networking.
-
--  
-
-   Available in fresh installations of CloudStack. Not available through
+-  Available in fresh installations of CloudStack. Not available through
    upgrade of previous versions.
 
--  
-
-   Features such as Elastic IP (EIP) and Elastic Load Balancing (ELB)
+-  Features such as Elastic IP (EIP) and Elastic Load Balancing (ELB)
    are only available in an infrastructure with a Citrix NetScaler
    device. Users accessing a Zone with a NetScaler device will need to
    use a NetScaler-enabled network offering (DefaultSharedNetscalerEIP
    and ELBNetworkOffering).
 
+
 Supported API Version
 ~~~~~~~~~~~~~~~~~~~~~
 
--  
-
-   The EC2 interface complies with Amazon's WDSL version dated November
-   15, 2010, available at
-   `http://ec2.amazonaws.com/doc/2010-11-15/ <http://ec2.amazonaws.com/doc/2010-11-15/>`_.
+-  The EC2 interface complies with Amazon's WDSL version dated November
+   15, 2010, available at `http://ec2.amazonaws.com/doc/2010-11-15/ 
+   <http://ec2.amazonaws.com/doc/2010-11-15/>`_.
 
--  
-
-   The interface is compatible with the EC2 command-line tools *EC2
+-  The interface is compatible with the EC2 command-line tools *EC2
    tools v. 1.3.6230*, which can be downloaded at
    `http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip <http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip>`_.
 
 .. note:: 
-
    Work is underway to support a more recent version of the EC2 API
 
+
 Enabling the EC2 and S3 Compatible Interface
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -363,32 +311,28 @@ The software that provides AWS API compatibility is installed along with
 CloudStack. You must enable the services and perform some setup steps
 prior to using it.
 
-#. 
+#. Set the global configuration parameters for each service to true. See
+   `*Setting Global Configuration Parameters* 
+   <configuration.html#setting-global-configuration-parameters>`_.
 
-   Set the global configuration parameters for each service to true. See
-   `*Setting Global Configuration Parameters* <configuration.html#setting-global-configuration-parameters>`_.
-
-#. 
-
-   Create a set of CloudStack service offerings with names that match
+#. Create a set of CloudStack service offerings with names that match
    the Amazon service offerings. You can do this through the CloudStack
    UI as described in the Administration Guide.
 
    .. warning::
-   
-      Be sure you have included the Amazon default service offering, m1.small. As well as any EC2 instance types that you will use.
-
-#. 
+      Be sure you have included the Amazon default service offering, m1.small. 
+      As well as any EC2 instance types that you will use.
 
-   If you did not already do so when you set the configuration parameter
+#. If you did not already do so when you set the configuration parameter
    in step 1, restart the Management Server.
 
    .. sourcecode:: bash
 
-     # service cloudstack-management restart
+      # service cloudstack-management restart
 
 The following sections provides details to perform these steps
 
+
 Enabling the Services
 ^^^^^^^^^^^^^^^^^^^^^
 
@@ -409,11 +353,12 @@ Settings set the port to 8096 and subsequently call the
 
 .. sourcecode:: bash
 
-    http://localhost:8096/client/api?command=updateConfiguration&name=enable.ec2.api&value=true
-    http://localhost:8096/client/api?command=updateConfiguration&name=enable.ec2.api&value=true
+   http://localhost:8096/client/api?command=updateConfiguration&name=enable.ec2.api&value=true
+   http://localhost:8096/client/api?command=updateConfiguration&name=enable.ec2.api&value=true
 
 Once you have enabled the services, restart the server.
 
+
 Creating EC2 Compatible Service Offerings
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -428,34 +373,28 @@ matches an EC2 instance type API name. The snapshot below shows you how:
 |Use the GUI to set the name of a compute service offering to an EC2
 instance type API name.|
 
+
 Modifying the AWS API Port
 ^^^^^^^^^^^^^^^^^^^^^^^^^^
 
 .. note::
+   (Optional) The AWS API listens for requests on port 7080. If you prefer AWS 
+   API to listen on another port, you can change it as follows:
 
-   (Optional) The AWS API listens for requests on port 7080. If you prefer AWS API to listen on another port, you can change it as follows:
-
-   #. 
-
-      Edit the files ``/etc/cloudstack/management/server.xml``,
+   #. Edit the files ``/etc/cloudstack/management/server.xml``,
       ``/etc/cloudstack/management/server-nonssl.xml``, and
       ``/etc/cloudstack/management/server-ssl.xml``.
 
-   #. 
+   #. In each file, find the tag <Service name="Catalina7080">. Under this tag, locate <Connector executor="tomcatThreadPool-internal" port=   ....<.
 
-      In each file, find the tag <Service name="Catalina7080">. Under this tag, locate <Connector executor="tomcatThreadPool-internal" port=   ....<.
+   #. Change the port to whatever port you want to use, then save the files.
 
-   #. 
-
-      Change the port to whatever port you want to use, then save the files.
-
-   #. 
-
-      Restart the Management Server.
+   #. Restart the Management Server.
 
 If you re-install CloudStack, you will have to re-enable the services
 and if need be update the port.
 
+
 AWS API User Setup
 ~~~~~~~~~~~~~~~~~~
 
@@ -468,17 +407,11 @@ their CloudStack deployment, by specifying the endpoint of the
 management server and using the proper user credentials. In order to do
 this, each user must perform the following configuration steps:
 
--  
-
-   Generate user credentials.
+-  Generate user credentials.
 
--  
+-  Register with the service.
 
-   Register with the service.
-
--  
-
-   For convenience, set up environment variables for the EC2 SOAP
+-  For convenience, set up environment variables for the EC2 SOAP
    command-line tools.
 
 
@@ -487,15 +420,11 @@ AWS API Command-Line Tools Setup
 
 To use the EC2 command-line tools, the user must perform these steps:
 
-#. 
-
-   Be sure you have the right version of EC2 Tools. The supported
+#. Be sure you have the right version of EC2 Tools. The supported
    version is available at
    `http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip <http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip>`_.
 
-#. 
-
-   Set up the EC2 environment variables. This can be done every time you
+#. Set up the EC2 environment variables. This can be done every time you
    use the service or you can set them up in the proper shell profile.
    Replace the endpoint (i.e EC2\_URL) with the proper address of your
    CloudStack management server and port. In a bash shell do the
@@ -503,10 +432,11 @@ To use the EC2 command-line tools, the user must perform these steps:
 
 .. sourcecode:: bash
 
-    $ export EC2_CERT=/path/to/cert.pem
-    $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
-    $ export EC2_URL=http://localhost:7080/awsapi
-    $ export EC2_HOME=/path/to/EC2_tools_directory
+   $ export EC2_CERT=/path/to/cert.pem
+   $ export EC2_PRIVATE_KEY=/path/to/private_key.pem
+   $ export EC2_URL=http://localhost:7080/awsapi
+   $ export EC2_HOME=/path/to/EC2_tools_directory
+
 
 Using Timeouts to Ensure AWS API Command Completion
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -521,23 +451,23 @@ Specifies a connection timeout (in seconds)
 
 .. sourcecode:: bash
                                
-     --connection-timeout TIMEOUT
+   --connection-timeout TIMEOUT
 
 Specifies a request timeout (in seconds)
 
 .. sourcecode:: bash
 
-    --request-timeout TIMEOUT
+   --request-timeout TIMEOUT
 
 Example:
 
 .. sourcecode:: bash
 
-    ec2-run-instances 2 –z us-test1 –n 1-3 --connection-timeout 120 --request-timeout 120
+   ec2-run-instances 2 –z us-test1 –n 1-3 --connection-timeout 120 --request-timeout 120
 
 .. note::
+   The timeouts optional arguments are not specific to CloudStack.
 
-    The timeouts optional arguments are not specific to CloudStack.
 
 Supported AWS API Calls
 ~~~~~~~~~~~~~~~~~~~~~~~
@@ -549,7 +479,6 @@ differences are noted. The underlying SOAP call for each command is also
 given, for those who have built tools using those calls.
 
 Table 1. Elastic IP API mapping
-                                  
 
 +---------------------------+-----------------------+-------------------------+
 | EC2 command               | SOAP call             | CloudStack API call     |
@@ -565,10 +494,9 @@ Table 1. Elastic IP API mapping
 | ec2-release-address       | ReleaseAddress        | disassociateIpAddress   |
 +---------------------------+-----------------------+-------------------------+
 
-| 
+|
 
 Table 2. Availability Zone API mapping
-                                         
 
 +-----------------------------------+-----------------------------+-----------------------+
 | EC2 command                       | SOAP call                   | CloudStack API call   |
@@ -576,10 +504,9 @@ Table 2. Availability Zone API mapping
 | ec2-describe-availability-zones   | DescribeAvailabilityZones   | listZones             |
 +-----------------------------------+-----------------------------+-----------------------+
 
-| 
+|
 
 Table 3. Images API mapping
-                              
 
 +-----------------------+-------------------+-----------------------+
 | EC2 command           | SOAP call         | CloudStack API call   |
@@ -593,10 +520,9 @@ Table 3. Images API mapping
 | ec2-register          | RegisterImage     | registerTemplate      |
 +-----------------------+-------------------+-----------------------+
 
-| 
+|
 
 Table 4. Image Attributes API mapping
-                                        
 
 +--------------------------------+--------------------------+-----------------------------+
 | EC2 command                    | SOAP call                | CloudStack API call         |
@@ -608,10 +534,9 @@ Table 4. Image Attributes API mapping
 | ec2-reset-image-attribute      | ResetImageAttribute      | updateTemplatePermissions   |
 +--------------------------------+--------------------------+-----------------------------+
 
-| 
+|
 
 Table 5. Instances API mapping
-                                 
 
 +---------------------------+----------------------+-------------------------+
 | EC2 command               | SOAP call            | CloudStack API call     |
@@ -629,10 +554,9 @@ Table 5. Instances API mapping
 | ec2-terminate-instances   | TerminateInstances   | destroyVirtualMachine   |
 +---------------------------+----------------------+-------------------------+
 
-| 
+|
 
 Table 6. Instance Attributes Mapping
-                                       
 
 +-----------------------------------+-----------------------------+-----------------------+
 | EC2 command                       | SOAP call                   | CloudStack API call   |
@@ -640,10 +564,9 @@ Table 6. Instance Attributes Mapping
 | ec2-describe-instance-attribute   | DescribeInstanceAttribute   | listVirtualMachines   |
 +-----------------------------------+-----------------------------+-----------------------+
 
-| 
+|
 
 Table 7. Keys Pairs Mapping
-                              
 
 +-------------------------+--------------------+-----------------------+
 | EC2 command             | SOAP call          | CloudStack API call   |
@@ -657,10 +580,9 @@ Table 7. Keys Pairs Mapping
 | ec2-import-keypair      | ImportKeyPair      | registerSSHKeyPair    |
 +-------------------------+--------------------+-----------------------+
 
-| 
+|
 
 Table 8. Passwords API Mapping
-                                 
 
 +--------------------+-------------------+-----------------------+
 | EC2 command        | SOAP call         | CloudStack API call   |
@@ -668,10 +590,9 @@ Table 8. Passwords API Mapping
 | ec2-get-password   | GetPasswordData   | getVMPassword         |
 +--------------------+-------------------+-----------------------+
 
-| 
+|
 
 Table 9. Security Groups API Mapping
-                                       
 
 +----------------------+---------------------------------+---------------------------------+
 | EC2 command          | SOAP call                       | CloudStack API call             |
@@ -687,10 +608,9 @@ Table 9. Security Groups API Mapping
 | ec2-revoke           | RevokeSecurityGroupIngress      | revokeSecurityGroupIngress      |
 +----------------------+---------------------------------+---------------------------------+
 
-| 
+|
 
 Table 10. Snapshots API Mapping
-                                  
 
 +--------------------------+---------------------+-----------------------+
 | EC2 command              | SOAP call           | CloudStack API call   |
@@ -702,10 +622,9 @@ Table 10. Snapshots API Mapping
 | ec2-describe-snapshots   | DescribeSnapshots   | listSnapshots         |
 +--------------------------+---------------------+-----------------------+
 
-| 
+|
 
 Table 11. Volumes API Mapping
-                                
 
 +-----------------------+------------------+-----------------------+
 | EC2 command           | SOAP call        | CloudStack API call   |
@@ -721,7 +640,8 @@ Table 11. Volumes API Mapping
 | ec2-detach-volume     | DetachVolume     | detachVolume          |
 +-----------------------+------------------+-----------------------+
 
-| 
+|
+
 
 Examples
 ~~~~~~~~
@@ -730,6 +650,7 @@ There are many tools available to interface with a AWS compatible API.
 In this section we provide a few examples that users of CloudStack can
 build upon.
 
+
 Boto Examples
 ^^^^^^^^^^^^^^
 
@@ -743,39 +664,38 @@ own and update the endpoint.
 
 Example 1. An EC2 Boto example
                                  
-
 .. sourcecode:: python
 
-    #!/usr/bin/env python
-
-    import sys
-    import os
-    import boto
-    import boto.ec2
-
-    region = boto.ec2.regioninfo.RegionInfo(name="ROOT",endpoint="localhost")
-    apikey='GwNnpUPrO6KgIdZu01z_ZhhZnKjtSdRwuYd4DvpzvFpyxGMvrzno2q05MB0ViBoFYtdqKd'
-    secretkey='t4eXLEYWw7chBhDlaKf38adCMSHx_wlds6JfSx3z9fSpSOm0AbP9Moj0oGIzy2LSC8iw'
-
-    def main():
-        '''Establish connection to EC2 cloud'''
-            conn =boto.connect_ec2(aws_access_key_id=apikey,
-                           aws_secret_access_key=secretkey,
-                           is_secure=False,
-                           region=region,
-                           port=7080,
-                           path="/awsapi",
-                           api_version="2010-11-15")
-
-            '''Get list of images that I own'''
-        images = conn.get_all_images()
-        print images
-        myimage = images[0]
-        '''Pick an instance type'''
-        vm_type='m1.small'
-        reservation = myimage.run(instance_type=vm_type,security_groups=['default'])
-
-    if __name__ == '__main__':
+   #!/usr/bin/env python
+
+   import sys
+   import os
+   import boto
+   import boto.ec2
+
+   region = boto.ec2.regioninfo.RegionInfo(name="ROOT",endpoint="localhost")
+   apikey='GwNnpUPrO6KgIdZu01z_ZhhZnKjtSdRwuYd4DvpzvFpyxGMvrzno2q05MB0ViBoFYtdqKd'
+   secretkey='t4eXLEYWw7chBhDlaKf38adCMSHx_wlds6JfSx3z9fSpSOm0AbP9Moj0oGIzy2LSC8iw'
+
+   def main():
+       '''Establish connection to EC2 cloud'''
+       conn = boto.connect_ec2(aws_access_key_id=apikey,
+                               aws_secret_access_key=secretkey,
+                               is_secure=False,
+                               region=region,
+                               port=7080,
+                               path="/awsapi",
+                               api_version="2010-11-15")
+
+       '''Get list of images that I own'''
+       images = conn.get_all_images()
+       print images
+       myimage = images[0]
+       '''Pick an instance type'''
+       vm_type='m1.small'
+       reservation = myimage.run(instance_type=vm_type,security_groups=['default'])
+
+   if __name__ == '__main__':
         main()
 
 | 
@@ -784,65 +704,63 @@ Second is an S3 example. The S3 interface in CloudStack is obsolete. If you need
 
 Example 2. An S3 Boto Example
                                 
-
 .. sourcecode:: python
 
-    #!/usr/bin/env python
-
-    import sys
-    import os
-    from boto.s3.key import Key
-    from boto.s3.connection import S3Connection
-    from boto.s3.connection import OrdinaryCallingFormat
-
-    apikey='ChOw-pwdcCFy6fpeyv6kUaR0NnhzmG3tE7HLN2z3OB_s-ogF5HjZtN4rnzKnq2UjtnHeg_yLA5gOw'
-    secretkey='IMY8R7CJQiSGFk4cHwfXXN3DUFXz07cCiU80eM3MCmfLs7kusgyOfm0g9qzXRXhoAPCH-IRxXc3w'
-
-    cf=OrdinaryCallingFormat()
-
-    def main(): 
-        '''Establish connection to S3 service'''
-            conn =S3Connection(aws_access_key_id=apikey,aws_secret_access_key=secretkey, \
-                              is_secure=False, \
-                              host='localhost', \
-                              port=7080, \
-                              calling_format=cf, \
-                              path="/awsapi/rest/AmazonS3")
-
-            try:
-                bucket=conn.create_bucket('cloudstack')
-                k = Key(bucket)
-                k.key = 'test'
-                try:
-                   k.set_contents_from_filename('/Users/runseb/Desktop/s3cs.py')
-                except:
-                   print 'could not write file'
-                   pass
-            except:
-                bucket = conn.get_bucket('cloudstack')
-                k = Key(bucket)
-                k.key = 'test'
-                try:
-                   k.get_contents_to_filename('/Users/runseb/Desktop/foobar')
-                except:
-                   print 'Could not get file'
-                   pass
-
-            try:
-               bucket1=conn.create_bucket('teststring')
-               k=Key(bucket1)
-               k.key('foobar')
-               k.set_contents_from_string('This is my silly test')
-            except:
-               bucket1=conn.get_bucket('teststring')
-               k = Key(bucket1)
-               k.key='foobar'
-               k.get_contents_as_string()
-        
-    if __name__ == '__main__':
-        main()
+   #!/usr/bin/env python
+
+   import sys
+   import os
+   from boto.s3.key import Key
+   from boto.s3.connection import S3Connection
+   from boto.s3.connection import OrdinaryCallingFormat
+
+   apikey='ChOw-pwdcCFy6fpeyv6kUaR0NnhzmG3tE7HLN2z3OB_s-ogF5HjZtN4rnzKnq2UjtnHeg_yLA5gOw'
+   secretkey='IMY8R7CJQiSGFk4cHwfXXN3DUFXz07cCiU80eM3MCmfLs7kusgyOfm0g9qzXRXhoAPCH-IRxXc3w'
+
+   cf=OrdinaryCallingFormat()
+
+   def main(): 
+       '''Establish connection to S3 service'''
+       conn = S3Connection(aws_access_key_id=apikey,aws_secret_access_key=secretkey, \
+                           is_secure=False, \
+                           host='localhost', \
+                           port=7080, \
+                           calling_format=cf, \
+                           path="/awsapi/rest/AmazonS3")
+
+       try:
+           bucket=conn.create_bucket('cloudstack')
+           k = Key(bucket)
+           k.key = 'test'
+           try:
+               k.set_contents_from_filename('/Users/runseb/Desktop/s3cs.py')
+           except:
+               print 'could not write file'
+               pass
+       except:
+           bucket = conn.get_bucket('cloudstack')
+           k = Key(bucket)
+           k.key = 'test'
+           try:
+               k.get_contents_to_filename('/Users/runseb/Desktop/foobar')
+           except:
+               print 'Could not get file'
+               pass
+
+       try:
+           bucket1=conn.create_bucket('teststring')
+           k=Key(bucket1)
+           k.key('foobar')
+           k.set_contents_from_string('This is my silly test')
+       except:
+           bucket1=conn.get_bucket('teststring')
+           k = Key(bucket1)
+           k.key='foobar'
+           k.get_contents_as_string()
+       
+   if __name__ == '__main__':
+       main()
 
 
 .. |Use the GUI to set the configuration variable to true| image:: ./_static/images/ec2-s3-configuration.png
 .. |Use the GUI to set the name of a compute service offering to an EC2 instance type API name.| image:: ./_static/images/compute-service-offerings.png
-


Mime
View raw message