Update ABD stats for linear page Linux
[zfs.git] / contrib / pyzfs / libzfs_core / __init__.py
bloba80f94b524ecf146c8fce6b50ebb6695c2f5898a
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.
17 '''
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>`_.
37 .. data:: MAXNAMELEN
39 Maximum length of any ZFS name.
40 '''
41 from __future__ import absolute_import, division, print_function
43 from ._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
53 from ._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,
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',
156 # vim: softtabstop=4 tabstop=4 expandtab shiftwidth=4