Fixing get_panel_groups uncaught exception

The get_dashboards method in horizon/base.py returns dashboards
that have been unregistered. Subsequently calling get_panel_groups
on that dashboard causes an uncaught exception.

Fixes: bug#1185914

Change-Id: Ia5a7e7d19e7d2f04731a6840858cd9d9b91cfe00
Sort imports alphabetically

This patch also re-organizes imports to import one per line.

Change-Id: Ia958e3a30a48d4308d08d51df243c1272425c316
Fixes: bug 1188529
Fixes: bug 1188537
Use Python 3.x compatible except construct

Python 3.x removed the "except x,y:" construct. Use
"except x as y:" instead which works with all
Python versions >= 2.6.

Change-Id: Iedb4c5a6d8580cbb6c9697933d006e94b1db916d
Manually mock service_catalog in stub_keystoneclient

MockObject.__init__ ignores properties, fixes:

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

Change-Id: I0af2f571855ad63c204e26d8283a713be0caae8f
Only display tenant resources in network topology when admin

Change how the JSON renders so that it checks for tenant IDs
but still allows shared and external networks to be shown
for each project, no longer directly accesses the python
clients instead uses the api class.

Change-Id: I1c4c97cf0bc6df3c13be2b1b97fe621817425c09
Fixes: bug #1151101
Merge "Fixing get_panel_groups uncaught exception"
Remove pool selection from "Add Monitor" page

Allow one to create a health monitor object without
any association. Add buttons "Add Health Monitor" and
"Delete Health Monitor" on pools table page.

fixes bug 1158602

Change-Id: I4d9abe378dc1ef2cf410f801ec1f480060de015a
Fix quota charts on the Resize Instance form

Also consolidate the template with _launch_details_help.html.

Fixes bug #1188631.

Change-Id: I5cfeccc7b7b3a4eb4027c41e3df2a99820b93706
Merge "Manually mock service_catalog in stub_keystoneclient"
Ensure flake8 runs with a valid settings file

The H301 check sometimes imports a file when trying to tell whether it
is a module. Ensure we run flake8 in a valid environment to avoid
any side-effects from this.

Fixes bug #1191748.

Change-Id: I35fdefcd8f4c465a89f884299a0a9f4a4c79a6f6
Disable stop action when instance is deleting

Fixes Bug: 1192608

Change-Id: I916f10fb55c90b4891d79fbb7462b319fc88c4d1
Merge "Fix quota charts on the Resize Instance form"
Merge "Remove pool selection from "Add Monitor" page"
Merge "Only display tenant resources in network topology when admin"
Fixing unmocked call errors

Call pool_health_monitors_get was mocked, but it is called
multiple times.  Added MultipleTimes() to the mock.

Fixes: bug #1192923

Change-Id: I127d28d7963aa823064fe2a6593823ec6e613739
Region selector enabling multi-region support.

This patch adds a region selector dropdown
at the top of both the Project and Admin dashboards if
more than one region is available in the user's service
catalog.  The user is allowed to choose from any region
available in the service catalog. By selecting a region,
the user is limited to accessing endpoints in that
region only as long as the go through api.base.url_for

If there are more than one endpoint for a service in a
region the first in the catalog is returned.  Further
work on the blueprint will handle that complexity.

Supporting Keystone v2.0 and v3 catalog formats.

Partially implements blueprint multiple-service-endpoints

Change-Id: I1ab6539c7c5f4b1ae4b1716059370e86b6ca4d2e
Fixing scoping of instances in admin volume view

Existing code was only getting instances scoped to the user's
current token.  When calling from the admin volumes view, this
needs to get all instances to correlate volume attachments.

Changed get_volumes to pass all_tenants=True to be consistent,
cinder ignores the value anyway and only looks for the all_tenants
key.

Fixes: bug #1193002

Change-Id: I5ed2a63997126911d6657619b062acd2947d06e1
Add general description field in image properties

It would be beneficial for us to be able to add descriptions to the
image file.

Change-Id: I8e5f9ce423f1bc76e559ffb437f255fd9717902e
Fixes: bug #1180861
Merge "Fixing unmocked call errors"
Improvements in csv export for usage data

Added a csv writer using the 'csv' library to format
properly exported data - escaping, encoding etc.
Added a HttpResponse-based class to handle csv generation
Added translation for the CSV columns and template.

Fix bug #1158383

Renamed few occurencies of 'tenant' to 'project'.

Also added a new 'project' in nova_data.py, which required
some refactoring of few tests, that didn't consider the current project
for project-based calls.

Note: I've added a StreamingHttpResponse example,
which is introduced in Django 1.5+ and being advised in the ticket.
However, my opinion is that at the moment we don't need this - it is
too complicated for the current usage.

Change-Id: I18bd70a23b7b8389c7c0f96dbf8794fea5e1e75b