if props is None:
props = {}
if key is None:
- key = bytes("")
+ key = b""
else:
key = bytes(key)
if ds_type == 'zfs':
supported on this side.
:raises NameInvalid: if the name of either snapshot is invalid.
:raises NameTooLong: if the name of either snapshot is too long.
+ :raises WrongParent: if the parent dataset of the received destination is
+ not a filesystem (e.g. ZVOL)
.. note::
The ``origin`` is ignored if the actual stream is an incremental stream
if props is None:
props = {}
if key is None:
- key = bytes("")
+ key = b""
else:
key = bytes(key)
cmd = {
error.
'''
output = {}
- params_nv = nvlist_in({"argv": params})
+ params_nv = nvlist_in({b"argv": params})
with nvlist_out(output) as outnvl:
ret = _lib.lzc_channel_program(
poolname, program, instrlimit, memlimit, params_nv, outnvl)
errors.lzc_channel_program_translate_error(
- ret, poolname, output.get("error"))
- return output.get("return")
+ ret, poolname, output.get(b"error"))
+ return output.get(b"return")
def lzc_channel_program_nosync(
error.
'''
output = {}
- params_nv = nvlist_in({"argv": params})
+ params_nv = nvlist_in({b"argv": params})
with nvlist_out(output) as outnvl:
ret = _lib.lzc_channel_program_nosync(
poolname, program, instrlimit, memlimit, params_nv, outnvl)
errors.lzc_channel_program_translate_error(
- ret, poolname, output.get("error"))
- return output.get("return")
+ ret, poolname, output.get(b"error"))
+ return output.get(b"return")
def lzc_receive_resumable(
if cmdprops is None:
cmdprops = {}
if key is None:
- key = bytes("")
+ key = b""
else:
key = bytes(key)
`innvl` has been replaced by the `force` boolean and `outnvl` has been
conveniently removed since it's not used.
'''
- innvl = nvlist_in({"force": force})
+ innvl = nvlist_in({b"force": force})
with nvlist_out({}) as outnvl:
ret = _lib.lzc_sync(poolname, innvl, outnvl)
errors.lzc_sync_translate_error(ret, poolname)
errors.lzc_promote_translate_error(ret, name)
-@_uncommitted()
-def lzc_remap(name):
- '''
- Remaps the ZFS dataset.
-
- :param bytes name: the name of the dataset to remap.
- :raises NameInvalid: if the dataset name is invalid.
- :raises NameTooLong: if the dataset name is too long.
- :raises DatasetNotFound: if the dataset does not exist.
- :raises FeatureNotSupported: if the pool containing the dataset does not
- have the *obsolete_counts* feature enabled.
- '''
- ret = _lib.lzc_remap(name)
- errors.lzc_remap_translate_error(ret, name)
-
-
@_uncommitted()
def lzc_pool_checkpoint(name):
'''
:raises FilesystemNotFound: if the target's parent does not exist.
:raises FilesystemExists: if the target already exists.
:raises PoolsDiffer: if the source and target belong to different pools.
+ :raises WrongParent: if the "new" parent dataset is not a filesystem
+ (e.g. ZVOL)
'''
ret = _lib.lzc_rename(source, target)
errors.lzc_rename_translate_error(ret, source, target)