Fix nova-lxd driver loading
Recent nova commit 8eb03de1eb83a6cd2d4d41804e1b8253f94e5400 removed the mechanism by which nova-lxd was loading its ComputeDriver from out of tree. With this change we can now add a nova.virt.lxd to the nova.virt namespace from the nova-lxd package. This makes it easier to maintain and easier to merge into the nova tree when it is ready. Signed-off-by: Chuck Short <chuck.short@canonical.com>
This commit is contained in:
parent
d51060f00b
commit
8d634ee967
@ -19,10 +19,10 @@ import mock
|
||||
from nova import test
|
||||
from nova.tests.unit import fake_network
|
||||
|
||||
from nova_lxd.nova.virt.lxd import config
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.nova.virt.lxd import utils as container_dir
|
||||
from nova_lxd.tests import stubs
|
||||
from nova.virt.lxd import config
|
||||
from nova.virt.lxd import session
|
||||
from nova.virt.lxd import utils as container_dir
|
||||
import stubs
|
||||
|
||||
|
||||
@ddt.ddt
|
@ -33,12 +33,12 @@ from nova import test
|
||||
from nova.virt import fake
|
||||
from nova.virt import hardware
|
||||
|
||||
from nova_lxd.nova.virt.lxd import driver
|
||||
from nova_lxd.nova.virt.lxd import host
|
||||
from nova_lxd.nova.virt.lxd import operations as container_ops
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.nova.virt.lxd import utils as container_dir
|
||||
from nova_lxd.tests import stubs
|
||||
from nova.virt.lxd import driver
|
||||
from nova.virt.lxd import host
|
||||
from nova.virt.lxd import operations as container_ops
|
||||
from nova.virt.lxd import session
|
||||
from nova.virt.lxd import utils as container_dir
|
||||
import stubs
|
||||
|
||||
|
||||
class LXDTestConfig(test.NoDBTestCase):
|
@ -27,9 +27,9 @@ from oslo_concurrency import lockutils
|
||||
from oslo_config import fixture as config_fixture
|
||||
|
||||
|
||||
from nova_lxd.nova.virt.lxd import image
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.tests import stubs
|
||||
from nova.virt.lxd import image
|
||||
from nova.virt.lxd import session
|
||||
import stubs
|
||||
|
||||
|
||||
@ddt.ddt
|
@ -20,11 +20,11 @@ from nova.virt import fake
|
||||
|
||||
from oslo_config import cfg
|
||||
|
||||
from nova_lxd.nova.virt.lxd import config
|
||||
from nova_lxd.nova.virt.lxd import migrate
|
||||
from nova_lxd.nova.virt.lxd import operations
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.tests import stubs
|
||||
from nova.virt.lxd import config
|
||||
from nova.virt.lxd import migrate
|
||||
from nova.virt.lxd import operations
|
||||
from nova.virt.lxd import session
|
||||
import stubs
|
||||
|
||||
CONF = cfg.CONF
|
||||
CONF.import_opt('my_ip', 'nova.netconf')
|
@ -19,11 +19,11 @@ import mock
|
||||
from nova import test
|
||||
from nova.virt import fake
|
||||
|
||||
from nova_lxd.nova.virt.lxd import config
|
||||
from nova_lxd.nova.virt.lxd import image
|
||||
from nova_lxd.nova.virt.lxd import operations as container_ops
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.tests import stubs
|
||||
from nova.virt.lxd import config
|
||||
from nova.virt.lxd import image
|
||||
from nova.virt.lxd import operations as container_ops
|
||||
from nova.virt.lxd import session
|
||||
import stubs
|
||||
|
||||
|
||||
@ddt.ddt
|
@ -23,8 +23,8 @@ from nova import exception
|
||||
from nova.network import model as network_model
|
||||
from nova import test
|
||||
|
||||
from nova_lxd.nova.virt.lxd import vif
|
||||
from nova_lxd.tests import stubs
|
||||
from nova.virt.lxd import vif
|
||||
import stubs
|
||||
|
||||
|
||||
@ddt.ddt
|
@ -1,5 +1 @@
|
||||
__import__('pkg_resources').declare_namespace(__name__)
|
||||
|
||||
import os
|
||||
|
||||
os.environ['EVENTLET_NO_GREENDNS'] = 'yes'
|
3
nova/virt/lxd/__init__.py
Normal file
3
nova/virt/lxd/__init__.py
Normal file
@ -0,0 +1,3 @@
|
||||
from nova.virt.lxd import driver
|
||||
|
||||
LXDDriver = driver.LXDDriver
|
@ -24,9 +24,9 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.nova.virt.lxd import utils as container_dir
|
||||
from nova_lxd.nova.virt.lxd import vif
|
||||
from nova.virt.lxd import session
|
||||
from nova.virt.lxd import utils as container_dir
|
||||
from nova.virt.lxd import vif
|
||||
|
||||
_ = i18n._
|
||||
_LE = i18n._LE
|
@ -25,7 +25,7 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova.virt.lxd import session
|
||||
|
||||
_ = i18n._
|
||||
_LE = i18n._LE
|
@ -25,12 +25,12 @@ from oslo_config import cfg
|
||||
from oslo_log import log as logging
|
||||
|
||||
|
||||
from nova_lxd.nova.virt.lxd import container_firewall
|
||||
from nova_lxd.nova.virt.lxd import container_snapshot
|
||||
from nova_lxd.nova.virt.lxd import host
|
||||
from nova_lxd.nova.virt.lxd import migrate
|
||||
from nova_lxd.nova.virt.lxd import operations as container_ops
|
||||
from nova_lxd.nova.virt.lxd import vif as lxd_vif
|
||||
from nova.virt.lxd import container_firewall
|
||||
from nova.virt.lxd import container_snapshot
|
||||
from nova.virt.lxd import host
|
||||
from nova.virt.lxd import migrate
|
||||
from nova.virt.lxd import operations as container_ops
|
||||
from nova.virt.lxd import vif as lxd_vif
|
||||
|
||||
_ = i18n._
|
||||
|
@ -34,8 +34,8 @@ from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
from oslo_utils import fileutils
|
||||
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.nova.virt.lxd import utils as container_dir
|
||||
from nova.virt.lxd import session
|
||||
from nova.virt.lxd import utils as container_dir
|
||||
|
||||
_ = i18n._
|
||||
_LE = i18n._LE
|
@ -25,10 +25,10 @@ from oslo_log import log as logging
|
||||
from oslo_utils import excutils
|
||||
from oslo_utils import fileutils
|
||||
|
||||
from nova_lxd.nova.virt.lxd import config
|
||||
from nova_lxd.nova.virt.lxd import operations
|
||||
from nova_lxd.nova.virt.lxd import utils as container_dir
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova.virt.lxd import config
|
||||
from nova.virt.lxd import operations
|
||||
from nova.virt.lxd import utils as container_dir
|
||||
from nova.virt.lxd import session
|
||||
|
||||
|
||||
_ = i18n._
|
@ -33,12 +33,12 @@ from nova import i18n
|
||||
from nova import utils
|
||||
from nova.compute import power_state
|
||||
|
||||
from nova_lxd.nova.virt.lxd import config as container_config
|
||||
from nova_lxd.nova.virt.lxd import container_firewall
|
||||
from nova_lxd.nova.virt.lxd import image
|
||||
from nova_lxd.nova.virt.lxd import session
|
||||
from nova_lxd.nova.virt.lxd import utils as container_dir
|
||||
from nova_lxd.nova.virt.lxd import vif
|
||||
from nova.virt.lxd import config as container_config
|
||||
from nova.virt.lxd import container_firewall
|
||||
from nova.virt.lxd import image
|
||||
from nova.virt.lxd import session
|
||||
from nova.virt.lxd import utils as container_dir
|
||||
from nova.virt.lxd import vif
|
||||
|
||||
_ = i18n._
|
||||
_LE = i18n._LE
|
@ -31,7 +31,7 @@ from pylxd.deprecated import api
|
||||
from pylxd.deprecated import exceptions as lxd_exceptions
|
||||
import six
|
||||
|
||||
from nova_lxd.nova.virt.lxd import constants
|
||||
from nova.virt.lxd import constants
|
||||
|
||||
_ = i18n._
|
||||
_LE = i18n._LE
|
@ -1,3 +0,0 @@
|
||||
from nova_lxd.nova.virt.lxd import driver
|
||||
|
||||
LXDDriver = driver.LXDDriver
|
Loading…
Reference in New Issue
Block a user