cs 3.3.0__tar.gz → 3.4.0__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.
- {cs-3.3.0/cs.egg-info → cs-3.4.0}/PKG-INFO +16 -8
- {cs-3.3.0 → cs-3.4.0}/README.rst +12 -5
- {cs-3.3.0 → cs-3.4.0}/cs/__init__.py +22 -15
- {cs-3.3.0 → cs-3.4.0}/cs/client.py +11 -37
- cs-3.4.0/cs/version.py +1 -0
- {cs-3.3.0 → cs-3.4.0/cs.egg-info}/PKG-INFO +16 -8
- {cs-3.3.0 → cs-3.4.0}/cs.egg-info/SOURCES.txt +1 -0
- {cs-3.3.0 → cs-3.4.0}/setup.cfg +2 -9
- {cs-3.3.0 → cs-3.4.0}/LICENSE +0 -0
- {cs-3.3.0 → cs-3.4.0}/MANIFEST.in +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs/__main__.py +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs/_async.py +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs.egg-info/dependency_links.txt +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs.egg-info/entry_points.txt +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs.egg-info/not-zip-safe +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs.egg-info/requires.txt +0 -0
- {cs-3.3.0 → cs-3.4.0}/cs.egg-info/top_level.txt +0 -0
- {cs-3.3.0 → cs-3.4.0}/pyproject.toml +0 -0
- {cs-3.3.0 → cs-3.4.0}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: cs
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: A simple yet powerful CloudStack API client for Python and the command-line.
|
|
5
5
|
Home-page: https://github.com/ngine-io/cs
|
|
6
6
|
Author: Bruno Renié
|
|
@@ -10,11 +10,11 @@ Classifier: Intended Audience :: System Administrators
|
|
|
10
10
|
Classifier: License :: OSI Approved :: BSD License
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
Requires-Dist: pytz
|
|
20
20
|
Requires-Dist: requests
|
|
@@ -22,17 +22,25 @@ Provides-Extra: async
|
|
|
22
22
|
Requires-Dist: aiohttp; extra == "async"
|
|
23
23
|
Provides-Extra: highlight
|
|
24
24
|
Requires-Dist: pygments; extra == "highlight"
|
|
25
|
+
Dynamic: license-file
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
.. image:: https://github.com/ngine-io/cs/actions/workflows/main.yml/badge.svg
|
|
28
|
+
:alt: CI
|
|
29
|
+
:target: https://github.com/ngine-io/cs/actions/workflows/main.yml
|
|
30
|
+
.. image:: https://img.shields.io/pypi/pyversions/cs.svg
|
|
31
|
+
:alt: Python versions
|
|
32
|
+
:target: https://pypi.org/project/cs/
|
|
33
|
+
|
|
34
|
+
.. image:: https://img.shields.io/pypi/dw/cs.svg
|
|
35
|
+
:alt: Downloads / Week
|
|
36
|
+
:target: https://pypi.org/project/cs/
|
|
28
37
|
|
|
29
38
|
.. image:: https://img.shields.io/pypi/l/cs.svg
|
|
30
39
|
:alt: License
|
|
31
40
|
:target: https://pypi.org/project/cs/
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
:target: https://pypi.org/project/cs/
|
|
42
|
+
CS - Python CloudStack API client
|
|
43
|
+
=================================
|
|
36
44
|
|
|
37
45
|
A simple, yet powerful CloudStack API client for python and the command-line.
|
|
38
46
|
|
{cs-3.3.0 → cs-3.4.0}/README.rst
RENAMED
|
@@ -1,13 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
.. image:: https://github.com/ngine-io/cs/actions/workflows/main.yml/badge.svg
|
|
2
|
+
:alt: CI
|
|
3
|
+
:target: https://github.com/ngine-io/cs/actions/workflows/main.yml
|
|
4
|
+
.. image:: https://img.shields.io/pypi/pyversions/cs.svg
|
|
5
|
+
:alt: Python versions
|
|
6
|
+
:target: https://pypi.org/project/cs/
|
|
7
|
+
|
|
8
|
+
.. image:: https://img.shields.io/pypi/dw/cs.svg
|
|
9
|
+
:alt: Downloads / Week
|
|
10
|
+
:target: https://pypi.org/project/cs/
|
|
3
11
|
|
|
4
12
|
.. image:: https://img.shields.io/pypi/l/cs.svg
|
|
5
13
|
:alt: License
|
|
6
14
|
:target: https://pypi.org/project/cs/
|
|
7
15
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
:target: https://pypi.org/project/cs/
|
|
16
|
+
CS - Python CloudStack API client
|
|
17
|
+
=================================
|
|
11
18
|
|
|
12
19
|
A simple, yet powerful CloudStack API client for python and the command-line.
|
|
13
20
|
|
|
@@ -3,11 +3,7 @@ import json
|
|
|
3
3
|
import os
|
|
4
4
|
import sys
|
|
5
5
|
from collections import defaultdict
|
|
6
|
-
|
|
7
|
-
try:
|
|
8
|
-
from configparser import NoSectionError
|
|
9
|
-
except ImportError: # python 2
|
|
10
|
-
from ConfigParser import NoSectionError
|
|
6
|
+
from configparser import NoSectionError
|
|
11
7
|
|
|
12
8
|
try:
|
|
13
9
|
import pygments
|
|
@@ -23,6 +19,7 @@ from .client import (
|
|
|
23
19
|
CloudStackException,
|
|
24
20
|
read_config,
|
|
25
21
|
)
|
|
22
|
+
from .version import __version__
|
|
26
23
|
|
|
27
24
|
|
|
28
25
|
__all__ = [
|
|
@@ -32,15 +29,14 @@ __all__ = [
|
|
|
32
29
|
"CloudStackApiException",
|
|
33
30
|
]
|
|
34
31
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
from ._async import AIOCloudStack # noqa
|
|
32
|
+
try:
|
|
33
|
+
import aiohttp # noqa
|
|
34
|
+
except ImportError:
|
|
35
|
+
pass
|
|
36
|
+
else:
|
|
37
|
+
from ._async import AIOCloudStack # noqa
|
|
42
38
|
|
|
43
|
-
|
|
39
|
+
__all__.append("AIOCloudStack")
|
|
44
40
|
|
|
45
41
|
|
|
46
42
|
def _format_json(data, theme):
|
|
@@ -56,7 +52,7 @@ def _format_json(data, theme):
|
|
|
56
52
|
|
|
57
53
|
|
|
58
54
|
def main(args=None):
|
|
59
|
-
parser = argparse.ArgumentParser(description="
|
|
55
|
+
parser = argparse.ArgumentParser(description="Cloudstack client.")
|
|
60
56
|
parser.add_argument(
|
|
61
57
|
"--region",
|
|
62
58
|
"-r",
|
|
@@ -97,7 +93,15 @@ def main(args=None):
|
|
|
97
93
|
help="trace the HTTP requests done on stderr",
|
|
98
94
|
)
|
|
99
95
|
parser.add_argument(
|
|
100
|
-
"command",
|
|
96
|
+
"command",
|
|
97
|
+
metavar="COMMAND",
|
|
98
|
+
help="Cloudstack API command to execute",
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
parser.add_argument(
|
|
102
|
+
"--version",
|
|
103
|
+
action="version",
|
|
104
|
+
version=__version__,
|
|
101
105
|
)
|
|
102
106
|
|
|
103
107
|
def parse_option(x):
|
|
@@ -116,6 +120,7 @@ def main(args=None):
|
|
|
116
120
|
)
|
|
117
121
|
|
|
118
122
|
options = parser.parse_args(args=args)
|
|
123
|
+
|
|
119
124
|
command = options.command
|
|
120
125
|
kwargs = defaultdict(set)
|
|
121
126
|
for arg in options.arguments:
|
|
@@ -133,8 +138,10 @@ def main(args=None):
|
|
|
133
138
|
|
|
134
139
|
if options.post:
|
|
135
140
|
config["method"] = "post"
|
|
141
|
+
|
|
136
142
|
if options.trace:
|
|
137
143
|
config["trace"] = True
|
|
144
|
+
|
|
138
145
|
cs = CloudStack(**config)
|
|
139
146
|
ok = True
|
|
140
147
|
response = None
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
#! /usr/bin/env python
|
|
2
|
-
from __future__ import print_function
|
|
3
|
-
|
|
4
1
|
import base64
|
|
5
2
|
import hashlib
|
|
6
3
|
import hmac
|
|
@@ -8,42 +5,21 @@ import os
|
|
|
8
5
|
import re
|
|
9
6
|
import sys
|
|
10
7
|
import time
|
|
8
|
+
from configparser import ConfigParser
|
|
11
9
|
from datetime import datetime, timedelta
|
|
12
10
|
from fnmatch import fnmatch
|
|
13
|
-
|
|
14
|
-
try:
|
|
15
|
-
from configparser import ConfigParser
|
|
16
|
-
except ImportError: # python 2
|
|
17
|
-
from ConfigParser import ConfigParser
|
|
18
|
-
|
|
19
|
-
try:
|
|
20
|
-
from urllib.parse import quote
|
|
21
|
-
except ImportError: # python 2
|
|
22
|
-
from urllib import quote
|
|
11
|
+
from urllib.parse import quote
|
|
23
12
|
|
|
24
13
|
import pytz
|
|
25
14
|
|
|
26
15
|
import requests
|
|
27
16
|
from requests.structures import CaseInsensitiveDict
|
|
28
17
|
|
|
29
|
-
PY2 = sys.version_info < (3, 0)
|
|
30
|
-
|
|
31
|
-
if PY2:
|
|
32
|
-
text_type = unicode # noqa
|
|
33
|
-
string_type = basestring # noqa
|
|
34
|
-
integer_types = int, long # noqa
|
|
35
|
-
binary_type = str
|
|
36
|
-
else:
|
|
37
|
-
text_type = str
|
|
38
|
-
string_type = str
|
|
39
|
-
integer_types = int
|
|
40
|
-
binary_type = bytes
|
|
41
18
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
pass
|
|
19
|
+
try:
|
|
20
|
+
from . import AIOCloudStack # noqa
|
|
21
|
+
except ImportError:
|
|
22
|
+
pass
|
|
47
23
|
|
|
48
24
|
|
|
49
25
|
TIMEOUT = 10
|
|
@@ -124,8 +100,6 @@ def cs_encode(s):
|
|
|
124
100
|
|
|
125
101
|
java.net.URLEncoder.encode(s).replace('+', '%20')
|
|
126
102
|
"""
|
|
127
|
-
if PY2 and isinstance(s, text_type):
|
|
128
|
-
s = s.encode("utf-8")
|
|
129
103
|
return quote(s, safe="*")
|
|
130
104
|
|
|
131
105
|
|
|
@@ -146,11 +120,11 @@ def transform(params):
|
|
|
146
120
|
params.pop(key)
|
|
147
121
|
continue
|
|
148
122
|
|
|
149
|
-
if isinstance(value, (
|
|
123
|
+
if isinstance(value, (str, bytes)):
|
|
150
124
|
continue
|
|
151
125
|
|
|
152
|
-
if isinstance(value,
|
|
153
|
-
params[key] =
|
|
126
|
+
if isinstance(value, int):
|
|
127
|
+
params[key] = str(value)
|
|
154
128
|
elif isinstance(value, (list, tuple, set, dict)):
|
|
155
129
|
if not value:
|
|
156
130
|
params.pop(key)
|
|
@@ -166,7 +140,7 @@ def transform(params):
|
|
|
166
140
|
for index, val in enumerate(value):
|
|
167
141
|
for name, v in val.items():
|
|
168
142
|
k = "%s[%d].%s" % (key, index, name)
|
|
169
|
-
params[k] =
|
|
143
|
+
params[k] = str(v)
|
|
170
144
|
else:
|
|
171
145
|
raise ValueError(type(value))
|
|
172
146
|
|
|
@@ -606,7 +580,7 @@ def read_config(ini_group=None):
|
|
|
606
580
|
# convert booleans values.
|
|
607
581
|
bool_keys = ("dangerous_no_tls_verify",)
|
|
608
582
|
for bool_key in bool_keys:
|
|
609
|
-
if isinstance(config[bool_key],
|
|
583
|
+
if isinstance(config[bool_key], str):
|
|
610
584
|
try:
|
|
611
585
|
config[bool_key] = strtobool(config[bool_key])
|
|
612
586
|
except ValueError:
|
cs-3.4.0/cs/version.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.4.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: cs
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.4.0
|
|
4
4
|
Summary: A simple yet powerful CloudStack API client for Python and the command-line.
|
|
5
5
|
Home-page: https://github.com/ngine-io/cs
|
|
6
6
|
Author: Bruno Renié
|
|
@@ -10,11 +10,11 @@ Classifier: Intended Audience :: System Administrators
|
|
|
10
10
|
Classifier: License :: OSI Approved :: BSD License
|
|
11
11
|
Classifier: Programming Language :: Python
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.9
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
18
|
License-File: LICENSE
|
|
19
19
|
Requires-Dist: pytz
|
|
20
20
|
Requires-Dist: requests
|
|
@@ -22,17 +22,25 @@ Provides-Extra: async
|
|
|
22
22
|
Requires-Dist: aiohttp; extra == "async"
|
|
23
23
|
Provides-Extra: highlight
|
|
24
24
|
Requires-Dist: pygments; extra == "highlight"
|
|
25
|
+
Dynamic: license-file
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
.. image:: https://github.com/ngine-io/cs/actions/workflows/main.yml/badge.svg
|
|
28
|
+
:alt: CI
|
|
29
|
+
:target: https://github.com/ngine-io/cs/actions/workflows/main.yml
|
|
30
|
+
.. image:: https://img.shields.io/pypi/pyversions/cs.svg
|
|
31
|
+
:alt: Python versions
|
|
32
|
+
:target: https://pypi.org/project/cs/
|
|
33
|
+
|
|
34
|
+
.. image:: https://img.shields.io/pypi/dw/cs.svg
|
|
35
|
+
:alt: Downloads / Week
|
|
36
|
+
:target: https://pypi.org/project/cs/
|
|
28
37
|
|
|
29
38
|
.. image:: https://img.shields.io/pypi/l/cs.svg
|
|
30
39
|
:alt: License
|
|
31
40
|
:target: https://pypi.org/project/cs/
|
|
32
41
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
:target: https://pypi.org/project/cs/
|
|
42
|
+
CS - Python CloudStack API client
|
|
43
|
+
=================================
|
|
36
44
|
|
|
37
45
|
A simple, yet powerful CloudStack API client for python and the command-line.
|
|
38
46
|
|
{cs-3.3.0 → cs-3.4.0}/setup.cfg
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[metadata]
|
|
2
2
|
name = cs
|
|
3
|
-
version = 3.
|
|
3
|
+
version = 3.4.0
|
|
4
4
|
url = https://github.com/ngine-io/cs
|
|
5
5
|
author = Bruno Renié
|
|
6
6
|
description = A simple yet powerful CloudStack API client for Python and the command-line.
|
|
@@ -13,11 +13,11 @@ classifiers =
|
|
|
13
13
|
License :: OSI Approved :: BSD License
|
|
14
14
|
Programming Language :: Python
|
|
15
15
|
Programming Language :: Python :: 3
|
|
16
|
-
Programming Language :: Python :: 3.8
|
|
17
16
|
Programming Language :: Python :: 3.9
|
|
18
17
|
Programming Language :: Python :: 3.10
|
|
19
18
|
Programming Language :: Python :: 3.11
|
|
20
19
|
Programming Language :: Python :: 3.12
|
|
20
|
+
Programming Language :: Python :: 3.13
|
|
21
21
|
|
|
22
22
|
[options]
|
|
23
23
|
packages = find:
|
|
@@ -26,13 +26,6 @@ zip_safe = false
|
|
|
26
26
|
install_requires =
|
|
27
27
|
pytz
|
|
28
28
|
requests
|
|
29
|
-
setup_requires =
|
|
30
|
-
pytest-runner
|
|
31
|
-
tests_require =
|
|
32
|
-
aiohttp
|
|
33
|
-
pytest-cache
|
|
34
|
-
pytest-cov
|
|
35
|
-
pytest
|
|
36
29
|
|
|
37
30
|
[options.packages.find]
|
|
38
31
|
exclude = tests
|
{cs-3.3.0 → cs-3.4.0}/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cs-3.3.0 → cs-3.4.0}/setup.py
RENAMED
|
File without changes
|