Skip to content

Commit

Permalink
(#4) add required transaction action for blockdev-backup
Browse files Browse the repository at this point in the history
  • Loading branch information
abbbi committed Jan 28, 2024
1 parent c1af637 commit 330b93a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions libqmpbackup/qmpcommon.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ def transaction_bitmap_clear(self, node, name, **kwargs):
"block-dirty-bitmap-clear", node=node, name=name, **kwargs
)

def transaction_add_blockdev(self, name, driver, filename):
"""Return transaction action object for blockdev-add"""
return self.transaction_action(
"blockdev-add",
driver=driver,
name=name,
file={"driver": "file", "filename": filename},
)

def transaction_blockdev_create(self, name, driver, filename, size):
"""Return transaction action object for blockdev-add"""
return self.transaction_action(
"blockdev-create",
job_id=name,
name=name,
options={"driver": driver, "file": filename, "size": size},
)

def transaction_bitmap_add(self, node, name, **kwargs):
"""Return transaction action object for bitmap add"""
return self.transaction_action(
Expand Down

0 comments on commit 330b93a

Please sign in to comment.