Exemple #1
0
    def create_snapshot(self, volume_id, name=None, description=None):
        snapshot = Snapshot()
        snapshot.id = new_id()
        snapshot.status = 'pending'
        self.snapshots[snapshot.id] = snapshot

        if self.create_snapshot_callback:
            self.create_snapshot_callback(volume_id, snapshot)

        return snapshot
Exemple #2
0
 def create_snapshot(self, volume_id, name=None, description=None):
     snapshot = Snapshot()
     snapshot.id = _new_id()
     snapshot.status = 'pending'
     self.snapshots[snapshot.id] = snapshot
     return snapshot