Remove asserts for optional imports

Horizon's __init__.py has some code that explicitly allows it to
be imported by setup.py before Django is set up, by making import
failures just throw a warning instead of an exception. But that code
is defeated by a bunch of asserts that were added later, that just
make the error even more confusing.

I'm removing the asserts and replacing them with __all__.

Closes-bug: #1210253
Change-Id: I0fde7810a033fd7216da9a5460f5e4e323b4d6e9
Add a warning to @memoized when caching is impossible

The @memoized decorator cannot cache function calls that take unhashable
arguments. So far it just ignored them, and silently called the function
directly without any cache. This commit adds a warning in such case, so
that we can see where @memoized is not really doing anything.

I used Python's warning mechanism, because we can easily configure the
particular warning to become an exception or to be ignored entirely.

Change-Id: I4b581f504972ffac589fdb78bfb9fb194d2b4525
Add a loadAngular function

    If something is added to the DOM with external tools, angular is not
aware of these changes (Ajax call, pure js DOM manipulation, etc...).
This patch add an utility function which will load angular on the given
element.
    There is also an example on modal, angular is now loaded when a
modal is shown.

Fixes bug #1258192

Change-Id: I3266b455d79d7d1856e4a622e927ed4af8e90b5e
Hide AZ when creating Volume from snapshot

Volume created from snapshot must match the AZ of the snapshot.
It doesn't make sense to allow the user to select the AZ as the
only valid values are Any AZ or AZ of the snapshot - which the user
still need to figure out.

Change-Id: Id3fb03fc2bc152ae0af72b939f63d9d403324fe6
Closes-Bug: #1257845
Initialize the table after data load in TableTab

Change-Id: Icd4b5b4f01f1ecdf54146fa70311cc873ee4d0c6
Closes-Bug: #1259226
Adds Trove mock to tests in database_backups

Test cases in database_backups/tests.py now have a mock for the
method api.trove.instance_get(). The absence of this mock was
causing real HTTP requests to Trove.

Change-Id: Icf760d7eaba2d136626dbbbbf6e49260a18fb874
Closes-Bug: #1255936
Run selenium tests only when requested

In some environments, it's not wanted or possible
to execute selenium tests. These are only executed, if
--with-selenium is specified.

Change-Id: I39c40ac1feb64565f0bcbc97f6345d203b1d816e
Closes-Bug: 1259072
Configurable cell_class in DataTable

There are two changes in this proposal. One is to move the logic
for extracting cell data from the row datum (and handling auto columns)
to the Cell class, into a separate method for easy extending. The
second is to make that extending possible by making the cell class
configurable in the DataTable's meta.

Those changes are supposed to make it easier to extend the DataTable
with new kinds of cells -- for example, cells that contain an editable
widget, a progress bar, an icon, etc. as well as make it easier to
modify the behavior of the auto columns -- for example, by making it
possible to have some of the multi_select checkboxes preselected. Those
changes would also make it easier to integrate DataTable with a Django
FormSet.

Right now, in order to modify any of the proposed Cell.get_data
behavior, one has to make their own Row class and practically copy-paste
the whole Row.load_cells method, as there is no easy way to extend it.

Change-Id: I29277a9e77e1c413193fe80d3f8cfe001bf5d709
Closes-Bug: #1229677
JavaScript use policy

Add a point to HACKING.rst pointing to the Horizon docs about
contributing.

Add information about JavaScript support policy to the contributing
docs.

The policy is based on:
http://lists.openstack.org/pipermail/openstack-dev/2013-November/020342.html

Change-Id: I16a51c7ab7faf68d6e7984c113da175c5c08650d
Allow translators to control word order of BatchAction message

Currently BatchAction message is generated by concatenating
'action' and 'data_type'. In most cases 'action' is a verb
and 'data_type' is an object. However in some action such as
TerminateInstance 'action' is a combination of verb and
object (e.g., "Scheduled termination of").  It is hard that
translators find translated strings which covers both cases.

This commit allows classes inheriting BatchAction to specify
a full action name containing '%(data_type)s' substitution
in action_present/ action_past so that translators can
control the order of phrases completely.

* _conjugate() in actions.py is renamed to _get_action_name()
  because this method no longer always conjugate words.
* Changes action_past strings which are not a form of verb + obj
  to strings with "%(data_type)s"

Closes-Bug: #1253678
Change-Id: I3cf1dc74e22745eb3a9bd2edc3ec68ed389495b5
Updated from global requirements

Change-Id: I1d0ec675677b3c48715da78f1f491a6db24cfa23
Merge "Allow translators to control word order of BatchAction message"
Merge "Adds Trove mock to tests in database_backups"
Merge "Run selenium tests only when requested"
Merge "Configurable cell_class in DataTable"
Merge "Remove asserts for optional imports"
Merge "JavaScript use policy"
Added help note in attach volume dialog

Added help note in Horizon's dashboard (Edit attachments dialog), in order to
inform that device name may not match the proposed one.
The intention is to provide more information when device names don't match due
to hypervisor limitations or naming convention.

Change-Id: I39828542047a2f2149815e2beba1099501aa755e
Partial-Bug: #1217874
Merge "Initialize the table after data load in TableTab"
Merge "Add a loadAngular function"