2 # Copyright 2015 ClusterHQ
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
18 Python wrappers for **libzfs_core** library.
20 *libzfs_core* is intended to be a stable, committed interface for programmatic
21 administration of ZFS.
22 This wrapper provides one-to-one wrappers for libzfs_core API functions,
23 but the signatures and types are more natural to Python.
24 nvlists are wrapped as dictionaries or lists depending on their usage.
25 Some parameters have default values depending on typical use for
26 increased convenience.
27 Output parameters are not used and return values are directly returned.
28 Enumerations and bit flags become strings and lists of strings in Python.
29 Errors are reported as exceptions rather than integer errno-style
30 error codes. The wrapper takes care to provide one-to-many mapping
31 of the error codes to the exceptions by interpreting a context
32 in which the error code is produced.
34 To submit an issue or contribute to development of this package
35 please visit its `GitHub repository <https://github.com/openzfs/zfs>`_.
39 Maximum length of any ZFS name.
41 from __future__
import absolute_import
, division
, print_function
43 from ._constants
import (
45 ZCP_DEFAULT_INSTRLIMIT
,
53 from ._libzfs
_core
import (
57 lzc_channel_program_nosync
,
60 lzc_destroy_bookmarks
,
68 lzc_pool_checkpoint_discard
,
72 lzc_receive_resumable
,
73 lzc_receive_with_cmdprops
,
74 lzc_receive_with_header
,
75 lzc_receive_with_heal
,
104 'ZCP_DEFAULT_INSTRLIMIT',
105 'ZCP_DEFAULT_MEMLIMIT',
112 'lzc_channel_program',
113 'lzc_channel_program_nosync',
116 'lzc_destroy_bookmarks',
123 'lzc_pool_checkpoint',
124 'lzc_pool_checkpoint_discard',
128 'lzc_receive_resumable',
129 'lzc_receive_with_cmdprops',
130 'lzc_receive_with_header',
131 'lzc_receive_with_heal',
139 'lzc_snaprange_space',
156 # vim: softtabstop=4 tabstop=4 expandtab shiftwidth=4