def test_vsa_volume_create_delete(self):
        volume_param = self._default_volume_param()
        volume_ref = self.volume_api.create(self.context, **volume_param)

        self.assertEqual(volume_ref['display_name'],
                         volume_param['name'])
        self.assertEqual(volume_ref['display_description'],
                         volume_param['description'])
        self.assertEqual(volume_ref['size'],
                         volume_param['size'])
        self.assertEqual(volume_ref['status'],
                         'creating')

        vols2 = self._get_all_volumes_by_vsa()
        self.assertEqual(1, len(vols2))
        volume_ref = vols2[0]

        self.assertEqual(volume_ref['display_name'],
                         volume_param['name'])
        self.assertEqual(volume_ref['display_description'],
                         volume_param['description'])
        self.assertEqual(volume_ref['size'],
                         volume_param['size'])
        self.assertEqual(volume_ref['status'],
                         'creating')

        self.volume_api.update(self.context,
                    volume_ref['id'], {'status': 'available'})
        self.volume_api.delete(self.context, volume_ref['id'])

        vols3 = self._get_all_volumes_by_vsa()
        self.assertEqual(1, len(vols2))
        volume_ref = vols3[0]
        self.assertEqual(volume_ref['status'],
                         'deleting')
Check if volume properly created and deleted.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/tests/test_vsa_volumes.py/VsaVolumesTestCase.test_vsa_volume_create_delete