Ejemplo n.º 1
0
 def save(self):
     updates = self.cinder_obj_get_changes()
     if updates:
         if 'consistencygroup' in updates:
             raise exception.ObjectActionError(
                 action='save', reason=_('consistencygroup changed'))
         if 'snapshots' in updates:
             raise exception.ObjectActionError(
                 action='save', reason=_('snapshots changed'))
         db.cgsnapshot_update(self._context, self.id, updates)
         self.obj_reset_changes()
Ejemplo n.º 2
0
 def save(self):
     updates = self.cinder_obj_get_changes()
     if updates:
         if 'consistencygroup' in updates:
             raise exception.ObjectActionError(
                 action='save', reason=_('consistencygroup changed'))
         if 'snapshots' in updates:
             raise exception.ObjectActionError(
                 action='save', reason=_('snapshots changed'))
         db.cgsnapshot_update(self._context, self.id, updates)
         self.obj_reset_changes()