예제 #1
0
파일: test_suspects.py 프로젝트: audip/lunr
 def create(self, status, last_modified):
     volume = Volume(0, 'vtype', status=status,
                     id=str(uuid.uuid4()), node=self.node,
                     account=self.account)
     backup = Backup(volume, status='AVAILABLE',
                     volume_id=str(uuid.uuid4()))
     self.db.add_all([volume, backup])
     self.db.commit()
     # Assign the backup as the restore of the volume
     volume.restore_of = backup.id
     volume.last_modified = last_modified
     self.db.commit()
     return volume
예제 #2
0
 def create(self, status, last_modified):
     volume = Volume(0, 'vtype', status=status,
                     id=str(uuid.uuid4()), node=self.node,
                     account=self.account)
     backup = Backup(volume, status='AVAILABLE',
                     volume_id=str(uuid.uuid4()))
     self.db.add_all([volume, backup])
     self.db.commit()
     # Assign the backup as the restore of the volume
     volume.restore_of = backup.id
     volume.last_modified = last_modified
     self.db.commit()
     return volume