Trove - service_statuses status set to delete when instance deleted

A Trove Instance that is created and booted successfully has a
service_statuses status as running.When the instance is deleted
however, the service_statuses record remains unchanged.
This fix updates the status to deleted.

Change-Id: Ied0b740e2de563f6337dbbcc3c026aad2777cc53
Fixes: bug #1200373
jsonschema upgrade to v1.3.0(as minimal)

Change-Id: I6478eeaa926a05d3ac45d08654eaa8d9eb7cd9f7
Fixes: bug #1207491
Add and associate security group rule with group.

Fixes: bug #1176095 #1176098
Change-Id: I254aca213ae40326ed6e9c00bc35d63ff0805c9f
Implementing heat as an optional provisioning system

* Adds a template
* Adds create and delete functionality

implements blueprint heat-integration

Change-Id: I64b524c589620fb81867bee1ea5dd69ea9017132
Adds includedir back to templates

This adds includedir to the mysql templates, which allows overriding of
default my.cnf settings. Additionally, /etc/mysql/conf.d is created if it
doesn't already exist to prevent mysql from failing.

Change-Id: I1e051978b2363eaa9fd11abf1b107bd1e9c0edcb
Fixes: bug #1218613
Implement resize volume method

Trove use Cinder as volume backend default and Cinder requires that volume must
in "available" status if wish to resize. So we should stop db firstly, then
detach volume from instance and resize volume. Finally, restart db in ease.

If resize volume failed, the instance may stuck into "RESIZE" status. Because
we have no idea to rescue the volume which is in "error_extending" by Cinder.

implement bp implement-volume-extend

Change-Id: Iff3b302a705917e0e27cd70edf6e1be1639f62d5
Support Security Group Name Prefix Customization

As of now, if CONF.trove_security_groups_support == True, then a
Security Group is created for every new Instance, following the
naming scheme of: "SecGroup_<Instance's UUID>".

Nicira NVP for Quantum enforces a Security Group naming limitation of
40 chars maximum. Given the UUID's length, this only leaves 2
characters for the prefix, e.g. 'SG' vs. 'SecGroup'.

Even in lieu of restrictions, it's not inconceivable that a
vendor/user might want to customize the naming scheme of their
Security Groups to align with other cloud providers, etc.

Change-Id: I1043e15c71607cabe2fd6f72f64705e80cd2cde1
Closes-Bug: #1218589
Merge "Implement resize volume method"
Merge "Trove - service_statuses status set to delete when instance deleted"
Merge "Support Security Group Name Prefix Customization"
Increased unit test coverage

Change-Id: I6d3f373d999a2e29ad9421b22d9832176d92d990
service_statuses updated_at Field Not Set

The service_statuses updated_at value is never set due to
inconsistent column naming ('updated' is automatically set in the
base model). The result is the value remains NULL throughout the
instance creation lifecycle, despite multiple row updates.

Fix: override save() and set updated_at (following the pattern
established in agent_heartbeats)

Change-Id: I71fea5001fa1868d221f50c34605022e6a1022bd
Closes-Bug: #1199518
Merge "Implementing heat as an optional provisioning system"
Merge "Adds includedir back to templates"
Do not use locals() for string formatting

Fix all occurrences of H501 of Hacking 0.7.x so that
the check can be enabled later for gating.

Change-Id: Ib193e4923349fd7d8e6015989642c3fbc4ae345e
Fix and enable gating on H703 - string localisation

Avoid using multi positional strings for localisation,
as those are hard to translate to various languages.
Also enable gating on H231 (which does not trigger).

Change-Id: Ie22cf781bcd5ce7562a5e61cf08fde816e7af86a
Enclose command args in with_venv.sh

It will support argument with blanks.

Change-Id: I83313290a964bf10fe46570f43cf213ceab8a326
Fixes: bug #1220937
Made apischema a bit less restrictive.

All additionalProperties are now True instead of False
All array minsizes are now 0 instead of 1
Create Instance now has an additional service_type optional property

fixes bug #1215183
fixes bug #1218661
fixes bug #1218662

Change-Id: If5c9344464a730220a588294383bb473e7bc5e7c
Merge "Made apischema a bit less restrictive."
Modify User Attributes API - Fix

This fix does not allow empty host strings in the update user call.
Besides, it also enusres that database access is not lost during an update of the host attribute

Change-Id: I57b7733c264d2bcd70dfea95f85aae68553c4dff
Fixes: bug #1214166
Fixes: bug #1214555