python-linstor 1.21.0__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.21.0/python_linstor.egg-info → python_linstor-1.27.1}/PKG-INFO +16 -11
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/config.py +25 -14
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/linstorapi.py +663 -608
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/properties.py +211 -201
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/resource.py +29 -2
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/resourcegroup.py +18 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/responses.py +113 -234
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/sharedconsts.py +56 -54
- python_linstor-1.27.1/linstor/version.py +1 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/consts.json +196 -218
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/genproperties.py +22 -1
- {python-linstor-1.21.0 → 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.21.0 → python_linstor-1.27.1/python_linstor.egg-info}/PKG-INFO +16 -11
- {python-linstor-1.21.0 → python_linstor-1.27.1}/python_linstor.egg-info/SOURCES.txt +2 -1
- {python-linstor-1.21.0 → python_linstor-1.27.1}/setup.py +2 -60
- python-linstor-1.21.0/linstor/version.py +0 -1
- python-linstor-1.21.0/python_linstor.egg-info/requires.txt +0 -3
- {python-linstor-1.21.0 → python_linstor-1.27.1}/COPYING +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/MANIFEST.in +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/Makefile +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/README.md +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/__init__.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/errors.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/kv.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor/size_calc.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/Makefile +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/drbdoptions.json +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/drbdsetup.xml +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/genconsts.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor-common/gendrbdoptions.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor_tests/__init__.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor_tests/test_responses.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/linstor_tests/test_utils.py +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/python_linstor.egg-info/dependency_links.txt +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/python_linstor.egg-info/top_level.txt +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/setup.cfg +0 -0
- {python-linstor-1.21.0 → python_linstor-1.27.1}/setup.cfg.py2 +0 -0
|
@@ -1,27 +1,32 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: python-linstor
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.27.1
|
|
4
4
|
Summary: Linstor python api
|
|
5
5
|
Home-page: https://www.linbit.com
|
|
6
|
-
Author:
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
Project-URL:
|
|
12
|
-
Project-URL:
|
|
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
|
|
13
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
15
|
Classifier: Intended Audience :: Developers
|
|
15
|
-
Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
|
|
16
16
|
Classifier: Programming Language :: Python :: 2.7
|
|
17
17
|
Classifier: Programming Language :: Python :: 3.5
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.6
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.7
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.8
|
|
21
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
|
|
22
26
|
Description-Content-Type: text/markdown
|
|
23
27
|
License-File: COPYING
|
|
24
|
-
|
|
28
|
+
Dynamic: home-page
|
|
29
|
+
Dynamic: license-file
|
|
25
30
|
|
|
26
31
|
# LINSTOR Python API
|
|
27
32
|
|
|
@@ -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
|