nova/nova/cmd
Matt Riedemann cfad7a1faa Handle templated cell mappings in nova-status
The nova-status upgrade check code is intentionally written
to not use versioned objects and just work with the data model
directly.

However, CellMapping database_connection template support was
added in Rocky and the template URL is only formatted when using
the object on read from the database, which means if you are using
a template for the database_connection nova-status will break since
the get_engine() code is getting a template string rather than a
properly formatted URL.

This change fixes the bug by using the CellMapping object code to
pull the mappings from the database which will format the database
connection URL. Note that we cannot simply update the sqlalchemy
RowProxy objects we get normally since those are read-only, and
because of how the mappings are used as objects with attribute
access rather than as a dict we cannot just convert the RowProxy
to a dict - we would have to put it in some kind of object for
attribute access and if we are going to do that we might as well
just use the CellMapping objects we have so that's what we do in
this change.

Change-Id: I5ce175517f6feb6e82ba507078a565b71427a4b0
Closes-Bug: #1818047
(cherry picked from commit 38f2ce549c)
2019-03-11 21:01:08 -04:00
..
__init__.py Reload oslo_context after calling monkey_patch() 2018-08-01 13:54:31 +03:00
api.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
api_metadata.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
api_os_compute.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
baseproxy.py Convert websocketproxy to use db for token validation 2018-05-03 09:57:56 -04:00
cells.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
common.py Handle deprecation of inspect.getargspec 2018-04-26 11:51:10 +00:00
compute.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
conductor.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
console.py Pass config object to oslo_reports 2017-09-05 10:39:43 +00:00
consoleauth.py Deprecate the nova-consoleauth service 2018-05-03 10:02:29 -04:00
dhcpbridge.py Remove translation of log messages 2017-06-09 09:06:16 +00:00
manage.py Fix using template cell urls with nova-manage 2019-01-24 18:08:20 -05:00
network.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
novncproxy.py console: Provide an RFB security proxy implementation 2018-01-12 10:00:42 +00:00
policy.py Use nova.db.api directly 2018-07-10 14:56:27 +00:00
scheduler.py Remove deprecated monkey_patch config options 2018-05-16 11:40:41 -04:00
serialproxy.py config options: centralize section "serial_console" 2015-11-19 11:00:20 +01:00
spicehtml5proxy.py config options: centralize 'spice' options 2016-04-11 10:34:05 +00:00
status.py Handle templated cell mappings in nova-status 2019-03-11 21:01:08 -04:00
xvpvncproxy.py Pass config object to oslo_reports 2017-09-05 10:39:43 +00:00