Skip to content

Commit

Permalink
zfs-vol: 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 Apr 4, 2024
1 parent c5c6a09 commit dd03a5b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion plugins/volume/org.xen.xapi.storage.zfs-vol/volume.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,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 dd03a5b

Please sign in to comment.