CLOUDSTACK-7264:NPE while creating scheduled/recurring snapshots for the
removed account with cleanup_needed=1.
appliance: use the right way to get git branch name

Taken from Junio C Hamano's blog [1], git's maintainer, he must not be wrong :)

[1] http://git-blame.blogspot.ch/2013/06/checking-current-branch-programatically.html

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit e16414e56d8f398f8ddbbde89d3ee833582b8bb2)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
CLOUDSTACK-6695: Added support to the UI for uploading a chain of certificates

In the "SSL Certificate" dialog we added:
- new field for the root certificate;
- a button to add intermediate certificates if necessary; when this is pressed, a new field, called "Intermediate certificate 1" is added; pressed again, "Intermediate certificate 2" field is added, and so on.

We upload the certificates in order: first the root certificate (with id=1), then the intermediate certificates (with id=2,3,..) and finally the server certificate.
When uploading a certificate, we wait for the upload to be completed successfully and only then we proceed to uploading the next one. If one fails, we report failure and don't continue with the remaining.

Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
appliance: fix branch finding method from e16414e even Junio can be wrong

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit bbaefb8e5def610a654fba907c8ec3f868416bdf)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
appliance: box commands for dumb bash in cleaning branch name, in build.sh

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
(cherry picked from commit edb5650c737d582595e134aab286e7304f299983)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
UI > Infrastructure > Add Primary Storage > use custom function if it's available.
CLOUDSTACK-6486: Guest network guru - when add network, validate isolation method in case insensitive manner