Cherry picked from https://review.openstack.org/#/c/30822/

Change-Id: I4d01cd275249111a5a2d887902f6ba2fc2ed6cad