'Remove the last volume and delete the storage group.
If the storage group is a child of another storage group,
it must be removed from the parent before deletion.
:param serial_number: the array serial number
:param device_id: the volume device id
:param volume_name: the volume name
:param storagegroup_name: the sg name
:param extra_specs: extra specifications
:param parent_sg_name: the parent sg name'

def _remove_last_vol_and_delete_sg(self, serial_number, device_id, volume_name, storagegroup_name, extra_specs, parent_sg_name=None, move=False):

    if move:
        self.add_volume_to_default_storage_group(serial_number, device_id, volume_name, extra_specs, src_sg=storagegroup_name)
    else:
        self.remove_vol_from_storage_group(serial_number, device_id, storagegroup_name, volume_name, extra_specs)
    LOG.debug('Remove    the    last    volume    %(volumeName)s    completed    successfully.', {'volumeName': volume_name})
    if parent_sg_name:
        self.rest.remove_child_sg_from_parent_sg(serial_number, storagegroup_name, parent_sg_name, extra_specs)
    self.rest.delete_storage_group(serial_number, storagegroup_name)
