1#
2# Copyright 2015 ClusterHQ
3#
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
7#
8#    http://www.apache.org/licenses/LICENSE-2.0
9#
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.
15#
16
17'''
18Python wrappers for **libzfs_core** library.
19
20*libzfs_core* is intended to be a stable, committed interface for programmatic
21administration of ZFS.
22This wrapper provides one-to-one wrappers for libzfs_core API functions,
23but the signatures and types are more natural to Python.
24nvlists are wrapped as dictionaries or lists depending on their usage.
25Some parameters have default values depending on typical use for
26increased convenience.
27Output parameters are not used and return values are directly returned.
28Enumerations and bit flags become strings and lists of strings in Python.
29Errors are reported as exceptions rather than integer errno-style
30error codes.  The wrapper takes care to provide one-to-many mapping
31of the error codes to the exceptions by interpreting a context
32in which the error code is produced.
33
34To submit an issue or contribute to development of this package
35please visit its `GitHub repository <https://github.com/openzfs/zfs>`_.
36
37.. data:: MAXNAMELEN
38
39    Maximum length of any ZFS name.
40'''
41from __future__ import absolute_import, division, print_function
42
43from ._constants import (
44    MAXNAMELEN,
45    ZCP_DEFAULT_INSTRLIMIT,
46    ZCP_DEFAULT_MEMLIMIT,
47    WRAPPING_KEY_LEN,
48    zfs_key_location,
49    zfs_keyformat,
50    zio_encrypt
51)
52
53from ._libzfs_core import (
54    lzc_bookmark,
55    lzc_change_key,
56    lzc_channel_program,
57    lzc_channel_program_nosync,
58    lzc_clone,
59    lzc_create,
60    lzc_destroy_bookmarks,
61    lzc_destroy_snaps,
62    lzc_exists,
63    lzc_get_bookmarks,
64    lzc_get_holds,
65    lzc_hold,
66    lzc_load_key,
67    lzc_pool_checkpoint,
68    lzc_pool_checkpoint_discard,
69    lzc_promote,
70    lzc_receive,
71    lzc_receive_one,
72    lzc_receive_resumable,
73    lzc_receive_with_cmdprops,
74    lzc_receive_with_header,
75    lzc_receive_with_heal,
76    lzc_release,
77    lzc_reopen,
78    lzc_rollback,
79    lzc_rollback_to,
80    lzc_send,
81    lzc_send_resume,
82    lzc_send_space,
83    lzc_snaprange_space,
84    lzc_snapshot,
85    lzc_sync,
86    lzc_unload_key,
87    is_supported,
88    lzc_recv,
89    lzc_snap,
90    lzc_rename,
91    lzc_destroy,
92    lzc_inherit_prop,
93    lzc_get_props,
94    lzc_set_props,
95    lzc_list_children,
96    lzc_list_snaps,
97    receive_header,
98)
99
100__all__ = [
101    'ctypes',
102    'exceptions',
103    'MAXNAMELEN',
104    'ZCP_DEFAULT_INSTRLIMIT',
105    'ZCP_DEFAULT_MEMLIMIT',
106    'WRAPPING_KEY_LEN',
107    'zfs_key_location',
108    'zfs_keyformat',
109    'zio_encrypt',
110    'lzc_bookmark',
111    'lzc_change_key',
112    'lzc_channel_program',
113    'lzc_channel_program_nosync',
114    'lzc_clone',
115    'lzc_create',
116    'lzc_destroy_bookmarks',
117    'lzc_destroy_snaps',
118    'lzc_exists',
119    'lzc_get_bookmarks',
120    'lzc_get_holds',
121    'lzc_hold',
122    'lzc_load_key',
123    'lzc_pool_checkpoint',
124    'lzc_pool_checkpoint_discard',
125    'lzc_promote',
126    'lzc_receive',
127    'lzc_receive_one',
128    'lzc_receive_resumable',
129    'lzc_receive_with_cmdprops',
130    'lzc_receive_with_header',
131    'lzc_receive_with_heal',
132    'lzc_release',
133    'lzc_reopen',
134    'lzc_rollback',
135    'lzc_rollback_to',
136    'lzc_send',
137    'lzc_send_resume',
138    'lzc_send_space',
139    'lzc_snaprange_space',
140    'lzc_snapshot',
141    'lzc_sync',
142    'lzc_unload_key',
143    'is_supported',
144    'lzc_recv',
145    'lzc_snap',
146    'lzc_rename',
147    'lzc_destroy',
148    'lzc_inherit_prop',
149    'lzc_get_props',
150    'lzc_set_props',
151    'lzc_list_children',
152    'lzc_list_snaps',
153    'receive_header',
154]
155
156# vim: softtabstop=4 tabstop=4 expandtab shiftwidth=4
157