As we all know, 'command magnum-api' and 'magnum-conductor' have
many options such as 'log-file' and 'use-syslog'. But as for
magnum-db-magnum, these are not available.
Add oslo_log command options will help.
Change-Id: If61efbde56e1d7dd0ed88d76fa42dd00501cc938
Add new unit tests for cmd/db_manage.py.
Increase the coverage for cmd/db_manage.py from 0 to 100%.
Move the subcommand 'command' of db_manage to out side
of method main for easier testing.
Change-Id: I686fbc25fd58aea91b5a862fc61c832f4e0d8684
Partial-Bug: #1511667
In some Magnum source code files, oslo log is imported but not used.
Remove it.
from oslo_log import logging
LOG = logging.getLogger(__name__)
Closes-Bug: #1529253
Change-Id: I4d3911b94aed4c74b8163993b38e756139198049
Currently magnum has two type of migration tools, one is oslo.db
migration_cli, other is calling alembic migration tool directly.
This fixes to get more consistency.
Closes-Bug: #1487248
Change-Id: I705dd2cc65c1f879ce1e2ebaaf2015dc6dc24c64
Previously, it throw error message when database connection was
not defined,
"ValueError: Database connection not set in /etc/magnum/magnum.conf"
even if it was explicitly run with "--config-file /other/location".
So remove that hardcoded config file location.
Change-Id: I3af00f1f6572c3cd9e56141e1774acf373bbce8b
Closes-Bug: #1487258
oslo.log has graduated from oslo-incubator, magnum need use oslo.log
instead of oslo.incubator log module.
NOTE: openstack.common.log registers its options at import time, but
oslo.log needs to call register_options() explicitly.
Change-Id: I671bb020b628bd972813daf5936040b7f1c6bf7a
Closes-Bug: #1459736
Remove downgrade from all existing migrations.
Related cross-project spec: https://review.openstack.org/152337
Change-Id: I39135d99278b6bba13b5f09ffa382b87051d09ad
Partial-Bug: 1434103
Oslo team is recommending everyone to use the direct imports and
not use the Oslo namespaces. So switch all our code to use oslo_*
instead of "from oslo." or "import oslo" or "from oslo"
NOTE: some of the tests still have mocks referring to oslo.utils
@mock.patch('oslo.utils.timeutils.utcnow')
as the tests break otherwise. We should do this later.
Closes-bug: #1419385
Change-Id: I8e3fbeb833cddc3f55674a0e781ffe69d5033ad4
A stray debug print was causing magnum-db-manage to fail because the
configuration file was read after the print. The print printed out
configuration information.
Change-Id: I077aaa80fad40a10148bcab93c5278e5871e899d
The Ironic codebase is pretty simple for database access. This work
leads into the introduction of versioned object technology from nova
and ironic that will be entering oslo:
https://review.openstack.org/#/c/127532/
This will drastically speed up the process of implementing moving the
RPC objects across the network.
Change-Id: I38aa451b658b66f5b6f10ced03ea2e0355af4ecd