Use default_project_id as user project for keystone v3

This fixes the keystone api module so that it looks for the
default_project_id attribute on the user and uses that as the
primary project.

Closes-Bug: 1347840
Change-Id: If3ea4625ae50ae4561df3e566d1236b86226307b
(cherry picked from commit 03f9caa9d1e43ac4c4db4c10c16e07ca14daaf6e)
Proper port for LBaaS members

This patch set makes loadbalancer select a port on pool subnet
for new members if possible.

Conflicts:
        openstack_dashboard/dashboards/project/loadbalancers/tests.py
        openstack_dashboard/dashboards/project/loadbalancers/workflows.py

Closes-Bug: #1288859

Change-Id: I0809908ec5d15a448691dccf526b66308cf929d4
(cherry picked from commit 98bd3159d65b5d94b10403b6894002ea6de553b2)
TEMPLATE_DIRS must be a tuple

With Django 1.7, TEMPLATE_DIRS must be a tuple. The
definition in horizon/test/settings.py must therefore
have a leading comma. Note that other definitions of
TEMPLATE_DIRS are already like this in Horizon, so
this just fixes the one instance which is wrong.

Note that it is required to support Django 1.7 in
Icehouse, because we're planning to release Debian
Jessie with both Django 1.7 and Icehouse. This is to
*support* Django 1.7, not at all to *switch* to it,
which is very different.

Change-Id: I4d9aa9e716e4cf6c2b56fd25ab8fde9187fc5108
(cherry picked from commit daf9e5c772f82b783ce2255f7cd347ef397efcaf)
Bump stable/icehouse next version to 2014.1.3

Bump stable/icehouse next version to 2014.1.3

Change-Id: I0fed220a36c2d0e223c6ef3ddadb341411d41617
Signed-off-by: Chuck Short <chuck.short@canonical.com>
Long container names no longer break the page

In the containers page, if the name of a container is too long, the
objects table is no longer visible and the table is out of the screen.
There's a screenshot in the bug itself.

Conflicts:
	openstack_dashboard/static/dashboard/less/horizon.less

Change-Id: I4b37d04fec462b2b2baad5a3c76db0d0f48e5387
Closes-Bug: 1314145
(cherry picked from commit d20bde3d7be621642faa300ba3ae28ab65c2c6b5)
Fix XSS issue with the unordered_list filter

When using the unordered_list filter in a Horizon table (as opposed to
a template directly), autoescaping is not set by default and the input
wasn't sanitised.

Closes-Bug: #1349491
Change-Id: Id82eefe48ccb17a158751ec65d24f3ac779380ec
Set python hash seed to 0 in tox.ini

New tox (>=1.7.0) sets a random python hash seed by default. This is
generally good for testing because it will help keep projects working
regardless of the hash seed, but horizon unittests don't currently pass
with a random hash seed so set it to the python default seed.

This change will allow us to use new tox again and remove the
restriction on tox<=1.6.1 to run unittests.

Also see Ib54364877a251db48c54dfdc43c503281ea1f04a.

Change-Id: I8834487e8c7bcdbeae8397c1a10a18873976ce61
Partial-Bug: #1348818
(cherry picked from commit b30072e47ead3625cbf29a3b2955cae19a8e7533)
Merge "Bump stable/icehouse next version to 2014.1.3" into stable/icehouse
Not able to delete a pseudo-folder via horizon

Through horizon the user not able to delete a
pseudo-folder. it giving a error message like
'you are not allowed to delete object'

problem-1:
'subfolders' datatype is not added in the
allowed datatypes tuple, so the delete operation
is not allowed for pseudo-folder. now the 'subfolder'
is added in the tuple.

problem-2:
the object name is starting with container name and
not trailing with '/'. now the object name is modified
before sending to swift client.(removing the container
name and trailing with '/'.

Change-Id: Ifced62b24a9b6e4800b70dae2912ff16d809743d
Closes-Bug: #1317016
Co-Authored-By: Mizielski Robert <robert.mizielski@cloudwatt.com>
(cherry picked from commit a46ce9e3ffaa4ee18618ea18496a76508717c871)
Fix endpoint error when running keystone on apache

When running keystone in httpd, horizon could not generate the
right keystone endpoint url. Fixes this issue by retrieving the
whole path from the service_catalog or OPENSTACK_KEYSTONE_URL
and generating a new url.

Change-Id: Id8459947498127e47700d9f690d4ed4d5cadbba9
Closes-bug: #1295128
(cherry picked from commit 48a0d07e45bac04393978776c63b67cd7c71415d)
Allow forms to disable autofill in all browsers

New variable added to form to specify whether it should autofill or
not. This updates the modal forms autocomplete attribute. Hidden
fields are required because Chromium v34+ based browsers ignore the
autocomplete=off form attribute, so the hidden fields catch autofill
data. Any form without self.no_autocomplete = True will just act
like before.

Conflicts:
	horizon/templates/horizon/common/_modal_form.html
	openstack_dashboard/dashboards/admin/users/forms.py

Change-Id: Ibb1722023eea8f57312e1133939d1f75cd909467
Closes-Bug: 1352459
(cherry picked from commit e79af0ac1e273db86f0034898cb05720df34aa35)
Set the correct min_disk size when creating volume from image

Sometimes the image min_disk size is specified in a property rather
than the min_disk attribute (for instance, after creating a snapshot
from an instance). This ensures that the correct tooltip and error
message are displayed in these cases too.

Change-Id: I0c7a87a6f00c4cc1a54f8b70e5df9bb1d05de866
Closes-Bug: #1368600
(cherry picked from commit 6b62f616b1d6f7d71a34ea59ba8c8120745915f4)
Add OS_REGION_NAME to openrc

The openrc file that is downloaded from Horizon is missing the
OS_REGION_NAME setting. This causes issues in environments that have
multiple regions. If the Region is none, ensure that it is unset after
sourcing the rc file to avoid and empty variable. This fix also cleans
up some language in the generated openrc file.

Change-Id: Ieab0b13afd79158c6bf603891164f01aff3aabf3
Closes-Bug: #1334791
(cherry picked from commit a8692b7726fb43af867844950538eb5ce6436a35)
Add missing "load url from future" in a container template

The modified template uses new syntax for the URL template tag,
but doesn't load the new syntax definition, as required by Django.
This leads to errors when trying to render that template.

Change-Id: I42ddb39cad62b1be0cad81d4758412a981be461e
Closes-bug: #1331271
(cherry picked from commit 8c711e8f6b80bebe9ad49eb6a718b2aba0e2b11b)
Replace Ceilometer ClientException with HTTPException

ClientException was removed from Ceilometer client. Replace it
with HTTPException.

Change-Id: I8707593861939b1218e42ff957171e97e225942f
Closes-bug: #1372416
(cherry picked from commit e36ff388c95927b53ba60d7a7f764d484ae9721d)
Rename add_error methods: Django 1.7 conflict

In Django 1.7, Forms have an add_error() method and our definition
was conflicting with Django's method. Thanks to hertzog@debian.org
for the patch.

Note that it is required to support Django 1.7 in Icehouse, because
we're planning to release Debian Jessie with both Django 1.7 and
Icehouse. This is to *support* Django 1.7, not at all to *switch* to
it, which is very different.

Close-bug: #1352919
Change-Id: I1f558cf7f3198a68629738a011e9cae0c3749320
(cherry picked from commit 04dd1568c1c927901085941124e4c6852183f4f0)
template to rely on the the "id" attribute

The exception fixed is the following:
NoReverseMatch: Reverse for 'detail' with arguments '('',)' and keyword
arguments '{}' not found. 1 pattern(s) tried:
[u'project/volumes/(?P<volume_id>[^/]+)/$']

The test data doesn't include a volumeId attribute to volumes but they
contain an id attribute.

Here I modify the template to rely on the the "id" attribute but maybe
real data has a volumeId attribute and it's the test data in
openstack_dashboard/test/test_data/nova_data.py that needs to be
modified instead.

Note that it is required to support Django 1.7 in Icehouse, because
we're planning to release Debian Jessie with both Django 1.7 and
Icehouse. This is to *support* Django 1.7, not at all to *switch* to
it, which is very different.

Change-Id: Ia561c2db1c59e51fb669e1ad6636d9b3bc9f7676
(cherry picked from commit 149f842017f44b24f83a904498a4df6c6d2b6cc9)
Merge "Rename add_error methods: Django 1.7 conflict" into stable/icehouse
Merge "Add OS_REGION_NAME to openrc" into stable/icehouse
Merge "Set the correct min_disk size when creating volume from image" into stable/icehouse