'Steps if the volume is the last in a storage group.
1. Check if the volume is in a masking view.
2. If it is in a masking view, check if it is the last volume in the
masking view or just this child storage group.
3. If it is last in the masking view, delete the masking view,
delete the initiator group if there are no other masking views
associated with it, and delete the both the current storage group
and its parent group.
4. Otherwise, remove the volume and delete the child storage group.
5. If it is not in a masking view, delete the storage group.
:param serial_number: array serial number
:param device_id: volume device id
:param volume_name: volume name
:param storagegroup_name: storage group name
:param extra_specs: extra specifications
:param move: flag to indicate a move instead of remove
:param connector: the connector object
:returns: status -- bool'

def _last_vol_in_sg(self, serial_number, device_id, volume_name, storagegroup_name, extra_specs, move, connector=None):

    LOG.debug('Only    one    volume    remains    in    storage    group    %(sgname)s.    Driver    will    attempt    cleanup.', {'sgname': storagegroup_name})
    maskingview_list = self.rest.get_masking_views_from_storage_group(serial_number, storagegroup_name)
    if (not bool(maskingview_list)):
        status = self._last_vol_no_masking_views(serial_number, storagegroup_name, device_id, volume_name, extra_specs, move)
    else:
        status = self._last_vol_masking_views(serial_number, storagegroup_name, maskingview_list, device_id, volume_name, extra_specs, connector, move)
    return status
