xautomata-hive 3.0.3__py3-none-any.whl → 3.2.0__py3-none-any.whl
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.
- hive/api.py +124 -43
- hive/cookbook/acl_docs.py +1 -1
- hive/cookbook/acl_overrides.py +22 -1
- hive/cookbook/analytics.py +11 -1
- hive/cookbook/anomalies.py +30 -1
- hive/cookbook/calendars.py +95 -1
- hive/cookbook/contacts.py +114 -1
- hive/cookbook/customers.py +293 -7
- hive/cookbook/dashboards.py +82 -1
- hive/cookbook/dispatchers.py +117 -1
- hive/cookbook/downtimes.py +100 -1
- hive/cookbook/external_tickets.py +117 -1
- hive/cookbook/firmware_updates.py +20 -1
- hive/cookbook/groups.py +88 -1
- hive/cookbook/last_status.py +48 -2
- hive/cookbook/login.py +163 -1
- hive/cookbook/messages.py +35 -1
- hive/cookbook/metric_ingest.py +1 -1
- hive/cookbook/metric_types.py +71 -1
- hive/cookbook/metrics.py +77 -1
- hive/cookbook/notification_provider_types.py +32 -1
- hive/cookbook/notification_providers.py +28 -1
- hive/cookbook/objects.py +95 -1
- hive/cookbook/opening_reasons.py +33 -1
- hive/cookbook/probe_types.py +31 -1
- hive/cookbook/probes.py +70 -1
- hive/cookbook/probes_log_ingest.py +5 -1
- hive/cookbook/profile_topics.py +24 -1
- hive/cookbook/reason_for_closure.py +36 -6
- hive/cookbook/retention_rules.py +30 -1
- hive/cookbook/schedules.py +20 -1
- hive/cookbook/services.py +114 -2
- hive/cookbook/sites.py +93 -1
- hive/cookbook/tree_hierarchy.py +89 -1
- hive/cookbook/ts_cost_azure_raw.py +154 -1
- hive/cookbook/ts_cost_management.py +136 -114
- hive/cookbook/ts_metric_status.py +20 -1
- hive/cookbook/ts_metric_value.py +19 -1
- hive/cookbook/ts_ntop_flows.py +25 -1
- hive/cookbook/ts_service_status.py +48 -2
- hive/cookbook/ts_service_value.py +43 -1
- hive/cookbook/users.py +174 -3
- hive/cookbook/users_notifications.py +109 -0
- hive/cookbook/virtual_domains.py +47 -1
- hive/cookbook/webhooks.py +21 -1
- hive/cookbook/widget_groups.py +39 -1
- hive/cookbook/widgets.py +60 -1
- hive/version.py +1 -1
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/METADATA +1 -1
- xautomata_hive-3.2.0.dist-info/RECORD +58 -0
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/WHEEL +1 -1
- xautomata_hive-3.0.3.dist-info/RECORD +0 -57
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/LICENSE +0 -0
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/top_level.txt +0 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class ReasonForClosure(ApiManager):
|
@@ -28,6 +28,15 @@ class ReasonForClosure(ApiManager):
|
|
28
28
|
Returns: list"""
|
29
29
|
if kwargs is None:
|
30
30
|
kwargs = dict()
|
31
|
+
official_params_list = ['sort_by', 'null_fields', 'code',
|
32
|
+
'description', 'jurisdiction', 'skip', 'limit', 'like', 'join',
|
33
|
+
'count']
|
34
|
+
params.get('sort_by'), params.get('null_fields'), params.get('code'
|
35
|
+
), params.get('description'), params.get('jurisdiction'
|
36
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
37
|
+
), params.get('join'), params.get('count')
|
38
|
+
warning_wrong_parameters(self.reason_for_closure.__name__, params,
|
39
|
+
official_params_list)
|
31
40
|
response = self.execute('GET', path=f'/reason_for_closure/',
|
32
41
|
single_page=single_page, page_size=page_size, warm_start=
|
33
42
|
warm_start, params=params, **kwargs)
|
@@ -46,6 +55,11 @@ class ReasonForClosure(ApiManager):
|
|
46
55
|
Returns: list"""
|
47
56
|
if kwargs is None:
|
48
57
|
kwargs = dict()
|
58
|
+
official_payload_list = ['code', 'description', 'jurisdiction']
|
59
|
+
payload.get('code'), payload.get('description'), payload.get(
|
60
|
+
'jurisdiction')
|
61
|
+
warning_wrong_parameters(self.reason_for_closure_create.__name__,
|
62
|
+
payload, official_payload_list)
|
49
63
|
response = self.execute('POST', path=f'/reason_for_closure/',
|
50
64
|
payload=payload, **kwargs)
|
51
65
|
return response
|
@@ -78,6 +92,11 @@ class ReasonForClosure(ApiManager):
|
|
78
92
|
Returns: list"""
|
79
93
|
if kwargs is None:
|
80
94
|
kwargs = dict()
|
95
|
+
official_payload_list = ['code', 'description', 'jurisdiction']
|
96
|
+
payload.get('code'), payload.get('description'), payload.get(
|
97
|
+
'jurisdiction')
|
98
|
+
warning_wrong_parameters(self.reason_for_closure_put.__name__,
|
99
|
+
payload, official_payload_list)
|
81
100
|
response = self.execute('PUT', path=f'/reason_for_closure/{uuid}',
|
82
101
|
payload=payload, **kwargs)
|
83
102
|
return response
|
@@ -95,14 +114,16 @@ class ReasonForClosure(ApiManager):
|
|
95
114
|
f'/reason_for_closure/{uuid}', **kwargs)
|
96
115
|
return response
|
97
116
|
|
98
|
-
def
|
99
|
-
|
100
|
-
kwargs: dict = None, **params) -> list:
|
117
|
+
def reason_for_closure_bulk(self, payload: list,
|
118
|
+
warm_start: bool = False, single_page: bool = False,
|
119
|
+
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
101
120
|
"""Bulk Read Reasons For Closure
|
102
121
|
Args:
|
122
|
+
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.
|
103
123
|
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
104
124
|
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
105
125
|
payload (list[dict], optional): List dict to create.
|
126
|
+
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.
|
106
127
|
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
107
128
|
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
108
129
|
kwargs (dict, optional): additional parameters for execute. Default to None.
|
@@ -117,9 +138,14 @@ class ReasonForClosure(ApiManager):
|
|
117
138
|
Returns: list"""
|
118
139
|
if kwargs is None:
|
119
140
|
kwargs = dict()
|
141
|
+
official_params_list = ['join']
|
142
|
+
params.get('join')
|
143
|
+
warning_wrong_parameters(self.reason_for_closure_bulk.__name__,
|
144
|
+
params, official_params_list)
|
120
145
|
response = self.execute('POST', path=
|
121
|
-
f'/reason_for_closure/
|
122
|
-
page_size=page_size,
|
146
|
+
f'/reason_for_closure/bulk/read/', single_page=single_page,
|
147
|
+
page_size=page_size, warm_start=warm_start, params=params,
|
148
|
+
payload=payload, **kwargs)
|
123
149
|
return response
|
124
150
|
|
125
151
|
def reason_for_closure_create_bulk(self, payload: list,
|
@@ -148,6 +174,10 @@ class ReasonForClosure(ApiManager):
|
|
148
174
|
Returns: list"""
|
149
175
|
if kwargs is None:
|
150
176
|
kwargs = dict()
|
177
|
+
official_params_list = ['best_effort']
|
178
|
+
params.get('best_effort')
|
179
|
+
warning_wrong_parameters(self.reason_for_closure_create_bulk.
|
180
|
+
__name__, params, official_params_list)
|
151
181
|
response = self.execute('POST', path=
|
152
182
|
f'/reason_for_closure/bulk/create/', single_page=single_page,
|
153
183
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
hive/cookbook/retention_rules.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class RetentionRules(ApiManager):
|
@@ -30,6 +30,17 @@ class RetentionRules(ApiManager):
|
|
30
30
|
Returns: list"""
|
31
31
|
if kwargs is None:
|
32
32
|
kwargs = dict()
|
33
|
+
official_params_list = ['sort_by', 'null_fields', 'metric_profile',
|
34
|
+
'priority', 'average_after_days', 'average_over_minutes',
|
35
|
+
'deletion_after_days', 'skip', 'limit', 'like', 'join', 'count']
|
36
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
37
|
+
'metric_profile'), params.get('priority'), params.get(
|
38
|
+
'average_after_days'), params.get('average_over_minutes'
|
39
|
+
), params.get('deletion_after_days'), params.get('skip'
|
40
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
41
|
+
), params.get('count')
|
42
|
+
warning_wrong_parameters(self.retention_rules.__name__, params,
|
43
|
+
official_params_list)
|
33
44
|
response = self.execute('GET', path=f'/retention_rules/',
|
34
45
|
single_page=single_page, page_size=page_size, warm_start=
|
35
46
|
warm_start, params=params, **kwargs)
|
@@ -50,6 +61,15 @@ class RetentionRules(ApiManager):
|
|
50
61
|
Returns: list"""
|
51
62
|
if kwargs is None:
|
52
63
|
kwargs = dict()
|
64
|
+
official_payload_list = ['uuid_customer', 'metric_profile',
|
65
|
+
'priority', 'average_after_days', 'average_over_minutes',
|
66
|
+
'deletion_after_days']
|
67
|
+
payload.get('uuid_customer'), payload.get('metric_profile'
|
68
|
+
), payload.get('priority'), payload.get('average_after_days'
|
69
|
+
), payload.get('average_over_minutes'), payload.get(
|
70
|
+
'deletion_after_days')
|
71
|
+
warning_wrong_parameters(self.retention_rules_create.__name__,
|
72
|
+
payload, official_payload_list)
|
53
73
|
response = self.execute('POST', path=f'/retention_rules/', payload=
|
54
74
|
payload, **kwargs)
|
55
75
|
return response
|
@@ -85,6 +105,15 @@ class RetentionRules(ApiManager):
|
|
85
105
|
Returns: list"""
|
86
106
|
if kwargs is None:
|
87
107
|
kwargs = dict()
|
108
|
+
official_payload_list = ['uuid_customer', 'metric_profile',
|
109
|
+
'priority', 'average_after_days', 'average_over_minutes',
|
110
|
+
'deletion_after_days']
|
111
|
+
payload.get('uuid_customer'), payload.get('metric_profile'
|
112
|
+
), payload.get('priority'), payload.get('average_after_days'
|
113
|
+
), payload.get('average_over_minutes'), payload.get(
|
114
|
+
'deletion_after_days')
|
115
|
+
warning_wrong_parameters(self.retention_rules_put.__name__, payload,
|
116
|
+
official_payload_list)
|
88
117
|
response = self.execute('PUT', path=f'/retention_rules/{uuid}',
|
89
118
|
payload=payload, **kwargs)
|
90
119
|
return response
|
hive/cookbook/schedules.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Schedules(ApiManager):
|
@@ -26,6 +26,13 @@ class Schedules(ApiManager):
|
|
26
26
|
Returns: list"""
|
27
27
|
if kwargs is None:
|
28
28
|
kwargs = dict()
|
29
|
+
official_params_list = ['sort_by', 'uuid_customer', 'code', 'ical',
|
30
|
+
'skip', 'limit', 'like', 'join', 'count']
|
31
|
+
params.get('sort_by'), params.get('uuid_customer'), params.get('code'
|
32
|
+
), params.get('ical'), params.get('skip'), params.get('limit'
|
33
|
+
), params.get('like'), params.get('join'), params.get('count')
|
34
|
+
warning_wrong_parameters(self.schedules.__name__, params,
|
35
|
+
official_params_list)
|
29
36
|
response = self.execute('GET', path=f'/schedules/', single_page=
|
30
37
|
single_page, page_size=page_size, warm_start=warm_start, params
|
31
38
|
=params, **kwargs)
|
@@ -43,6 +50,10 @@ class Schedules(ApiManager):
|
|
43
50
|
Returns: list"""
|
44
51
|
if kwargs is None:
|
45
52
|
kwargs = dict()
|
53
|
+
official_payload_list = ['uuid_customer', 'code', 'ical']
|
54
|
+
payload.get('uuid_customer'), payload.get('code'), payload.get('ical')
|
55
|
+
warning_wrong_parameters(self.schedules_create.__name__, payload,
|
56
|
+
official_payload_list)
|
46
57
|
response = self.execute('POST', path=f'/schedules/', payload=
|
47
58
|
payload, **kwargs)
|
48
59
|
return response
|
@@ -62,6 +73,10 @@ class Schedules(ApiManager):
|
|
62
73
|
kwargs = dict()
|
63
74
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
64
75
|
=params)
|
76
|
+
official_params_list = ['join']
|
77
|
+
params.get('join')
|
78
|
+
warning_wrong_parameters(self.schedule.__name__, params,
|
79
|
+
official_params_list)
|
65
80
|
response = self.execute('GET', path=f'/schedules/{uuid}',
|
66
81
|
warm_start=warm_start, params=params, **kwargs)
|
67
82
|
return response
|
@@ -79,6 +94,10 @@ class Schedules(ApiManager):
|
|
79
94
|
Returns: list"""
|
80
95
|
if kwargs is None:
|
81
96
|
kwargs = dict()
|
97
|
+
official_payload_list = ['uuid_customer', 'code', 'ical']
|
98
|
+
payload.get('uuid_customer'), payload.get('code'), payload.get('ical')
|
99
|
+
warning_wrong_parameters(self.schedules_put.__name__, payload,
|
100
|
+
official_payload_list)
|
82
101
|
response = self.execute('PUT', path=f'/schedules/{uuid}', payload=
|
83
102
|
payload, **kwargs)
|
84
103
|
return response
|
hive/cookbook/services.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Services(ApiManager):
|
@@ -30,6 +30,16 @@ class Services(ApiManager):
|
|
30
30
|
Returns: list"""
|
31
31
|
if kwargs is None:
|
32
32
|
kwargs = dict()
|
33
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_parent',
|
34
|
+
'uuid_customer', 'profile', 'name', 'description', 'status',
|
35
|
+
'skip', 'limit', 'like', 'join', 'count']
|
36
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
37
|
+
'uuid_parent'), params.get('uuid_customer'), params.get('profile'
|
38
|
+
), params.get('name'), params.get('description'), params.get(
|
39
|
+
'status'), params.get('skip'), params.get('limit'), params.get(
|
40
|
+
'like'), params.get('join'), params.get('count')
|
41
|
+
warning_wrong_parameters(self.services.__name__, params,
|
42
|
+
official_params_list)
|
33
43
|
response = self.execute('GET', path=f'/services/', single_page=
|
34
44
|
single_page, page_size=page_size, warm_start=warm_start, params
|
35
45
|
=params, **kwargs)
|
@@ -52,6 +62,14 @@ class Services(ApiManager):
|
|
52
62
|
Returns: list"""
|
53
63
|
if kwargs is None:
|
54
64
|
kwargs = dict()
|
65
|
+
official_payload_list = ['uuid_parent', 'uuid_customer', 'profile',
|
66
|
+
'name', 'description', 'automata_domain', 'rule', 'status']
|
67
|
+
payload.get('uuid_parent'), payload.get('uuid_customer'), payload.get(
|
68
|
+
'profile'), payload.get('name'), payload.get('description'
|
69
|
+
), payload.get('automata_domain'), payload.get('rule'
|
70
|
+
), payload.get('status')
|
71
|
+
warning_wrong_parameters(self.services_create.__name__, payload,
|
72
|
+
official_payload_list)
|
55
73
|
response = self.execute('POST', path=f'/services/', payload=payload,
|
56
74
|
**kwargs)
|
57
75
|
return response
|
@@ -71,6 +89,10 @@ class Services(ApiManager):
|
|
71
89
|
kwargs = dict()
|
72
90
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
73
91
|
=params)
|
92
|
+
official_params_list = ['join']
|
93
|
+
params.get('join')
|
94
|
+
warning_wrong_parameters(self.service.__name__, params,
|
95
|
+
official_params_list)
|
74
96
|
response = self.execute('GET', path=f'/services/{uuid}', warm_start
|
75
97
|
=warm_start, params=params, **kwargs)
|
76
98
|
return response
|
@@ -84,7 +106,7 @@ class Services(ApiManager):
|
|
84
106
|
Keyword Args:
|
85
107
|
uuid_parent (string optional): additional filter - payload
|
86
108
|
uuid_customer (string optional): additional filter - payload
|
87
|
-
profile (string
|
109
|
+
profile (string optional): additional filter - payload
|
88
110
|
name (string optional): additional filter - payload
|
89
111
|
description (string optional): additional filter - payload
|
90
112
|
automata_domain (array object optional): additional filter - payload
|
@@ -93,6 +115,14 @@ class Services(ApiManager):
|
|
93
115
|
Returns: list"""
|
94
116
|
if kwargs is None:
|
95
117
|
kwargs = dict()
|
118
|
+
official_payload_list = ['uuid_parent', 'uuid_customer', 'profile',
|
119
|
+
'name', 'description', 'automata_domain', 'rule', 'status']
|
120
|
+
payload.get('uuid_parent'), payload.get('uuid_customer'), payload.get(
|
121
|
+
'profile'), payload.get('name'), payload.get('description'
|
122
|
+
), payload.get('automata_domain'), payload.get('rule'
|
123
|
+
), payload.get('status')
|
124
|
+
warning_wrong_parameters(self.services_put.__name__, payload,
|
125
|
+
official_payload_list)
|
96
126
|
response = self.execute('PUT', path=f'/services/{uuid}', payload=
|
97
127
|
payload, **kwargs)
|
98
128
|
return response
|
@@ -121,6 +151,7 @@ class Services(ApiManager):
|
|
121
151
|
**params: additional parameters for the API.
|
122
152
|
Keyword Args:
|
123
153
|
not_in (boolean optional): additional filter - parameter
|
154
|
+
name (string optional): additional filter - parameter
|
124
155
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
125
156
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
126
157
|
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
|
@@ -129,6 +160,13 @@ class Services(ApiManager):
|
|
129
160
|
Returns: list"""
|
130
161
|
if kwargs is None:
|
131
162
|
kwargs = dict()
|
163
|
+
official_params_list = ['not_in', 'name', 'skip', 'limit', 'like',
|
164
|
+
'join', 'count']
|
165
|
+
params.get('not_in'), params.get('name'), params.get('skip'
|
166
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
167
|
+
), params.get('count')
|
168
|
+
warning_wrong_parameters(self.services_metrics.__name__, params,
|
169
|
+
official_params_list)
|
132
170
|
response = self.execute('GET', path=f'/services/{uuid}/metrics',
|
133
171
|
single_page=single_page, page_size=page_size, warm_start=
|
134
172
|
warm_start, params=params, **kwargs)
|
@@ -175,6 +213,7 @@ class Services(ApiManager):
|
|
175
213
|
**params: additional parameters for the API.
|
176
214
|
Keyword Args:
|
177
215
|
not_in (boolean optional): additional filter - parameter
|
216
|
+
code (string optional): additional filter - parameter
|
178
217
|
fetch_all (boolean optional): additional filter - parameter
|
179
218
|
active_at_timestamp (string optional): additional filter - parameter
|
180
219
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
@@ -185,6 +224,14 @@ class Services(ApiManager):
|
|
185
224
|
Returns: list"""
|
186
225
|
if kwargs is None:
|
187
226
|
kwargs = dict()
|
227
|
+
official_params_list = ['not_in', 'code', 'fetch_all',
|
228
|
+
'active_at_timestamp', 'skip', 'limit', 'like', 'join', 'count']
|
229
|
+
params.get('not_in'), params.get('code'), params.get('fetch_all'
|
230
|
+
), params.get('active_at_timestamp'), params.get('skip'
|
231
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
232
|
+
), params.get('count')
|
233
|
+
warning_wrong_parameters(self.services_downtimes.__name__, params,
|
234
|
+
official_params_list)
|
188
235
|
response = self.execute('GET', path=f'/services/{uuid}/downtimes',
|
189
236
|
single_page=single_page, page_size=page_size, warm_start=
|
190
237
|
warm_start, params=params, **kwargs)
|
@@ -231,6 +278,7 @@ class Services(ApiManager):
|
|
231
278
|
**params: additional parameters for the API.
|
232
279
|
Keyword Args:
|
233
280
|
not_in (boolean optional): additional filter - parameter
|
281
|
+
code (string optional): additional filter - parameter
|
234
282
|
fetch_all (boolean optional): additional filter - parameter
|
235
283
|
active_at_timestamp (string optional): additional filter - parameter
|
236
284
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
@@ -241,6 +289,14 @@ class Services(ApiManager):
|
|
241
289
|
Returns: list"""
|
242
290
|
if kwargs is None:
|
243
291
|
kwargs = dict()
|
292
|
+
official_params_list = ['not_in', 'code', 'fetch_all',
|
293
|
+
'active_at_timestamp', 'skip', 'limit', 'like', 'join', 'count']
|
294
|
+
params.get('not_in'), params.get('code'), params.get('fetch_all'
|
295
|
+
), params.get('active_at_timestamp'), params.get('skip'
|
296
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
297
|
+
), params.get('count')
|
298
|
+
warning_wrong_parameters(self.services_dispatchers.__name__, params,
|
299
|
+
official_params_list)
|
244
300
|
response = self.execute('GET', path=f'/services/{uuid}/dispatchers',
|
245
301
|
single_page=single_page, page_size=page_size, warm_start=
|
246
302
|
warm_start, params=params, **kwargs)
|
@@ -328,6 +384,39 @@ class Services(ApiManager):
|
|
328
384
|
Returns: list"""
|
329
385
|
if kwargs is None:
|
330
386
|
kwargs = dict()
|
387
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_customer',
|
388
|
+
'customer_code', 'customer_status', 'uuid_site', 'site_code',
|
389
|
+
'site_description', 'site_address', 'site_zip_code',
|
390
|
+
'site_city', 'site_country', 'site_state_province',
|
391
|
+
'site_status', 'uuid_group', 'group_name', 'group_status',
|
392
|
+
'group_type', 'uuid_object', 'object_name', 'object_status',
|
393
|
+
'object_profile', 'uuid_metric_type', 'metric_type_name',
|
394
|
+
'metric_type_status', 'uuid_metric', 'metric_name',
|
395
|
+
'metric_status', 'metric_profile', 'service_uuid_parent',
|
396
|
+
'uuid_service', 'service_profile', 'service_name',
|
397
|
+
'service_description', 'service_status', 'skip', 'limit',
|
398
|
+
'like', 'join', 'count']
|
399
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
400
|
+
'uuid_customer'), params.get('customer_code'), params.get(
|
401
|
+
'customer_status'), params.get('uuid_site'), params.get('site_code'
|
402
|
+
), params.get('site_description'), params.get('site_address'
|
403
|
+
), params.get('site_zip_code'), params.get('site_city'
|
404
|
+
), params.get('site_country'), params.get('site_state_province'
|
405
|
+
), params.get('site_status'), params.get('uuid_group'), params.get(
|
406
|
+
'group_name'), params.get('group_status'), params.get('group_type'
|
407
|
+
), params.get('uuid_object'), params.get('object_name'
|
408
|
+
), params.get('object_status'), params.get('object_profile'
|
409
|
+
), params.get('uuid_metric_type'), params.get('metric_type_name'
|
410
|
+
), params.get('metric_type_status'), params.get('uuid_metric'
|
411
|
+
), params.get('metric_name'), params.get('metric_status'
|
412
|
+
), params.get('metric_profile'), params.get('service_uuid_parent'
|
413
|
+
), params.get('uuid_service'), params.get('service_profile'
|
414
|
+
), params.get('service_name'), params.get('service_description'
|
415
|
+
), params.get('service_status'), params.get('skip'), params.get(
|
416
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
417
|
+
'count')
|
418
|
+
warning_wrong_parameters(self.services_query.__name__, params,
|
419
|
+
official_params_list)
|
331
420
|
response = self.execute('GET', path=f'/services/query/',
|
332
421
|
single_page=single_page, page_size=page_size, warm_start=
|
333
422
|
warm_start, params=params, **kwargs)
|
@@ -395,6 +484,13 @@ class Services(ApiManager):
|
|
395
484
|
Returns: list"""
|
396
485
|
if kwargs is None:
|
397
486
|
kwargs = dict()
|
487
|
+
official_params_list = ['sort_by', 'null_fields', 'skip', 'limit',
|
488
|
+
'like', 'join', 'count']
|
489
|
+
params.get('sort_by'), params.get('null_fields'), params.get('skip'
|
490
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
491
|
+
), params.get('count')
|
492
|
+
warning_wrong_parameters(self.services_query_bulk.__name__, params,
|
493
|
+
official_params_list)
|
398
494
|
response = self.execute('POST', path=f'/services/query/',
|
399
495
|
single_page=single_page, page_size=page_size, warm_start=
|
400
496
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -424,6 +520,10 @@ class Services(ApiManager):
|
|
424
520
|
Returns: list"""
|
425
521
|
if kwargs is None:
|
426
522
|
kwargs = dict()
|
523
|
+
official_params_list = ['join']
|
524
|
+
params.get('join')
|
525
|
+
warning_wrong_parameters(self.services_bulk.__name__, params,
|
526
|
+
official_params_list)
|
427
527
|
response = self.execute('POST', path=f'/services/bulk/read/',
|
428
528
|
single_page=single_page, page_size=page_size, warm_start=
|
429
529
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -489,6 +589,10 @@ class Services(ApiManager):
|
|
489
589
|
Returns: list"""
|
490
590
|
if kwargs is None:
|
491
591
|
kwargs = dict()
|
592
|
+
official_params_list = ['best_effort']
|
593
|
+
params.get('best_effort')
|
594
|
+
warning_wrong_parameters(self.services_create_bulk.__name__, params,
|
595
|
+
official_params_list)
|
492
596
|
response = self.execute('POST', path=f'/services/bulk/create/',
|
493
597
|
single_page=single_page, page_size=page_size, params=params,
|
494
598
|
payload=payload, **kwargs)
|
@@ -542,6 +646,10 @@ class Services(ApiManager):
|
|
542
646
|
Returns: list"""
|
543
647
|
if kwargs is None:
|
544
648
|
kwargs = dict()
|
649
|
+
official_params_list = ['best_effort']
|
650
|
+
params.get('best_effort')
|
651
|
+
warning_wrong_parameters(self.services_metrics_create_bulk.__name__,
|
652
|
+
params, official_params_list)
|
545
653
|
response = self.execute('POST', path=
|
546
654
|
f'/services/bulk/create/metrics', single_page=single_page,
|
547
655
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
@@ -599,6 +707,10 @@ class Services(ApiManager):
|
|
599
707
|
Returns: list"""
|
600
708
|
if kwargs is None:
|
601
709
|
kwargs = dict()
|
710
|
+
official_params_list = ['best_effort']
|
711
|
+
params.get('best_effort')
|
712
|
+
warning_wrong_parameters(self.services_downtimes_create_bulk.
|
713
|
+
__name__, params, official_params_list)
|
602
714
|
response = self.execute('POST', path=
|
603
715
|
f'/services/bulk/create/downtimes', single_page=single_page,
|
604
716
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
hive/cookbook/sites.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Sites(ApiManager):
|
@@ -37,6 +37,21 @@ class Sites(ApiManager):
|
|
37
37
|
Returns: list"""
|
38
38
|
if kwargs is None:
|
39
39
|
kwargs = dict()
|
40
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_customer',
|
41
|
+
'type', 'code', 'description', 'address', 'zip_code', 'city',
|
42
|
+
'country', 'notes', 'state_province', 'status',
|
43
|
+
'filter_group_types', 'extract_severity', 'skip', 'limit',
|
44
|
+
'like', 'join', 'count']
|
45
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
46
|
+
'uuid_customer'), params.get('type'), params.get('code'
|
47
|
+
), params.get('description'), params.get('address'), params.get(
|
48
|
+
'zip_code'), params.get('city'), params.get('country'), params.get(
|
49
|
+
'notes'), params.get('state_province'), params.get('status'
|
50
|
+
), params.get('filter_group_types'), params.get('extract_severity'
|
51
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
52
|
+
), params.get('join'), params.get('count')
|
53
|
+
warning_wrong_parameters(self.sites.__name__, params,
|
54
|
+
official_params_list)
|
40
55
|
response = self.execute('GET', path=f'/sites/', single_page=
|
41
56
|
single_page, page_size=page_size, warm_start=warm_start, params
|
42
57
|
=params, **kwargs)
|
@@ -65,6 +80,16 @@ class Sites(ApiManager):
|
|
65
80
|
Returns: list"""
|
66
81
|
if kwargs is None:
|
67
82
|
kwargs = dict()
|
83
|
+
official_payload_list = ['uuid_customer', 'type', 'code',
|
84
|
+
'description', 'address', 'zip_code', 'city', 'country',
|
85
|
+
'notes', 'state_province', 'status']
|
86
|
+
payload.get('uuid_customer'), payload.get('type'), payload.get('code'
|
87
|
+
), payload.get('description'), payload.get('address'), payload.get(
|
88
|
+
'zip_code'), payload.get('city'), payload.get('country'
|
89
|
+
), payload.get('notes'), payload.get('state_province'
|
90
|
+
), payload.get('status')
|
91
|
+
warning_wrong_parameters(self.sites_create.__name__, payload,
|
92
|
+
official_payload_list)
|
68
93
|
response = self.execute('POST', path=f'/sites/', params=params,
|
69
94
|
payload=payload, **kwargs)
|
70
95
|
return response
|
@@ -84,6 +109,10 @@ class Sites(ApiManager):
|
|
84
109
|
kwargs = dict()
|
85
110
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
86
111
|
=params)
|
112
|
+
official_params_list = ['join']
|
113
|
+
params.get('join')
|
114
|
+
warning_wrong_parameters(self.site.__name__, params,
|
115
|
+
official_params_list)
|
87
116
|
response = self.execute('GET', path=f'/sites/{uuid}', warm_start=
|
88
117
|
warm_start, params=params, **kwargs)
|
89
118
|
return response
|
@@ -113,6 +142,16 @@ class Sites(ApiManager):
|
|
113
142
|
Returns: list"""
|
114
143
|
if kwargs is None:
|
115
144
|
kwargs = dict()
|
145
|
+
official_payload_list = ['uuid_customer', 'type', 'code',
|
146
|
+
'description', 'address', 'zip_code', 'city', 'country',
|
147
|
+
'notes', 'state_province', 'status']
|
148
|
+
payload.get('uuid_customer'), payload.get('type'), payload.get('code'
|
149
|
+
), payload.get('description'), payload.get('address'), payload.get(
|
150
|
+
'zip_code'), payload.get('city'), payload.get('country'
|
151
|
+
), payload.get('notes'), payload.get('state_province'
|
152
|
+
), payload.get('status')
|
153
|
+
warning_wrong_parameters(self.sites_put.__name__, payload,
|
154
|
+
official_payload_list)
|
116
155
|
response = self.execute('PUT', path=f'/sites/{uuid}', params=params,
|
117
156
|
payload=payload, **kwargs)
|
118
157
|
return response
|
@@ -148,6 +187,11 @@ class Sites(ApiManager):
|
|
148
187
|
Returns: list"""
|
149
188
|
if kwargs is None:
|
150
189
|
kwargs = dict()
|
190
|
+
official_params_list = ['skip', 'limit', 'like', 'join', 'count']
|
191
|
+
params.get('skip'), params.get('limit'), params.get('like'
|
192
|
+
), params.get('join'), params.get('count')
|
193
|
+
warning_wrong_parameters(self.sites_groups.__name__, params,
|
194
|
+
official_params_list)
|
151
195
|
response = self.execute('GET', path=f'/sites/{uuid}/groups',
|
152
196
|
single_page=single_page, page_size=page_size, warm_start=
|
153
197
|
warm_start, params=params, **kwargs)
|
@@ -166,6 +210,7 @@ class Sites(ApiManager):
|
|
166
210
|
**params: additional parameters for the API.
|
167
211
|
Keyword Args:
|
168
212
|
not_in (boolean optional): additional filter - parameter
|
213
|
+
name (string optional): additional filter - parameter
|
169
214
|
type (string optional): additional filter - parameter
|
170
215
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
171
216
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -175,6 +220,13 @@ class Sites(ApiManager):
|
|
175
220
|
Returns: list"""
|
176
221
|
if kwargs is None:
|
177
222
|
kwargs = dict()
|
223
|
+
official_params_list = ['not_in', 'name', 'type', 'skip', 'limit',
|
224
|
+
'like', 'join', 'count']
|
225
|
+
params.get('not_in'), params.get('name'), params.get('type'
|
226
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
227
|
+
), params.get('join'), params.get('count')
|
228
|
+
warning_wrong_parameters(self.sites_contacts.__name__, params,
|
229
|
+
official_params_list)
|
178
230
|
response = self.execute('GET', path=f'/sites/{uuid}/contacts',
|
179
231
|
single_page=single_page, page_size=page_size, warm_start=
|
180
232
|
warm_start, params=params, **kwargs)
|
@@ -193,6 +245,10 @@ class Sites(ApiManager):
|
|
193
245
|
Returns: list"""
|
194
246
|
if kwargs is None:
|
195
247
|
kwargs = dict()
|
248
|
+
official_payload_list = ['type']
|
249
|
+
payload.get('type')
|
250
|
+
warning_wrong_parameters(self.sites_contacts_put.__name__, payload,
|
251
|
+
official_payload_list)
|
196
252
|
response = self.execute('PUT', path=
|
197
253
|
f'/sites/{uuid}/contacts/{uuid_contact}', payload=payload, **kwargs
|
198
254
|
)
|
@@ -211,6 +267,10 @@ class Sites(ApiManager):
|
|
211
267
|
Returns: list"""
|
212
268
|
if kwargs is None:
|
213
269
|
kwargs = dict()
|
270
|
+
official_payload_list = ['type']
|
271
|
+
payload.get('type')
|
272
|
+
warning_wrong_parameters(self.sites_contacts_create.__name__,
|
273
|
+
payload, official_payload_list)
|
214
274
|
response = self.execute('POST', path=
|
215
275
|
f'/sites/{uuid}/contacts/{uuid_contact}', payload=payload, **kwargs
|
216
276
|
)
|
@@ -251,6 +311,13 @@ class Sites(ApiManager):
|
|
251
311
|
Returns: list"""
|
252
312
|
if kwargs is None:
|
253
313
|
kwargs = dict()
|
314
|
+
official_params_list = ['sort_by', 'uuid_site', 'skip', 'limit',
|
315
|
+
'like', 'join', 'count']
|
316
|
+
params.get('sort_by'), params.get('uuid_site'), params.get('skip'
|
317
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
318
|
+
), params.get('count')
|
319
|
+
warning_wrong_parameters(self.sites_coordinates.__name__, params,
|
320
|
+
official_params_list)
|
254
321
|
response = self.execute('GET', path=f'/sites/coordinates/',
|
255
322
|
single_page=single_page, page_size=page_size, warm_start=
|
256
323
|
warm_start, params=params, **kwargs)
|
@@ -268,6 +335,11 @@ class Sites(ApiManager):
|
|
268
335
|
Returns: list"""
|
269
336
|
if kwargs is None:
|
270
337
|
kwargs = dict()
|
338
|
+
official_payload_list = ['longitude', 'latitude', 'uuid_site']
|
339
|
+
payload.get('longitude'), payload.get('latitude'), payload.get(
|
340
|
+
'uuid_site')
|
341
|
+
warning_wrong_parameters(self.sites_coordinates_create.__name__,
|
342
|
+
payload, official_payload_list)
|
271
343
|
response = self.execute('POST', path=f'/sites/coordinates/',
|
272
344
|
payload=payload, **kwargs)
|
273
345
|
return response
|
@@ -285,6 +357,10 @@ class Sites(ApiManager):
|
|
285
357
|
Returns: list"""
|
286
358
|
if kwargs is None:
|
287
359
|
kwargs = dict()
|
360
|
+
official_payload_list = ['longitude', 'latitude']
|
361
|
+
payload.get('longitude'), payload.get('latitude')
|
362
|
+
warning_wrong_parameters(self.sites_coordinates_put.__name__,
|
363
|
+
payload, official_payload_list)
|
288
364
|
response = self.execute('PUT', path=
|
289
365
|
f'/sites/coordinates/{uuid_site}', payload=payload, **kwargs)
|
290
366
|
return response
|
@@ -326,6 +402,10 @@ class Sites(ApiManager):
|
|
326
402
|
Returns: list"""
|
327
403
|
if kwargs is None:
|
328
404
|
kwargs = dict()
|
405
|
+
official_params_list = ['join']
|
406
|
+
params.get('join')
|
407
|
+
warning_wrong_parameters(self.sites_bulk.__name__, params,
|
408
|
+
official_params_list)
|
329
409
|
response = self.execute('POST', path=f'/sites/bulk/read/',
|
330
410
|
single_page=single_page, page_size=page_size, warm_start=
|
331
411
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -394,6 +474,10 @@ class Sites(ApiManager):
|
|
394
474
|
Returns: list"""
|
395
475
|
if kwargs is None:
|
396
476
|
kwargs = dict()
|
477
|
+
official_params_list = ['geocode', 'best_effort']
|
478
|
+
params.get('geocode'), params.get('best_effort')
|
479
|
+
warning_wrong_parameters(self.sites_create_bulk.__name__, params,
|
480
|
+
official_params_list)
|
397
481
|
response = self.execute('POST', path=f'/sites/bulk/create/',
|
398
482
|
single_page=single_page, page_size=page_size, params=params,
|
399
483
|
payload=payload, **kwargs)
|
@@ -448,6 +532,10 @@ class Sites(ApiManager):
|
|
448
532
|
Returns: list"""
|
449
533
|
if kwargs is None:
|
450
534
|
kwargs = dict()
|
535
|
+
official_params_list = ['best_effort']
|
536
|
+
params.get('best_effort')
|
537
|
+
warning_wrong_parameters(self.sites_contacts_create_bulk.__name__,
|
538
|
+
params, official_params_list)
|
451
539
|
response = self.execute('POST', path=f'/sites/bulk/create/contacts',
|
452
540
|
single_page=single_page, page_size=page_size, params=params,
|
453
541
|
payload=payload, **kwargs)
|
@@ -506,6 +594,10 @@ class Sites(ApiManager):
|
|
506
594
|
Returns: list"""
|
507
595
|
if kwargs is None:
|
508
596
|
kwargs = dict()
|
597
|
+
official_params_list = ['best_effort']
|
598
|
+
params.get('best_effort')
|
599
|
+
warning_wrong_parameters(self.sites_coordinates_create_bulk.
|
600
|
+
__name__, params, official_params_list)
|
509
601
|
response = self.execute('POST', path=
|
510
602
|
f'/sites/coordinates/bulk/create/', single_page=single_page,
|
511
603
|
page_size=page_size, params=params, payload=payload, **kwargs)
|