Skip to content

Commit

Permalink
zfs-ng: implement volume-create 1/2: Volume.set and .unset
Browse files Browse the repository at this point in the history
This activates the default implementations from libcow (insertion in
vdi_custom_keys table in SR metabase).  `Volume.set` is necessary for
`xe vdi-create`, and `Volume.unset` is provided for symmetry.

Originally-by: Matias Ezequiel Vara Larsen <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
  • Loading branch information
ydirson committed Mar 26, 2024
1 parent 60a51fc commit 43bce71
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/volume/org.xen.xapi.storage.zfs-ng/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ def call_volume_command():
cmd = xapi.storage.api.v5.volume.Volume_commandline(
Implementation(fsp.Callbacks()))
base = os.path.basename(sys.argv[0])
raise xapi.storage.api.v5.volume.Unimplemented(base)
if base == "Volume.set":
cmd.set()
elif base == "Volume.unset":
cmd.unset()
else:
raise xapi.storage.api.v5.volume.Unimplemented(base)

if __name__ == "__main__":
call_volume_command()

0 comments on commit 43bce71

Please sign in to comment.