Merge "Fix DevStack Ceph on the Giant release"
diff --git a/doc/source/changes.rst b/doc/source/changes.rst
index ccd96e8..f4a326d 100644
--- a/doc/source/changes.rst
+++ b/doc/source/changes.rst
@@ -1,10 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
+=======
+Changes
+=======
 
 Recent Changes What's been happening?
 -------------------------------------
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 9befc90..eba2956 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Configuration Making it go my way
----------------------------------
+=============
+Configuration
+=============
 
 DevStack has always tried to be mostly-functional with a minimal amount
 of configuration. The number of options has ballooned as projects add
diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst
index 73069e7..b4f9f37 100644
--- a/doc/source/contributing.rst
+++ b/doc/source/contributing.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Contributing Help us help you
------------------------------
+============
+Contributing
+============
 
 DevStack uses the standard OpenStack contribution process as outlined in
 `the OpenStack wiki 'How To
diff --git a/doc/source/eucarc.rst b/doc/source/eucarc.rst
index c91d341..1284b88 100644
--- a/doc/source/eucarc.rst
+++ b/doc/source/eucarc.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-eucarc EC2 settings
--------------------
+=====================
+eucarc - EC2 Settings
+=====================
 
 ``eucarc`` creates EC2 credentials for the current user as defined by
 ``OS_TENANT_NAME:OS_USERNAME``. ``eucarc`` sources ``openrc`` at the
diff --git a/doc/source/exerciserc.rst b/doc/source/exerciserc.rst
index ed3f2e8..f3780c3 100644
--- a/doc/source/exerciserc.rst
+++ b/doc/source/exerciserc.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-exerciserc Exercise settings
-----------------------------
+==============================
+exerciserc - Exercise Settings
+==============================
 
 ``exerciserc`` is used to configure settings for the exercise scripts.
 The values shown below are the default values. Thse can all be
diff --git a/doc/source/faq.rst b/doc/source/faq.rst
index 36b25b3..7b33b41 100644
--- a/doc/source/faq.rst
+++ b/doc/source/faq.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-FAQ: Using DevStack Making to behave
-------------------------------------
+===
+FAQ
+===
 
 -  `General Questions <#general>`__
 -  `Operation and Configuration <#ops_conf>`__
diff --git a/doc/source/guides/multinode-lab.rst b/doc/source/guides/multinode-lab.rst
index a63260f..1c53227 100644
--- a/doc/source/guides/multinode-lab.rst
+++ b/doc/source/guides/multinode-lab.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <../overview.html>`__
--  `Changes <../changes.html>`__
--  `FAQ <../faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Multi-Node Lab: Serious Stuff
-=============================
+==============
+Multi-Node Lab
+==============
 
 Here is OpenStack in a realistic test configuration with multiple
 physical servers.
@@ -167,6 +160,7 @@
 
 ::
 
+    [[local|localrc]]
     HOST_IP=192.168.42.12 # change this per compute node
     FLAT_INTERFACE=eth0
     FIXED_RANGE=10.4.128.0/20
diff --git a/doc/source/guides/pxe-boot.rst b/doc/source/guides/pxe-boot.rst
deleted file mode 100644
index f745abb..0000000
--- a/doc/source/guides/pxe-boot.rst
+++ /dev/null
@@ -1,140 +0,0 @@
-`DevStack </>`__
-
--  `Overview <../overview.html>`__
--  `Changes <../changes.html>`__
--  `FAQ <../faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-PXE Boot Server Guide: Magic Dust for Network Boot
-==================================================
-
-Boot DevStack from a PXE server to a RAM disk.
-
-Prerequisites Hardware & OpenWRT
---------------------------------
-
-Hardware
-~~~~~~~~
-
-The whole point of this exercise is to have a highly portable boot
-server, so using a small router with a USB port is the desired platform.
-This guide uses a Buffalo WZR-HP-G300NH as an example, but it is easily
-generalized for other supported platforms. See openwrt.org for more.
-
-OpenWRT
-~~~~~~~
-
-Any recent 'Backfire' build of OpenWRT will work for the boot server
-project. We build from trunk and have made the images available at
-`http://openwrt.xr7.org/openwrt <http://openwrt.xr7.org/openwrt>`__.
-
-Installation bit blasting
--------------------------
-
-Install the Image
-~~~~~~~~~~~~~~~~~
-
-This process follows `the OpenWRT doc OEM
-Install <http://wiki.openwrt.org/toh/buffalo/wzr-hp-g300h>`__ to tftp
-the new image onto the router. You need a computer to set up the router,
-we assume it is a recent Linux or OS/X installation.
-
--  Get openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
-
-   ::
-
-       wget http://openwrt.xr7.org/openwrt/ar71xx/openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
-
--  Connect computer to LAN port 4 (closest to WAN port)
--  Set computer interface to IP address in the 192.168.11.2
--  Add static arp entry for router
-
-   ::
-
-       arp -s 192.168.11.1 <mac-address>
-
--  Start TFTP transfer attempt
-
-   ::
-
-       tftp 192.168.11.1
-       binary
-       rexmt 1
-       timeout 60
-       put openwrt-ar71xx-wzr-hp-g300nh-squashfs-tftp.bin
-
--  Power on router. Router will reboot and initialize on 192.168.1.1.
--  Delete static arp entry for router
-
-   ::
-
-       arp -d 192.168.11.1
-
--  Set computer to DHCP, connect and telnet to router and set root
-   password.
-
-Configure the Router
-~~~~~~~~~~~~~~~~~~~~
-
--  Update ``/etc/opkg.conf`` to point to our repo:
-
-   ::
-
-       src/gz packages http://192.168.5.13/openwrt/build/ar71xx/packages
-
--  Configure anon mounts:
-
-   ::
-
-       uci delete fstab.@mount[0]
-       uci commit fstab
-       /etc/init.d/fstab restart
-
--  Reset the DHCP address range. DevStack will claim the upper /25 of
-   the router's LAN address space for floating IPs so the default DHCP
-   address range needs to be moved:
-
-   ::
-
-       uci set dhcp.lan.start=65
-       uci set dhcp.lan.limit=60
-       uci commit dhcp
-
--  Enable TFTP:
-
-   ::
-
-       uci set dhcp.@dnsmasq[0].enable_tftp=1
-       uci set dhcp.@dnsmasq[0].tftp_root=/mnt/sda1/tftpboot
-       uci set dhcp.@dnsmasq[0].dhcp_boot=pxelinux.0
-       uci commit dhcp
-       /etc/init.d/dnsmasq restart
-
-Set Up tftpboot
-~~~~~~~~~~~~~~~
-
--  Create the ``/tmp/tftpboot`` structure and populate it:
-
-   ::
-
-       cd ~/devstack
-       tools/build_pxe_boot.sh /tmp
-
-   This calls ``tools/build_ramdisk.sh`` to create a 2GB ramdisk
-   containing a complete development Oneiric OS plus the OpenStack code
-   checkouts.
-
--  Copy ``tftpboot`` to a USB drive:
-
-   ::
-
-       mount /dev/sdb1 /mnt/tmp
-       rsync -a /tmp/tftpboot/ /mnt/tmp/tftpboot/
-       umount /mnt/tmp
-
--  Plug USB drive into router. It will be automounted and is ready to
-   serve content.
-
-Now `return <ramdisk.html>`__ to the RAM disk Guide to kick off your
-DevStack experience.
diff --git a/doc/source/guides/ramdisk.rst b/doc/source/guides/ramdisk.rst
deleted file mode 100644
index 1ba74f2..0000000
--- a/doc/source/guides/ramdisk.rst
+++ /dev/null
@@ -1,86 +0,0 @@
-`DevStack </>`__
-
--  `Overview <../overview.html>`__
--  `Changes <../changes.html>`__
--  `FAQ <../faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Stack-in-a-Box: Try before you mkfs
-===================================
-
-Run DevStack from a RAM disk to give it a whirl before making the
-commitment to install it. We'll cover booting from a USB drive or over
-the network via PXE. We'll even thow in configuring a home router to
-handle the PXE boot. You will need a minimum of 3GB for both of these
-configurations as the RAM disk itself is 2GB.
-
-Prerequisites Hardware
-----------------------
-
-USB Boot
-~~~~~~~~
-
-`This guide <usb-boot.html>`__ covers the creation of a bootable USB
-drive. Your computer BIOS must support booting from USB.
-
-PXE Boot
-~~~~~~~~
-
-`This guide <pxe-boot.html>`__ covers the installation of OpenWRT on a
-home router and configuring it as a PXE server, plus the creation of the
-boot images and PXE support files.
-
-Installation bit blasting
--------------------------
-
-Install DevStack
-~~~~~~~~~~~~~~~~
-
-Grab the latest version of DevStack via https:
-
-::
-
-    sudo apt-get install git -y
-    git clone https://git.openstack.org/openstack-dev/devstack
-    cd devstack
-
-Prepare the Boot RAMdisk
-~~~~~~~~~~~~~~~~~~~~~~~~
-
-Pick your boot method and follow the guide to prepare to build the RAM
-disk and set up the boot process:
-
--  `USB boot <usb-boot.html>`__
--  `PXE boot <pxe-boot.html>`__
-
-Fire It Up
-~~~~~~~~~~
-
--  Boot the computer into the RAM disk. The details will vary from
-   machine to machine but most BIOSes have a method to select the boot
-   device, often by pressing F12 during POST.
--  Select 'DevStack' from the Boot Menu.
--  Log in with the 'stack' user and 'pass' password.
--  Create ``devstack/localrc`` if you wish to change any of the
-   configuration variables. You will probably want to at least set the
-   admin login password to something memorable rather than the default
-   20 random characters:
-
-   ::
-
-       ADMIN_PASSWORD=openstack
-
--  Fire up OpenStack!
-
-   ::
-
-       ./run.sh
-
--  See the processes running in screen:
-
-   ::
-
-       screen -x
-
--  Connect to the dashboard at ``http://<ip-address>/``
diff --git a/doc/source/guides/single-machine.rst b/doc/source/guides/single-machine.rst
index 3e0a39c..6059511 100644
--- a/doc/source/guides/single-machine.rst
+++ b/doc/source/guides/single-machine.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <../overview.html>`__
--  `Changes <../changes.html>`__
--  `FAQ <../faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-All-In-One: Dedicated Hardware
-==============================
+==========
+All-In-One
+==========
 
 Things are about to get real! Using OpenStack in containers or VMs is
 nice for kicking the tires, but doesn't compare to the feeling you get
diff --git a/doc/source/guides/single-vm.rst b/doc/source/guides/single-vm.rst
index 35efb14..d296db6 100644
--- a/doc/source/guides/single-vm.rst
+++ b/doc/source/guides/single-vm.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <../overview.html>`__
--  `Changes <../changes.html>`__
--  `FAQ <../faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Running a Cloud in a VM
-=======================
+=============
+Cloud in a VM
+=============
 
 Use the cloud to build the cloud! Use your cloud to launch new versions
 of OpenStack in about 5 minutes. When you break it, start over! The VMs
diff --git a/doc/source/guides/usb-boot.rst b/doc/source/guides/usb-boot.rst
deleted file mode 100644
index 4f7a494..0000000
--- a/doc/source/guides/usb-boot.rst
+++ /dev/null
@@ -1,57 +0,0 @@
-`DevStack </>`__
-
--  `Overview <../overview.html>`__
--  `Changes <../changes.html>`__
--  `FAQ <../faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-USB Boot: Undoable Stack Boot
-=============================
-
-Boot DevStack from a USB disk into a RAM disk.
-
-Prerequisites
--------------
-
-Hardware
-~~~~~~~~
-
-This guide covers the creation of a bootable USB drive. Your computer
-BIOS must support booting from USB and You will want at least 3GB of
-RAM. You also will need a USB drive of at least 2GB.
-
-Software
-~~~~~~~~
-
-Ubuntu 11.10 (Oneiric Ocelot) is required on host to create images.
-
-Installation bit blasting
--------------------------
-
-Set Up USB Drive
-~~~~~~~~~~~~~~~~
-
--  Insert the USB drive into the computer. Make a note of the device
-   name, such as ``sdb``. Do not mount the device.
--  Install the boot system:
-
-   ::
-
-       tools/build_usb_boot.sh /dev/sdb1
-
-   This calls tools/build\_ramdisk.sh to create a 2GB ramdisk containing
-   a complete development Oneiric OS plus the OpenStack code checkouts.
-   It then writes a syslinux boot sector to the specified device and
-   creates ``/syslinux``.
-
--  If desired, you may now mount the device:
-
-   ::
-
-       mount /dev/sdb1 /mnt/tmp
-       # foo
-       umount /mnt/tmp
-
-Now `return <ramdisk.html>`__ to the RAM disk Guide to kick off your
-DevStack experience.
diff --git a/doc/source/index.rst b/doc/source/index.rst
index 37b365d..2128620 100644
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1,40 +1,19 @@
-`DevStack </>`__
-
--  `Overview <overview.rst>`__
--  `Changes <changes.rst>`__
--  `FAQ <faq.rst>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-.. toctree::
-   :glob:
-   :maxdepth: 2
-
-   *
-   guides/*
-   
-
-
 DevStack - an OpenStack Community Production
 ============================================
 
-| A documented shell script to build complete OpenStack development environments.
-|  An OpenStack program maintained by the developer community.
+.. toctree::
+   :glob:
+   :maxdepth: 1
 
-#. Setup a fresh supported Linux installation.
-#. Clone devstack from git.openstack.org.
+   overview
+   configuration
+   plugins
+   faq
+   changes
+   contributing
 
-   ::
+   guides/*
 
-       git clone https://git.openstack.org/openstack-dev/devstack
-
-#. Deploy your OpenStack Cloud
-
-   ::
-
-       cd devstack && ./stack.sh
-

 
 Quick Start This ain't your first rodeo
 ---------------------------------------
@@ -63,8 +42,8 @@
 
 #. Configure
 
-   We recommend at least a `minimal
-   configuration <configuration.html>`__ be set up.
+   We recommend at least a :doc:`minimal
+   configuration <configuration>` be set up.
 
 #. Start the install
 
@@ -75,104 +54,85 @@
    It takes a few minutes, we recommend `reading the
    script <stack.sh.html>`__ while it is building.
 
-Guides Walk through various setups used by stackers
----------------------------------------------------
+Guides
+======
+
+Walk through various setups used by stackers
 
 OpenStack on VMs
 ----------------
 
-Title
-
-Description
-
-Link
-
-Virtual Machine
-
-Run OpenStack in a VM. The VMs launched in your cloud will be slow as
-they are running in QEMU (emulation), but it is useful if you don't have
-spare hardware laying around.
-
-`Read » <guides/single-vm.html>`__
-
-1 Guide
-
-What is this?
-^^^^^^^^^^^^^
-
 These guides tell you how to virtualize your OpenStack cloud in virtual
 machines. This means that you can get started without having to purchase
 any hardware.
 
+Virtual Machine
+~~~~~~~~~~~~~~~
+
+:doc:`Run OpenStack in a VM <guides/single-vm>`. The VMs launched in your cloud will be slow as
+they are running in QEMU (emulation), but it is useful if you don't have
+spare hardware laying around. :doc:`[Read] <guides/single-vm>`
+
 OpenStack on Hardware
 ---------------------
 
-Title
-
-Description
-
-Link
-
-All-In-One
-
-Run OpenStack on dedicated hardware to get real performance in your VMs.
-This can include a server-class machine or a laptop at home.
-
-`Read » <guides/single-machine.html>`__
-
-Multi-Node + VLANs
-
-Setup a multi-node cluster with dedicated VLANs for VMs & Management.
-
-`Read » <guides/multinode-lab.html>`__
-
-2 Guides
-
-What is this?
-^^^^^^^^^^^^^
-
 These guides tell you how to deploy a development environment on real
 hardware. Guides range from running OpenStack on a single laptop to
 running a multi-node deployment on datacenter hardware.
 
-Documentation Help yourself to stack
-------------------------------------
+All-In-One
+~~~~~~~~~~
+
+:doc:`Run OpenStack on dedicated hardware <guides/single-machine>` to get real performance in your VMs.
+This can include a server-class machine or a laptop at home. :doc:`[Read] <guides/single-machine>`
+
+Multi-Node + VLANs
+~~~~~~~~~~~~~~~~~~
+
+:doc:`Setup a multi-node cluster <guides/multinode-lab>` with dedicated VLANs for VMs & Management. :doc:`[Read] <guides/multinode-lab>`
+
+Documentation
+=============
 
 Overview
 --------
 
-`An overview of DevStack goals and priorities <overview.html>`__
+:doc:`An overview of DevStack goals and priorities <overview>`
 
 Configuration
 -------------
 
-`Configuring and customizing the stack <configuration.html>`__
+:doc:`Configuring and customizing the stack <configuration>`
 
 Plugins
 -------
 
-`Extending DevStack with new features <plugins.html>`__
+:doc:`Extending DevStack with new features <plugins>`
 
 Recent Changes
 --------------
 
-`An incomplete summary of recent changes <changes.html>`__
+:doc:`An incomplete summary of recent changes <changes>`
 
 FAQ
 ---
 
-`The DevStack FAQ <faq.html>`__
+:doc:`The DevStack FAQ <faq>`
 
 Contributing
 ------------
 
-`Pitching in to make DevStack a better place <contributing.html>`__
+:doc:`Pitching in to make DevStack a better place <contributing>`
 
-Code A look at the bits that make it all go
--------------------------------------------
+Code
+====
 
-Scripts Generated documentation of DevStack scripts.
-----------------------------------------------------
+A look at the bits that make it all go
+
+Scripts
+-------
+
+Generated documentation of DevStack scripts.
 
 +-------------------------------+----------------------------------------------+
 | Filename                      | Link                                         |
@@ -254,8 +214,8 @@
 | extras.d/80-tempest.sh        | `Read » <extras.d/80-tempest.html>`__        |
 +-------------------------------+----------------------------------------------+
 
-Configuration Setting the table
--------------------------------
+Configuration
+-------------
 
 +--------------+--------------------------------+
 | Filename     | Link                           |
@@ -271,8 +231,8 @@
 | eucarc       | `Read » <eucarc.html>`__       |
 +--------------+--------------------------------+
 
-Tools Support scripts
----------------------
+Tools
+-----
 
 +-----------------------------+----------------------------------------------+
 | Filename                    | Link                                         |
@@ -292,8 +252,10 @@
 | tools/upload\_image.sh      | `Read » <tools/upload_image.sh.html>`__      |
 +-----------------------------+----------------------------------------------+
 
-Samples Generated documentation of DevStack sample files.
----------------------------------------------------------
+Samples
+-------
+
+Generated documentation of DevStack sample files.
 
 +------------+--------------------------------------+
 | Filename   | Link                                 |
@@ -303,8 +265,8 @@
 | localrc    | `Read » <samples/localrc.html>`__    |
 +------------+--------------------------------------+
 
-Exercises Generated documentation of DevStack scripts.
-------------------------------------------------------
+Exercises
+---------
 
 +---------------------------------+-------------------------------------------------+
 | Filename                        | Link                                            |
@@ -343,3 +305,9 @@
 +---------------------------------+-------------------------------------------------+
 | exercises/zaqar.sh              | `Read » <exercises/zaqar.sh.html>`__            |
 +---------------------------------+-------------------------------------------------+
+
+.. toctree::
+   :glob:
+   :maxdepth: 1
+
+   *
diff --git a/doc/source/local.conf.rst b/doc/source/local.conf.rst
index e1de44c..a9dfcb0 100644
--- a/doc/source/local.conf.rst
+++ b/doc/source/local.conf.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-local.conf User settings
-------------------------
+==========================
+local.conf - User Settings
+==========================
 
 ``local.conf`` is a user-maintained setings file that is sourced in
 ``stackrc``. It contains a section that replaces the historical
diff --git a/doc/source/localrc.rst b/doc/source/localrc.rst
index 487280b..98f3083 100644
--- a/doc/source/localrc.rst
+++ b/doc/source/localrc.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-localrc User settings
----------------------
+=====================
+localrc - The Old Way
+=====================
 
 ``localrc`` is the old file used to configure DevStack. It is deprecated
 and has been replaced by ```local.conf`` <local.conf.html>`__. DevStack
diff --git a/doc/source/openrc.rst b/doc/source/openrc.rst
index ce5765a..dc12f76 100644
--- a/doc/source/openrc.rst
+++ b/doc/source/openrc.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-openrc User authentication settings
------------------------------------
+=====================================
+openrc - User Authentication Settings
+=====================================
 
 ``openrc`` configures login credentials suitable for use with the
 OpenStack command-line tools. ``openrc`` sources ``stackrc`` at the
diff --git a/doc/source/overview.rst b/doc/source/overview.rst
index cedf941..e3cf75d 100644
--- a/doc/source/overview.rst
+++ b/doc/source/overview.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Overview DevStack from a cloud-height view
-------------------------------------------
+========
+Overview
+========
 
 DevStack has evolved to support a large number of configuration options
 and alternative platforms and support services. That evolution has grown
diff --git a/doc/source/plugins.rst b/doc/source/plugins.rst
index 0747b59..282c1a4 100644
--- a/doc/source/plugins.rst
+++ b/doc/source/plugins.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-Plugins Add stuff
------------------
+=======
+Plugins
+=======
 
 DevStack has a couple of plugin mechanisms to allow easily adding
 support for additional projects and features.
diff --git a/doc/source/stackrc.rst b/doc/source/stackrc.rst
index 5d9d221..0faab45 100644
--- a/doc/source/stackrc.rst
+++ b/doc/source/stackrc.rst
@@ -1,13 +1,6 @@
-`DevStack </>`__
-
--  `Overview <overview.html>`__
--  `Changes <changes.html>`__
--  `FAQ <faq.html>`__
--  `git.openstack.org <https://git.openstack.org/cgit/openstack-dev/devstack>`__
--  `Gerrit <https://review.openstack.org/#/q/status:open+project:openstack-dev/devstack,n,z>`__
-
-stackrc DevStack settings
--------------------------
+===========================
+stackrc - DevStack Settings
+===========================
 
 ``stackrc`` is the primary configuration file for DevStack. It contains
 all of the settings that control the services started and the
diff --git a/functions-common b/functions-common
index 48edba8..9f8476e 100644
--- a/functions-common
+++ b/functions-common
@@ -575,7 +575,7 @@
 
     RECLONE=$(trueorfalse False $RECLONE)
 
-    if [[ "$GIT_DEPTH" ]]; then
+    if [[ -n "${GIT_DEPTH}" ]]; then
         git_clone_flags="$git_clone_flags --depth $GIT_DEPTH"
     fi
 
@@ -993,6 +993,8 @@
     local file_to_parse
     local service
 
+    INSTALL_TESTONLY_PACKAGES=$(trueorfalse False $INSTALL_TESTONLY_PACKAGES)
+
     if [[ -z "$package_dir" ]]; then
         echo "No package directory supplied"
         return 1
@@ -1599,6 +1601,7 @@
         $cmd_pip install \
         $pip_mirror_opt $@
 
+    INSTALL_TESTONLY_PACKAGES=$(trueorfalse False $INSTALL_TESTONLY_PACKAGES)
     if [[ "$INSTALL_TESTONLY_PACKAGES" == "True" ]]; then
         local test_req="$@/test-requirements.txt"
         if [[ -e "$test_req" ]]; then
diff --git a/lib/ceilometer b/lib/ceilometer
index 9046b9d..483cd27 100644
--- a/lib/ceilometer
+++ b/lib/ceilometer
@@ -242,6 +242,18 @@
     fi
 }
 
+# install_redis() - Install the redis server.
+function install_redis {
+    if is_ubuntu; then
+        install_package redis-server
+    else
+        # This will fail (correctly) where a redis package is unavailable
+        install_package redis
+    fi
+
+    restart_service redis
+}
+
 # install_ceilometer() - Collect source and prepare
 function install_ceilometer {
     git_clone $CEILOMETER_REPO $CEILOMETER_DIR $CEILOMETER_BRANCH
@@ -249,6 +261,8 @@
 
     if echo $CEILOMETER_COORDINATION_URL | grep -q '^memcached:'; then
         install_package memcached
+    elif echo $CEILOMETER_COORDINATION_URL | grep -q '^redis:'; then
+        install_redis
     fi
 }
 
diff --git a/lib/cinder b/lib/cinder
index b30a036..29cda42 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -306,6 +306,7 @@
     iniset $CINDER_CONF DEFAULT glance_api_servers "${GLANCE_SERVICE_PROTOCOL}://${GLANCE_HOSTPORT}"
     if is_ssl_enabled_service glance || is_service_enabled tls-proxy; then
         iniset $CINDER_CONF DEFAULT glance_protocol https
+        iniset $CINDER_CONF DEFAULT glance_ca_certificates_file $SSL_BUNDLE_FILE
     fi
 
     # Register SSL certificates if provided
diff --git a/lib/ironic b/lib/ironic
index 0a84e47..cf005a7 100644
--- a/lib/ironic
+++ b/lib/ironic
@@ -279,7 +279,7 @@
         else
             die $LINENO "SWIFT_ENABLE_TEMPURLS must be True to use agent_ssh driver in Ironic."
         fi
-        iniset $IRONIC_CONF_FILE glance swift_endpoint_url http://${HOST_IP}:8080
+        iniset $IRONIC_CONF_FILE glance swift_endpoint_url http://${HOST_IP}:${SWIFT_DEFAULT_BIND_PORT:-8080}
         iniset $IRONIC_CONF_FILE glance swift_api_version v1
         local tenant_id=$(get_or_create_project $SERVICE_TENANT_NAME)
         iniset $IRONIC_CONF_FILE glance swift_account AUTH_${tenant_id}
@@ -523,7 +523,11 @@
     sudo modprobe nf_nat_tftp
     # nodes boot from TFTP and callback to the API server listening on $HOST_IP
     sudo iptables -I INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true
-    sudo iptables -I INPUT -d $HOST_IP -p tcp --dport 6385 -j ACCEPT || true
+    sudo iptables -I INPUT -d $HOST_IP -p tcp --dport $IRONIC_HOSTPORT -j ACCEPT || true
+    if [ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]; then
+        # agent ramdisk gets instance image from swift
+        sudo iptables -I INPUT -d $HOST_IP -p tcp --dport ${SWIFT_DEFAULT_BIND_PORT:-8080} -j ACCEPT || true
+    fi
 }
 
 function configure_tftpd {
@@ -678,6 +682,10 @@
     restart_service xinetd
     sudo iptables -D INPUT -d $HOST_IP -p udp --dport 69 -j ACCEPT || true
     sudo iptables -D INPUT -d $HOST_IP -p tcp --dport 6385 -j ACCEPT || true
+    if [ "$IRONIC_DEPLOY_DRIVER" == "agent_ssh" ]; then
+        # agent ramdisk gets instance image from swift
+        sudo iptables -D INPUT -d $HOST_IP -p tcp --dport ${SWIFT_DEFAULT_BIND_PORT:-8080} -j ACCEPT || true
+    fi
     sudo rmmod nf_conntrack_tftp || true
     sudo rmmod nf_nat_tftp || true
 }
diff --git a/lib/keystone b/lib/keystone
index 1c67835..276e971 100644
--- a/lib/keystone
+++ b/lib/keystone
@@ -287,7 +287,7 @@
         " -i $KEYSTONE_CATALOG
 
         # Configure ``keystone.conf`` to use templates
-        iniset $KEYSTONE_CONF catalog driver "keystone.catalog.backends.templated.TemplatedCatalog"
+        iniset $KEYSTONE_CONF catalog driver "keystone.catalog.backends.templated.Catalog"
         iniset $KEYSTONE_CONF catalog template_file "$KEYSTONE_CATALOG"
     fi
 
diff --git a/lib/neutron b/lib/neutron
index ca9b16c..eb07f40 100644
--- a/lib/neutron
+++ b/lib/neutron
@@ -20,13 +20,15 @@
 # - create_neutron_cache_dir
 # - create_nova_conf_neutron
 # - start_neutron_service_and_check
+# - start_neutron_agents
 # - create_neutron_initial_network
 # - setup_neutron_debug
-# - start_neutron_agents
 #
 # ``unstack.sh`` calls the entry points in this order:
 #
 # - stop_neutron
+# - stop_neutron_third_party
+# - cleanup_neutron
 
 # Functions in lib/neutron are classified into the following categories:
 #
@@ -43,21 +45,11 @@
 # to run Neutron on this host, make sure that q-svc is also in
 # ``ENABLED_SERVICES``.
 #
-# If you're planning to use the Neutron openvswitch plugin, set
-# ``Q_PLUGIN`` to "openvswitch" and make sure the q-agt service is enabled
-# in ``ENABLED_SERVICES``.  If you're planning to use the Neutron
-# linuxbridge plugin, set ``Q_PLUGIN`` to "linuxbridge" and make sure the
-# q-agt service is enabled in ``ENABLED_SERVICES``.
-#
 # See "Neutron Network Configuration" below for additional variables
 # that must be set in localrc for connectivity across hosts with
 # Neutron.
 #
 # With Neutron networking the NETWORK_MANAGER variable is ignored.
-#
-# To enable specific configuration options for either the Open vSwitch or
-# LinuxBridge plugin, please see the top level README file under the
-# Neutron section.
 
 
 # Neutron Network Configuration
@@ -213,12 +205,11 @@
 # Provider Network Configurations
 # --------------------------------
 
-# The following variables control the Neutron openvswitch and
-# linuxbridge plugins' allocation of tenant networks and
-# availability of provider networks. If these are not configured
-# in ``localrc``, tenant networks will be local to the host (with no
-# remote connectivity), and no physical resources will be
-# available for the allocation of provider networks.
+# The following variables control the Neutron ML2 plugins' allocation
+# of tenant networks and availability of provider networks. If these
+# are not configured in ``localrc``, tenant networks will be local to
+# the host (with no remote connectivity), and no physical resources
+# will be available for the allocation of provider networks.
 
 # To disable tunnels (GRE or VXLAN) for tenant networks,
 # set to False in ``local.conf``.
@@ -231,8 +222,8 @@
 TENANT_TUNNEL_RANGES=${TENANT_TUNNEL_RANGES:-1:1000}
 
 # To use VLANs for tenant networks, set to True in localrc. VLANs
-# are supported by the openvswitch and linuxbridge plugins, each
-# requiring additional configuration described below.
+# are supported by the ML2 plugins, requiring additional configuration
+# described below.
 ENABLE_TENANT_VLANS=${ENABLE_TENANT_VLANS:-False}
 
 # If using VLANs for tenant networks, set in ``localrc`` to specify
@@ -252,7 +243,7 @@
 # Example: ``PHYSICAL_NETWORK=default``
 PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-}
 
-# With the openvswitch plugin, if using VLANs for tenant networks,
+# With the openvswitch agent, if using VLANs for tenant networks,
 # or if using flat or VLAN provider networks, set in ``localrc`` to
 # the name of the OVS bridge to use for the physical network. The
 # bridge will be created if it does not already exist, but a
@@ -262,7 +253,7 @@
 # Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
 OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-}
 
-# With the linuxbridge plugin, if using VLANs for tenant networks,
+# With the linuxbridge agent, if using VLANs for tenant networks,
 # or if using flat or VLAN provider networks, set in ``localrc`` to
 # the name of the network interface to use for the physical
 # network.
@@ -283,6 +274,14 @@
 # Example: ``OVS_ENABLE_TUNNELING=True``
 OVS_ENABLE_TUNNELING=${OVS_ENABLE_TUNNELING:-$ENABLE_TENANT_TUNNELS}
 
+# Use DHCP agent for providing metadata service in the case of
+# without L3 agent (No Route Agent), set to True in localrc.
+ENABLE_ISOLATED_METADATA=${ENABLE_ISOLATED_METADATA:-False}
+
+# Add a static route as dhcp option, so the request to 169.254.169.254
+# will be able to reach through a route(DHCP agent)
+# This option require ENABLE_ISOLATED_METADATA = True
+ENABLE_METADATA_NETWORK=${ENABLE_METADATA_NETWORK:-False}
 # Neutron plugin specific functions
 # ---------------------------------
 
@@ -595,6 +594,24 @@
 function install_neutron {
     git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
     setup_develop $NEUTRON_DIR
+
+    if [ "$VIRT_DRIVER" == 'xenserver' ]; then
+        local dom0_ip
+        dom0_ip=$(echo "$XENAPI_CONNECTION_URL" | cut -d "/" -f 3-)
+
+        local ssh_dom0
+        ssh_dom0="sudo -u $DOMZERO_USER ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@$dom0_ip"
+
+        # Find where the plugins should go in dom0
+        local xen_functions
+        xen_functions=$(cat $TOP_DIR/tools/xen/functions)
+        local plugin_dir
+        plugin_dir=$($ssh_dom0 "$xen_functions; set -eux; xapi_plugin_location")
+
+        # install neutron plugins to dom0
+        tar -czf - -C $NEUTRON_DIR/neutron/plugins/openvswitch/agent/xenapi/etc/xapi.d/plugins/ ./ |
+            $ssh_dom0 "tar -xzf - -C $plugin_dir && chmod a+x $plugin_dir/*"
+    fi
 }
 
 # install_neutronclient() - Collect source and prepare
@@ -822,6 +839,17 @@
     iniset $Q_DHCP_CONF_FILE DEFAULT use_namespaces $Q_USE_NAMESPACE
     iniset $Q_DHCP_CONF_FILE DEFAULT root_helper "$Q_RR_COMMAND"
 
+    if ! is_service_enabled q-l3; then
+        if [[ "$ENABLE_ISOLATED_METADATA" = "True" ]]; then
+            iniset $Q_DHCP_CONF_FILE DEFAULT enable_isolated_metadata $ENABLE_ISOLATED_METADATA
+            iniset $Q_DHCP_CONF_FILE DEFAULT enable_metadata_network $ENABLE_METADATA_NETWORK
+        else
+            if [[ "$ENABLE_METADATA_NETWORK" = "True" ]]; then
+                die "$LINENO" "Enable isolated metadata is a must for metadata network"
+            fi
+        fi
+    fi
+
     _neutron_setup_interface_driver $Q_DHCP_CONF_FILE
 
     neutron_plugin_configure_dhcp_agent
diff --git a/lib/neutron_plugins/linuxbridge b/lib/neutron_plugins/linuxbridge
deleted file mode 100644
index 5f989ae..0000000
--- a/lib/neutron_plugins/linuxbridge
+++ /dev/null
@@ -1,55 +0,0 @@
-# Neutron Linux Bridge plugin
-# ---------------------------
-
-# Save trace setting
-LBRIDGE_XTRACE=$(set +o | grep xtrace)
-set +o xtrace
-
-source $TOP_DIR/lib/neutron_plugins/linuxbridge_agent
-
-function neutron_plugin_configure_common {
-    Q_PLUGIN_CONF_PATH=etc/neutron/plugins/linuxbridge
-    Q_PLUGIN_CONF_FILENAME=linuxbridge_conf.ini
-    Q_PLUGIN_CLASS="neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2"
-}
-
-function neutron_plugin_configure_service {
-    if [[ "$ENABLE_TENANT_VLANS" == "True" ]]; then
-        iniset /$Q_PLUGIN_CONF_FILE vlans tenant_network_type vlan
-    else
-        echo "WARNING - The linuxbridge plugin is using local tenant networks, with no connectivity between hosts."
-    fi
-
-    # Override ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc``
-    # for more complex physical network configurations.
-    if [[ "$LB_VLAN_RANGES" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]]; then
-        LB_VLAN_RANGES=$PHYSICAL_NETWORK
-        if [[ "$TENANT_VLAN_RANGE" != "" ]]; then
-            LB_VLAN_RANGES=$LB_VLAN_RANGES:$TENANT_VLAN_RANGE
-        fi
-    fi
-    if [[ "$LB_VLAN_RANGES" != "" ]]; then
-        iniset /$Q_PLUGIN_CONF_FILE vlans network_vlan_ranges $LB_VLAN_RANGES
-    fi
-    if [[ "$Q_USE_SECGROUP" == "True" ]]; then
-        iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
-    else
-        iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver
-    fi
-
-    # Define extra "LINUX_BRIDGE" configuration options when q-svc is configured by defining
-    # the array ``Q_SRV_EXTRA_OPTS``.
-    # For Example: ``Q_SRV_EXTRA_OPTS=(foo=true bar=2)``
-    for I in "${Q_SRV_EXTRA_OPTS[@]}"; do
-        # Replace the first '=' with ' ' for iniset syntax
-        iniset /$Q_PLUGIN_CONF_FILE linux_bridge ${I/=/ }
-    done
-}
-
-function has_neutron_plugin_security_group {
-    # 0 means True here
-    return 0
-}
-
-# Restore xtrace
-$LBRIDGE_XTRACE
diff --git a/lib/neutron_plugins/linuxbridge_agent b/lib/neutron_plugins/linuxbridge_agent
deleted file mode 100644
index 2638dd3..0000000
--- a/lib/neutron_plugins/linuxbridge_agent
+++ /dev/null
@@ -1,77 +0,0 @@
-# Neutron Linux Bridge L2 agent
-# -----------------------------
-
-# Save trace setting
-PLUGIN_XTRACE=$(set +o | grep xtrace)
-set +o xtrace
-
-function is_neutron_ovs_base_plugin {
-    # linuxbridge doesn't use OVS
-    return 1
-}
-
-function neutron_plugin_create_nova_conf {
-    :
-}
-
-function neutron_plugin_install_agent_packages {
-    install_package bridge-utils
-}
-
-function neutron_plugin_configure_debug_command {
-    iniset $NEUTRON_TEST_CONFIG_FILE DEFAULT external_network_bridge
-}
-
-function neutron_plugin_configure_dhcp_agent {
-    iniset $Q_DHCP_CONF_FILE DEFAULT dhcp_agent_manager neutron.agent.dhcp_agent.DhcpAgentWithStateReport
-}
-
-function neutron_plugin_configure_l3_agent {
-    iniset $Q_L3_CONF_FILE DEFAULT external_network_bridge
-    iniset $Q_L3_CONF_FILE DEFAULT l3_agent_manager neutron.agent.l3_agent.L3NATAgentWithStateReport
-}
-
-function neutron_plugin_configure_plugin_agent {
-    # Setup physical network interface mappings.  Override
-    # ``LB_VLAN_RANGES`` and ``LB_INTERFACE_MAPPINGS`` in ``localrc`` for more
-    # complex physical network configurations.
-    if [[ "$LB_INTERFACE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$LB_PHYSICAL_INTERFACE" != "" ]]; then
-        LB_INTERFACE_MAPPINGS=$PHYSICAL_NETWORK:$LB_PHYSICAL_INTERFACE
-    fi
-    if [[ "$LB_INTERFACE_MAPPINGS" != "" ]]; then
-        iniset /$Q_PLUGIN_CONF_FILE linux_bridge physical_interface_mappings $LB_INTERFACE_MAPPINGS
-    fi
-    if [[ "$Q_USE_SECGROUP" == "True" ]]; then
-        iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.linux.iptables_firewall.IptablesFirewallDriver
-    else
-        iniset /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver neutron.agent.firewall.NoopFirewallDriver
-    fi
-    AGENT_BINARY="$NEUTRON_BIN_DIR/neutron-linuxbridge-agent"
-    iniset /$Q_PLUGIN_CONF_FILE agent tunnel_types $Q_TUNNEL_TYPES
-    # Define extra "AGENT" configuration options when q-agt is configured by defining
-    # the array ``Q_AGENT_EXTRA_AGENT_OPTS``.
-    # For Example: ``Q_AGENT_EXTRA_AGENT_OPTS=(foo=true bar=2)``
-    for I in "${Q_AGENT_EXTRA_AGENT_OPTS[@]}"; do
-        # Replace the first '=' with ' ' for iniset syntax
-        iniset /$Q_PLUGIN_CONF_FILE agent ${I/=/ }
-    done
-    # Define extra "LINUX_BRIDGE" configuration options when q-agt is configured by defining
-    # the array ``Q_AGENT_EXTRA_SRV_OPTS``.
-    # For Example: ``Q_AGENT_EXTRA_SRV_OPTS=(foo=true bar=2)``
-    for I in "${Q_AGENT_EXTRA_SRV_OPTS[@]}"; do
-        # Replace the first '=' with ' ' for iniset syntax
-        iniset /$Q_PLUGIN_CONF_FILE linux_bridge ${I/=/ }
-    done
-}
-
-function neutron_plugin_setup_interface_driver {
-    local conf_file=$1
-    iniset $conf_file DEFAULT interface_driver neutron.agent.linux.interface.BridgeInterfaceDriver
-}
-
-function neutron_plugin_check_adv_test_requirements {
-    is_service_enabled q-agt && is_service_enabled q-dhcp && return 0
-}
-
-# Restore xtrace
-$PLUGIN_XTRACE
diff --git a/lib/neutron_plugins/ofagent_agent b/lib/neutron_plugins/ofagent_agent
index 1c04f2f..55f3f72 100644
--- a/lib/neutron_plugins/ofagent_agent
+++ b/lib/neutron_plugins/ofagent_agent
@@ -61,7 +61,6 @@
         if [ `vercmp_numbers "$OVS_VERSION" "1.4"` -lt "0" ]; then
             die $LINENO "You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts."
         fi
-        iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
         iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $TUNNEL_ENDPOINT_IP
     fi
 
diff --git a/lib/neutron_plugins/openvswitch b/lib/neutron_plugins/openvswitch
index c468132..3b6567c 100644
--- a/lib/neutron_plugins/openvswitch
+++ b/lib/neutron_plugins/openvswitch
@@ -1,5 +1,8 @@
-# Neutron Open vSwitch plugin
-# ---------------------------
+# Common code used by cisco and embrane plugins
+# ---------------------------------------------
+
+# This module used to be for Open vSwitch monolithic plugin,
+# which has been removed in Juno.
 
 # Save trace setting
 OVS_XTRACE=$(set +o | grep xtrace)
@@ -35,11 +38,6 @@
         iniset /$Q_PLUGIN_CONF_FILE ovs network_vlan_ranges $OVS_VLAN_RANGES
     fi
 
-    # Enable tunnel networks if selected
-    if [[ $OVS_ENABLE_TUNNELING == "True" ]]; then
-        iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
-    fi
-
     _neutron_ovs_base_configure_firewall_driver
 
     # Define extra "OVS" configuration options when q-svc is configured by defining
diff --git a/lib/neutron_plugins/openvswitch_agent b/lib/neutron_plugins/openvswitch_agent
index 835f645..e1a6f4a 100644
--- a/lib/neutron_plugins/openvswitch_agent
+++ b/lib/neutron_plugins/openvswitch_agent
@@ -47,7 +47,6 @@
         if [ `vercmp_numbers "$OVS_VERSION" "1.4"` -lt "0" ] && ! is_service_enabled q-svc ; then
             die $LINENO "You are running OVS version $OVS_VERSION. OVS 1.4+ is required for tunneling between multiple hosts."
         fi
-        iniset /$Q_PLUGIN_CONF_FILE ovs enable_tunneling True
         iniset /$Q_PLUGIN_CONF_FILE ovs local_ip $TUNNEL_ENDPOINT_IP
     fi
 
diff --git a/lib/opendaylight b/lib/opendaylight
index 374de95..bdebe58 100644
--- a/lib/opendaylight
+++ b/lib/opendaylight
@@ -44,6 +44,9 @@
 # The ODL password
 ODL_PASSWORD=${ODL_PASSWORD:-admin}
 
+# Short name of ODL package
+ODL_NAME=${ODL_NAME:-distribution-karaf-0.2.0-Helium}
+
 # <define global variables here that belong to this project>
 ODL_DIR=$DEST/opendaylight
 
@@ -87,23 +90,23 @@
 # configure_opendaylight() - Set config files, create data dirs, etc
 function configure_opendaylight {
     # Add odl-ovsdb-openstack if it's not already there
-    local ODLOVSDB=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/org.apache.karaf.features.cfg | grep featuresBoot= | grep odl)
+    local ODLOVSDB=$(cat $ODL_DIR/$ODL_NAME/etc/org.apache.karaf.features.cfg | grep featuresBoot= | grep odl)
     if [ "$ODLOVSDB" == "" ]; then
-        sed -i '/^featuresBoot=/ s/$/,odl-ovsdb-openstack/' $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/org.apache.karaf.features.cfg
+        sed -i '/^featuresBoot=/ s/$/,odl-ovsdb-openstack/' $ODL_DIR/$ODL_NAME/etc/org.apache.karaf.features.cfg
     fi
 
     # Configure OpenFlow 1.3 if it's not there
-    local OFLOW13=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties | grep ^of.version)
+    local OFLOW13=$(cat $ODL_DIR/$ODL_NAME/etc/custom.properties | grep ^of.version)
     if [ "$OFLOW13" == "" ]; then
-        echo "ovsdb.of.version=1.3" >> $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties
+        echo "ovsdb.of.version=1.3" >> $ODL_DIR/$ODL_NAME/etc/custom.properties
     fi
 
     # Configure L3 if the user wants it
     if [ "${ODL_L3}" == "True" ]; then
         # Configure L3 FWD if it's not there
-        local L3FWD=$(cat $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties | grep ^ovsdb.l3.fwd.enabled)
+        local L3FWD=$(cat $ODL_DIR/$ODL_NAME/etc/custom.properties | grep ^ovsdb.l3.fwd.enabled)
         if [ "$L3FWD" == "" ]; then
-            echo "ovsdb.l3.fwd.enabled=yes" >> $ODL_DIR/distribution-karaf-0.2.0-Helium/etc/custom.properties
+            echo "ovsdb.l3.fwd.enabled=yes" >> $ODL_DIR/$ODL_NAME/etc/custom.properties
         fi
     fi
 }
@@ -156,7 +159,7 @@
     #   -of13: runs ODL using OpenFlow 1.3 protocol support.
     #   -virt ovsdb: Runs ODL in "virtualization" mode with OVSDB support
 
-    run_process odl-server "cd $ODL_DIR/distribution-karaf-0.2.0-Helium && JAVA_HOME=$JHOME bin/karaf"
+    run_process odl-server "cd $ODL_DIR/$ODL_NAME && JAVA_HOME=$JHOME bin/karaf"
 
     # Sleep a bit to let OpenDaylight finish starting up
     sleep $ODL_BOOT_WAIT
diff --git a/lib/sahara b/lib/sahara
index 5c7c253..6d1bef5 100644
--- a/lib/sahara
+++ b/lib/sahara
@@ -98,12 +98,17 @@
     fi
     sudo chown $STACK_USER $SAHARA_CONF_DIR
 
+    if [[ -f $SAHARA_DIR/etc/sahara/policy.json ]]; then
+        cp -p $SAHARA_DIR/etc/sahara/policy.json $SAHARA_CONF_DIR
+    fi
+
     # Copy over sahara configuration file and configure common parameters.
     cp $SAHARA_DIR/etc/sahara/sahara.conf.sample $SAHARA_CONF_FILE
 
     # Create auth cache dir
     sudo mkdir -p $SAHARA_AUTH_CACHE_DIR
     sudo chown $STACK_USER $SAHARA_AUTH_CACHE_DIR
+    sudo chmod 700 $SAHARA_AUTH_CACHE_DIR
     rm -rf $SAHARA_AUTH_CACHE_DIR/*
 
     configure_auth_token_middleware $SAHARA_CONF_FILE sahara $SAHARA_AUTH_CACHE_DIR
diff --git a/lib/trove b/lib/trove
index 1d1b5f4..4ac7293 100644
--- a/lib/trove
+++ b/lib/trove
@@ -207,7 +207,7 @@
     # The image is uploaded by stack.sh -- see $IMAGE_URLS handling
     GUEST_IMAGE_NAME=$(basename "$TROVE_GUEST_IMAGE_URL")
     GUEST_IMAGE_NAME=${GUEST_IMAGE_NAME%.*}
-    TROVE_GUEST_IMAGE_ID=$(openstack --os-token $TOKEN --os-url http://$GLANCE_HOSTPORT image list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
+    TROVE_GUEST_IMAGE_ID=$(openstack --os-token $TOKEN --os-url $GLANCE_SERVICE_PROTOCOL://$GLANCE_HOSTPORT image list | grep "${GUEST_IMAGE_NAME}" | get_field 1)
     if [ -z "$TROVE_GUEST_IMAGE_ID" ]; then
         # If no glance id is found, skip remaining setup
         echo "Datastore ${TROVE_DATASTORE_TYPE} will not be created: guest image ${GUEST_IMAGE_NAME} not found."
diff --git a/stack.sh b/stack.sh
index ec13338..38ecceb 100755
--- a/stack.sh
+++ b/stack.sh
@@ -90,16 +90,6 @@
 # and ``DISTRO``
 GetDistro
 
-# Warn users who aren't on an explicitly supported distro, but allow them to
-# override check and attempt installation with ``FORCE=yes ./stack``
-if [[ ! ${DISTRO} =~ (precise|trusty|7.0|wheezy|sid|testing|jessie|f19|f20|rhel6|rhel7) ]]; then
-    echo "WARNING: this script has not been tested on $DISTRO"
-    if [[ "$FORCE" != "yes" ]]; then
-        die $LINENO "If you wish to run this script anyway run with FORCE=yes"
-    fi
-fi
-
-
 # Global Settings
 # ---------------
 
@@ -151,6 +141,15 @@
 fi
 source $TOP_DIR/stackrc
 
+# Warn users who aren't on an explicitly supported distro, but allow them to
+# override check and attempt installation with ``FORCE=yes ./stack``
+if [[ ! ${DISTRO} =~ (precise|trusty|7.0|wheezy|sid|testing|jessie|f19|f20|rhel6|rhel7) ]]; then
+    echo "WARNING: this script has not been tested on $DISTRO"
+    if [[ "$FORCE" != "yes" ]]; then
+        die $LINENO "If you wish to run this script anyway run with FORCE=yes"
+    fi
+fi
+
 # Check to see if we are already running DevStack
 # Note that this may fail if USE_SCREEN=False
 if type -p screen > /dev/null && screen -ls | egrep -q "[0-9]\.$SCREEN_NAME"; then
diff --git a/tools/fixup_stuff.sh b/tools/fixup_stuff.sh
index 1732ecc..b8beb01 100755
--- a/tools/fixup_stuff.sh
+++ b/tools/fixup_stuff.sh
@@ -50,17 +50,24 @@
 # exception into the Kernel for the Keystone AUTH ports.
 keystone_ports=${KEYSTONE_AUTH_PORT:-35357},${KEYSTONE_AUTH_PORT_INT:-35358}
 
-# Get any currently reserved ports, strip off leading whitespace
-reserved_ports=$(sysctl net.ipv4.ip_local_reserved_ports | awk -F'=' '{print $2;}' | sed 's/^ //')
+# only do the reserved ports when available, on some system (like containers)
+# where it's not exposed we are almost pretty sure these ports would be
+# exclusive for our devstack.
+if sysctl net.ipv4.ip_local_reserved_ports >/dev/null 2>&1; then
+    # Get any currently reserved ports, strip off leading whitespace
+    reserved_ports=$(sysctl net.ipv4.ip_local_reserved_ports | awk -F'=' '{print $2;}' | sed 's/^ //')
 
-if [[ -z "${reserved_ports}" ]]; then
-    # If there are no currently reserved ports, reserve the keystone ports
-    sudo sysctl -w net.ipv4.ip_local_reserved_ports=${keystone_ports}
+    if [[ -z "${reserved_ports}" ]]; then
+        # If there are no currently reserved ports, reserve the keystone ports
+        sudo sysctl -w net.ipv4.ip_local_reserved_ports=${keystone_ports}
+    else
+        # If there are currently reserved ports, keep those and also reserve the
+        # keystone specific ports. Duplicate reservations are merged into a single
+        # reservation (or range) automatically by the kernel.
+        sudo sysctl -w net.ipv4.ip_local_reserved_ports=${keystone_ports},${reserved_ports}
+    fi
 else
-    # If there are currently reserved ports, keep those and also reserve the
-    # keystone specific ports. Duplicate reservations are merged into a single
-    # reservation (or range) automatically by the kernel.
-    sudo sysctl -w net.ipv4.ip_local_reserved_ports=${keystone_ports},${reserved_ports}
+    echo_summary "WARNING: unable to reserve keystone ports"
 fi
 
 
diff --git a/tools/xen/build_xva.sh b/tools/xen/build_xva.sh
index cc3cbe1..7c8e620 100755
--- a/tools/xen/build_xva.sh
+++ b/tools/xen/build_xva.sh
@@ -21,19 +21,12 @@
 # This directory
 TOP_DIR=$(cd $(dirname "$0") && pwd)
 
-# Source lower level functions
-. $TOP_DIR/../../functions
-
 # Include onexit commands
 . $TOP_DIR/scripts/on_exit.sh
 
 # xapi functions
 . $TOP_DIR/functions
 
-# Determine what system we are running on.
-# Might not be XenServer if we're using xenserver-core
-GetDistro
-
 # Source params - override xenrc params in your localrc to suite your taste
 source xenrc
 
diff --git a/tools/xen/functions b/tools/xen/functions
index 4317796..c8efd57 100644
--- a/tools/xen/functions
+++ b/tools/xen/functions
@@ -19,10 +19,6 @@
     return 1
 }
 
-function zip_snapshot_location {
-    echo $1 | sed "s,^git://,http://,g;s:\.git$::;s:$:/zipball/$2:g"
-}
-
 function create_directory_for_kernels {
     if [ -d "/boot/guest" ]; then
         echo "INFO: /boot/guest directory already exists, using that" >&2
@@ -43,42 +39,6 @@
     fi
 }
 
-function extract_remote_zipball {
-    local ZIPBALL_URL=$1
-
-    local LOCAL_ZIPBALL=$(mktemp)
-    local EXTRACTED_FILES=$(mktemp -d)
-
-    {
-        if ! wget -nv $ZIPBALL_URL -O $LOCAL_ZIPBALL --no-check-certificate; then
-            die_with_error "Failed to download [$ZIPBALL_URL]"
-        fi
-        unzip -q -o $LOCAL_ZIPBALL -d $EXTRACTED_FILES
-        rm -f $LOCAL_ZIPBALL
-    } >&2
-
-    echo "$EXTRACTED_FILES"
-}
-
-function find_xapi_plugins_dir {
-    find $1 -path '*/xapi.d/plugins' -type d -print
-}
-
-function install_xapi_plugins_from {
-    local XAPI_PLUGIN_DIR
-    local EXTRACTED_FILES
-    local EXTRACTED_PLUGINS_DIR
-
-    EXTRACTED_FILES="$1"
-
-    XAPI_PLUGIN_DIR=$(xapi_plugin_location)
-
-    EXTRACTED_PLUGINS_DIR=$(find_xapi_plugins_dir $EXTRACTED_FILES)
-
-    cp -pr $EXTRACTED_PLUGINS_DIR/* $XAPI_PLUGIN_DIR
-    chmod a+x ${XAPI_PLUGIN_DIR}*
-}
-
 function get_local_sr {
     xe pool-list params=default-SR minimal=true
 }
diff --git a/tools/xen/install_os_domU.sh b/tools/xen/install_os_domU.sh
index 439db68..3a63473 100755
--- a/tools/xen/install_os_domU.sh
+++ b/tools/xen/install_os_domU.sh
@@ -22,19 +22,12 @@
 # This directory
 THIS_DIR=$(cd $(dirname "$0") && pwd)
 
-# Source lower level functions
-. $THIS_DIR/../../functions
-
 # Include onexit commands
 . $THIS_DIR/scripts/on_exit.sh
 
 # xapi functions
 . $THIS_DIR/functions
 
-# Determine what system we are running on.
-# Might not be XenServer if we're using xenserver-core
-GetDistro
-
 #
 # Get Settings
 #
@@ -65,16 +58,6 @@
     exit 1
 fi
 
-# Install plugins
-
-## Install the netwrap xapi plugin to support agent control of dom0 networking
-if [[ "$ENABLED_SERVICES" =~ "q-agt" && "$Q_PLUGIN" = "openvswitch" ]]; then
-    NEUTRON_ZIPBALL_URL=${NEUTRON_ZIPBALL_URL:-$(zip_snapshot_location $NEUTRON_REPO $NEUTRON_BRANCH)}
-    EXTRACTED_NEUTRON=$(extract_remote_zipball "$NEUTRON_ZIPBALL_URL")
-    install_xapi_plugins_from "$EXTRACTED_NEUTRON"
-    rm -rf "$EXTRACTED_NEUTRON"
-fi
-
 #
 # Configure Networking
 #
@@ -88,9 +71,7 @@
 
 # With neutron, one more network is required, which is internal to the
 # hypervisor, and used by the VMs
-if is_service_enabled neutron; then
-    setup_network "$XEN_INT_BRIDGE_OR_NET_NAME"
-fi
+setup_network "$XEN_INT_BRIDGE_OR_NET_NAME"
 
 if parameter_is_specified "FLAT_NETWORK_BRIDGE"; then
     if [ "$(bridge_for "$VM_BRIDGE_OR_NET_NAME")" != "$(bridge_for "$FLAT_NETWORK_BRIDGE")" ]; then
@@ -292,14 +273,12 @@
 # Attach a network interface for the integration network (so that the bridge
 # is created by XenServer). This is required for Neutron. Also pass that as a
 # kernel parameter for DomU
-if is_service_enabled neutron; then
-    attach_network "$XEN_INT_BRIDGE_OR_NET_NAME"
+attach_network "$XEN_INT_BRIDGE_OR_NET_NAME"
 
-    XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME")
-    append_kernel_cmdline \
-        "$GUEST_NAME" \
-        "xen_integration_bridge=${XEN_INTEGRATION_BRIDGE}"
-fi
+XEN_INTEGRATION_BRIDGE=$(bridge_for "$XEN_INT_BRIDGE_OR_NET_NAME")
+append_kernel_cmdline \
+    "$GUEST_NAME" \
+    "xen_integration_bridge=${XEN_INTEGRATION_BRIDGE}"
 
 FLAT_NETWORK_BRIDGE="${FLAT_NETWORK_BRIDGE:-$(bridge_for "$VM_BRIDGE_OR_NET_NAME")}"
 append_kernel_cmdline "$GUEST_NAME" "flat_network_bridge=${FLAT_NETWORK_BRIDGE}"
diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh
index 2d3b898..6cb2ca7 100755
--- a/tools/xen/prepare_guest_template.sh
+++ b/tools/xen/prepare_guest_template.sh
@@ -22,19 +22,12 @@
 # This directory
 TOP_DIR=$(cd $(dirname "$0") && pwd)
 
-# Source lower level functions
-. $TOP_DIR/../../functions
-
 # Include onexit commands
 . $TOP_DIR/scripts/on_exit.sh
 
 # xapi functions
 . $TOP_DIR/functions
 
-# Determine what system we are running on.
-# Might not be XenServer if we're using xenserver-core
-GetDistro
-
 # Source params - override xenrc params in your localrc to suite your taste
 source xenrc
 
@@ -118,3 +111,10 @@
 deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse
 deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse
 EOF
+
+rm -f $STAGING_DIR/etc/apt/apt.conf
+if [ -n "$UBUNTU_INST_HTTP_PROXY" ]; then
+    cat > $STAGING_DIR/etc/apt/apt.conf << EOF
+Acquire::http::Proxy "$UBUNTU_INST_HTTP_PROXY";
+EOF
+fi
diff --git a/tools/xen/scripts/install_ubuntu_template.sh b/tools/xen/scripts/install_ubuntu_template.sh
index d4d6567..d80ed09 100755
--- a/tools/xen/scripts/install_ubuntu_template.sh
+++ b/tools/xen/scripts/install_ubuntu_template.sh
@@ -14,9 +14,6 @@
 # This directory
 BASE_DIR=$(cd $(dirname "$0") && pwd)
 
-# Source the top level functions
-source $BASE_DIR/../../../functions
-
 # For default setings see xenrc
 source $BASE_DIR/../xenrc
 
diff --git a/tools/xen/test_functions.sh b/tools/xen/test_functions.sh
index 838f86a..924e773 100755
--- a/tools/xen/test_functions.sh
+++ b/tools/xen/test_functions.sh
@@ -116,18 +116,6 @@
     grep "[ -d /usr/lib/xcp/plugins/ ]" $LIST_OF_ACTIONS
 }
 
-function test_zip_snapshot_location_http {
-    diff \
-    <(zip_snapshot_location "http://github.com/openstack/nova.git" "master") \
-    <(echo "http://github.com/openstack/nova/zipball/master")
-}
-
-function test_zip_snapsot_location_git {
-    diff \
-    <(zip_snapshot_location "git://github.com/openstack/nova.git" "master") \
-    <(echo "http://github.com/openstack/nova/zipball/master")
-}
-
 function test_create_directory_for_kernels {
     (
         . mocks
@@ -174,37 +162,6 @@
 EOF
 }
 
-function test_extract_remote_zipball {
-    local RESULT=$(. mocks && extract_remote_zipball "someurl")
-
-    diff <(cat $LIST_OF_ACTIONS) - << EOF
-wget -nv someurl -O tempfile --no-check-certificate
-unzip -q -o tempfile -d tempdir
-rm -f tempfile
-EOF
-
-    [ "$RESULT" = "tempdir" ]
-}
-
-function test_extract_remote_zipball_wget_fail {
-    set +e
-
-    local IGNORE
-    IGNORE=$(. mocks && extract_remote_zipball "failurl")
-
-    assert_died_with "Failed to download [failurl]"
-}
-
-function test_find_nova_plugins {
-    local tmpdir=$(mktemp -d)
-
-    mkdir -p "$tmpdir/blah/blah/u/xapi.d/plugins"
-
-    [ "$tmpdir/blah/blah/u/xapi.d/plugins" = $(find_xapi_plugins_dir $tmpdir) ]
-
-    rm -rf $tmpdir
-}
-
 function test_get_local_sr {
     setup_xe_response "uuid123"
 
diff --git a/tools/xen/xenrc b/tools/xen/xenrc
index 510c5f9..0cbf861 100644
--- a/tools/xen/xenrc
+++ b/tools/xen/xenrc
@@ -91,7 +91,24 @@
 # Set the size to 0 to avoid creation of additional disk.
 XEN_XVDB_SIZE_GB=0
 
-restore_nounset=`set +o | grep nounset`
+STACK_USER=stack
+DOMZERO_USER=domzero
+
+RC_DIR="../.."
+
+restore_nounset=$(set +o | grep nounset)
 set +u
-source ../../stackrc
+
+## Note that the lines below are coming from stackrc to support
+## new-style config files
+
+# allow local overrides of env variables, including repo config
+if [[ -f $RC_DIR/localrc ]]; then
+    # Old-style user-supplied config
+    source $RC_DIR/localrc
+elif [[ -f $RC_DIR/.localrc.auto ]]; then
+    # New-style user-supplied config extracted from local.conf
+    source $RC_DIR/.localrc.auto
+fi
+
 $restore_nounset