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
This commit is contained in:
Taylor Jakobson 2017-11-03 14:46:40 -05:00
parent 37bd8a3e7a
commit e23b43bac5
3 changed files with 11 additions and 1 deletions

View File

@ -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 <volume> <new_size>
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

View File

@ -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):

View File

@ -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.