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 TsCostManagement(ApiManager):
|
@@ -45,6 +45,27 @@ class TsCostManagement(ApiManager):
|
|
45
45
|
Returns: list"""
|
46
46
|
if kwargs is None:
|
47
47
|
kwargs = dict()
|
48
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_metric',
|
49
|
+
'date_start', 'date_end', 'cloud_provider', 'resource_location',
|
50
|
+
'subscription_type', 'subscription_id', 'subscription_name',
|
51
|
+
'family', 'category', 'subcategory', 'object', 'metric', 'unit',
|
52
|
+
'resource_group', 'reservation_name', 'publisher_name',
|
53
|
+
'local_currency', 'provider_currency', 'uuid_customer', 'skip',
|
54
|
+
'limit', 'like', 'join', 'count']
|
55
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
56
|
+
'uuid_metric'), params.get('date_start'), params.get('date_end'
|
57
|
+
), params.get('cloud_provider'), params.get('resource_location'
|
58
|
+
), params.get('subscription_type'), params.get('subscription_id'
|
59
|
+
), params.get('subscription_name'), params.get('family'
|
60
|
+
), params.get('category'), params.get('subcategory'), params.get(
|
61
|
+
'object'), params.get('metric'), params.get('unit'), params.get(
|
62
|
+
'resource_group'), params.get('reservation_name'), params.get(
|
63
|
+
'publisher_name'), params.get('local_currency'), params.get(
|
64
|
+
'provider_currency'), params.get('uuid_customer'), params.get(
|
65
|
+
'skip'), params.get('limit'), params.get('like'), params.get('join'
|
66
|
+
), params.get('count')
|
67
|
+
warning_wrong_parameters(self.ts_cost_management.__name__, params,
|
68
|
+
official_params_list)
|
48
69
|
response = self.execute('GET', path=f'/ts_cost_management/',
|
49
70
|
single_page=single_page, page_size=page_size, warm_start=
|
50
71
|
warm_start, params=params, **kwargs)
|
@@ -93,6 +114,35 @@ class TsCostManagement(ApiManager):
|
|
93
114
|
Returns: list"""
|
94
115
|
if kwargs is None:
|
95
116
|
kwargs = dict()
|
117
|
+
official_payload_list = ['uuid_metric', 'date', 'cloud_provider',
|
118
|
+
'resource_location', 'subscription_type', 'subscription_id',
|
119
|
+
'subscription_name', 'family', 'category', 'subcategory',
|
120
|
+
'object', 'metric', 'unit', 'qnt', 'local_currency',
|
121
|
+
'unit_cost', 'total_cost', 'unit_revenue', 'total_revenue',
|
122
|
+
'provider_currency', 'unit_cost_pc', 'total_cost_pc',
|
123
|
+
'unit_revenue_pc', 'total_revenue_pc', 'cumulative_qnt',
|
124
|
+
'cumulative_unit_cost', 'cumulative_total_cost',
|
125
|
+
'cumulative_unit_revenue', 'cumulative_total_revenue',
|
126
|
+
'resource_group', 'reservation_name', 'publisher_name', 'tenant_id'
|
127
|
+
]
|
128
|
+
payload.get('uuid_metric'), payload.get('date'), payload.get(
|
129
|
+
'cloud_provider'), payload.get('resource_location'), payload.get(
|
130
|
+
'subscription_type'), payload.get('subscription_id'), payload.get(
|
131
|
+
'subscription_name'), payload.get('family'), payload.get('category'
|
132
|
+
), payload.get('subcategory'), payload.get('object'), payload.get(
|
133
|
+
'metric'), payload.get('unit'), payload.get('qnt'), payload.get(
|
134
|
+
'local_currency'), payload.get('unit_cost'), payload.get(
|
135
|
+
'total_cost'), payload.get('unit_revenue'), payload.get(
|
136
|
+
'total_revenue'), payload.get('provider_currency'), payload.get(
|
137
|
+
'unit_cost_pc'), payload.get('total_cost_pc'), payload.get(
|
138
|
+
'unit_revenue_pc'), payload.get('total_revenue_pc'), payload.get(
|
139
|
+
'cumulative_qnt'), payload.get('cumulative_unit_cost'
|
140
|
+
), payload.get('cumulative_total_cost'), payload.get(
|
141
|
+
'cumulative_unit_revenue'), payload.get('cumulative_total_revenue'
|
142
|
+
), payload.get('resource_group'), payload.get('reservation_name'
|
143
|
+
), payload.get('publisher_name'), payload.get('tenant_id')
|
144
|
+
warning_wrong_parameters(self.ts_cost_management_create.__name__,
|
145
|
+
payload, official_payload_list)
|
96
146
|
response = self.execute('POST', path=f'/ts_cost_management/',
|
97
147
|
payload=payload, **kwargs)
|
98
148
|
return response
|
@@ -127,6 +177,18 @@ class TsCostManagement(ApiManager):
|
|
127
177
|
Returns: list"""
|
128
178
|
if kwargs is None:
|
129
179
|
kwargs = dict()
|
180
|
+
official_params_list = ['sort_by', 'date_start', 'date_end',
|
181
|
+
'cloud_provider', 'resource_group', 'resource_location',
|
182
|
+
'category', 'subscription', 'subscription_type', 'interval',
|
183
|
+
'skip', 'limit', 'like', 'join', 'count']
|
184
|
+
params.get('sort_by'), params.get('date_start'), params.get('date_end'
|
185
|
+
), params.get('cloud_provider'), params.get('resource_group'
|
186
|
+
), params.get('resource_location'), params.get('category'
|
187
|
+
), params.get('subscription'), params.get('subscription_type'
|
188
|
+
), params.get('interval'), params.get('skip'), params.get('limit'
|
189
|
+
), params.get('like'), params.get('join'), params.get('count')
|
190
|
+
warning_wrong_parameters(self.ts_cost_management_grouped.__name__,
|
191
|
+
params, official_params_list)
|
130
192
|
response = self.execute('GET', path=
|
131
193
|
f'/ts_cost_management/grouped/{uuid_customer}', single_page=
|
132
194
|
single_page, page_size=page_size, warm_start=warm_start, params
|
@@ -148,6 +210,10 @@ class TsCostManagement(ApiManager):
|
|
148
210
|
kwargs = dict()
|
149
211
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
150
212
|
=params)
|
213
|
+
official_params_list = ['date']
|
214
|
+
params.get('date')
|
215
|
+
warning_wrong_parameters(self.ts_cost_management.__name__, params,
|
216
|
+
official_params_list)
|
151
217
|
response = self.execute('GET', path=
|
152
218
|
f'/ts_cost_management/{uuid_metric}', warm_start=warm_start,
|
153
219
|
params=params, **kwargs)
|
@@ -171,6 +237,11 @@ class TsCostManagement(ApiManager):
|
|
171
237
|
kwargs = dict()
|
172
238
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
173
239
|
=params)
|
240
|
+
official_params_list = ['count', 'date_start', 'date_end', 'interval']
|
241
|
+
params.get('count'), params.get('date_start'), params.get('date_end'
|
242
|
+
), params.get('interval')
|
243
|
+
warning_wrong_parameters(self.ts_cost_management_ccm_by_date.
|
244
|
+
__name__, params, official_params_list)
|
174
245
|
response = self.execute('GET', path=
|
175
246
|
f'/ts_cost_management/ccm_by_date/{uuid_customer}', warm_start=
|
176
247
|
warm_start, params=params, **kwargs)
|
@@ -194,6 +265,11 @@ class TsCostManagement(ApiManager):
|
|
194
265
|
kwargs = dict()
|
195
266
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
196
267
|
=params)
|
268
|
+
official_params_list = ['count', 'date_start', 'date_end']
|
269
|
+
params.get('count'), params.get('date_start'), params.get('date_end')
|
270
|
+
warning_wrong_parameters(self.
|
271
|
+
ts_cost_management_ccm_by_subscription_type.__name__, params,
|
272
|
+
official_params_list)
|
197
273
|
response = self.execute('GET', path=
|
198
274
|
f'/ts_cost_management/ccm_by_subscription_type/{uuid_customer}',
|
199
275
|
warm_start=warm_start, params=params, **kwargs)
|
@@ -216,6 +292,10 @@ class TsCostManagement(ApiManager):
|
|
216
292
|
kwargs = dict()
|
217
293
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
218
294
|
=params)
|
295
|
+
official_params_list = ['count', 'date_start', 'date_end']
|
296
|
+
params.get('count'), params.get('date_start'), params.get('date_end')
|
297
|
+
warning_wrong_parameters(self.ts_cost_management_ccm_by_category.
|
298
|
+
__name__, params, official_params_list)
|
219
299
|
response = self.execute('GET', path=
|
220
300
|
f'/ts_cost_management/ccm_by_category/{uuid_customer}',
|
221
301
|
warm_start=warm_start, params=params, **kwargs)
|
@@ -239,6 +319,11 @@ class TsCostManagement(ApiManager):
|
|
239
319
|
kwargs = dict()
|
240
320
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
241
321
|
=params)
|
322
|
+
official_params_list = ['count', 'date_start', 'date_end']
|
323
|
+
params.get('count'), params.get('date_start'), params.get('date_end')
|
324
|
+
warning_wrong_parameters(self.
|
325
|
+
ts_cost_management_ccm_by_resource_location.__name__, params,
|
326
|
+
official_params_list)
|
242
327
|
response = self.execute('GET', path=
|
243
328
|
f'/ts_cost_management/ccm_by_resource_location/{uuid_customer}',
|
244
329
|
warm_start=warm_start, params=params, **kwargs)
|
@@ -261,6 +346,11 @@ class TsCostManagement(ApiManager):
|
|
261
346
|
kwargs = dict()
|
262
347
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
263
348
|
=params)
|
349
|
+
official_params_list = ['count', 'date_start', 'date_end']
|
350
|
+
params.get('count'), params.get('date_start'), params.get('date_end')
|
351
|
+
warning_wrong_parameters(self.
|
352
|
+
ts_cost_management_ccm_by_resource_group.__name__, params,
|
353
|
+
official_params_list)
|
264
354
|
response = self.execute('GET', path=
|
265
355
|
f'/ts_cost_management/ccm_by_resource_group/{uuid_customer}',
|
266
356
|
warm_start=warm_start, params=params, **kwargs)
|
@@ -283,6 +373,11 @@ class TsCostManagement(ApiManager):
|
|
283
373
|
kwargs = dict()
|
284
374
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
285
375
|
=params)
|
376
|
+
official_params_list = ['count', 'date_start', 'date_end']
|
377
|
+
params.get('count'), params.get('date_start'), params.get('date_end')
|
378
|
+
warning_wrong_parameters(self.
|
379
|
+
ts_cost_management_ccm_by_subscription.__name__, params,
|
380
|
+
official_params_list)
|
286
381
|
response = self.execute('GET', path=
|
287
382
|
f'/ts_cost_management/ccm_by_subscription/{uuid_customer}',
|
288
383
|
warm_start=warm_start, params=params, **kwargs)
|
@@ -309,6 +404,13 @@ class TsCostManagement(ApiManager):
|
|
309
404
|
Returns: list"""
|
310
405
|
if kwargs is None:
|
311
406
|
kwargs = dict()
|
407
|
+
official_params_list = ['date_start', 'date_end', 'skip', 'limit',
|
408
|
+
'like', 'join', 'count']
|
409
|
+
params.get('date_start'), params.get('date_end'), params.get('skip'
|
410
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
411
|
+
), params.get('count')
|
412
|
+
warning_wrong_parameters(self.ts_cost_management_anomalies.__name__,
|
413
|
+
params, official_params_list)
|
312
414
|
response = self.execute('GET', path=
|
313
415
|
f'/ts_cost_management/anomalies/', single_page=single_page,
|
314
416
|
page_size=page_size, warm_start=warm_start, params=params, **kwargs
|
@@ -337,6 +439,15 @@ class TsCostManagement(ApiManager):
|
|
337
439
|
kwargs = dict()
|
338
440
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
339
441
|
=params)
|
442
|
+
official_params_list = ['count', 'date_start', 'date_end',
|
443
|
+
'sampling', 'uuid_customer', 'cloud_provider', 'description',
|
444
|
+
'family', 'category']
|
445
|
+
params.get('count'), params.get('date_start'), params.get('date_end'
|
446
|
+
), params.get('sampling'), params.get('uuid_customer'), params.get(
|
447
|
+
'cloud_provider'), params.get('description'), params.get('family'
|
448
|
+
), params.get('category')
|
449
|
+
warning_wrong_parameters(self.ts_cost_management_anomaly_selector.
|
450
|
+
__name__, params, official_params_list)
|
340
451
|
response = self.execute('GET', path=
|
341
452
|
f'/ts_cost_management/anomaly_selector/', warm_start=warm_start,
|
342
453
|
params=params, **kwargs)
|
@@ -363,6 +474,16 @@ class TsCostManagement(ApiManager):
|
|
363
474
|
kwargs = dict()
|
364
475
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
365
476
|
=params)
|
477
|
+
official_params_list = ['count', 'date_start', 'date_end',
|
478
|
+
'sampling', 'uuid_customer', 'cloud_provider', 'description',
|
479
|
+
'resource_location']
|
480
|
+
params.get('count'), params.get('date_start'), params.get('date_end'
|
481
|
+
), params.get('sampling'), params.get('uuid_customer'), params.get(
|
482
|
+
'cloud_provider'), params.get('description'), params.get(
|
483
|
+
'resource_location')
|
484
|
+
warning_wrong_parameters(self.
|
485
|
+
ts_cost_management_anomaly_selector_geo.__name__, params,
|
486
|
+
official_params_list)
|
366
487
|
response = self.execute('GET', path=
|
367
488
|
f'/ts_cost_management/anomaly_selector_geo/', warm_start=
|
368
489
|
warm_start, params=params, **kwargs)
|
@@ -389,125 +510,19 @@ class TsCostManagement(ApiManager):
|
|
389
510
|
Returns: list"""
|
390
511
|
if kwargs is None:
|
391
512
|
kwargs = dict()
|
513
|
+
official_params_list = ['date_start', 'date_end', 'skip', 'limit',
|
514
|
+
'like', 'join', 'count']
|
515
|
+
params.get('date_start'), params.get('date_end'), params.get('skip'
|
516
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
517
|
+
), params.get('count')
|
518
|
+
warning_wrong_parameters(self.ts_cost_management_anomalies_geo.
|
519
|
+
__name__, params, official_params_list)
|
392
520
|
response = self.execute('GET', path=
|
393
521
|
f'/ts_cost_management/anomalies_geo/', single_page=single_page,
|
394
522
|
page_size=page_size, warm_start=warm_start, params=params, **kwargs
|
395
523
|
)
|
396
524
|
return response
|
397
525
|
|
398
|
-
def ts_cost_management_billing(self, warm_start: bool = False,
|
399
|
-
kwargs: dict = None, **params) -> list:
|
400
|
-
"""Query Billing
|
401
|
-
Args:
|
402
|
-
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.
|
403
|
-
kwargs (dict, optional): additional parameters for execute. Default to None.
|
404
|
-
**params: additional parameters for the API.
|
405
|
-
Keyword Args:
|
406
|
-
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
|
407
|
-
date_start (string required): additional filter - parameter
|
408
|
-
date_end (string required): additional filter - parameter
|
409
|
-
Returns: list"""
|
410
|
-
if kwargs is None:
|
411
|
-
kwargs = dict()
|
412
|
-
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
413
|
-
=params)
|
414
|
-
response = self.execute('GET', path=f'/ts_cost_management/billing/',
|
415
|
-
warm_start=warm_start, params=params, **kwargs)
|
416
|
-
return response
|
417
|
-
|
418
|
-
def ts_cost_management_az_customer_data(self, warm_start: bool = False,
|
419
|
-
kwargs: dict = None, **params) -> list:
|
420
|
-
"""Az Customer Data
|
421
|
-
Args:
|
422
|
-
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.
|
423
|
-
kwargs (dict, optional): additional parameters for execute. Default to None.
|
424
|
-
**params: additional parameters for the API.
|
425
|
-
Keyword Args:
|
426
|
-
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
|
427
|
-
date_start (string required): additional filter - parameter
|
428
|
-
date_end (string required): additional filter - parameter
|
429
|
-
Returns: list"""
|
430
|
-
if kwargs is None:
|
431
|
-
kwargs = dict()
|
432
|
-
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
433
|
-
=params)
|
434
|
-
response = self.execute('GET', path=
|
435
|
-
f'/ts_cost_management/az_customer_data/', warm_start=warm_start,
|
436
|
-
params=params, **kwargs)
|
437
|
-
return response
|
438
|
-
|
439
|
-
def ts_cost_management_az_customer_data_probe_uuid(self,
|
440
|
-
probe_uuid: str, warm_start: bool = False, kwargs: dict = None, **
|
441
|
-
params) -> list:
|
442
|
-
"""Az Customer Data Single
|
443
|
-
Args:
|
444
|
-
probe_uuid (str, required): probe_uuid
|
445
|
-
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.
|
446
|
-
kwargs (dict, optional): additional parameters for execute. Default to None.
|
447
|
-
**params: additional parameters for the API.
|
448
|
-
Keyword Args:
|
449
|
-
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
|
450
|
-
date_start (string required): additional filter - parameter
|
451
|
-
date_end (string required): additional filter - parameter
|
452
|
-
Returns: list"""
|
453
|
-
if kwargs is None:
|
454
|
-
kwargs = dict()
|
455
|
-
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
456
|
-
=params)
|
457
|
-
response = self.execute('GET', path=
|
458
|
-
f'/ts_cost_management/az_customer_data/{probe_uuid}',
|
459
|
-
warm_start=warm_start, params=params, **kwargs)
|
460
|
-
return response
|
461
|
-
|
462
|
-
def ts_cost_management_az_customer_data_delete(self, probe_uuid: str,
|
463
|
-
kwargs: dict = None, **params) -> list:
|
464
|
-
"""Az Customer Data Single
|
465
|
-
Args:
|
466
|
-
probe_uuid (str, required): probe_uuid
|
467
|
-
kwargs (dict, optional): additional parameters for execute. Default to None.
|
468
|
-
**params: additional parameters for the API.
|
469
|
-
Keyword Args:
|
470
|
-
date_start (string required): additional filter - parameter
|
471
|
-
date_end (string required): additional filter - parameter
|
472
|
-
Returns: list"""
|
473
|
-
if kwargs is None:
|
474
|
-
kwargs = dict()
|
475
|
-
response = self.execute('DELETE', path=
|
476
|
-
f'/ts_cost_management/az_customer_data/{probe_uuid}', params=
|
477
|
-
params, **kwargs)
|
478
|
-
return response
|
479
|
-
|
480
|
-
def ts_cost_management_last_cumulative_values(self,
|
481
|
-
subscription_id: str, warm_start: bool = False,
|
482
|
-
single_page: bool = False, page_size: int = 5000,
|
483
|
-
kwargs: dict = None, **params) -> list:
|
484
|
-
"""Query Last Cumulative Values
|
485
|
-
Args:
|
486
|
-
subscription_id (str, required): subscription_id
|
487
|
-
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.
|
488
|
-
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
489
|
-
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
490
|
-
kwargs (dict, optional): additional parameters for execute. Default to None.
|
491
|
-
**params: additional parameters for the API.
|
492
|
-
Keyword Args:
|
493
|
-
until (string required): additional filter - parameter
|
494
|
-
category (string required): additional filter - parameter
|
495
|
-
subcategory (string required): additional filter - parameter
|
496
|
-
metric (string required): additional filter - parameter
|
497
|
-
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
498
|
-
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
499
|
-
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
|
500
|
-
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
|
501
|
-
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
|
502
|
-
Returns: list"""
|
503
|
-
if kwargs is None:
|
504
|
-
kwargs = dict()
|
505
|
-
response = self.execute('GET', path=
|
506
|
-
f'/ts_cost_management/last_cumulative_values/{subscription_id}',
|
507
|
-
single_page=single_page, page_size=page_size, warm_start=
|
508
|
-
warm_start, params=params, **kwargs)
|
509
|
-
return response
|
510
|
-
|
511
526
|
def ts_cost_management_probe_delete(self, uuid_probe: str,
|
512
527
|
kwargs: dict = None, **params) -> list:
|
513
528
|
"""Delete By Uuid Probe And Date Range
|
@@ -519,9 +534,16 @@ class TsCostManagement(ApiManager):
|
|
519
534
|
tenant_id (string optional): additional filter - parameter
|
520
535
|
date_start (string required): additional filter - parameter
|
521
536
|
date_end (string required): additional filter - parameter
|
537
|
+
profile (string optional): additional filter - parameter
|
522
538
|
Returns: list"""
|
523
539
|
if kwargs is None:
|
524
540
|
kwargs = dict()
|
541
|
+
official_params_list = ['tenant_id', 'date_start', 'date_end',
|
542
|
+
'profile']
|
543
|
+
params.get('tenant_id'), params.get('date_start'), params.get(
|
544
|
+
'date_end'), params.get('profile')
|
545
|
+
warning_wrong_parameters(self.ts_cost_management_probe_delete.
|
546
|
+
__name__, params, official_params_list)
|
525
547
|
response = self.execute('DELETE', path=
|
526
548
|
f'/ts_cost_management/probe/{uuid_probe}/', params=params, **kwargs
|
527
549
|
)
|
@@ -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 TsMetricStatus(ApiManager):
|
@@ -35,6 +35,21 @@ class TsMetricStatus(ApiManager):
|
|
35
35
|
Returns: list"""
|
36
36
|
if kwargs is None:
|
37
37
|
kwargs = dict()
|
38
|
+
official_params_list = ['sort_by', 'uuid_metric', 'timestamp_start',
|
39
|
+
'timestamp_end', 'ingest_timestamp_start',
|
40
|
+
'ingest_timestamp_end', 'database_timestamp_start',
|
41
|
+
'database_timestamp_end', 'status', 'ranking', 'description',
|
42
|
+
'null_fields', 'skip', 'limit', 'like', 'join', 'count']
|
43
|
+
params.get('sort_by'), params.get('uuid_metric'), params.get(
|
44
|
+
'timestamp_start'), params.get('timestamp_end'), params.get(
|
45
|
+
'ingest_timestamp_start'), params.get('ingest_timestamp_end'
|
46
|
+
), params.get('database_timestamp_start'), params.get(
|
47
|
+
'database_timestamp_end'), params.get('status'), params.get(
|
48
|
+
'ranking'), params.get('description'), params.get('null_fields'
|
49
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
50
|
+
), params.get('join'), params.get('count')
|
51
|
+
warning_wrong_parameters(self.ts_metric_status.__name__, params,
|
52
|
+
official_params_list)
|
38
53
|
response = self.execute('GET', path=f'/ts_metric_status/',
|
39
54
|
single_page=single_page, page_size=page_size, warm_start=
|
40
55
|
warm_start, params=params, **kwargs)
|
@@ -65,6 +80,10 @@ class TsMetricStatus(ApiManager):
|
|
65
80
|
Returns: list"""
|
66
81
|
if kwargs is None:
|
67
82
|
kwargs = dict()
|
83
|
+
official_params_list = ['ts_start', 'ts_end']
|
84
|
+
params.get('ts_start'), params.get('ts_end')
|
85
|
+
warning_wrong_parameters(self.ts_metric_status_bulk.__name__,
|
86
|
+
params, official_params_list)
|
68
87
|
response = self.execute('POST', path=
|
69
88
|
f'/ts_metric_status/bulk/read/', single_page=single_page,
|
70
89
|
page_size=page_size, warm_start=warm_start, params=params,
|
hive/cookbook/ts_metric_value.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 TsMetricValue(ApiManager):
|
@@ -33,6 +33,20 @@ class TsMetricValue(ApiManager):
|
|
33
33
|
Returns: list"""
|
34
34
|
if kwargs is None:
|
35
35
|
kwargs = dict()
|
36
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_metric',
|
37
|
+
'timestamp_start', 'timestamp_end', 'ingest_timestamp_start',
|
38
|
+
'ingest_timestamp_end', 'database_timestamp_start',
|
39
|
+
'database_timestamp_end', 'value', 'skip', 'limit', 'like',
|
40
|
+
'join', 'count']
|
41
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
42
|
+
'uuid_metric'), params.get('timestamp_start'), params.get(
|
43
|
+
'timestamp_end'), params.get('ingest_timestamp_start'), params.get(
|
44
|
+
'ingest_timestamp_end'), params.get('database_timestamp_start'
|
45
|
+
), params.get('database_timestamp_end'), params.get('value'
|
46
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
47
|
+
), params.get('join'), params.get('count')
|
48
|
+
warning_wrong_parameters(self.ts_metric_value.__name__, params,
|
49
|
+
official_params_list)
|
36
50
|
response = self.execute('GET', path=f'/ts_metric_value/',
|
37
51
|
single_page=single_page, page_size=page_size, warm_start=
|
38
52
|
warm_start, params=params, **kwargs)
|
@@ -63,6 +77,10 @@ class TsMetricValue(ApiManager):
|
|
63
77
|
Returns: list"""
|
64
78
|
if kwargs is None:
|
65
79
|
kwargs = dict()
|
80
|
+
official_params_list = ['ts_start', 'ts_end']
|
81
|
+
params.get('ts_start'), params.get('ts_end')
|
82
|
+
warning_wrong_parameters(self.ts_metric_value_bulk.__name__, params,
|
83
|
+
official_params_list)
|
66
84
|
response = self.execute('POST', path=f'/ts_metric_value/bulk/read/',
|
67
85
|
single_page=single_page, page_size=page_size, warm_start=
|
68
86
|
warm_start, params=params, payload=payload, **kwargs)
|
hive/cookbook/ts_ntop_flows.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 TsNtopFlows(ApiManager):
|
@@ -35,6 +35,21 @@ class TsNtopFlows(ApiManager):
|
|
35
35
|
Returns: list"""
|
36
36
|
if kwargs is None:
|
37
37
|
kwargs = dict()
|
38
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_service',
|
39
|
+
'l7_proto', 'ip_src_addr', 'ip_dst_addr', 'l4_dst_port',
|
40
|
+
'in_bytes', 'out_bytes', 'last_switched_start',
|
41
|
+
'last_switched_end', 'interface_id', 'skip', 'limit', 'like',
|
42
|
+
'join', 'count']
|
43
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
44
|
+
'uuid_service'), params.get('l7_proto'), params.get('ip_src_addr'
|
45
|
+
), params.get('ip_dst_addr'), params.get('l4_dst_port'
|
46
|
+
), params.get('in_bytes'), params.get('out_bytes'), params.get(
|
47
|
+
'last_switched_start'), params.get('last_switched_end'
|
48
|
+
), params.get('interface_id'), params.get('skip'), params.get(
|
49
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
50
|
+
'count')
|
51
|
+
warning_wrong_parameters(self.ts_ntop_flows.__name__, params,
|
52
|
+
official_params_list)
|
38
53
|
response = self.execute('GET', path=f'/ts_ntop_flows/', single_page
|
39
54
|
=single_page, page_size=page_size, warm_start=warm_start,
|
40
55
|
params=params, **kwargs)
|
@@ -58,6 +73,15 @@ class TsNtopFlows(ApiManager):
|
|
58
73
|
Returns: list"""
|
59
74
|
if kwargs is None:
|
60
75
|
kwargs = dict()
|
76
|
+
official_payload_list = ['uuid_service', 'l7_proto', 'ip_src_addr',
|
77
|
+
'ip_dst_addr', 'l4_dst_port', 'in_bytes', 'out_bytes',
|
78
|
+
'last_switched', 'interface_id']
|
79
|
+
payload.get('uuid_service'), payload.get('l7_proto'), payload.get(
|
80
|
+
'ip_src_addr'), payload.get('ip_dst_addr'), payload.get(
|
81
|
+
'l4_dst_port'), payload.get('in_bytes'), payload.get('out_bytes'
|
82
|
+
), payload.get('last_switched'), payload.get('interface_id')
|
83
|
+
warning_wrong_parameters(self.ts_ntop_flows_create.__name__,
|
84
|
+
payload, official_payload_list)
|
61
85
|
response = self.execute('POST', path=f'/ts_ntop_flows/', payload=
|
62
86
|
payload, **kwargs)
|
63
87
|
return response
|
@@ -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 TsServiceStatus(ApiManager):
|
@@ -33,6 +33,19 @@ class TsServiceStatus(ApiManager):
|
|
33
33
|
Returns: list"""
|
34
34
|
if kwargs is None:
|
35
35
|
kwargs = dict()
|
36
|
+
official_params_list = ['sort_by', 'uuid_service',
|
37
|
+
'timestamp_start', 'timestamp_end', 'database_timestamp_start',
|
38
|
+
'database_timestamp_end', 'status', 'ranking', 'description',
|
39
|
+
'null_fields', 'skip', 'limit', 'like', 'join', 'count']
|
40
|
+
params.get('sort_by'), params.get('uuid_service'), params.get(
|
41
|
+
'timestamp_start'), params.get('timestamp_end'), params.get(
|
42
|
+
'database_timestamp_start'), params.get('database_timestamp_end'
|
43
|
+
), params.get('status'), params.get('ranking'), params.get(
|
44
|
+
'description'), params.get('null_fields'), params.get('skip'
|
45
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
46
|
+
), params.get('count')
|
47
|
+
warning_wrong_parameters(self.ts_service_status.__name__, params,
|
48
|
+
official_params_list)
|
36
49
|
response = self.execute('GET', path=f'/ts_service_status/',
|
37
50
|
single_page=single_page, page_size=page_size, warm_start=
|
38
51
|
warm_start, params=params, **kwargs)
|
@@ -53,6 +66,13 @@ class TsServiceStatus(ApiManager):
|
|
53
66
|
Returns: list"""
|
54
67
|
if kwargs is None:
|
55
68
|
kwargs = dict()
|
69
|
+
official_payload_list = ['uuid_service', 'timestamp', 'status',
|
70
|
+
'ranking', 'description', 'extended_attributes']
|
71
|
+
payload.get('uuid_service'), payload.get('timestamp'), payload.get(
|
72
|
+
'status'), payload.get('ranking'), payload.get('description'
|
73
|
+
), payload.get('extended_attributes')
|
74
|
+
warning_wrong_parameters(self.ts_service_status_create.__name__,
|
75
|
+
payload, official_payload_list)
|
56
76
|
response = self.execute('POST', path=f'/ts_service_status/',
|
57
77
|
payload=payload, **kwargs)
|
58
78
|
return response
|
@@ -70,6 +90,10 @@ class TsServiceStatus(ApiManager):
|
|
70
90
|
Returns: list"""
|
71
91
|
if kwargs is None:
|
72
92
|
kwargs = dict()
|
93
|
+
official_params_list = ['ts_start', 'ts_end']
|
94
|
+
params.get('ts_start'), params.get('ts_end')
|
95
|
+
warning_wrong_parameters(self.ts_service_status_delete.__name__,
|
96
|
+
params, official_params_list)
|
73
97
|
response = self.execute('DELETE', path=
|
74
98
|
f'/ts_service_status/{uuid_service}/', params=params, **kwargs)
|
75
99
|
return response
|
@@ -106,6 +130,20 @@ class TsServiceStatus(ApiManager):
|
|
106
130
|
Returns: list"""
|
107
131
|
if kwargs is None:
|
108
132
|
kwargs = dict()
|
133
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_parent',
|
134
|
+
'uuid_customer', 'profile', 'name', 'description', 'status',
|
135
|
+
'ts_description', 'ts_status', 'ts_timestamp_start',
|
136
|
+
'ts_timestamp_end', 'ts_ranking', 'skip', 'limit', 'like',
|
137
|
+
'join', 'count']
|
138
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
139
|
+
'uuid_parent'), params.get('uuid_customer'), params.get('profile'
|
140
|
+
), params.get('name'), params.get('description'), params.get(
|
141
|
+
'status'), params.get('ts_description'), params.get('ts_status'
|
142
|
+
), params.get('ts_timestamp_start'), params.get('ts_timestamp_end'
|
143
|
+
), params.get('ts_ranking'), params.get('skip'), params.get('limit'
|
144
|
+
), params.get('like'), params.get('join'), params.get('count')
|
145
|
+
warning_wrong_parameters(self.ts_service_status_query.__name__,
|
146
|
+
params, official_params_list)
|
109
147
|
response = self.execute('GET', path=f'/ts_service_status/query/',
|
110
148
|
single_page=single_page, page_size=page_size, warm_start=
|
111
149
|
warm_start, params=params, **kwargs)
|
@@ -136,6 +174,10 @@ class TsServiceStatus(ApiManager):
|
|
136
174
|
Returns: list"""
|
137
175
|
if kwargs is None:
|
138
176
|
kwargs = dict()
|
177
|
+
official_params_list = ['ts_start', 'ts_end']
|
178
|
+
params.get('ts_start'), params.get('ts_end')
|
179
|
+
warning_wrong_parameters(self.ts_service_status_bulk.__name__,
|
180
|
+
params, official_params_list)
|
139
181
|
response = self.execute('POST', path=
|
140
182
|
f'/ts_service_status/bulk/read/', single_page=single_page,
|
141
183
|
page_size=page_size, warm_start=warm_start, params=params,
|
@@ -196,7 +238,11 @@ class TsServiceStatus(ApiManager):
|
|
196
238
|
Returns: list"""
|
197
239
|
if kwargs is None:
|
198
240
|
kwargs = dict()
|
199
|
-
|
241
|
+
official_params_list = ['ts_start', 'ts_end']
|
242
|
+
params.get('ts_start'), params.get('ts_end')
|
243
|
+
warning_wrong_parameters(self.ts_service_status_delete_bulk.
|
244
|
+
__name__, params, official_params_list)
|
245
|
+
response = self.execute('POST', path=
|
200
246
|
f'/ts_service_status/bulk/delete/', single_page=single_page,
|
201
247
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
202
248
|
return response
|