xautomata-hive 3.15.1__tar.gz → 3.15.3__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.
- {xautomata-hive-3.15.1/xautomata_hive.egg-info → xautomata-hive-3.15.3}/PKG-INFO +2 -2
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/api.py +7 -5
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/dashboards.py +11 -16
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/dispatchers.py +30 -25
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/downtimes.py +30 -25
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/groups.py +15 -11
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/login.py +38 -35
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/metric_types.py +15 -11
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/metrics.py +13 -11
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/objects.py +15 -11
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/services.py +6 -5
- xautomata-hive-3.15.3/hive/cookbook/terms_and_conditions.py +75 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/users_notifications.py +41 -0
- xautomata-hive-3.15.3/hive/version.py +1 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/setup.py +2 -2
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3/xautomata_hive.egg-info}/PKG-INFO +2 -2
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/xautomata_hive.egg-info/SOURCES.txt +1 -0
- xautomata-hive-3.15.1/hive/version.py +0 -1
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/LICENSE +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/README.md +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/__init__.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/__init__.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/acl_docs.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/acl_overrides.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/analytics.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/anomalies.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/calendars.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/contacts.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/cost_tagging.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/cost_tags.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/cost_views.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/customers.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/external_tickets.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/features.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/firmware_updates.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/google.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/jobs.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/last_status.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/messages.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/metric_ingest.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/microsoft.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/notification_provider_types.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/notification_providers.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/opening_reasons.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/probe_types.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/probes.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/probes_log_ingest.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/profile_topics.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/reason_for_closure.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/retention_rules.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/schedules.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/sites.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/tree_hierarchy.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_cost_azure_raw.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_cost_management.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_metric_status.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_metric_value.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_ntop_flows.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_service_status.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/ts_service_value.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/users.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/virtual_domains.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/webhooks.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/widget_groups.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/widgets.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/decorators.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/exceptions.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/infrastrucure_keys.py +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/setup.cfg +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/xautomata_hive.egg-info/dependency_links.txt +0 -0
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/xautomata_hive.egg-info/requires.txt +1 -1
- {xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/xautomata_hive.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: xautomata-hive
|
3
|
-
Version: 3.15.
|
3
|
+
Version: 3.15.3
|
4
4
|
Home-page: https://github.com/sherlogic/xautomata-hive.git
|
5
5
|
Author: Enrico Ferro - Andrea Jacassi
|
6
6
|
Author-email:
|
@@ -8,8 +8,8 @@ License: MIT
|
|
8
8
|
Requires-Python: >=3.8.0
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
License-File: LICENSE
|
11
|
-
Requires-Dist: urllib3==1.26.17
|
12
11
|
Requires-Dist: tqdm==4.64.1
|
12
|
+
Requires-Dist: urllib3==1.26.17
|
13
13
|
Requires-Dist: requests==2.31.0
|
14
14
|
|
15
15
|
# Xautomata API
|
@@ -50,10 +50,11 @@ class ApiManager:
|
|
50
50
|
_timeout_retry = 1 # di default non si fanno retry sui timeout
|
51
51
|
_timeout_sleep_time = 120 # tempo di attesa tra un retry e quello successivo in caso di timeout
|
52
52
|
_silence_warning = False # da implementare
|
53
|
+
_SSL_verify = True
|
53
54
|
|
54
55
|
def __init__(self, root, user, password):
|
55
56
|
|
56
|
-
if 'api/v' not in root:
|
57
|
+
if 'api/v' not in root: warnings.warn(f'{root} does not have the api/v* in the root, mandatory to point at the API')
|
57
58
|
|
58
59
|
self.root = root.rstrip('/')
|
59
60
|
self.credentials = (user, password)
|
@@ -69,14 +70,14 @@ class ApiManager:
|
|
69
70
|
"""
|
70
71
|
user, password = self.credentials
|
71
72
|
auth_date = {"grant_type": "password", "username": user, "password": password}
|
72
|
-
response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).post(f'{self.root}/login/access-token', auth_date)
|
73
|
+
response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).post(f'{self.root}/login/access-token', auth_date, verify=self._SSL_verify)
|
73
74
|
response.raise_for_status()
|
74
75
|
self.token = json.loads(response.content.decode('utf-8'))['access_token']
|
75
76
|
|
76
77
|
def openapi(self):
|
77
78
|
"""metodo che restituisce gli schema degli end point"""
|
78
79
|
response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).request('GET', url=f'{self.root}/openapi.js',
|
79
|
-
headers={'Authorization': f'Bearer {self.token}'})
|
80
|
+
headers={'Authorization': f'Bearer {self.token}'}, verify=self._SSL_verify)
|
80
81
|
data = json.loads(response.content[15:].decode('utf-8'))
|
81
82
|
return data
|
82
83
|
|
@@ -156,7 +157,7 @@ class ApiManager:
|
|
156
157
|
@timeout_retry(max_tries=self._timeout_retry, sleep_time=self._timeout_sleep_time)
|
157
158
|
@ratelimiter
|
158
159
|
def run_request(_mode, _url, _headers, _payload, _params, **_kwargs):
|
159
|
-
response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).request(_mode, url=_url, json=_payload, params=_params, headers=_headers, **_kwargs)
|
160
|
+
response = get_session(self._timeout, self._timeout_get_session_retry, self._timeout_get_session_backoff_factor).request(_mode, url=_url, json=_payload, params=_params, headers=_headers, verify=self._SSL_verify, **_kwargs)
|
160
161
|
if response.status_code == 401: raise UnauthorizedException
|
161
162
|
if response.status_code != 200 and response.status_code != 504: # 504 non e' gestito dalle API per cui la responce non sarebbe json serializable
|
162
163
|
print()
|
@@ -503,6 +504,7 @@ from hive.cookbook.schedules import Schedules
|
|
503
504
|
from hive.cookbook.services import Services
|
504
505
|
from hive.cookbook.sites import Sites
|
505
506
|
from hive.cookbook.last_status import LastStatus
|
507
|
+
from hive.cookbook.terms_and_conditions import TermsAndConditions
|
506
508
|
from hive.cookbook.tree_hierarchy import TreeHierarchy
|
507
509
|
from hive.cookbook.ts_cost_azure_raw import TsCostAzureRaw
|
508
510
|
from hive.cookbook.ts_cost_management import TsCostManagement
|
@@ -520,7 +522,7 @@ from hive.cookbook.widget_groups import WidgetGroups
|
|
520
522
|
# hive imports stop
|
521
523
|
|
522
524
|
|
523
|
-
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, CostTagging, CostTags, CostViews, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, Features, FirmwareUpdates, Groups, MetricIngest, Microsoft, Google, Login, Jobs, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, TreeHierarchy, TsCostAzureRaw, TsCostManagement, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
525
|
+
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, CostTagging, CostTags, CostViews, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, Features, FirmwareUpdates, Groups, MetricIngest, Microsoft, Google, Login, Jobs, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, TermsAndConditions, TreeHierarchy, TsCostAzureRaw, TsCostManagement, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
524
526
|
"""
|
525
527
|
Class with each specific API, based on the ApiManager Class created for a more general interaction with Xautomata API
|
526
528
|
"""
|
@@ -19,7 +19,6 @@ class Dashboards(ApiManager):
|
|
19
19
|
Keyword Args:
|
20
20
|
sort_by (string optional): Stringa separata da virgole di campi su cui ordinare. Si indica uno o piu campi della risposta e si puo chiedere di ottenere i valori di quei campi in ordine ascendente o discendente. Esempio "Customer:Desc". Default to "". - parameter
|
21
21
|
null_fields (string optional): additional filter - parameter
|
22
|
-
uuid_origin_dashboard (string optional): additional filter - parameter
|
23
22
|
name (string optional): additional filter - parameter
|
24
23
|
description (string optional): additional filter - parameter
|
25
24
|
type (string optional): additional filter - parameter
|
@@ -36,16 +35,15 @@ class Dashboards(ApiManager):
|
|
36
35
|
Returns: list"""
|
37
36
|
if kwargs is None:
|
38
37
|
kwargs = dict()
|
39
|
-
official_params_list = ['sort_by', 'null_fields',
|
40
|
-
'
|
41
|
-
'
|
42
|
-
|
43
|
-
|
44
|
-
'
|
45
|
-
'
|
46
|
-
), params.get('
|
47
|
-
'
|
48
|
-
), params.get('like'), params.get('join'), params.get('count')
|
38
|
+
official_params_list = ['sort_by', 'null_fields', 'name',
|
39
|
+
'description', 'type', 'username', 'profile', 'priority',
|
40
|
+
'refresh_interval', 'skip', 'limit', 'like', 'join', 'count']
|
41
|
+
params.get('sort_by'), params.get('null_fields'), params.get('name'
|
42
|
+
), params.get('description'), params.get('type'), params.get(
|
43
|
+
'username'), params.get('profile'), params.get('priority'
|
44
|
+
), params.get('refresh_interval'), params.get('skip'), params.get(
|
45
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
46
|
+
'count')
|
49
47
|
if not self._silence_warning:
|
50
48
|
warning_wrong_parameters(self.dashboards.__name__, params,
|
51
49
|
official_params_list)
|
@@ -70,18 +68,16 @@ class Dashboards(ApiManager):
|
|
70
68
|
priority (integer optional): additional filter - payload
|
71
69
|
refresh_interval (integer optional): additional filter - payload
|
72
70
|
image_name (string optional): additional filter - payload
|
73
|
-
uuid_origin_dashboard (string optional): additional filter - payload
|
74
71
|
|
75
72
|
Returns: list"""
|
76
73
|
if kwargs is None:
|
77
74
|
kwargs = dict()
|
78
75
|
official_payload_list = ['name', 'type', 'username', 'description',
|
79
|
-
'profile', 'priority', 'refresh_interval', 'image_name'
|
80
|
-
'uuid_origin_dashboard']
|
76
|
+
'profile', 'priority', 'refresh_interval', 'image_name']
|
81
77
|
payload.get('name'), payload.get('type'), payload.get('username'
|
82
78
|
), payload.get('description'), payload.get('profile'), payload.get(
|
83
79
|
'priority'), payload.get('refresh_interval'), payload.get(
|
84
|
-
'image_name')
|
80
|
+
'image_name')
|
85
81
|
if not self._silence_warning:
|
86
82
|
warning_wrong_parameters(self.dashboards_create.__name__,
|
87
83
|
payload, official_payload_list)
|
@@ -462,7 +458,6 @@ class Dashboards(ApiManager):
|
|
462
458
|
"priority": "integer", optional
|
463
459
|
"refresh_interval": "integer", optional
|
464
460
|
"image_name": "string", optional
|
465
|
-
"uuid_origin_dashboard": "string", optional
|
466
461
|
}
|
467
462
|
]
|
468
463
|
|
@@ -320,6 +320,7 @@ class Dispatchers(ApiManager):
|
|
320
320
|
Keyword Args:
|
321
321
|
not_in (boolean optional): additional filter - parameter
|
322
322
|
name (string optional): additional filter - parameter
|
323
|
+
status (string optional): additional filter - parameter
|
323
324
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
324
325
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
325
326
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -329,11 +330,11 @@ class Dispatchers(ApiManager):
|
|
329
330
|
Returns: list"""
|
330
331
|
if kwargs is None:
|
331
332
|
kwargs = dict()
|
332
|
-
official_params_list = ['not_in', 'name', '
|
333
|
-
'join', 'count']
|
334
|
-
params.get('not_in'), params.get('name'), params.get('
|
335
|
-
), params.get('
|
336
|
-
), params.get('count')
|
333
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
334
|
+
'like', 'join', 'count']
|
335
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
336
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
337
|
+
), params.get('join'), params.get('count')
|
337
338
|
if not self._silence_warning:
|
338
339
|
warning_wrong_parameters(self.dispatchers_groups.__name__,
|
339
340
|
params, official_params_list)
|
@@ -390,6 +391,7 @@ class Dispatchers(ApiManager):
|
|
390
391
|
Keyword Args:
|
391
392
|
not_in (boolean optional): additional filter - parameter
|
392
393
|
name (string optional): additional filter - parameter
|
394
|
+
status (string optional): additional filter - parameter
|
393
395
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
394
396
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
395
397
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -399,11 +401,11 @@ class Dispatchers(ApiManager):
|
|
399
401
|
Returns: list"""
|
400
402
|
if kwargs is None:
|
401
403
|
kwargs = dict()
|
402
|
-
official_params_list = ['not_in', 'name', '
|
403
|
-
'join', 'count']
|
404
|
-
params.get('not_in'), params.get('name'), params.get('
|
405
|
-
), params.get('
|
406
|
-
), params.get('count')
|
404
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
405
|
+
'like', 'join', 'count']
|
406
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
407
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
408
|
+
), params.get('join'), params.get('count')
|
407
409
|
if not self._silence_warning:
|
408
410
|
warning_wrong_parameters(self.dispatchers_objects.__name__,
|
409
411
|
params, official_params_list)
|
@@ -460,6 +462,7 @@ class Dispatchers(ApiManager):
|
|
460
462
|
Keyword Args:
|
461
463
|
not_in (boolean optional): additional filter - parameter
|
462
464
|
name (string optional): additional filter - parameter
|
465
|
+
status (string optional): additional filter - parameter
|
463
466
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
464
467
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
465
468
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -469,11 +472,11 @@ class Dispatchers(ApiManager):
|
|
469
472
|
Returns: list"""
|
470
473
|
if kwargs is None:
|
471
474
|
kwargs = dict()
|
472
|
-
official_params_list = ['not_in', 'name', '
|
473
|
-
'join', 'count']
|
474
|
-
params.get('not_in'), params.get('name'), params.get('
|
475
|
-
), params.get('
|
476
|
-
), params.get('count')
|
475
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
476
|
+
'like', 'join', 'count']
|
477
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
478
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
479
|
+
), params.get('join'), params.get('count')
|
477
480
|
if not self._silence_warning:
|
478
481
|
warning_wrong_parameters(self.dispatchers_metrics.__name__,
|
479
482
|
params, official_params_list)
|
@@ -530,6 +533,7 @@ class Dispatchers(ApiManager):
|
|
530
533
|
Keyword Args:
|
531
534
|
not_in (boolean optional): additional filter - parameter
|
532
535
|
name (string optional): additional filter - parameter
|
536
|
+
status (string optional): additional filter - parameter
|
533
537
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
534
538
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
535
539
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -539,11 +543,11 @@ class Dispatchers(ApiManager):
|
|
539
543
|
Returns: list"""
|
540
544
|
if kwargs is None:
|
541
545
|
kwargs = dict()
|
542
|
-
official_params_list = ['not_in', 'name', '
|
543
|
-
'join', 'count']
|
544
|
-
params.get('not_in'), params.get('name'), params.get('
|
545
|
-
), params.get('
|
546
|
-
), params.get('count')
|
546
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
547
|
+
'like', 'join', 'count']
|
548
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
549
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
550
|
+
), params.get('join'), params.get('count')
|
547
551
|
if not self._silence_warning:
|
548
552
|
warning_wrong_parameters(self.dispatchers_metric_types.__name__,
|
549
553
|
params, official_params_list)
|
@@ -601,6 +605,7 @@ class Dispatchers(ApiManager):
|
|
601
605
|
Keyword Args:
|
602
606
|
not_in (boolean optional): additional filter - parameter
|
603
607
|
name (string optional): additional filter - parameter
|
608
|
+
status (string optional): additional filter - parameter
|
604
609
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
605
610
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
606
611
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -610,11 +615,11 @@ class Dispatchers(ApiManager):
|
|
610
615
|
Returns: list"""
|
611
616
|
if kwargs is None:
|
612
617
|
kwargs = dict()
|
613
|
-
official_params_list = ['not_in', 'name', '
|
614
|
-
'join', 'count']
|
615
|
-
params.get('not_in'), params.get('name'), params.get('
|
616
|
-
), params.get('
|
617
|
-
), params.get('count')
|
618
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
619
|
+
'like', 'join', 'count']
|
620
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
621
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
622
|
+
), params.get('join'), params.get('count')
|
618
623
|
if not self._silence_warning:
|
619
624
|
warning_wrong_parameters(self.dispatchers_services.__name__,
|
620
625
|
params, official_params_list)
|
@@ -175,6 +175,7 @@ class Downtimes(ApiManager):
|
|
175
175
|
Keyword Args:
|
176
176
|
not_in (boolean optional): additional filter - parameter
|
177
177
|
name (string optional): additional filter - parameter
|
178
|
+
status (string optional): additional filter - parameter
|
178
179
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
179
180
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
180
181
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -184,11 +185,11 @@ class Downtimes(ApiManager):
|
|
184
185
|
Returns: list"""
|
185
186
|
if kwargs is None:
|
186
187
|
kwargs = dict()
|
187
|
-
official_params_list = ['not_in', 'name', '
|
188
|
-
'join', 'count']
|
189
|
-
params.get('not_in'), params.get('name'), params.get('
|
190
|
-
), params.get('
|
191
|
-
), params.get('count')
|
188
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
189
|
+
'like', 'join', 'count']
|
190
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
191
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
192
|
+
), params.get('join'), params.get('count')
|
192
193
|
if not self._silence_warning:
|
193
194
|
warning_wrong_parameters(self.downtimes_groups.__name__, params,
|
194
195
|
official_params_list)
|
@@ -245,6 +246,7 @@ class Downtimes(ApiManager):
|
|
245
246
|
Keyword Args:
|
246
247
|
not_in (boolean optional): additional filter - parameter
|
247
248
|
name (string optional): additional filter - parameter
|
249
|
+
status (string optional): additional filter - parameter
|
248
250
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
249
251
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
250
252
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -254,11 +256,11 @@ class Downtimes(ApiManager):
|
|
254
256
|
Returns: list"""
|
255
257
|
if kwargs is None:
|
256
258
|
kwargs = dict()
|
257
|
-
official_params_list = ['not_in', 'name', '
|
258
|
-
'join', 'count']
|
259
|
-
params.get('not_in'), params.get('name'), params.get('
|
260
|
-
), params.get('
|
261
|
-
), params.get('count')
|
259
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
260
|
+
'like', 'join', 'count']
|
261
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
262
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
263
|
+
), params.get('join'), params.get('count')
|
262
264
|
if not self._silence_warning:
|
263
265
|
warning_wrong_parameters(self.downtimes_objects.__name__,
|
264
266
|
params, official_params_list)
|
@@ -315,6 +317,7 @@ class Downtimes(ApiManager):
|
|
315
317
|
Keyword Args:
|
316
318
|
not_in (boolean optional): additional filter - parameter
|
317
319
|
name (string optional): additional filter - parameter
|
320
|
+
status (string optional): additional filter - parameter
|
318
321
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
319
322
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
320
323
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -324,11 +327,11 @@ class Downtimes(ApiManager):
|
|
324
327
|
Returns: list"""
|
325
328
|
if kwargs is None:
|
326
329
|
kwargs = dict()
|
327
|
-
official_params_list = ['not_in', 'name', '
|
328
|
-
'join', 'count']
|
329
|
-
params.get('not_in'), params.get('name'), params.get('
|
330
|
-
), params.get('
|
331
|
-
), params.get('count')
|
330
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
331
|
+
'like', 'join', 'count']
|
332
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
333
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
334
|
+
), params.get('join'), params.get('count')
|
332
335
|
if not self._silence_warning:
|
333
336
|
warning_wrong_parameters(self.downtimes_metrics.__name__,
|
334
337
|
params, official_params_list)
|
@@ -385,6 +388,7 @@ class Downtimes(ApiManager):
|
|
385
388
|
Keyword Args:
|
386
389
|
not_in (boolean optional): additional filter - parameter
|
387
390
|
name (string optional): additional filter - parameter
|
391
|
+
status (string optional): additional filter - parameter
|
388
392
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
389
393
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
390
394
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -394,11 +398,11 @@ class Downtimes(ApiManager):
|
|
394
398
|
Returns: list"""
|
395
399
|
if kwargs is None:
|
396
400
|
kwargs = dict()
|
397
|
-
official_params_list = ['not_in', 'name', '
|
398
|
-
'join', 'count']
|
399
|
-
params.get('not_in'), params.get('name'), params.get('
|
400
|
-
), params.get('
|
401
|
-
), params.get('count')
|
401
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
402
|
+
'like', 'join', 'count']
|
403
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
404
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
405
|
+
), params.get('join'), params.get('count')
|
402
406
|
if not self._silence_warning:
|
403
407
|
warning_wrong_parameters(self.downtimes_metric_types.__name__,
|
404
408
|
params, official_params_list)
|
@@ -456,6 +460,7 @@ class Downtimes(ApiManager):
|
|
456
460
|
Keyword Args:
|
457
461
|
not_in (boolean optional): additional filter - parameter
|
458
462
|
name (string optional): additional filter - parameter
|
463
|
+
status (string optional): additional filter - parameter
|
459
464
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
460
465
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
461
466
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -465,11 +470,11 @@ class Downtimes(ApiManager):
|
|
465
470
|
Returns: list"""
|
466
471
|
if kwargs is None:
|
467
472
|
kwargs = dict()
|
468
|
-
official_params_list = ['not_in', 'name', '
|
469
|
-
'join', 'count']
|
470
|
-
params.get('not_in'), params.get('name'), params.get('
|
471
|
-
), params.get('
|
472
|
-
), params.get('count')
|
473
|
+
official_params_list = ['not_in', 'name', 'status', 'skip', 'limit',
|
474
|
+
'like', 'join', 'count']
|
475
|
+
params.get('not_in'), params.get('name'), params.get('status'
|
476
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
477
|
+
), params.get('join'), params.get('count')
|
473
478
|
if not self._silence_warning:
|
474
479
|
warning_wrong_parameters(self.downtimes_services.__name__,
|
475
480
|
params, official_params_list)
|
@@ -325,6 +325,7 @@ class Groups(ApiManager):
|
|
325
325
|
Keyword Args:
|
326
326
|
not_in (boolean optional): additional filter - parameter
|
327
327
|
code (string optional): additional filter - parameter
|
328
|
+
status (string optional): additional filter - parameter
|
328
329
|
active_at_timestamp (string optional): additional filter - parameter
|
329
330
|
active_after_timestamp (string optional): additional filter - parameter
|
330
331
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
@@ -336,12 +337,13 @@ class Groups(ApiManager):
|
|
336
337
|
Returns: list"""
|
337
338
|
if kwargs is None:
|
338
339
|
kwargs = dict()
|
339
|
-
official_params_list = ['not_in', 'code', '
|
340
|
-
'
|
341
|
-
|
342
|
-
|
343
|
-
), params.get('
|
344
|
-
), params.get('
|
340
|
+
official_params_list = ['not_in', 'code', 'status',
|
341
|
+
'active_at_timestamp', 'active_after_timestamp', 'skip',
|
342
|
+
'limit', 'like', 'join', 'count']
|
343
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
344
|
+
), params.get('active_at_timestamp'), params.get(
|
345
|
+
'active_after_timestamp'), params.get('skip'), params.get('limit'
|
346
|
+
), params.get('like'), params.get('join'), params.get('count')
|
345
347
|
if not self._silence_warning:
|
346
348
|
warning_wrong_parameters(self.groups_downtimes.__name__, params,
|
347
349
|
official_params_list)
|
@@ -398,6 +400,7 @@ class Groups(ApiManager):
|
|
398
400
|
Keyword Args:
|
399
401
|
not_in (boolean optional): additional filter - parameter
|
400
402
|
code (string optional): additional filter - parameter
|
403
|
+
status (string optional): additional filter - parameter
|
401
404
|
active_at_timestamp (string optional): additional filter - parameter
|
402
405
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
403
406
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -408,11 +411,12 @@ class Groups(ApiManager):
|
|
408
411
|
Returns: list"""
|
409
412
|
if kwargs is None:
|
410
413
|
kwargs = dict()
|
411
|
-
official_params_list = ['not_in', 'code', '
|
412
|
-
'skip', 'limit', 'like', 'join', 'count']
|
413
|
-
params.get('not_in'), params.get('code'), params.get(
|
414
|
-
|
415
|
-
), params.get('
|
414
|
+
official_params_list = ['not_in', 'code', 'status',
|
415
|
+
'active_at_timestamp', 'skip', 'limit', 'like', 'join', 'count']
|
416
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
417
|
+
), params.get('active_at_timestamp'), params.get('skip'
|
418
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
419
|
+
), params.get('count')
|
416
420
|
if not self._silence_warning:
|
417
421
|
warning_wrong_parameters(self.groups_dispatchers.__name__,
|
418
422
|
params, official_params_list)
|
@@ -266,6 +266,21 @@ class Login(ApiManager):
|
|
266
266
|
f'/login/current_user/push_tokens', payload=payload, **kwargs)
|
267
267
|
return response
|
268
268
|
|
269
|
+
def login_current_user_push_tokens_delete(self, token: str,
|
270
|
+
kwargs: dict = None) -> list:
|
271
|
+
"""Delete Downtime
|
272
|
+
|
273
|
+
Args:
|
274
|
+
token (str, required): token
|
275
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
276
|
+
|
277
|
+
Returns: list"""
|
278
|
+
if kwargs is None:
|
279
|
+
kwargs = dict()
|
280
|
+
response = self.execute('DELETE', path=
|
281
|
+
f'/login/current_user/push_tokens/{token}', **kwargs)
|
282
|
+
return response
|
283
|
+
|
269
284
|
def login_current_user_notifications(self, warm_start: bool = False,
|
270
285
|
single_page: bool = False, page_size: int = 5000,
|
271
286
|
kwargs: dict = None, **params) -> list:
|
@@ -324,6 +339,21 @@ class Login(ApiManager):
|
|
324
339
|
f'/login/current_user/notifications/{uuid}', **kwargs)
|
325
340
|
return response
|
326
341
|
|
342
|
+
def login_current_user_notifications_delete(self, uuid: str,
|
343
|
+
kwargs: dict = None) -> list:
|
344
|
+
"""Delete Notification
|
345
|
+
|
346
|
+
Args:
|
347
|
+
uuid (str, required): uuid
|
348
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
349
|
+
|
350
|
+
Returns: list"""
|
351
|
+
if kwargs is None:
|
352
|
+
kwargs = dict()
|
353
|
+
response = self.execute('DELETE', path=
|
354
|
+
f'/login/current_user/notifications/{uuid}', **kwargs)
|
355
|
+
return response
|
356
|
+
|
327
357
|
def login_current_user_notifications_put_bulk(self, payload: list,
|
328
358
|
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
329
359
|
) -> list:
|
@@ -349,7 +379,7 @@ class Login(ApiManager):
|
|
349
379
|
single_page, page_size=page_size, payload=payload, **kwargs)
|
350
380
|
return response
|
351
381
|
|
352
|
-
def
|
382
|
+
def login_current_user_terms_and_conditions(self,
|
353
383
|
warm_start: bool = False, single_page: bool = False,
|
354
384
|
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
355
385
|
"""Check If User Approved Tc
|
@@ -362,7 +392,7 @@ class Login(ApiManager):
|
|
362
392
|
**params: additional parameters for the API.
|
363
393
|
|
364
394
|
Keyword Args:
|
365
|
-
tc_version (
|
395
|
+
tc_version (integer optional): additional filter - parameter
|
366
396
|
sort_by (string optional): Stringa separata da virgole di campi su cui ordinare. Si indica uno o piu campi della risposta e si puo chiedere di ottenere i valori di quei campi in ordine ascendente o discendente. Esempio "Customer:Desc". Default to "". - parameter
|
367
397
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
368
398
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -380,15 +410,15 @@ class Login(ApiManager):
|
|
380
410
|
), params.get('count')
|
381
411
|
if not self._silence_warning:
|
382
412
|
warning_wrong_parameters(self.
|
383
|
-
|
413
|
+
login_current_user_terms_and_conditions.__name__, params,
|
384
414
|
official_params_list)
|
385
415
|
response = self.execute('GET', path=
|
386
|
-
f'/login/current_user/
|
416
|
+
f'/login/current_user/terms_and_conditions', single_page=
|
387
417
|
single_page, page_size=page_size, warm_start=warm_start, params
|
388
418
|
=params, **kwargs)
|
389
419
|
return response
|
390
420
|
|
391
|
-
def
|
421
|
+
def login_current_user_terms_and_conditions_create(self,
|
392
422
|
kwargs: dict = None, **payload) -> list:
|
393
423
|
"""User Approved Or Declined Tc
|
394
424
|
|
@@ -397,7 +427,7 @@ class Login(ApiManager):
|
|
397
427
|
**payload: additional parameters for the API.
|
398
428
|
|
399
429
|
Keyword Args:
|
400
|
-
tc_version (
|
430
|
+
tc_version (integer required): additional filter - payload
|
401
431
|
accepted (boolean required): additional filter - payload
|
402
432
|
|
403
433
|
Returns: list"""
|
@@ -407,36 +437,9 @@ class Login(ApiManager):
|
|
407
437
|
payload.get('tc_version'), payload.get('accepted')
|
408
438
|
if not self._silence_warning:
|
409
439
|
warning_wrong_parameters(self.
|
410
|
-
|
440
|
+
login_current_user_terms_and_conditions_create.__name__,
|
411
441
|
payload, official_payload_list)
|
412
442
|
response = self.execute('POST', path=
|
413
|
-
f'/login/current_user/
|
443
|
+
f'/login/current_user/terms_and_conditions', payload=payload,
|
414
444
|
**kwargs)
|
415
445
|
return response
|
416
|
-
|
417
|
-
def login_current_user_terms_and_notifications_put(self, uuid: str,
|
418
|
-
kwargs: dict = None, **payload) -> list:
|
419
|
-
"""Update User Tc
|
420
|
-
|
421
|
-
Args:
|
422
|
-
uuid (str, required): uuid
|
423
|
-
kwargs (dict, optional): additional parameters for execute. Default to None.
|
424
|
-
**payload: additional parameters for the API.
|
425
|
-
|
426
|
-
Keyword Args:
|
427
|
-
tc_version (string optional): additional filter - payload
|
428
|
-
accepted (boolean optional): additional filter - payload
|
429
|
-
|
430
|
-
Returns: list"""
|
431
|
-
if kwargs is None:
|
432
|
-
kwargs = dict()
|
433
|
-
official_payload_list = ['tc_version', 'accepted']
|
434
|
-
payload.get('tc_version'), payload.get('accepted')
|
435
|
-
if not self._silence_warning:
|
436
|
-
warning_wrong_parameters(self.
|
437
|
-
login_current_user_terms_and_notifications_put.__name__,
|
438
|
-
payload, official_payload_list)
|
439
|
-
response = self.execute('PUT', path=
|
440
|
-
f'/login/current_user/terms_and_notifications/{uuid}', payload=
|
441
|
-
payload, **kwargs)
|
442
|
-
return response
|
@@ -218,6 +218,7 @@ class MetricTypes(ApiManager):
|
|
218
218
|
Keyword Args:
|
219
219
|
not_in (boolean optional): additional filter - parameter
|
220
220
|
code (string optional): additional filter - parameter
|
221
|
+
status (string optional): additional filter - parameter
|
221
222
|
active_at_timestamp (string optional): additional filter - parameter
|
222
223
|
active_after_timestamp (string optional): additional filter - parameter
|
223
224
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
@@ -229,12 +230,13 @@ class MetricTypes(ApiManager):
|
|
229
230
|
Returns: list"""
|
230
231
|
if kwargs is None:
|
231
232
|
kwargs = dict()
|
232
|
-
official_params_list = ['not_in', 'code', '
|
233
|
-
'
|
234
|
-
|
235
|
-
|
236
|
-
), params.get('
|
237
|
-
), params.get('
|
233
|
+
official_params_list = ['not_in', 'code', 'status',
|
234
|
+
'active_at_timestamp', 'active_after_timestamp', 'skip',
|
235
|
+
'limit', 'like', 'join', 'count']
|
236
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
237
|
+
), params.get('active_at_timestamp'), params.get(
|
238
|
+
'active_after_timestamp'), params.get('skip'), params.get('limit'
|
239
|
+
), params.get('like'), params.get('join'), params.get('count')
|
238
240
|
if not self._silence_warning:
|
239
241
|
warning_wrong_parameters(self.metric_types_downtimes.__name__,
|
240
242
|
params, official_params_list)
|
@@ -292,6 +294,7 @@ class MetricTypes(ApiManager):
|
|
292
294
|
Keyword Args:
|
293
295
|
not_in (boolean optional): additional filter - parameter
|
294
296
|
code (string optional): additional filter - parameter
|
297
|
+
status (string optional): additional filter - parameter
|
295
298
|
active_at_timestamp (string optional): additional filter - parameter
|
296
299
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
297
300
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -302,11 +305,12 @@ class MetricTypes(ApiManager):
|
|
302
305
|
Returns: list"""
|
303
306
|
if kwargs is None:
|
304
307
|
kwargs = dict()
|
305
|
-
official_params_list = ['not_in', 'code', '
|
306
|
-
'skip', 'limit', 'like', 'join', 'count']
|
307
|
-
params.get('not_in'), params.get('code'), params.get(
|
308
|
-
|
309
|
-
), params.get('
|
308
|
+
official_params_list = ['not_in', 'code', 'status',
|
309
|
+
'active_at_timestamp', 'skip', 'limit', 'like', 'join', 'count']
|
310
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
311
|
+
), params.get('active_at_timestamp'), params.get('skip'
|
312
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
313
|
+
), params.get('count')
|
310
314
|
if not self._silence_warning:
|
311
315
|
warning_wrong_parameters(self.metric_types_dispatchers.__name__,
|
312
316
|
params, official_params_list)
|
@@ -263,6 +263,7 @@ class Metrics(ApiManager):
|
|
263
263
|
Keyword Args:
|
264
264
|
not_in (boolean optional): additional filter - parameter
|
265
265
|
code (string optional): additional filter - parameter
|
266
|
+
status (string optional): additional filter - parameter
|
266
267
|
fetch_all (boolean optional): additional filter - parameter
|
267
268
|
only_actives (boolean optional): additional filter - parameter
|
268
269
|
active_at_timestamp (string optional): additional filter - parameter
|
@@ -276,14 +277,14 @@ class Metrics(ApiManager):
|
|
276
277
|
Returns: list"""
|
277
278
|
if kwargs is None:
|
278
279
|
kwargs = dict()
|
279
|
-
official_params_list = ['not_in', 'code', 'fetch_all',
|
280
|
+
official_params_list = ['not_in', 'code', 'status', 'fetch_all',
|
280
281
|
'only_actives', 'active_at_timestamp', 'active_after_timestamp',
|
281
282
|
'skip', 'limit', 'like', 'join', 'count']
|
282
|
-
params.get('not_in'), params.get('code'), params.get('
|
283
|
-
), params.get('
|
284
|
-
|
285
|
-
), params.get('
|
286
|
-
), params.get('count')
|
283
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
284
|
+
), params.get('fetch_all'), params.get('only_actives'), params.get(
|
285
|
+
'active_at_timestamp'), params.get('active_after_timestamp'
|
286
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
287
|
+
), params.get('join'), params.get('count')
|
287
288
|
if not self._silence_warning:
|
288
289
|
warning_wrong_parameters(self.metrics_downtimes.__name__,
|
289
290
|
params, official_params_list)
|
@@ -340,6 +341,7 @@ class Metrics(ApiManager):
|
|
340
341
|
Keyword Args:
|
341
342
|
not_in (boolean optional): additional filter - parameter
|
342
343
|
code (string optional): additional filter - parameter
|
344
|
+
status (string optional): additional filter - parameter
|
343
345
|
fetch_all (boolean optional): additional filter - parameter
|
344
346
|
only_actives (boolean optional): additional filter - parameter
|
345
347
|
active_at_timestamp (string optional): additional filter - parameter
|
@@ -352,13 +354,13 @@ class Metrics(ApiManager):
|
|
352
354
|
Returns: list"""
|
353
355
|
if kwargs is None:
|
354
356
|
kwargs = dict()
|
355
|
-
official_params_list = ['not_in', 'code', 'fetch_all',
|
357
|
+
official_params_list = ['not_in', 'code', 'status', 'fetch_all',
|
356
358
|
'only_actives', 'active_at_timestamp', 'skip', 'limit', 'like',
|
357
359
|
'join', 'count']
|
358
|
-
params.get('not_in'), params.get('code'), params.get('
|
359
|
-
), params.get('
|
360
|
-
), params.get('skip'), params.get('limit'
|
361
|
-
), params.get('join'), params.get('count')
|
360
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
361
|
+
), params.get('fetch_all'), params.get('only_actives'), params.get(
|
362
|
+
'active_at_timestamp'), params.get('skip'), params.get('limit'
|
363
|
+
), params.get('like'), params.get('join'), params.get('count')
|
362
364
|
if not self._silence_warning:
|
363
365
|
warning_wrong_parameters(self.metrics_dispatchers.__name__,
|
364
366
|
params, official_params_list)
|
@@ -380,6 +380,7 @@ class Objects(ApiManager):
|
|
380
380
|
Keyword Args:
|
381
381
|
not_in (boolean optional): additional filter - parameter
|
382
382
|
code (string optional): additional filter - parameter
|
383
|
+
status (boolean optional): additional filter - parameter
|
383
384
|
active_at_timestamp (string optional): additional filter - parameter
|
384
385
|
active_after_timestamp (string optional): additional filter - parameter
|
385
386
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
@@ -391,12 +392,13 @@ class Objects(ApiManager):
|
|
391
392
|
Returns: list"""
|
392
393
|
if kwargs is None:
|
393
394
|
kwargs = dict()
|
394
|
-
official_params_list = ['not_in', 'code', '
|
395
|
-
'
|
396
|
-
|
397
|
-
|
398
|
-
), params.get('
|
399
|
-
), params.get('
|
395
|
+
official_params_list = ['not_in', 'code', 'status',
|
396
|
+
'active_at_timestamp', 'active_after_timestamp', 'skip',
|
397
|
+
'limit', 'like', 'join', 'count']
|
398
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
399
|
+
), params.get('active_at_timestamp'), params.get(
|
400
|
+
'active_after_timestamp'), params.get('skip'), params.get('limit'
|
401
|
+
), params.get('like'), params.get('join'), params.get('count')
|
400
402
|
if not self._silence_warning:
|
401
403
|
warning_wrong_parameters(self.objects_downtimes.__name__,
|
402
404
|
params, official_params_list)
|
@@ -453,6 +455,7 @@ class Objects(ApiManager):
|
|
453
455
|
Keyword Args:
|
454
456
|
not_in (boolean optional): additional filter - parameter
|
455
457
|
code (string optional): additional filter - parameter
|
458
|
+
status (string optional): additional filter - parameter
|
456
459
|
active_at_timestamp (string optional): additional filter - parameter
|
457
460
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
458
461
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -463,11 +466,12 @@ class Objects(ApiManager):
|
|
463
466
|
Returns: list"""
|
464
467
|
if kwargs is None:
|
465
468
|
kwargs = dict()
|
466
|
-
official_params_list = ['not_in', 'code', '
|
467
|
-
'skip', 'limit', 'like', 'join', 'count']
|
468
|
-
params.get('not_in'), params.get('code'), params.get(
|
469
|
-
|
470
|
-
), params.get('
|
469
|
+
official_params_list = ['not_in', 'code', 'status',
|
470
|
+
'active_at_timestamp', 'skip', 'limit', 'like', 'join', 'count']
|
471
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
472
|
+
), params.get('active_at_timestamp'), params.get('skip'
|
473
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
474
|
+
), params.get('count')
|
471
475
|
if not self._silence_warning:
|
472
476
|
warning_wrong_parameters(self.objects_dispatchers.__name__,
|
473
477
|
params, official_params_list)
|
@@ -317,6 +317,7 @@ class Services(ApiManager):
|
|
317
317
|
Keyword Args:
|
318
318
|
not_in (boolean optional): additional filter - parameter
|
319
319
|
code (string optional): additional filter - parameter
|
320
|
+
status (string optional): additional filter - parameter
|
320
321
|
fetch_all (boolean optional): additional filter - parameter
|
321
322
|
only_actives (boolean optional): additional filter - parameter
|
322
323
|
active_at_timestamp (string optional): additional filter - parameter
|
@@ -329,13 +330,13 @@ class Services(ApiManager):
|
|
329
330
|
Returns: list"""
|
330
331
|
if kwargs is None:
|
331
332
|
kwargs = dict()
|
332
|
-
official_params_list = ['not_in', 'code', 'fetch_all',
|
333
|
+
official_params_list = ['not_in', 'code', 'status', 'fetch_all',
|
333
334
|
'only_actives', 'active_at_timestamp', 'skip', 'limit', 'like',
|
334
335
|
'join', 'count']
|
335
|
-
params.get('not_in'), params.get('code'), params.get('
|
336
|
-
), params.get('
|
337
|
-
), params.get('skip'), params.get('limit'
|
338
|
-
), params.get('join'), params.get('count')
|
336
|
+
params.get('not_in'), params.get('code'), params.get('status'
|
337
|
+
), params.get('fetch_all'), params.get('only_actives'), params.get(
|
338
|
+
'active_at_timestamp'), params.get('skip'), params.get('limit'
|
339
|
+
), params.get('like'), params.get('join'), params.get('count')
|
339
340
|
if not self._silence_warning:
|
340
341
|
warning_wrong_parameters(self.services_dispatchers.__name__,
|
341
342
|
params, official_params_list)
|
@@ -0,0 +1,75 @@
|
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
|
+
|
3
|
+
|
4
|
+
class TermsAndConditions(ApiManager):
|
5
|
+
"""Class that handles all the XAutomata terms_and_conditions APIs"""
|
6
|
+
|
7
|
+
def terms_and_conditions(self, warm_start: bool = False,
|
8
|
+
single_page: bool = False, page_size: int = 5000,
|
9
|
+
kwargs: dict = None, **params) -> list:
|
10
|
+
"""Get Terms And Conditions
|
11
|
+
|
12
|
+
Args:
|
13
|
+
warm_start (bool, optional): salva la risposta in un file e se viene richiamata la stessa funzione con gli stessi argomenti restituisce il contenuto del file. Default to False.
|
14
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
15
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
16
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
17
|
+
**params: additional parameters for the API.
|
18
|
+
|
19
|
+
Keyword Args:
|
20
|
+
sort_by (string optional): Stringa separata da virgole di campi su cui ordinare. Si indica uno o piu campi della risposta e si puo chiedere di ottenere i valori di quei campi in ordine ascendente o discendente. Esempio "Customer:Desc". Default to "". - parameter
|
21
|
+
null_fields (string optional): additional filter - parameter
|
22
|
+
version (integer optional): additional filter - parameter
|
23
|
+
privacy (string optional): additional filter - parameter
|
24
|
+
terms (string optional): additional filter - parameter
|
25
|
+
publication_date_start (string optional): additional filter - parameter
|
26
|
+
publication_date_end (string optional): additional filter - parameter
|
27
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
28
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
29
|
+
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
30
|
+
join (boolean optional): Se join = true, ogni riga restituita conterra' chiavi aggiuntive che fanno riferimento ad altre entita', con cui la riga ha relazioni 1:1. Default to False - parameter
|
31
|
+
count (boolean optional): Se True nel header della risposta e' presente la dimensione massima a db della chiamata fatta, sconsigliabile perche raddoppia il tempo per chiamata. Default to False. - parameter
|
32
|
+
|
33
|
+
Returns: list"""
|
34
|
+
if kwargs is None:
|
35
|
+
kwargs = dict()
|
36
|
+
official_params_list = ['sort_by', 'null_fields', 'version',
|
37
|
+
'privacy', 'terms', 'publication_date_start',
|
38
|
+
'publication_date_end', 'skip', 'limit', 'like', 'join', 'count']
|
39
|
+
params.get('sort_by'), params.get('null_fields'), params.get('version'
|
40
|
+
), params.get('privacy'), params.get('terms'), params.get(
|
41
|
+
'publication_date_start'), params.get('publication_date_end'
|
42
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
43
|
+
), params.get('join'), params.get('count')
|
44
|
+
if not self._silence_warning:
|
45
|
+
warning_wrong_parameters(self.terms_and_conditions.__name__,
|
46
|
+
params, official_params_list)
|
47
|
+
response = self.execute('GET', path=f'/terms_and_conditions/',
|
48
|
+
single_page=single_page, page_size=page_size, warm_start=
|
49
|
+
warm_start, params=params, **kwargs)
|
50
|
+
return response
|
51
|
+
|
52
|
+
def terms_and_conditions_create(self, kwargs: dict = None, **payload
|
53
|
+
) -> list:
|
54
|
+
"""Create Terms And Conditions
|
55
|
+
|
56
|
+
Args:
|
57
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
58
|
+
**payload: additional parameters for the API.
|
59
|
+
|
60
|
+
Keyword Args:
|
61
|
+
privacy (string optional): additional filter - payload
|
62
|
+
terms (string optional): additional filter - payload
|
63
|
+
version (integer required): additional filter - payload
|
64
|
+
|
65
|
+
Returns: list"""
|
66
|
+
if kwargs is None:
|
67
|
+
kwargs = dict()
|
68
|
+
official_payload_list = ['privacy', 'terms', 'version']
|
69
|
+
payload.get('privacy'), payload.get('terms'), payload.get('version')
|
70
|
+
if not self._silence_warning:
|
71
|
+
warning_wrong_parameters(self.terms_and_conditions_create.
|
72
|
+
__name__, payload, official_payload_list)
|
73
|
+
response = self.execute('POST', path=f'/terms_and_conditions/',
|
74
|
+
payload=payload, **kwargs)
|
75
|
+
return response
|
@@ -121,3 +121,44 @@ class UsersNotifications(ApiManager):
|
|
121
121
|
response = self.execute('DELETE', path=
|
122
122
|
f'/users_notifications/{uuid}', **kwargs)
|
123
123
|
return response
|
124
|
+
|
125
|
+
def users_notifications_create_bulk(self, payload: list,
|
126
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
127
|
+
**params) -> list:
|
128
|
+
"""Create Bulk Notification
|
129
|
+
|
130
|
+
Args:
|
131
|
+
payload (list[dict], optional): List dict to create.
|
132
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
133
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
134
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
135
|
+
**params: additional parameters for the API.
|
136
|
+
|
137
|
+
Keyword Args:
|
138
|
+
best_effort (boolean optional): additional filter - parameter
|
139
|
+
|
140
|
+
Examples:
|
141
|
+
payload =
|
142
|
+
[
|
143
|
+
{
|
144
|
+
"username": "string", required
|
145
|
+
"title": "string", required
|
146
|
+
"body": "array object", optional
|
147
|
+
"read": "boolean", optional
|
148
|
+
"sent": "boolean", optional
|
149
|
+
"timestamp": "string", optional
|
150
|
+
}
|
151
|
+
]
|
152
|
+
|
153
|
+
Returns: list"""
|
154
|
+
if kwargs is None:
|
155
|
+
kwargs = dict()
|
156
|
+
official_params_list = ['best_effort']
|
157
|
+
params.get('best_effort')
|
158
|
+
if not self._silence_warning:
|
159
|
+
warning_wrong_parameters(self.users_notifications_create_bulk.
|
160
|
+
__name__, params, official_params_list)
|
161
|
+
response = self.execute('POST', path=
|
162
|
+
f'/users_notifications/bulk/create/', single_page=single_page,
|
163
|
+
page_size=page_size, params=params, payload=payload, **kwargs)
|
164
|
+
return response
|
@@ -0,0 +1 @@
|
|
1
|
+
version = '3.15.3'
|
@@ -15,8 +15,8 @@ with open("hive/version.py", "r") as f:
|
|
15
15
|
version = version[0].split("'")[1]
|
16
16
|
|
17
17
|
# version go
|
18
|
-
urllib3 = 'urllib3==1.26.17'
|
19
18
|
tqdm = 'tqdm==4.64.1'
|
19
|
+
urllib3 = 'urllib3==1.26.17'
|
20
20
|
requests = 'requests==2.31.0'
|
21
21
|
# version end
|
22
22
|
|
@@ -32,5 +32,5 @@ setup(
|
|
32
32
|
author_email='',
|
33
33
|
description='',
|
34
34
|
url="https://github.com/sherlogic/xautomata-hive.git",
|
35
|
-
install_requires=[
|
35
|
+
install_requires=[tqdm, urllib3, requests],
|
36
36
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: xautomata-hive
|
3
|
-
Version: 3.15.
|
3
|
+
Version: 3.15.3
|
4
4
|
Home-page: https://github.com/sherlogic/xautomata-hive.git
|
5
5
|
Author: Enrico Ferro - Andrea Jacassi
|
6
6
|
Author-email:
|
@@ -8,8 +8,8 @@ License: MIT
|
|
8
8
|
Requires-Python: >=3.8.0
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
License-File: LICENSE
|
11
|
-
Requires-Dist: urllib3==1.26.17
|
12
11
|
Requires-Dist: tqdm==4.64.1
|
12
|
+
Requires-Dist: urllib3==1.26.17
|
13
13
|
Requires-Dist: requests==2.31.0
|
14
14
|
|
15
15
|
# Xautomata API
|
@@ -47,6 +47,7 @@ hive/cookbook/retention_rules.py
|
|
47
47
|
hive/cookbook/schedules.py
|
48
48
|
hive/cookbook/services.py
|
49
49
|
hive/cookbook/sites.py
|
50
|
+
hive/cookbook/terms_and_conditions.py
|
50
51
|
hive/cookbook/tree_hierarchy.py
|
51
52
|
hive/cookbook/ts_cost_azure_raw.py
|
52
53
|
hive/cookbook/ts_cost_management.py
|
@@ -1 +0,0 @@
|
|
1
|
-
version = '3.15.1'
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/hive/cookbook/notification_provider_types.py
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
|
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
|
{xautomata-hive-3.15.1 → xautomata-hive-3.15.3}/xautomata_hive.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|