Cherry-picked from https://review.openstack.org/37063 and https://review.openstack.org/37190

Change-Id: I3a30e54fbefe58a3b96a8a6ac5a65ed91b7da085
Merge "Cherry-picked from https://review.openstack.org/37063 and https://review.openstack.org/37190" into stable/grizzly