Resolve API import issues (quantum)

Restore the imports in the api init file, without including the "from"
to ensure api calls still must specify "api.nova", "api.quantum", etc.

Fixes bug #1125632

Change-Id: I981105ce0ed7f1352de42fe2c0620665ba378823
Added encryption support for volumes

The modifications are to the volumes/cinder area of the dashboard. In
the cinder client's API, we exposed the metadata parameter in the
"create" method, and then added a choice field to the create form to
(optionally) select an encryption mode.  The user's selection is then
passed in to cinder as volume metadata.  We also modified the detailed
volume view to display all metadata associated with a volume.  We also
added a flag in OPENSTACK_HYPERVISOR_FEATURES to enable/disable the
encryption field.  Finally, we added a test case to exercise the
encryption choice field.

The following changes were made to Nova to support this feature:

Added support to encrypt volumes. Modified the libvirt driver to
encrypt volumes during the attach call. Created a new VolumeEncryptor
class that is responsible for encrypting volumes. The default
implementation does not do enryption, and a DmCryptVolumeEncryptor is
provided to encrypt volumes using dmcrypt.

Added a new KeyManager interface. The KeyManager is used by the
VolumeEncryptor to retrieve the key necessary for encryption.

Change-Id: Idb6a923f0e3fa52ca800ebd621e247d972b7c714
Implements: blueprint volume-encryption-field
Adding network-topology view for quantum

Implements bp quantum-network-topology

- network-topology pane shows the topology of quantum network
- supports network, router , instances now
- support of load balancer is future work

Change-Id: Idb1bf2d3add43cf51ed23ebaac3ee740b03498aa
Merge "Added encryption support for volumes"
Add support for both soft and hard reboot options

Fixes bug #1088859. Thanks to Yufang Zhang for the initial patch.

Change-Id: Ic91feb6859586c2df1b6758f72f3981039914095
Fix a TypeError when working in a Folsom env.

Fixes bug 1121975

Change-Id: I6b4482e9efd1332f8969c54f68a365f6b48d8e04
Allow admin to edit project quotas for security groups and rules

Fixes bug 1078092

Change-Id: I1018f07f740b7e27e14fb00bac4c3cce177469e2
Merge "Adding network-topology view for quantum"
Fix images/snapshots table pagination

For project images, disable pagination entirely as it's not compatible
with client-side filtering (at least without moving to asynch table
loading). This can be revisited when we move to glance v2, which
apparently supports filtering by owner.

For snapshots and admin images, fix pagination by making sure the
iterator returned by glanceclient isn't exhausted completely when
returning a page of images. Do this by slicing just the number of
images we require (+ 1 to check if there will be another page after
this one).

Fixes bug #1083034.

Change-Id: I692f57dec6dca16cf8909f5b234aadb002702fc8
Fix hogan js templates in IE8

Fixes: bug #1110226

Incorrect usage of the templating framework
as the html should be provided and not text? Weird
that it worked in other browsers though.

As part of the fix hogan has also been updated to
the latest official version 2.0.0 which may prevent
other bugs.

Upstream bug has been filed here:
https://github.com/twitter/hogan.js/issues/130

Change-Id: Id5b6cef85dab1f9a497a525f9c065b410c52b38f
Merge "Add support for both soft and hard reboot options"
Fix uninitialized variable in launch instance

Change-Id: If93dbe0ddd0af4333ac69662beb5151e5d1ea95c
Fix footer count update for multi-table pages

The initial footer count update was selecting all tables on the page
at once for the update, so the count was a sum of all visible rows
on the page.

Fixes bug #1131522.

Change-Id: Iff85ec8533ed62c01d91a21d7f7ea35dcfbf1417
Fix row striping when datatables are filtered

Bootstrap uses nth-child(2n+1) to stripe tables, but this doesn't
take into account hidden rows. tablesorter's zebra plugin can apply
odd/even classes based on the actual visible rows, so allow these
classes to override the default bootstrap style when they're set.

Fixes bug #1119069

Change-Id: Ie47313a8659226945871be8165c75edee169e816
Ensure "Add Interface" form in Admin Panel works

This commit add new templates for interface add/delete operations
in admin panel to make sure the original page is displayed after
adding a router interface successfully.

It also changes the following:
- Update the help message in "Add Interface" and "Set Gateway" forms
  (both in project and admin panels)
- Fixes a issue that Project router detail was displayed after setting
  an external gateway to a router in admin panel.
  Admin router detail is expected to display
- Make sure a router name is displayed in router detail in admin panel.

Fixes Bug #1131177

Change-Id: I9728cb68972977f868549b61979d9c779cd9fd4e
Correctly mock keystoneclient.Client.auto_token property with Mox

Recent Mox doesn't stub out class properties any more (check
https://code.google.com/p/pymox/issues/detail?id=11), so we have to do
that manually. Avoids the following error:

FAIL: test_get_default_role
(openstack_dashboard.test.api_tests.keystone_tests.RoleAPITests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/Projects/openstack/horizon/openstack_dashboard/test/api_tests/keystone_tests.py", line 76, in test_get_default_role
    keystoneclient = self.stub_keystoneclient()
  File "/root/Projects/openstack/horizon/openstack_dashboard/test/helpers.py", line 280, in stub_keystoneclient
    self.keystoneclient = self.mox.CreateMock(keystone_client.Client)
  File "/usr/lib/python2.7/site-packages/mox.py", line 258, in CreateMock
    new_mock = MockObject(class_to_mock, attrs=attrs)
  File "/usr/lib/python2.7/site-packages/mox.py", line 556, in __init__
    attr = getattr(class_to_mock, method)
  File "/usr/lib/python2.7/site-packages/mox.py", line 608, in __getattr__
    raise UnknownMethodCallError(name)
UnknownMethodCallError: Method called is not a member of the object: Method called is not a member of the object: auth_token
>>  raise UnknownMethodCallError('auth_token')

Change-Id: I54fd0de298dc66344470147d9bcec6b62baf8297
Escape the region name before passing as value in URL.

Fixes bug 1133048.

Change-Id: I03f7eb0df9f5ae46b6b41da76e0486663403e357
pin django to 1.4.x stream

django 1.5 just released in the last hour, and there is a
compatibility issue with it and horizon causing gate failures.

Pin this so that we can get back to business and let the horizon
team address django 1.5 when it makes sense to them.

Change-Id: I6ddf9623f8a4719b1cb82b118c1876373051fd28
Merge "Fix footer count update for multi-table pages"
Merge "Fix images/snapshots table pagination"