In the nova-manage cell_v2 discover_hosts command, the nova.context
module is erroneously being passed to a database API function instead
of a RequestContext object, causing the error on the command line:
error: 'module' object has no attribute 'session'
This corrects the argument and adds a test assertion for the
RequestContext.
Conflicts: nova/tests/unit/test_nova_manage.py
NOTE(mriedem): The conflict is due to the validate transport
tests from ocata not being in test_nova_manage in newton.
Closes-Bug: #1650694
Change-Id: I7b5468218e79ffc77adf15d2f00c063095d62af3
(cherry picked from commit 93a9aaa1cfef8cb2b662790bdae3971368dba808)
Reviewed: https:/ /review. openstack. org/412090 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=730530b08e5 77adeaf112e60c5 c58d507ad4bb8b
Committed: https:/
Submitter: Jenkins
Branch: stable/newton
commit 730530b08e577ad eaf112e60c5c58d 507ad4bb8b
Author: melanie witt <email address hidden>
Date: Sat Dec 17 03:13:01 2016 +0000
Fix nova-manage cell_v2 discover_hosts RequestContext
In the nova-manage cell_v2 discover_hosts command, the nova.context
module is erroneously being passed to a database API function instead
of a RequestContext object, causing the error on the command line:
error: 'module' object has no attribute 'session'
This corrects the argument and adds a test assertion for the
RequestContext.
Conflicts:
nova/ tests/unit/ test_nova_ manage. py
NOTE(mriedem): The conflict is due to the validate transport
tests from ocata not being in test_nova_manage in newton.
Closes-Bug: #1650694
Change-Id: I7b5468218e79ff c77adf15d2f00c0 63095d62af3 2b662790bdae397 1368dba808)
(cherry picked from commit 93a9aaa1cfef8cb