SOLIDserverRest 2.12.3__tar.gz → 2.13.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.
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/PKG-INFO +1 -1
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/Exception.py +10 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/SOLIDserverRest.py +89 -3
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/nom_folder.py +6 -5
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/nom_interface.py +6 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/sds.py +34 -14
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/mapper.py +50 -10
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/PKG-INFO +1 -1
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/setup.py +1 -1
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/LICENSE +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/README.md +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/__init__.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/__init__.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/base.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/class_params.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/device.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/device_tools.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/devif.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/dns.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/dns_record.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/dns_view.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/dns_zone.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/ipaddress.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/network.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/nom_network_object.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/space.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest/adv/validators.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/SOURCES.txt +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/dependency_links.txt +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/entry_points.txt +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/not-zip-safe +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/requires.txt +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/top_level.txt +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/setup.cfg +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/tests/test_simple.py +0 -0
- {solidserverrest-2.12.3 → solidserverrest-2.13.0}/tests/tests.py +0 -0
|
@@ -28,6 +28,8 @@ __all__ = [
|
|
|
28
28
|
|
|
29
29
|
"SDSDNSError", "SDSDNSAlreadyExistingError",
|
|
30
30
|
"SDSDNSCredentialsError",
|
|
31
|
+
|
|
32
|
+
"SDSRateLimitError"
|
|
31
33
|
]
|
|
32
34
|
|
|
33
35
|
|
|
@@ -169,6 +171,14 @@ class SDSDNSError(SDSError): # pragma: no cover
|
|
|
169
171
|
super().__init__(message)
|
|
170
172
|
|
|
171
173
|
|
|
174
|
+
class SDSRateLimitError(SDSError): # pragma: no cover
|
|
175
|
+
""" raised when rate limit is reached """
|
|
176
|
+
|
|
177
|
+
def __init__(self, message=""):
|
|
178
|
+
message = f"Rate limit reached: {message}"
|
|
179
|
+
super().__init__(message)
|
|
180
|
+
|
|
181
|
+
|
|
172
182
|
class SDSDNSAlreadyExistingError(SDSDNSError): # pragma: no cover
|
|
173
183
|
""" raised when dns server is already existing """
|
|
174
184
|
|
|
@@ -24,6 +24,8 @@ import urllib
|
|
|
24
24
|
import time
|
|
25
25
|
import hashlib
|
|
26
26
|
import requests
|
|
27
|
+
import threading
|
|
28
|
+
import math
|
|
27
29
|
|
|
28
30
|
|
|
29
31
|
# pylint: disable=F0401, E1101
|
|
@@ -50,8 +52,68 @@ __all__ = ["SOLIDserverRest"]
|
|
|
50
52
|
##########################################################################
|
|
51
53
|
|
|
52
54
|
|
|
55
|
+
class TokenBucketRateLimiter:
|
|
56
|
+
def __init__(self, rate, capacity):
|
|
57
|
+
"""
|
|
58
|
+
rate: Number of tokens to add per second.
|
|
59
|
+
capacity: Maximum number of tokens the bucket can hold.
|
|
60
|
+
"""
|
|
61
|
+
self.capacity = capacity
|
|
62
|
+
self.tokens = capacity
|
|
63
|
+
self.rate = rate
|
|
64
|
+
self.period = capacity / rate
|
|
65
|
+
self.last_checked = time.time()
|
|
66
|
+
self.lock = threading.Lock()
|
|
67
|
+
|
|
68
|
+
def allow_request(self) -> bool:
|
|
69
|
+
with self.lock:
|
|
70
|
+
now = time.time()
|
|
71
|
+
# Add new tokens based on elapsed time
|
|
72
|
+
elapsed = now - self.last_checked
|
|
73
|
+
self.last_checked = now
|
|
74
|
+
added_tokens = elapsed * self.rate * 0.80
|
|
75
|
+
self.tokens = min(self.capacity, self.tokens + added_tokens)
|
|
76
|
+
|
|
77
|
+
# logging.info(f'{time.time()}'
|
|
78
|
+
# f' tokens = {self.tokens:.1f}'
|
|
79
|
+
# f', added={added_tokens}')
|
|
80
|
+
if self.tokens >= 1:
|
|
81
|
+
self.tokens -= 1
|
|
82
|
+
return True
|
|
83
|
+
else:
|
|
84
|
+
return False
|
|
85
|
+
|
|
86
|
+
def _sleep_time(self, burst):
|
|
87
|
+
a = self.capacity - self.tokens - self.capacity * burst
|
|
88
|
+
b = a / (self.capacity * burst / 2)
|
|
89
|
+
c = math.exp(b)
|
|
90
|
+
d = c / (self.rate * 0.90)
|
|
91
|
+
|
|
92
|
+
# logging.info(
|
|
93
|
+
# f'{self.capacity} {self.tokens}'
|
|
94
|
+
# f' {a:.4f} {b:.4f} {c:.4f} {d:.4f}')
|
|
95
|
+
return d
|
|
96
|
+
|
|
97
|
+
def apply_limit(self, burst: float = 0.30) -> bool:
|
|
98
|
+
# check the request and apply a sleep if under the burst limit
|
|
99
|
+
if not self.allow_request():
|
|
100
|
+
return False
|
|
101
|
+
|
|
102
|
+
# normalizing burst
|
|
103
|
+
burst = min(0.5, burst)
|
|
104
|
+
burst = max(0.1, burst)
|
|
105
|
+
|
|
106
|
+
_s = self._sleep_time(burst)
|
|
107
|
+
# logging.info(f'tokens={self.tokens:.3f} sleep {_s:.2f}s')
|
|
108
|
+
|
|
109
|
+
time.sleep(_s)
|
|
110
|
+
|
|
111
|
+
return True
|
|
112
|
+
|
|
53
113
|
# effectively few variables in this class, just disabling the warning
|
|
54
114
|
# pylint: disable=R0902
|
|
115
|
+
|
|
116
|
+
|
|
55
117
|
class SOLIDserverRest:
|
|
56
118
|
""" main SDS class """
|
|
57
119
|
CNX_NATIVE = 1
|
|
@@ -89,6 +151,9 @@ class SOLIDserverRest:
|
|
|
89
151
|
self.cred_token_keyid = None
|
|
90
152
|
self.cred_token_keysecret = None
|
|
91
153
|
|
|
154
|
+
self.rate_limiter = TokenBucketRateLimiter(rate=200 / 60,
|
|
155
|
+
capacity=200)
|
|
156
|
+
|
|
92
157
|
# set specific features for python v2 (<=2020, not supported after)
|
|
93
158
|
if sys.version_info[0] == 2: # pragma: no cover
|
|
94
159
|
# pylint: disable=E1101
|
|
@@ -111,7 +176,18 @@ class SOLIDserverRest:
|
|
|
111
176
|
def __del__(self):
|
|
112
177
|
self.clean()
|
|
113
178
|
|
|
179
|
+
def set_rate_limit(self, limit: int, window: int):
|
|
180
|
+
""" set the rate limit for requests """
|
|
181
|
+
if limit <= 0:
|
|
182
|
+
return
|
|
183
|
+
if window <= 0:
|
|
184
|
+
return
|
|
185
|
+
|
|
186
|
+
self.rate_limiter = TokenBucketRateLimiter(rate=limit / window,
|
|
187
|
+
capacity=limit)
|
|
188
|
+
|
|
114
189
|
# -------------------------------------
|
|
190
|
+
|
|
115
191
|
def use_native_sds(self, user, password):
|
|
116
192
|
""" propose to use a native EfficientIP SDS connection with Username
|
|
117
193
|
and password encoded in the headers of each requests
|
|
@@ -241,7 +317,8 @@ class SOLIDserverRest:
|
|
|
241
317
|
def query(self, service,
|
|
242
318
|
params='',
|
|
243
319
|
timeout=2,
|
|
244
|
-
option=False
|
|
320
|
+
option=False,
|
|
321
|
+
allow_raw=False):
|
|
245
322
|
""" send request to the API endpoint, returns request result """
|
|
246
323
|
|
|
247
324
|
(params, method) = self._query_method(service, option, params)
|
|
@@ -257,8 +334,14 @@ class SOLIDserverRest:
|
|
|
257
334
|
# choose service
|
|
258
335
|
svc_mapped = SERVICE_MAPPER.get(service)
|
|
259
336
|
if svc_mapped is None:
|
|
260
|
-
|
|
261
|
-
|
|
337
|
+
if allow_raw:
|
|
338
|
+
# Allow using the raw service name/path as a bypass when the
|
|
339
|
+
# SERVICE_MAPPER doesn't contain the requested service.
|
|
340
|
+
logging.debug("using raw for service %s", service)
|
|
341
|
+
svc_mapped = service
|
|
342
|
+
else:
|
|
343
|
+
logging.warning("unknown service %s", service)
|
|
344
|
+
raise SDSServiceError(service)
|
|
262
345
|
|
|
263
346
|
self.last_url = f"{svc_mapped}{params}".strip()
|
|
264
347
|
|
|
@@ -269,6 +352,9 @@ class SOLIDserverRest:
|
|
|
269
352
|
url_path = f"/{self.default_method}/{self.last_url}"
|
|
270
353
|
url = f"{self.prefix_url}{url_path}"
|
|
271
354
|
|
|
355
|
+
if not self.rate_limiter.apply_limit():
|
|
356
|
+
raise SDSServiceError("rate limit")
|
|
357
|
+
|
|
272
358
|
try:
|
|
273
359
|
logging.debug("m=%s u=%s h=%s v=%s a=%s",
|
|
274
360
|
method,
|
|
@@ -136,6 +136,7 @@ class NomFolder(ClassParams):
|
|
|
136
136
|
msg += " / " + str(err_descr)
|
|
137
137
|
raise SDSError(msg) from err_descr
|
|
138
138
|
|
|
139
|
+
# logging.info(rjson)
|
|
139
140
|
if rjson[0]['errno'] != '0': # pragma: no cover
|
|
140
141
|
raise SDSError("errno raised on get folder")
|
|
141
142
|
|
|
@@ -205,16 +206,16 @@ class NomFolder(ClassParams):
|
|
|
205
206
|
self.update_class_params(rjson['nomfolder_class_parameters'])
|
|
206
207
|
|
|
207
208
|
# -------------------------------------
|
|
208
|
-
def bind_spacename(self, spacename):
|
|
209
|
+
def bind_spacename(self, spacename: str):
|
|
209
210
|
""" associate the folder with a space by name"""
|
|
210
211
|
self.space = Space(self.sds, name=spacename)
|
|
211
212
|
try:
|
|
212
213
|
self.space.refresh()
|
|
213
214
|
except SDSError as e:
|
|
214
215
|
self.space = None
|
|
215
|
-
logging.
|
|
216
|
-
|
|
217
|
-
|
|
216
|
+
logging.warning("Folder cannot be associated"
|
|
217
|
+
" with unexistent space (%s)",
|
|
218
|
+
spacename)
|
|
218
219
|
raise SDSError("space not found") from e
|
|
219
220
|
|
|
220
221
|
def bind_space(self, space):
|
|
@@ -275,7 +276,7 @@ class NomFolder(ClassParams):
|
|
|
275
276
|
if self.description != '':
|
|
276
277
|
params['nomfolder_description'] = self.description
|
|
277
278
|
|
|
278
|
-
if self.space
|
|
279
|
+
if self.space:
|
|
279
280
|
params['nomfolder_site_name'] = self.space.name
|
|
280
281
|
|
|
281
282
|
self.prepare_class_params('nomfolder', params)
|
|
@@ -148,6 +148,12 @@ class NomPort(ClassParams):
|
|
|
148
148
|
raise SDSError(message="not connected")
|
|
149
149
|
|
|
150
150
|
try:
|
|
151
|
+
if self.myid is None or self.myid == -1:
|
|
152
|
+
self.clean_additional_where_params()
|
|
153
|
+
self.set_additional_where_params(mac_address=self.mac_address)
|
|
154
|
+
self.set_additional_where_params(
|
|
155
|
+
nomnetobj_id=self.network_object.myid)
|
|
156
|
+
|
|
151
157
|
nomport_id = self._get_id(query="nom_port_list",
|
|
152
158
|
key="nomport")
|
|
153
159
|
except SDSError as err_descr:
|
|
@@ -16,11 +16,13 @@ import json
|
|
|
16
16
|
from json.decoder import JSONDecodeError
|
|
17
17
|
|
|
18
18
|
from SOLIDserverRest.Exception import SDSInitError, SDSAuthError
|
|
19
|
-
from SOLIDserverRest.Exception import SDSEmptyError
|
|
19
|
+
from SOLIDserverRest.Exception import SDSEmptyError, SDSRateLimitError
|
|
20
20
|
from SOLIDserverRest import SOLIDserverRest
|
|
21
21
|
|
|
22
22
|
from .class_params import ClassParams
|
|
23
23
|
|
|
24
|
+
import time
|
|
25
|
+
|
|
24
26
|
__all__ = ["SDS"]
|
|
25
27
|
|
|
26
28
|
|
|
@@ -252,7 +254,11 @@ class SDS(ClassParams):
|
|
|
252
254
|
return _r
|
|
253
255
|
|
|
254
256
|
# ---------------------------
|
|
255
|
-
def query(self, method,
|
|
257
|
+
def query(self, method,
|
|
258
|
+
params='',
|
|
259
|
+
option=False,
|
|
260
|
+
timeout=None,
|
|
261
|
+
allow_raw=False):
|
|
256
262
|
"""execute a query towards the SDS"""
|
|
257
263
|
|
|
258
264
|
if self.sds is None:
|
|
@@ -263,19 +269,33 @@ class SDS(ClassParams):
|
|
|
263
269
|
if isinstance(timeout, int):
|
|
264
270
|
_timeout = timeout
|
|
265
271
|
|
|
272
|
+
_retry_rate_limit_count = 0
|
|
273
|
+
|
|
266
274
|
try:
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
275
|
+
# up to 3 retry based on rate limit
|
|
276
|
+
for _retry_rate_limit_count in range(3):
|
|
277
|
+
answer_req = self.sds.query(method,
|
|
278
|
+
params=params,
|
|
279
|
+
option=option,
|
|
280
|
+
timeout=_timeout,
|
|
281
|
+
allow_raw=allow_raw)
|
|
282
|
+
|
|
283
|
+
if answer_req.status_code == 401: # pragma: no cover
|
|
284
|
+
raise SDSAuthError(message="authentication error")
|
|
285
|
+
|
|
286
|
+
if answer_req.status_code == 204:
|
|
287
|
+
raise SDSEmptyError(message="204 returned")
|
|
288
|
+
|
|
289
|
+
if answer_req.status_code == 429:
|
|
290
|
+
_retry_rate_limit_count += 1
|
|
291
|
+
|
|
292
|
+
if _retry_rate_limit_count > 3:
|
|
293
|
+
raise SDSRateLimitError(f"rate limit exceeded")
|
|
294
|
+
|
|
295
|
+
_sleeptime = (int(answer_req.headers['Retry-After']) +
|
|
296
|
+
_retry_rate_limit_count)
|
|
297
|
+
logging.warning(f"rate limited, waiting for {_sleeptime}s")
|
|
298
|
+
time.sleep(_sleeptime)
|
|
279
299
|
|
|
280
300
|
try:
|
|
281
301
|
j = answer_req.json()
|
|
@@ -8,6 +8,7 @@ and method to use in REST calls
|
|
|
8
8
|
"""
|
|
9
9
|
__all__ = ["SERVICE_MAPPER", "METHOD_MAPPER"]
|
|
10
10
|
|
|
11
|
+
# IPAM space
|
|
11
12
|
SERVICE_MAPPER = {
|
|
12
13
|
'ip_site_create': 'ip_site_add',
|
|
13
14
|
'ip_site_update': 'ip_site_add',
|
|
@@ -17,6 +18,7 @@ SERVICE_MAPPER = {
|
|
|
17
18
|
'ip_site_delete': 'ip_site_delete',
|
|
18
19
|
}
|
|
19
20
|
|
|
21
|
+
# IPAM networks
|
|
20
22
|
SERVICE_MAPPER.update({
|
|
21
23
|
'ip_subnet_create': 'ip_subnet_add',
|
|
22
24
|
'ip_subnet_update': 'ip_subnet_add',
|
|
@@ -27,6 +29,7 @@ SERVICE_MAPPER.update({
|
|
|
27
29
|
'ip_subnet_find_free': 'ip_find_free_subnet',
|
|
28
30
|
})
|
|
29
31
|
|
|
32
|
+
# IPAM networks v6
|
|
30
33
|
SERVICE_MAPPER.update({
|
|
31
34
|
'ip_subnet6_create': 'ip6_subnet6_add',
|
|
32
35
|
'ip_subnet6_update': 'ip6_subnet6_add',
|
|
@@ -37,6 +40,7 @@ SERVICE_MAPPER.update({
|
|
|
37
40
|
'ip_subnet6_find_free': 'ip6_find_free_subnet6',
|
|
38
41
|
})
|
|
39
42
|
|
|
43
|
+
# IPAM pool
|
|
40
44
|
SERVICE_MAPPER.update({
|
|
41
45
|
'ip_pool_create': 'ip_pool_add',
|
|
42
46
|
'ip_pool_update': 'ip_pool_add',
|
|
@@ -46,6 +50,7 @@ SERVICE_MAPPER.update({
|
|
|
46
50
|
'ip_pool_delete': 'ip_pool_delete',
|
|
47
51
|
})
|
|
48
52
|
|
|
53
|
+
# IPAM pool v6
|
|
49
54
|
SERVICE_MAPPER.update({
|
|
50
55
|
'ip_pool6_create': 'ip6_pool6_add',
|
|
51
56
|
'ip_pool6_update': 'ip6_pool6_add',
|
|
@@ -55,6 +60,7 @@ SERVICE_MAPPER.update({
|
|
|
55
60
|
'ip_pool6_delete': 'ip6_pool6_delete',
|
|
56
61
|
})
|
|
57
62
|
|
|
63
|
+
# IPAM address
|
|
58
64
|
SERVICE_MAPPER.update({
|
|
59
65
|
'ip_address_create': 'ip_add',
|
|
60
66
|
'ip_address_update': 'ip_add',
|
|
@@ -65,6 +71,7 @@ SERVICE_MAPPER.update({
|
|
|
65
71
|
'ip_address_find_free': 'ip_find_free_address',
|
|
66
72
|
})
|
|
67
73
|
|
|
74
|
+
# IPAM address v6
|
|
68
75
|
SERVICE_MAPPER.update({
|
|
69
76
|
'ip_address6_create': 'ip6_address6_add',
|
|
70
77
|
'ip_address6_update': 'ip6_address6_add',
|
|
@@ -75,6 +82,7 @@ SERVICE_MAPPER.update({
|
|
|
75
82
|
'ip_address6_find_free': 'ip6_find_free_address6',
|
|
76
83
|
})
|
|
77
84
|
|
|
85
|
+
# IPAM alias
|
|
78
86
|
SERVICE_MAPPER.update({
|
|
79
87
|
'ip_alias_create': 'ip_alias_add',
|
|
80
88
|
'ip_alias_update': 'ip_alias_add',
|
|
@@ -82,6 +90,7 @@ SERVICE_MAPPER.update({
|
|
|
82
90
|
'ip_alias_delete': 'ip_alias_delete',
|
|
83
91
|
})
|
|
84
92
|
|
|
93
|
+
# IPAM alias v6
|
|
85
94
|
SERVICE_MAPPER.update({
|
|
86
95
|
'ip_alias6_create': 'ip6_alias_add',
|
|
87
96
|
'ip_alias6_update': 'ip6_alias_add',
|
|
@@ -89,8 +98,8 @@ SERVICE_MAPPER.update({
|
|
|
89
98
|
'ip_alias6_delete': 'ip6_alias_delete',
|
|
90
99
|
})
|
|
91
100
|
|
|
101
|
+
# DNS
|
|
92
102
|
SERVICE_MAPPER.update({
|
|
93
|
-
# DNS
|
|
94
103
|
'dns_server_create': 'dns_add',
|
|
95
104
|
'dns_server_update': 'dns_add',
|
|
96
105
|
'dns_server_delete': 'dns_delete',
|
|
@@ -148,6 +157,7 @@ SERVICE_MAPPER.update({
|
|
|
148
157
|
'dns_key_count': 'dns_key_count',
|
|
149
158
|
})
|
|
150
159
|
|
|
160
|
+
# Application manager
|
|
151
161
|
SERVICE_MAPPER.update({
|
|
152
162
|
# Application manager
|
|
153
163
|
'app_application_list': 'app_application_list',
|
|
@@ -180,8 +190,8 @@ SERVICE_MAPPER.update({
|
|
|
180
190
|
'member_list': 'member_list',
|
|
181
191
|
})
|
|
182
192
|
|
|
193
|
+
# dhcp
|
|
183
194
|
SERVICE_MAPPER.update({
|
|
184
|
-
# dhcp
|
|
185
195
|
'dhcp_server_create': 'dhcp_add',
|
|
186
196
|
'dhcp_server_update': 'dhcp_add',
|
|
187
197
|
'dhcp_server_delete': 'dhcp_delete',
|
|
@@ -224,8 +234,8 @@ SERVICE_MAPPER.update({
|
|
|
224
234
|
'dhcp_group_delete': 'dhcp_group_delete'
|
|
225
235
|
})
|
|
226
236
|
|
|
237
|
+
# dhcp leases
|
|
227
238
|
SERVICE_MAPPER.update({
|
|
228
|
-
# dhcp leases
|
|
229
239
|
'dhcp_range_lease_info': 'dhcp_range_lease_info',
|
|
230
240
|
'dhcp_range_lease_count': 'dhcp_range_lease_count',
|
|
231
241
|
'dhcp_range_lease_list': 'dhcp_range_lease_list',
|
|
@@ -235,8 +245,8 @@ SERVICE_MAPPER.update({
|
|
|
235
245
|
'dhcp_lease_manual_delete': 'dhcp_lease_manual_delete'
|
|
236
246
|
})
|
|
237
247
|
|
|
248
|
+
# dhcp options
|
|
238
249
|
SERVICE_MAPPER.update({
|
|
239
|
-
# dhcp options
|
|
240
250
|
'dhcp_option_create': 'dhcp_option_add',
|
|
241
251
|
'dhcp_option_update': 'dhcp_option_add',
|
|
242
252
|
# no delete, please use update and empty value
|
|
@@ -248,8 +258,8 @@ SERVICE_MAPPER.update({
|
|
|
248
258
|
'dhcp_options_static_list': 'dhcp_static_options_list'
|
|
249
259
|
})
|
|
250
260
|
|
|
261
|
+
# dhcp6
|
|
251
262
|
SERVICE_MAPPER.update({
|
|
252
|
-
# dhcp6
|
|
253
263
|
'dhcp_server6_create': 'dhcp6_add',
|
|
254
264
|
'dhcp_server6_update': 'dhcp6_add',
|
|
255
265
|
'dhcp_server6_delete': 'dhcp6_delete',
|
|
@@ -300,16 +310,16 @@ SERVICE_MAPPER.update({
|
|
|
300
310
|
'dhcp_shared_network6_delete': 'dhcp6_sn6_delete',
|
|
301
311
|
})
|
|
302
312
|
|
|
313
|
+
# dhcp6 leases
|
|
303
314
|
SERVICE_MAPPER.update({
|
|
304
|
-
# dhcp6 leases
|
|
305
315
|
'dhcp_lease6_list': 'dhcp6_lease6_list',
|
|
306
316
|
'dhcp_lease6_count': 'dhcp6_lease6_count',
|
|
307
317
|
'dhcp_lease6_log_list': 'dhcp6_lease6_log_list',
|
|
308
318
|
'dhcp_lease6_log_count': 'dhcp6_lease6_log_count',
|
|
309
319
|
})
|
|
310
320
|
|
|
321
|
+
# device manager
|
|
311
322
|
SERVICE_MAPPER.update({
|
|
312
|
-
# device manager
|
|
313
323
|
'host_device_create': 'hostdev_add',
|
|
314
324
|
'host_device_update': 'hostdev_add',
|
|
315
325
|
'host_device_delete': 'hostdev_delete',
|
|
@@ -332,8 +342,8 @@ SERVICE_MAPPER.update({
|
|
|
332
342
|
'host_link_info': 'link_hostiface_list',
|
|
333
343
|
})
|
|
334
344
|
|
|
345
|
+
# Vlan Manager
|
|
335
346
|
SERVICE_MAPPER.update({
|
|
336
|
-
# Vlan Manager
|
|
337
347
|
'vlm_domain_create': 'vlm_domain_add',
|
|
338
348
|
'vlm_domain_update': 'vlm_domain_add',
|
|
339
349
|
'vlm_domain_delete': 'vlm_domain_delete',
|
|
@@ -356,8 +366,8 @@ SERVICE_MAPPER.update({
|
|
|
356
366
|
'vlm_vlan_info': 'vlmvlan_info',
|
|
357
367
|
})
|
|
358
368
|
|
|
369
|
+
# Guardian params
|
|
359
370
|
SERVICE_MAPPER.update({
|
|
360
|
-
# Guardian params
|
|
361
371
|
'guardian_param_create': 'guardian_param_add',
|
|
362
372
|
'guardian_param_update': 'guardian_param_add',
|
|
363
373
|
'guardian_param_count': 'guardian_param_count',
|
|
@@ -365,8 +375,8 @@ SERVICE_MAPPER.update({
|
|
|
365
375
|
'guardian_param_info': 'guardian_param_info',
|
|
366
376
|
})
|
|
367
377
|
|
|
378
|
+
# custom databases
|
|
368
379
|
SERVICE_MAPPER.update({
|
|
369
|
-
# custom databases
|
|
370
380
|
'custom_db_data_create': 'custom_db_data_add',
|
|
371
381
|
'custom_db_data_update': 'custom_db_data_add',
|
|
372
382
|
'custom_db_data_delete': 'custom_db_data_delete',
|
|
@@ -375,6 +385,7 @@ SERVICE_MAPPER.update({
|
|
|
375
385
|
'custom_db_data_info': 'custom_db_data_info',
|
|
376
386
|
})
|
|
377
387
|
|
|
388
|
+
# NOM
|
|
378
389
|
SERVICE_MAPPER.update({
|
|
379
390
|
# NOM folder
|
|
380
391
|
'nom_folder_create': 'nom_folder_add',
|
|
@@ -406,6 +417,35 @@ SERVICE_MAPPER.update({
|
|
|
406
417
|
|
|
407
418
|
})
|
|
408
419
|
|
|
420
|
+
# admin group
|
|
421
|
+
SERVICE_MAPPER.update({
|
|
422
|
+
'group_create': 'group_add',
|
|
423
|
+
'group_update': 'group_add',
|
|
424
|
+
'group_delete': 'group_delete',
|
|
425
|
+
'group_count': 'group_count',
|
|
426
|
+
'group_list': 'group_list',
|
|
427
|
+
'group_info': 'group_info',
|
|
428
|
+
|
|
429
|
+
'group_service_create': 'group_service_add',
|
|
430
|
+
'group_service_update': 'group_service_add',
|
|
431
|
+
'group_service_delete': 'group_service_delete',
|
|
432
|
+
'group_service_list': 'group_service_list',
|
|
433
|
+
|
|
434
|
+
'group_user_add': 'group_user_add',
|
|
435
|
+
'group_user_update': 'group_user_add',
|
|
436
|
+
'group_user_delete': 'group_user_delete',
|
|
437
|
+
})
|
|
438
|
+
|
|
439
|
+
# admin user
|
|
440
|
+
SERVICE_MAPPER.update({
|
|
441
|
+
'user_create': 'user_add',
|
|
442
|
+
'user_update': 'user_add',
|
|
443
|
+
'user_info': 'user_info',
|
|
444
|
+
'user_delete': 'user_delete',
|
|
445
|
+
'user_list': 'user_list',
|
|
446
|
+
'user_service_list': 'user_service_list',
|
|
447
|
+
})
|
|
448
|
+
|
|
409
449
|
METHOD_MAPPER = {
|
|
410
450
|
'add': 'POST',
|
|
411
451
|
'update': 'PUT',
|
|
@@ -10,7 +10,7 @@ with open(os.path.join(here, 'README.md')) as f:
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='SOLIDserverRest',
|
|
13
|
-
version='2.
|
|
13
|
+
version='2.13.0',
|
|
14
14
|
author='Gregory CUGAT / Alex Chauvin',
|
|
15
15
|
url='https://gitlab.com/efficientip/solidserverrest',
|
|
16
16
|
description='The SOLIDserverRest is a library to drive EfficientIP API',
|
|
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
|
|
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
|
{solidserverrest-2.12.3 → solidserverrest-2.13.0}/SOLIDserverRest.egg-info/dependency_links.txt
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
|