python-linstor 1.20.1__tar.gz → 1.27.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_linstor-1.27.1/PKG-INFO +53 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/config.py +25 -14
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/linstorapi.py +724 -627
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/properties.py +211 -201
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/resource.py +34 -2
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/resourcegroup.py +18 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/responses.py +114 -235
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/sharedconsts.py +56 -54
- python_linstor-1.27.1/linstor/version.py +1 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/consts.json +196 -218
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/genproperties.py +22 -1
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/properties.json +168 -216
- python_linstor-1.27.1/linstor_tests/test_linstorapi.py +36 -0
- python_linstor-1.27.1/pyproject.toml +40 -0
- python_linstor-1.27.1/python_linstor.egg-info/PKG-INFO +53 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/python_linstor.egg-info/SOURCES.txt +2 -23
- {python-linstor-1.20.1 → python_linstor-1.27.1}/setup.cfg +1 -1
- {python-linstor-1.20.1 → python_linstor-1.27.1}/setup.cfg.py2 +1 -1
- {python-linstor-1.20.1 → python_linstor-1.27.1}/setup.py +2 -60
- python-linstor-1.20.1/.gitignore +0 -26
- python-linstor-1.20.1/.gitlab-ci.yml +0 -91
- python-linstor-1.20.1/.gitmodules +0 -4
- python-linstor-1.20.1/.pep8 +0 -3
- python-linstor-1.20.1/CHANGELOG.md +0 -120
- python-linstor-1.20.1/PKG-INFO +0 -47
- python-linstor-1.20.1/debian/changelog +0 -963
- python-linstor-1.20.1/debian/clean +0 -1
- python-linstor-1.20.1/debian/compat +0 -1
- python-linstor-1.20.1/debian/control +0 -23
- python-linstor-1.20.1/debian/copyright +0 -72
- python-linstor-1.20.1/debian/patches/series +0 -0
- python-linstor-1.20.1/debian/rules +0 -13
- python-linstor-1.20.1/debian/source/format +0 -1
- python-linstor-1.20.1/doc/Makefile +0 -20
- python-linstor-1.20.1/doc/conf.py +0 -175
- python-linstor-1.20.1/doc/index.rst +0 -24
- python-linstor-1.20.1/doc/introduction.rst +0 -242
- python-linstor-1.20.1/doc/linstor.rst +0 -53
- python-linstor-1.20.1/doc/make.bat +0 -36
- python-linstor-1.20.1/linstor/consts_githash.py +0 -1
- python-linstor-1.20.1/linstor/version.py +0 -1
- python-linstor-1.20.1/linstor_tests.py +0 -8
- python-linstor-1.20.1/python_linstor.egg-info/PKG-INFO +0 -47
- python-linstor-1.20.1/python_linstor.egg-info/requires.txt +0 -3
- python-linstor-1.20.1/tests.py +0 -10
- {python-linstor-1.20.1 → python_linstor-1.27.1}/COPYING +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/MANIFEST.in +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/Makefile +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/README.md +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/__init__.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/errors.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/kv.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor/size_calc.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/Makefile +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/drbdoptions.json +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/drbdsetup.xml +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/genconsts.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor-common/gendrbdoptions.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor_tests/__init__.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor_tests/test_responses.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/linstor_tests/test_utils.py +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/python_linstor.egg-info/dependency_links.txt +0 -0
- {python-linstor-1.20.1 → python_linstor-1.27.1}/python_linstor.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-linstor
|
|
3
|
+
Version: 1.27.1
|
|
4
|
+
Summary: Linstor python api
|
|
5
|
+
Home-page: https://www.linbit.com
|
|
6
|
+
Author-email: Rene Peinthor <rene.peinthor@linbit.com>, Roland Kammerer <roland.kammerer@linbit.com>, Gabor Hernadi <gabor.hernadi@linbit.com>, Moritz Wanzenboeck <moritz.wanzenboeck@linbit.com>
|
|
7
|
+
Maintainer-email: Rene Peinthor <rene.peinthor@linbit.com>
|
|
8
|
+
License-Expression: LGPL-3.0-or-later
|
|
9
|
+
Project-URL: Homepage, https://github.com/LINBIT/linstor-api-py
|
|
10
|
+
Project-URL: Documentation, https://linbit.github.io/linstor-api-py/
|
|
11
|
+
Project-URL: Repository, https://github.com/LINBIT/linstor-api-py.git
|
|
12
|
+
Project-URL: Issues, https://github.com/LINBIT/linstor-api-py/issues
|
|
13
|
+
Project-URL: Changelog, https://github.com/LINBIT/linstor-api-py/blob/master/CHANGELOG.md
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 2.7
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.5
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.6
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
25
|
+
Requires-Python: >=3.5
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: COPYING
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
# LINSTOR Python API
|
|
32
|
+
|
|
33
|
+
This repository contains a Python library to communicate with a linstor controller.
|
|
34
|
+
|
|
35
|
+
LINSTOR, developed by [LINBIT](https://www.linbit.com), is a software that manages DRBD replicated
|
|
36
|
+
LVM/ZFS volumes across a group of machines. It maintains DRBD configuration on the participating machines. It
|
|
37
|
+
creates/deletes the backing LVM/ZFS volumes. It automatically places the backing LVM/ZFS volumes among the
|
|
38
|
+
participating machines.
|
|
39
|
+
|
|
40
|
+
# Online API documentation
|
|
41
|
+
A rendered html documentation for the LINSTOR Python API can be found [here](https://linbit.github.io/linstor-api-py/).
|
|
42
|
+
|
|
43
|
+
# Using Linstor
|
|
44
|
+
Please read the user-guide provided at [docs.linbit.com](https://docs.linbit.com).
|
|
45
|
+
|
|
46
|
+
# Support
|
|
47
|
+
For further products and professional support, please
|
|
48
|
+
[contact](http://links.linbit.com/support) us.
|
|
49
|
+
|
|
50
|
+
# Releases
|
|
51
|
+
Releases generated by git tags on github are snapshots of the git repository at the given time. You most
|
|
52
|
+
likely do not want to use these. They might lack things such as generated man pages, the `configure` script,
|
|
53
|
+
and other generated files. If you want to build from a tarball, use the ones [provided by us](https://www.linbit.com/en/drbd-community/drbd-download/).
|
|
@@ -9,6 +9,8 @@ except ImportError:
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
class Config(object):
|
|
12
|
+
CONFIG = None # cache object
|
|
13
|
+
|
|
12
14
|
@staticmethod
|
|
13
15
|
def read_config(config_file):
|
|
14
16
|
cp = ConfigParser()
|
|
@@ -20,20 +22,29 @@ class Config(object):
|
|
|
20
22
|
|
|
21
23
|
@staticmethod
|
|
22
24
|
def get_section(section, config_file_name=None):
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
config =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
25
|
+
if Config.CONFIG is None:
|
|
26
|
+
home_dir = os.path.expanduser("~")
|
|
27
|
+
config_file = "linstor-client.conf"
|
|
28
|
+
user_conf = os.path.join(home_dir, ".config", "linstor", config_file)
|
|
29
|
+
sys_conf = os.path.join('/etc', 'linstor', config_file)
|
|
30
|
+
sys_d_conf_dir = os.path.join('/etc', 'linstor', 'linstor-client.d')
|
|
31
|
+
|
|
32
|
+
config = {}
|
|
33
|
+
if os.path.exists(sys_d_conf_dir):
|
|
34
|
+
conf_files = [x for x in os.listdir(sys_d_conf_dir) if x.endswith('.conf')]
|
|
35
|
+
conf_files.sort()
|
|
36
|
+
for file in conf_files:
|
|
37
|
+
config.update(Config.read_config(os.path.join(sys_d_conf_dir, file)))
|
|
38
|
+
|
|
39
|
+
if config_file_name and os.path.exists(config_file_name):
|
|
40
|
+
config.update(Config.read_config(config_file_name))
|
|
41
|
+
elif os.path.exists(user_conf):
|
|
42
|
+
config.update(Config.read_config(user_conf))
|
|
43
|
+
elif os.path.exists(sys_conf):
|
|
44
|
+
config.update(Config.read_config(sys_conf))
|
|
45
|
+
Config.CONFIG = config
|
|
46
|
+
|
|
47
|
+
entries = Config.CONFIG.get(section, []) if Config.CONFIG else []
|
|
37
48
|
return {k: v for k, v in entries}
|
|
38
49
|
|
|
39
50
|
@staticmethod
|