Merge pull request #983 from vuntz/stoney-ha

Sync with roxy wrt HA integration code
Change how we deal with multi-proposals barclamps in list of barclamps

Until now, when a multi-proposal barclamp had no proposal, we were just
displaying a Create button that created a proposal named "default". And
then, later on, we were allowing the creation of new proposals with
different names.

Since "default" is not a great name and people will likely want to
change this, we now directly allow creating proposals with any name.

(cherry picked from commit 18287e549ce802c9826505ae8399709d284c8fdd)
Stop capitalizing the proposal description entered by the user

This is broken, even for the default description (which is a date, where
"Tue" becomes "tue").

(cherry picked from commit 1bb5c9dabdc1490d5d07ae4aa0b96a48b6e90e43)
Improve suggested proposal name on creation so that it's unique

Until now, the default proposal name is "proposal" for all barclamps.
This is fine when the barclamp does not support multiple proposals, but
when it does, it means that the suggested proposal name might already be
in use.

Now we append a _1, _2, etc. string to the suggestion for the new
proposal name. That way, we guarantee that the user can directly create
the proposal.

(cherry picked from commit a3ecc894e38078b5c9253f75fcabfe4192b5f559)
Add ServiceObject.suggested_proposal_name to define suggested proposal names

This way, we allow barclamps to override
ServiceObject.suggested_proposal_name so that they will use "cluster_1"
instead of "proposal_1".

(cherry picked from commit d55963f459e658cdc7121f63edac52c3213820a2)
Do not accept / in secure passwords

Otherwise, this conflicts with URI that contain the passwords.

(cherry picked from commit 1623a9f04b56e2db142e09abd2c01a302d9f409f)
Do not accept + in secure passwords either

Like /, it makes URLs not work :/

(cherry picked from commit 5654b733c4356db15f73f82975fafbb9701ef5c8)
Add conflicts_with constraint

conflicts_with constraint covers the scenario when a node can be
assigned to a certain role only if it is not assigned to any of the
listed roles.

E.g.: A node can be either a pacemaker-cluster-member OR
a pacemaker-cluster-founder, but not both. This would be archieved by
adding these constraints to the model:

{
  "pacemaker-cluster-founder" => {
    "conflicts_with" => ["pacemaker-cluster-member"],
  },
  "pacemaker-cluster-member" => {
    "conflicts_with" => ["pacemaker-cluster-founder"],
  }
}

The conflicts_with value can contain more than one role in the case of
multiple conflicting roles:

{
  "roleA" => { "conflicts_with" => ["roleB", "roleC"] }
}

(cherry picked from commit 45c7ba260257e2d81ce4e6cd75964c2198deae2a)

Conflicts:
	crowbar_framework/app/assets/javascripts/jquery/nodeList.js
	crowbar_framework/app/assets/javascripts/misc/stringLocalize.js
Add conflicts_with constraint type to ServiceObject

conflicts_with constraint allows specifying one or more mutually
exclusive roles for a given node and role.

E.g.: a node can be either a pacemaker-cluster-member or
pacemaker-cluster-founder, but not both.

The patch also adds tests for existing constraint types.

(cherry picked from commit a6f6afee697d799ef06dfb32c0580ae68e628881)
Fix id of input tag for deployment JSON

It was "development" instead of "deployment".

(cherry picked from commit d12e2810d35aed87ac7b95935974774ed9c51260)
Fix undefined reference variable when unallocating

The id variable was undefined in this context, we need to use
source.data('id').

(cherry picked from commit f38b53c8a8b60e0adb210b5a0afadb1ff22f171d)
Directly call methods instead of using call(:method)

(cherry picked from commit 6e9c3d1e98760278582c7840374c309d766ec647)