diff --git a/README.rst b/README.rst index 4d2ae203..b2a74de3 100644 --- a/README.rst +++ b/README.rst @@ -85,9 +85,14 @@ The driver enables the following: * Thorough unit, syntax, and style testing is provided and enforced for the driver. -The intention is that this driver follows the OpenStack Nova model and will -be a candidate for promotion (via a subsequent blueprint) into the nova core -project. +The intention is that this driver follows the OpenStack Nova model. + +The driver is being promoted into the nova core project in stages, the first of +which is represented by blueprint `powervm-nova-compute-driver`_. The +coexistence of these two incarnations of the driver raises some `Dual Driver +Considerations`_. + +.. _`powervm-nova-compute-driver`: https://blueprints.launchpad.net/nova/+spec/powervm-nova-compute-driver Data Model Impact @@ -159,7 +164,7 @@ Developer Impact ---------------- The code for this driver is currently contained within a powervm project. -The driver is within the /nova_powervm/virt/powervm/ package and extends the +The driver is within the /nova/virt/powervm_ext/ package and extends the nova.virt.driver.ComputeDriver class. The code interacts with PowerVM through the pypowervm library. This python @@ -229,6 +234,35 @@ Dependencies .. _pypowervm library: https://github.com/powervm/pypowervm + +Upgrade Considerations +====================== + +Prior to Ocata, only the out-of-tree nova_powervm driver existed. The in-tree +driver is introduced in Ocata. + +Namespaces +---------- + +In Liberty and Mitaka, the namespace of the out-of-tree driver is +``nova_powervm.virt.powervm``. In Newton, it was moved to +``nova.virt.powervm``. In Ocata, the new in-tree driver occupies the +``nova.virt.powervm`` namespace, and the out-of-tree driver is moved to +``nova.virt.powervm_ext``. Ocata consumers have the option of using the +in-tree driver, which will provide limited functionality until it is fully +integrated; or the out-of-tree driver, which provides full functionality. +Refer to the documentation for the ``nova.conf`` settings required to load +the desired driver. + +Live Migrate Data Object +------------------------ + +In order to use live migration prior to Ocata, it was necessary to run the +customized nova_powervm conductor to bring in the ``PowerVMLiveMigrateData`` +object. In Ocata, this object is included in core nova, so no custom conductor +is necessary. + + Testing ======= @@ -242,12 +276,12 @@ Tempest tests that require function that the platform does not yet support (e.g. iSCSI or Floating IPs) will not pass. These should be ommitted from the Tempest test suite. -A `sample Tempest test configuration` for the PowerVM driver has been provided. +A `sample Tempest test configuration`_ for the PowerVM driver has been provided. Thorough unit tests exist within the project to validate specific functions within this implementation. -.. _sample Tempest test configuration: https://github.com/powervm/powervm-ci/tree/master/tempest +.. _`sample Tempest test configuration`: https://github.com/powervm/powervm-ci/tree/master/tempest Functional Tests diff --git a/devstack/settings b/devstack/settings index a182bb00..2e18656d 100644 --- a/devstack/settings +++ b/devstack/settings @@ -10,7 +10,7 @@ INSTALL_PYPOWERVM=$(trueorfalse False INSTALL_PYPOWERVM) PVM_ADMIN_GROUP=${PVM_ADMIN_GROUP:-pvm_admin} # Nova settings -PVM_DRIVER=powervm.driver.PowerVMDriver +PVM_DRIVER=powervm_ext.driver.PowerVMDriver INSTANCE_NAME_TEMPLATE=${INSTANCE_NAME_TEMPLATE:-"%(display_name).13s-%(uuid).8s-pvm"} COMPUTE_MONITORS=${COMPUTE_MONITORS:-nova.compute.monitors.all_monitors} FORCE_CONFIG_DRIVE=${FORCE_CONFIG_DRIVE:-True} diff --git a/doc/source/devref/usage.rst b/doc/source/devref/usage.rst index ebc6b056..1876fac8 100644 --- a/doc/source/devref/usage.rst +++ b/doc/source/devref/usage.rst @@ -45,7 +45,7 @@ Configuration File Options -------------------------- After nova-powervm has been installed the user must enable PowerVM as the compute driver. To do so, set the ``compute_driver`` value in the ``nova.conf`` -file to ``compute_driver = powervm.driver.PowerVMDriver``. +file to ``compute_driver = powervm_ext.driver.PowerVMDriver``. The standard nova configuration options are supported. In particular, to use PowerVM SR-IOV vNIC for networking, the ``pci_passthrough_whitelist`` option diff --git a/nova/virt/powervm/__init__.py b/nova/virt/powervm_ext/__init__.py similarity index 100% rename from nova/virt/powervm/__init__.py rename to nova/virt/powervm_ext/__init__.py diff --git a/nova/virt/powervm/driver.py b/nova/virt/powervm_ext/driver.py similarity index 100% rename from nova/virt/powervm/driver.py rename to nova/virt/powervm_ext/driver.py diff --git a/nova_powervm/tests/virt/powervm/fixtures.py b/nova_powervm/tests/virt/powervm/fixtures.py index 622133df..03727708 100644 --- a/nova_powervm/tests/virt/powervm/fixtures.py +++ b/nova_powervm/tests/virt/powervm/fixtures.py @@ -20,7 +20,7 @@ from __future__ import absolute_import import fixtures import mock -from nova.virt.powervm import driver +from nova.virt.powervm_ext import driver from nova.virt import fake from pypowervm.tests import test_fixtures as pvm_fx diff --git a/nova_powervm/tests/virt/powervm/test_driver.py b/nova_powervm/tests/virt/powervm/test_driver.py index 7fb67a23..e0d1c913 100644 --- a/nova_powervm/tests/virt/powervm/test_driver.py +++ b/nova_powervm/tests/virt/powervm/test_driver.py @@ -44,7 +44,7 @@ from pypowervm.wrappers import base_partition as pvm_bp from pypowervm.wrappers import logical_partition as pvm_lpar from pypowervm.wrappers import virtual_io_server as pvm_vios -from nova.virt.powervm import driver +from nova.virt.powervm_ext import driver from nova_powervm.tests.virt import powervm from nova_powervm.tests.virt.powervm import fixtures as fx @@ -300,7 +300,7 @@ class TestPowerVMDriver(test.TestCase): '.execute') @mock.patch('nova_powervm.virt.powervm.tasks.storage.CreateDiskForImg' '.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif.execute') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs.execute') @@ -378,7 +378,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova.virt.block_device.DriverVolumeBlockDevice.save') @mock.patch('nova_powervm.virt.powervm.tasks.storage.CreateDiskForImg' '.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif.execute') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs.execute') @@ -433,7 +433,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova.virt.block_device.DriverVolumeBlockDevice.save') @mock.patch('nova_powervm.virt.powervm.tasks.storage.CreateDiskForImg' '.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif.execute') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs.execute') @@ -494,7 +494,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova.virt.block_device.DriverVolumeBlockDevice.save') @mock.patch('nova_powervm.virt.powervm.tasks.storage.CreateDiskForImg' '.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif.execute') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs.execute') @@ -548,7 +548,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova_powervm.virt.powervm.tasks.storage.ConnectVolume') @mock.patch('nova_powervm.virt.powervm.tasks.storage.ConnectDisk') @mock.patch('nova_powervm.virt.powervm.tasks.storage.FindDisk') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs') @@ -660,7 +660,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova.virt.block_device.DriverVolumeBlockDevice.save') @mock.patch('nova_powervm.virt.powervm.tasks.storage.CreateDiskForImg.' 'execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif.execute') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs.execute') @@ -668,7 +668,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova.objects.flavor.Flavor.get_by_id') @mock.patch('nova_powervm.virt.powervm.tasks.vm.UpdateIBMiSettings.' 'execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_get_boot_connectivity_type') @mock.patch('pypowervm.tasks.power.power_on') def test_spawn_ibmi(self, mock_pwron, mock_boot_conn_type, @@ -718,7 +718,7 @@ class TestPowerVMDriver(test.TestCase): '.execute') @mock.patch('nova_powervm.virt.powervm.tasks.storage.CreateDiskForImg' '.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugMgmtVif.execute') @mock.patch('nova_powervm.virt.powervm.tasks.network.PlugVifs.execute') @@ -726,7 +726,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('nova.objects.flavor.Flavor.get_by_id') @mock.patch('nova_powervm.virt.powervm.tasks.vm.UpdateIBMiSettings' '.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_get_boot_connectivity_type') @mock.patch('pypowervm.tasks.power.power_on') def test_spawn_ibmi_without_bdms(self, mock_pwron, mock_boot_conn_type, @@ -945,7 +945,7 @@ class TestPowerVMDriver(test.TestCase): @mock.patch('pypowervm.wrappers.entry_wrapper.EntryWrapper.update', new=mock.Mock()) @mock.patch('nova_powervm.virt.powervm.tasks.network.UnplugVifs.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.vm.dlt_lpar') @mock.patch('nova_powervm.virt.powervm.vm.power_off') @@ -1108,7 +1108,7 @@ class TestPowerVMDriver(test.TestCase): assert_not_called() @mock.patch('nova_powervm.virt.powervm.tasks.network.UnplugVifs.execute') - @mock.patch('nova.virt.powervm.driver.PowerVMDriver.' + @mock.patch('nova.virt.powervm_ext.driver.PowerVMDriver.' '_is_booted_from_volume') @mock.patch('nova_powervm.virt.powervm.vm.dlt_lpar') @mock.patch('nova_powervm.virt.powervm.vm.power_off') @@ -1683,7 +1683,7 @@ class TestPowerVMDriver(test.TestCase): def test_get_host_ip_addr(self): self.assertEqual(self.drv.get_host_ip_addr(), '127.0.0.1') - @mock.patch('nova.virt.powervm.driver.LOG.warning') + @mock.patch('nova.virt.powervm_ext.driver.LOG.warning') @mock.patch('nova.compute.utils.get_machine_ips') def test_get_host_ip_addr_failure(self, mock_ips, mock_log): mock_ips.return_value = ['1.1.1.1'] diff --git a/setup.cfg b/setup.cfg index d55574d9..83c30a3d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -20,7 +20,7 @@ classifier = [files] packages = nova_powervm - nova/virt/powervm + nova/virt/powervm_ext [build_sphinx] source-dir = doc/source