The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/nova-lxd/pull/140
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === In the mitaka cycle, nova.conf has centralized all the Nova configuration options in one place. Transition nova-lxd to use nova.conf to access configuration options. Signed-off-by: Chuck Short <chuck.sh...@canonical.com>
From 17c7d55d75fde1d204958c086e45979ab648d8d7 Mon Sep 17 00:00:00 2001 From: Chuck Short <chuck.sh...@canonical.com> Date: Thu, 19 May 2016 19:48:58 -0400 Subject: [PATCH] Transition to nova.conf In the mitaka cycle, nova.conf has centralized all the Nova configuration in one place. Transition nova-lxd to do the same thing. Signed-off-by: Chuck Short <chuck.sh...@canonical.com> --- nova/tests/unit/virt/lxd/test_driver_api.py | 3 ++- nova/virt/lxd/container_firewall.py | 4 ++-- nova/virt/lxd/container_snapshot.py | 4 ++-- nova/virt/lxd/driver.py | 1 + nova/virt/lxd/host.py | 4 ++-- nova/virt/lxd/image.py | 4 ++-- nova/virt/lxd/operations.py | 4 ++-- nova/virt/lxd/utils.py | 4 ++-- nova/virt/lxd/vif.py | 4 ++-- 9 files changed, 17 insertions(+), 15 deletions(-) diff --git a/nova/tests/unit/virt/lxd/test_driver_api.py b/nova/tests/unit/virt/lxd/test_driver_api.py index ff5fdd5..ea07616 100644 --- a/nova/tests/unit/virt/lxd/test_driver_api.py +++ b/nova/tests/unit/virt/lxd/test_driver_api.py @@ -21,9 +21,10 @@ import ddt import mock -from oslo_config import cfg import six +from oslo_config import cfg + from nova.compute import arch from nova.compute import hv_type from nova.compute import power_state diff --git a/nova/virt/lxd/container_firewall.py b/nova/virt/lxd/container_firewall.py index 9f3a11f..70e76c0 100644 --- a/nova/virt/lxd/container_firewall.py +++ b/nova/virt/lxd/container_firewall.py @@ -13,12 +13,12 @@ # License for the specific language governing permissions and limitations # under the License. +import nova.conf from nova.virt import firewall -from oslo_config import cfg from oslo_log import log as logging -CONF = cfg.CONF +CONF = nova.conf.CONF LOG = logging.getLogger(__name__) diff --git a/nova/virt/lxd/container_snapshot.py b/nova/virt/lxd/container_snapshot.py index 376261f..3f750e0 100644 --- a/nova/virt/lxd/container_snapshot.py +++ b/nova/virt/lxd/container_snapshot.py @@ -14,6 +14,7 @@ # License for the specific language governing permissions and limitations # under the License.from oslo_config import cfg +import nova.conf from nova.compute import task_states from nova import exception from nova import i18n @@ -21,7 +22,6 @@ import os from oslo_concurrency import lockutils -from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils @@ -30,7 +30,7 @@ _ = i18n._ _LE = i18n._LE -CONF = cfg.CONF +CONF = nova.conf.CONF LOG = logging.getLogger(__name__) IMAGE_API = image.API() diff --git a/nova/virt/lxd/driver.py b/nova/virt/lxd/driver.py index e56fc6c..c77560a 100644 --- a/nova/virt/lxd/driver.py +++ b/nova/virt/lxd/driver.py @@ -16,6 +16,7 @@ from __future__ import absolute_import +import nova.conf from nova import exception from nova import i18n from nova.virt import driver diff --git a/nova/virt/lxd/host.py b/nova/virt/lxd/host.py index 587539c..2aafbb9 100644 --- a/nova/virt/lxd/host.py +++ b/nova/virt/lxd/host.py @@ -18,6 +18,7 @@ # under the License. +import nova.conf from nova.compute import arch from nova.compute import hv_type from nova.compute import utils as compute_utils @@ -31,7 +32,6 @@ from pylxd.deprecated import exceptions as lxd_exceptions import socket -from oslo_config import cfg from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_utils import units @@ -39,7 +39,7 @@ _ = i18n._ _LW = i18n._LW -CONF = cfg.CONF +CONF = nova.conf.CONF LOG = logging.getLogger(__name__) diff --git a/nova/virt/lxd/image.py b/nova/virt/lxd/image.py index 90de759..dee13ac 100644 --- a/nova/virt/lxd/image.py +++ b/nova/virt/lxd/image.py @@ -16,6 +16,7 @@ import hashlib import io import json +import nova.conf from nova.compute import arch from nova import exception from nova import i18n @@ -29,7 +30,6 @@ from oslo_concurrency import lockutils from oslo_concurrency import processutils -from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import fileutils @@ -40,7 +40,7 @@ _ = i18n._ _LE = i18n._LE -CONF = cfg.CONF +CONF = nova.conf.CONF LOG = logging.getLogger(__name__) IMAGE_API = image.API() diff --git a/nova/virt/lxd/operations.py b/nova/virt/lxd/operations.py index 84fb80c..43ec597 100644 --- a/nova/virt/lxd/operations.py +++ b/nova/virt/lxd/operations.py @@ -15,6 +15,7 @@ # under the License. +import nova.conf from nova.api.metadata import base as instance_metadata from nova.virt import configdrive from nova.virt import hardware @@ -22,7 +23,6 @@ import pwd import shutil -from oslo_config import cfg from oslo_log import log as logging from oslo_utils import excutils from oslo_utils import fileutils @@ -45,7 +45,7 @@ _LW = i18n._LW _LI = i18n._LI -CONF = cfg.CONF +CONF = nova.conf.CONF CONF.import_opt('vif_plugging_timeout', 'nova.virt.driver') CONF.import_opt('vif_plugging_is_fatal', 'nova.virt.driver') LOG = logging.getLogger(__name__) diff --git a/nova/virt/lxd/utils.py b/nova/virt/lxd/utils.py index 7ad822f..3de3f9a 100644 --- a/nova/virt/lxd/utils.py +++ b/nova/virt/lxd/utils.py @@ -15,9 +15,9 @@ import os -from oslo_config import cfg +import nova.conf -CONF = cfg.CONF +CONF = nova.conf.CONF class LXDContainerDirectories(object): diff --git a/nova/virt/lxd/vif.py b/nova/virt/lxd/vif.py index deada73..5c8ad23 100644 --- a/nova/virt/lxd/vif.py +++ b/nova/virt/lxd/vif.py @@ -13,9 +13,9 @@ # under the License. from oslo_concurrency import processutils -from oslo_config import cfg from oslo_log import log as logging +import nova.conf from nova import exception from nova import i18n from nova.network import linux_net @@ -25,7 +25,7 @@ _ = i18n._ _LE = i18n._LE -CONF = cfg.CONF +CONF = nova.conf.CONF LOG = logging.getLogger(__name__)
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel