Use base.create_volume in VolumesTestJSON
In VolumesTestJSON.resource_setup,
1) the multi lines of creating volumes can be replaced by one call
to base.create_volume.(base.create_volume can be modified to
accept other kwargs)
2) The try...except seems no necessary, because if not all volumes are
created, the volumes already created will be deleted automatically.
And without LOG.exception(exc), we can also clearly see the traceback
info to see what had happened.
3) the resource_cleanup is no necessary, because volumes created by
base.create_volume can be deleted automatically.
This patch is to deal with these points and to make code more simple.
Change-Id: Ia0bf536882776717521a86107a9b72ced9408398
2 files changed