示例#1
0
    def save(self):
        updates = self.cinder_obj_get_changes()
        if updates:
            if 'volume' in updates:
                raise exception.ObjectActionError(action='save',
                                                  reason=_('volume changed'))

            db.volume_attachment_update(self._context, self.id, updates)
            self.obj_reset_changes()
    def save(self):
        updates = self.cinder_obj_get_changes()
        if updates:
            if 'connection_info' in updates:
                self._convert_connection_info_to_db_format(updates)
            if 'volume' in updates:
                raise exception.ObjectActionError(action='save',
                                                  reason=_('volume changed'))

            db.volume_attachment_update(self._context, self.id, updates)
            self.obj_reset_changes()
示例#3
0
 def save(self):
     updates = self.cinder_obj_get_changes()
     if updates:
         db.volume_attachment_update(self._context, self.id, updates)
         self.obj_reset_changes()
示例#4
0
 def save(self):
     updates = self.cinder_obj_get_changes()
     if updates:
         db.volume_attachment_update(self._context, self.id, updates)
         self.obj_reset_changes()