Provide explicit image create value for test_image_paginate case

Assign an explicit created_at datetime value to image db fixtures,
it be used to fixes race condition in DB driver test_image_paginate
case.

Closes-Bug: #1282400
Change-Id: I359633af4bb25cf1866b42d6dad3df658995b7bd
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Enable H304 check

Enable H304: no relative imports

Fix import in tools/install_venv.py

Change-Id: I099ed65db9b42223eaa4b66a3a5c6113d1cc56fe
Configuration doc for VMware storage backend

The documentation in configuring.rst needs to be populated
for the VMware datastore storage backend.

docImpact

Change-Id: I2064292867e12e699ca0a8ebba6c11f9de3591a5
Closes-Bug: #1275040
Updated from global requirements

Change-Id: I5db8a08cc2f4d4465de633db8d06e111b171a630
Added undescore function to some log messages

Log messages were not ready for translation w/o underscore function.

Change-Id: I57641afa4fa57aca6d331d609d80e94fbcb7815d
Closes-bug: 1284523
To prevent remote code injection on Sheepdog store

Change-Id: Iae92eaf9eb023f36a1bab7c20ea41c985f2bf51b
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Update Glance configuration sample files for database options

Sample configuration files are out of date with respect to database
options. This change makes the options up-to-date.

Closes-bug: #1285617
Change-Id: I2694425a0b1610f37e77f1bc81aebed850a16348
Signed-off-by: Zhi Yan Liu <zhiyanl@cn.ibm.com>
Merge "Updated from global requirements"
Merge "To prevent remote code injection on Sheepdog store"
Merge "Update Glance configuration sample files for database options"
Fixes Glance Registry V2 client

Add an optional configuration step to glance.db.get_api().

This step is then used in glance.db.registry.api in order to ensure that
the registry client has been configured in time for the registry db
driver's use.

Closes bug: #1302345

Change-Id: Id2c52c423b411ec20bdfa76ee91837c98b1613ef
Co-Authored-By: Mark J. Washenberger <mark.washenberger@markwash.net>
Merge "Fixes Glance Registry V2 client"
Merge "Added undescore function to some log messages"
Uses None instead of mutables for function param defaults

Addressing bug 1307878, changes use of mutable lists and dicts as
default arguments and defaults them within the function. Otherwise,
those defaults can be unexpectedly persisted with the function between
invocations and erupt into mass hysteria on the streets.

To my knowledge there aren't known cases of the current use causing
specific issues, but needs addressing (even stylistically) to avoid
problems in the future -- ones that may crop up as extremely subtle or
intermittent bugs...or worse, security vulnerabilities.

In Glance's case there are ACL-related methods using this, so
although I haven't confirmed one way or the other yet, I've marked it
with SecurityImpact so that a more knowledgeable set of eyes can
review it in this context as well.

Closes-Bug: #1307878
SecurityImpact

Change-Id: Ic17c330eff701ff63701c0029b26db7093a1d73d
Sync latest network_utils module from Oslo

Syncs the latest network_utils from Oslo to help simplify the fix
needed for bug #1216247. Also adds network_utils to
openstack-common.conf.

This also includes the following commits to network_utils:

897aa7c urlsplit issues with IPv6 addresses in python26
35dc1d7 py3kcompat: remove
12bcdb7 Remove vim header
4c22556 Use py3kcompat urlutils functions instead of urlparse
0bf03b7 Add network_utils.urlsplit
e456727 Remove useless logging in networks_utils
7119e29 Enable hacking H404 test.

Change-Id: I63325c9b677c2192d24e7eb73adac272bffd4e0b
Fixes "bad format" in replicator for valid hosts

Due to a bad regex, the glance-replicator tool rejects any source or
target host:port combination that contains a period. As a result, only
hostnames without periods can be used.

This fix expands the host/port checks to:
  - allow periods in hostnames
  - allow and verify IPv6 addr/port pairs (i.e., [fe80::f00d:face]:1234)
  - allow and verify IPv4 addr/port pairs (i.e., 172.17.17.2:1234)
  - sanity-check port numbers

This also includes extensive tests for each component of the parsing,
and adds network_utils to openstack-common.conf.

Change-Id: I94fdd7a57a4cb0aa5d79f66d68be159d1f1266d1
Closes-Bug: #1216247
Get rid of TaskDetails in favor of TaskStub

Change I0b406e4662cfd3cb496b71be77ad10a90c178baa introduces a new
class TaskStub. This class is designed to be a subset of what a
task is in the domain layer: it doesn't contain input, message and
result. TaskStub should be used when listing tasks in order to avoid
extra-overhead of transporting these text fields.
As a result, the TaskDetails introduced by change
I0b406e4662cfd3cb496b71be77ad10a90c178baa doesn't need to exist.

With this patch, the domain layer contains Task and TaskStub instead
of Task, TaskStub and TaskDetails.

partially implements bp async-glance-workers

Change-Id: I2a20b0c5033c6920749370355c2d672dec707c28
Merge "Provide explicit image create value for test_image_paginate case"
Replace assert* with more suitable asserts in unit tests

The following replacements were done in unit tests to have
clearer messages in case of failure:
- assertTrue(* is None) with assertIsNone
- assertTrue(* is not None) with assertIsNotNone
- assertTrue(* in *) with assertIn
- assertTrue(* not in *) with assertNotIn
- assertFalse(* in *) with assertNotIn
- assertTrue(* == *) with assertEqual
- assertTrue(* != *) with assertNotEqual

Change-Id: I0c47f991c3974e441335e71c9d26fab8a127f2ca
Merge "Get rid of TaskDetails in favor of TaskStub"