From e23b43bac53f15fe15a7bc99f4903919e5bc303a Mon Sep 17 00:00:00 2001 From: Taylor Jakobson Date: Fri, 3 Nov 2017 14:46:40 -0500 Subject: [PATCH] Add the ability to extend npiv volumes The compute host does not need to do anything for the client to see the extended size. Depends-on: I0f6f80df6ad0d87dcccc560509c4e31992e4c0ec Change-Id: I94aa12d422fe6c38a3ab8f7e37489738c956fb6f --- doc/source/support-matrix.ini | 3 ++- nova_powervm/tests/virt/powervm/volume/test_npiv.py | 4 ++++ nova_powervm/virt/powervm/volume/npiv.py | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/source/support-matrix.ini b/doc/source/support-matrix.ini index 3f091909..6cc19e3e 100644 --- a/doc/source/support-matrix.ini +++ b/doc/source/support-matrix.ini @@ -105,7 +105,8 @@ notes=The extend volume operation provides a means to extend Therefore this operation is not considered to be mandatory to support. cli=cinder extend driver-impl-powervm=partial -driver-notes-powervm=Extend volume only supported for fileio and iSCSI volumes. +driver-notes-powervm=Extend volume only supported for NPIV, FileIO, and iSCSI + volumes. [operation.maintenance-mode] title=Set the host in a maintenance mode diff --git a/nova_powervm/tests/virt/powervm/volume/test_npiv.py b/nova_powervm/tests/virt/powervm/volume/test_npiv.py index 7824549c..5fadbc3f 100644 --- a/nova_powervm/tests/virt/powervm/volume/test_npiv.py +++ b/nova_powervm/tests/virt/powervm/volume/test_npiv.py @@ -194,6 +194,10 @@ class TestNPIVAdapter(test_vol.TestVolumeAdapter): self.vol_drv.instance.system_metadata = {meta_st_key: fabric_state, meta_fb_key: meta_fb_map} + def test_extend_volume(self): + # Ensure the method is implemented + self.vol_drv.extend_volume() + @mock.patch('pypowervm.tasks.vfc_mapper.remove_maps') @mock.patch('pypowervm.tasks.vfc_mapper.find_vios_for_vfc_wwpns') def test_disconnect_volume(self, mock_find_vios, mock_remove_maps): diff --git a/nova_powervm/virt/powervm/volume/npiv.py b/nova_powervm/virt/powervm/volume/npiv.py index 3307ef90..d3fcc789 100644 --- a/nova_powervm/virt/powervm/volume/npiv.py +++ b/nova_powervm/virt/powervm/volume/npiv.py @@ -77,6 +77,11 @@ class NPIVVolumeAdapter(v_driver.FibreChannelVolumeAdapter): for fabric in self._fabric_names(): self._add_maps_for_fabric(fabric, slot_mgr) + def extend_volume(self): + # The compute node does not need to take any additional steps for the + # client to see the extended volume. + pass + def _disconnect_volume(self, slot_mgr): """Disconnect the volume.