示例#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
示例#2
0
文件: test.py 项目: jimvoll/brkt-cli
 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