Add the ability to extend FC vscsi volumes

The compute host does not need to do anything for the client to
see the extended size.

Change-Id: I56582d9e8846e319d9875b05fe2cd313c1a12c8d
This commit is contained in:
Taylor Jakobson 2018-01-26 13:39:58 -06:00
parent a4e0721c6b
commit 3b6dc03e12
3 changed files with 12 additions and 3 deletions

View File

@ -113,7 +113,7 @@ 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=Only supported for NPIV, FileIO, and iSCSI volumes.
driver-notes-powervm=Not supported for rbd volumes.
[operation.attach-interface]
title=Attach virtual network interface to instance

View File

@ -1,4 +1,4 @@
# Copyright 2015, 2017 IBM Corp.
# Copyright 2015, 2018 IBM Corp.
#
# All Rights Reserved.
#
@ -290,6 +290,10 @@ class TestVSCSIAdapter(BaseVSCSITest):
self.assertRaises(p_exc.VolumeAttachFailed,
self.vol_drv._validate_vios_on_connection, 1)
def test_extend_volume(self):
# Ensure the method is implemented
self.vol_drv.extend_volume()
@mock.patch('pypowervm.tasks.hdisk.remove_hdisk')
@mock.patch('pypowervm.wrappers.virtual_io_server.VIOS.hdisk_from_uuid')
@mock.patch('pypowervm.tasks.scsi_mapper.remove_maps')

View File

@ -1,4 +1,4 @@
# Copyright 2015, 2017 IBM Corp.
# Copyright 2015, 2018 IBM Corp.
#
# All Rights Reserved.
#
@ -163,6 +163,11 @@ class PVVscsiFCVolumeAdapter(volume.VscsiVolumeAdapter,
vios_w, self.volume_id)
return hdisk.good_discovery(status, device_name), udid
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 _discover_volume_on_vios(self, vios_w, volume_id):
"""Discovers an hdisk on a single vios for the volume.