'Write JSON metadata to a new object.
This should only be called once per backup. Raises
VolumeMetadataBackupExists if the object already exists.'

def set(self, json_meta):

    meta_obj = rados.Object(self._client.ioctx, self.name)
    if self._exists(meta_obj):
        msg = (_("Metadata    backup    object    '%s'    already    exists") % self.name)
        raise exception.VolumeMetadataBackupExists(msg)
    meta_obj.write(json_meta)
