Fix NodeCollectionNICsDefaultHandler and add tests

Since last refactoring we have broken NodeCollectionNICsDefaultHandler,
so it's not working at all.

Change-Id: I67f1794b806e3281a34aff7deda233c986937942
Closes-Bug: #1374356
(cherry picked from commit af6247aef7540156a093582fd091c95a8501a7aa)
Introduce NeutronNetworkDeploymentSerializer

Neutron attributes serialization is moved from NetworkManager to
NeutronNetworkDeploymentSerializer.
Versioning is introduced in NeutronNetworkDeploymentSerializer.

The previous code in network/neutron.py checked specifically for 5.1
environments. This caused 5.1.1 environments to fall back to the
old behavior and set network_type to 'flat' and configure 'physnet'.

(cherry picked from commit 069849284a7c50cf3cb957c9b9392c45c6fc6675)

Change-Id: I3940d0910c888794f82dd2159727ef5073367916
Closes-Bug: #1357298
Revoke token from keystone after user logout

Also, add test_login_logout.js

Change-Id: Ibf1660624d3441c249b319fa69eb3775c9716b9c
Closes-Bug: #1375622
(cherry picked from commit 1b8b0f92448c7d630eed0ff69146e7befc772fc2)
Add cookie-based authentication along with X-Auth-Token

- added jquery.cookie as Bower dependency
- fixed keystone.py middleware to process the cookie and inject X-Auth-Token
  into the request, X-Auth-Token still has priority though
- fixed 401 response format to return iterable (list)
- added test_auth_token for testing both authentication methods

(cherry picked from commit 9a8d01ff1ac54bb9c3c737bdb9ff5c0a688f3013)

Conflicts:
	nailgun/bower.json
	nailgun/static/js/main.js

Change-Id: I01239c93b8f0d5da95424d44c96f6fb60ab378fd
Implements: blueprint access-control-master-node-improvments
Bring back X-Auth-Token by default

It seems that requests are made to other places than API so this
token is still required there (Health check for example with OSTF).

Change-Id: I2f0e47a57b360abd04f2ca21fc013ccd34d84eec
Closes-Bug: #1379000
(cherry picked from commit 207580c58842166ef516b36e5917be251b7472ec)
Remove capacity/csv from public URLs

With the new cookie-based authentication this download link does
not need anymore to be publicly accessible (the X-Auth-Token header
was the reason to first make the link public).

Change-Id: If72bb8fe764810c565fc08f960db3e19ddaf4fb9
Closes-Bug: #1362615
Related-Bug: #1379000
(cherry picked from commit 7bd6b11e6808eebdcb12310c3a13d2e9583a8f44)
Merge "Introduce NeutronNetworkDeploymentSerializer" into stable/5.1
Increase OpenStack version in openstack.yaml

Closes-Bug: #1373376

Change-Id: I94835736d3fe07c0dad92ed5c755be57df7d7ff0
Merge "Fix NodeCollectionNICsDefaultHandler and add tests" into stable/5.1
Fix role validation using expression_parser

Removed _search_in_settings (seems to be unused now).
Fixed test_assignment_validator.py

(cherry picked from commit fbaa4ee9d82a29011cc485c2ff24f99cf65c082e)
Closes-Bug: #1376831
Closes-Bug: #1373109
Change-Id: I3c5e8fa6c8165e0fb75f09829d98b8cad5166410
Ask for password during upgrade

Upgrades will no longer use password stored in astute.yaml
Now there are two ways to pass admin password to upgrade script:
* new `--password` argument in CLI
* prompt for password when password was not specified by `--password`
When no password was provided error is raised.

Changed where logging is initialized to make CLI tests easier

DocImpact
Implements: blueprint access-control-master-node-improvments

Change-Id: Icc0f952729517fb94ee90ab98b0ee313bc213330
Remove storing of password in browser

Plaintext password was stored in localStorage. This was removed and replaced
by token.
Username is still stored -- we display it in the navigation bar.
Tests were updated to use only the token and a check for username in navbar
was added.

Implements: blueprint access-control-master-node-improvments
(cherry picked from commit c1ee8dfede79b354601f389a91a7244a2920945a)

Conflicts:
	nailgun/static/js/app.js
	nailgun/static/js/views/dialogs.jsx
	nailgun/static/js/views/layout.jsx
	nailgun/static/js/views/login_page.jsx

Change-Id: Id9a053e119f6826eda5472629f7d09e618297403
Fix KeystoneClient issue when token was expired

KeystoneClient should always first try to use username/password and only if
they are not provided, do a fallback to this.token. Otherwise for expired
tokens login is not possible.

Related-Bug: #1375622
(cherry picked from commit d8d9d96608f759d765ec0b1016e7363229ffc35a)

Change-Id: Ia85278402799d7d19e0c0aee975cc986de5879f9
Merge "Remove storing of password in browser" into stable/5.1
Merge "Fix KeystoneClient issue when token was expired" into stable/5.1
Use masks in release orchestrator_data

Since Fuel Upgrade feature, it's a common practice to add new
openstack release, so it'd be very useful to add new release
with a kind of macro replacement in paths to repos and puppets.

Since this commit, the macro replacement for MASTER_IP was
introduced.

(cherry picked from commit 2488bffd55baee84b33366ac9e4eef62dbd70607)

Closes-Bug: #1378901
Change-Id: Ie3a79ab105461f10cbabcc5353ca952946200f32
Merge "Ask for password during upgrade" into stable/5.1
fuel_upgrade: add ability to use diff-based repo

In Fuel 6.0 we're going to introduce diff-based releases, so the
fuel-upgrade script has to handle and install it properly.

(cherry picked from commit 21a21ed2acfa42aebf0f6551fa3329c9f2b00522)

Blueprint: reduce-tarball-size
Change-Id: If05ac74b680691bf9adb54caf8958e235ec767ef
Merge "Use masks in release orchestrator_data" into stable/5.1
Merge "fuel_upgrade: add ability to use diff-based repo" into stable/5.1