Refactor tests.unit.utils:FakeDB.reset

glance.tests.unit.utils:FakeDB uses glance.db.simple.api which has
already implemented reset() functionality, the redundant code in
FakeDB should be removed.

Change-Id: I140e932e9cc531900cee503e20d3549549b13d27
Closes-Bug: #1264204
Remove the redundant code

In methods 'version_control' and 'db_sync' in glance/db/sqlalchemy/migration.py,
there are redundant code 'sql_connection = CONF.sql_connection'.
The 'sql_connection's are local variable and not used.

Change-Id: Ie8a12e6f385f7103463172ed9acde1de0336a6d4
Closes-Bug:#1264056
Fix and enable gating on H306

Fix fallout of Hacking check: Imports should be in alphabetical order

Change-Id: I179711c8448208592490ffa47d51419779940014
Merge "Refactor tests.unit.utils:FakeDB.reset"
Merge "Fix and enable gating on H306"
Disallow negative image sizes

Currently Glance v1 allows creation of images with negative sizes when
the source URL provided by the --location parmeter does not exist at
the time of creation.

There is already a check to verify whether or not an image size can be
converted to an int but the check doesn't verify whether or not the
resulting value is >= 0. This commit supplements that check to
disallow negative values for the size parameter.

Change-Id: I47511f3e34cf5adfdf944747d94285ecbbda4249
Closes-Bug: #1260738
Merge "Remove the redundant code"
Merge "Disallow negative image sizes"