def create(self, req, vsa_id, body):
        LOG.audit(_("Create. vsa_id=%(vsa_id)s, body=%(body)s"), locals())
        context = req.environ['nova.context']

        if not body:
            return faults.Fault(exc.HTTPUnprocessableEntity())

        vol = body[self.object]
        size = vol['size']
        LOG.audit(_("Create volume of %(size)s GB from VSA ID %(vsa_id)s"),
                    locals(), context=context)
        try:
            # create is supported for volumes only (drives created through VSA)
            volume_type = self.vsa_api.get_vsa_volume_type(context)
        except exception.NotFound:
            return faults.Fault(exc.HTTPNotFound())

        new_volume = self.volume_api.create(context,
                            size,
                            None,
                            vol.get('displayName'),
                            vol.get('displayDescription'),
                            volume_type=volume_type,
                            metadata=dict(from_vsa_id=str(vsa_id)))

        return {self.object: self._translation(context, new_volume,
                                               vsa_id, True)}
Create a new volume from VSA.
dataset/ETHPy150Open nii-cloud/dodai-compute/nova/api/openstack/contrib/virtual_storage_arrays.py/VsaVolumeDriveController.create