xautomata-hive 3.18.2__tar.gz → 3.19.1__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.18.2/xautomata_hive.egg-info → xautomata_hive-3.19.1}/PKG-INFO +2 -2
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/api.py +6 -5
- xautomata_hive-3.19.1/hive/cookbook/automata_ingest.py +40 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/cost_tags.py +23 -19
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/cost_tree_nodes.py +22 -15
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/cost_tree_resources.py +29 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/cost_views.py +32 -4
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/customers.py +13 -14
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/dashboards.py +7 -3
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/login.py +44 -7
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/probes.py +12 -10
- xautomata_hive-3.19.1/hive/cookbook/ts_automata_state.py +99 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_metric_status.py +1 -1
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_service_value.py +1 -1
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/users.py +20 -20
- xautomata_hive-3.19.1/hive/version.py +1 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/setup.py +2 -2
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1/xautomata_hive.egg-info}/PKG-INFO +2 -2
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/xautomata_hive.egg-info/SOURCES.txt +2 -0
- xautomata_hive-3.18.2/hive/version.py +0 -1
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/LICENSE +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/README.md +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/__init__.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/__init__.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/acl_docs.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/acl_overrides.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/analytics.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/anomalies.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/calendars.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/contacts.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/cost_tagging.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/dispatchers.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/downtimes.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/external_tickets.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/features.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/firmware_updates.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/google.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/groups.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/jobs.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/last_status.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/messages.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/metric_ingest.py +3 -3
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/metric_types.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/metrics.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/microsoft.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/notification_provider_types.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/notification_providers.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/objects.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/opening_reasons.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/probe_types.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/probes_log_ingest.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/profile_topics.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/reason_for_closure.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/retention_rules.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/schedules.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/services.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/sites.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/terms_and_conditions.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/tree_hierarchy.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_cost_azure_raw.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_cost_management.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_metric_value.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_ntop_flows.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/ts_service_status.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/users_notifications.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/virtual_domains.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/webhooks.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/widget_groups.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/cookbook/widgets.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/decorators.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/exceptions.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/infrastrucure_keys.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/hive/tools.py +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/setup.cfg +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/xautomata_hive.egg-info/dependency_links.txt +0 -0
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/xautomata_hive.egg-info/requires.txt +1 -1
- {xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/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.
|
3
|
+
Version: 3.19.1
|
4
4
|
Home-page: https://github.com/sherlogic/xautomata-hive.git
|
5
5
|
Author: Enrico Ferro - Andrea Jacassi
|
6
6
|
Author-email:
|
@@ -8,9 +8,9 @@ License: MIT
|
|
8
8
|
Requires-Python: >=3.8.0
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
License-File: LICENSE
|
11
|
+
Requires-Dist: requests==2.31.0
|
11
12
|
Requires-Dist: tqdm==4.64.1
|
12
13
|
Requires-Dist: urllib3==2.0.4
|
13
|
-
Requires-Dist: requests==2.31.0
|
14
14
|
|
15
15
|
# Xautomata API
|
16
16
|
Pacchetto che fornisca una interfaccia semplice per usare le API di Xautomata in python
|
@@ -9,7 +9,6 @@ from requests import HTTPError
|
|
9
9
|
from hive.decorators import ratelimiter, refresh, paginate, warmstart, timeout_retry
|
10
10
|
from hive.exceptions import UnauthorizedException
|
11
11
|
from hive.infrastrucure_keys import Keys
|
12
|
-
import warnings
|
13
12
|
import gc
|
14
13
|
import functools
|
15
14
|
import logging
|
@@ -56,7 +55,7 @@ class ApiManager:
|
|
56
55
|
|
57
56
|
def __init__(self, root, user, password, ssl_verify: bool = True):
|
58
57
|
|
59
|
-
if 'api/v' not in root:
|
58
|
+
if 'api/v' not in root: logger.warning(f'{root} does not have the api/v* in the root, mandatory to point at the API')
|
60
59
|
|
61
60
|
self._SSL_verify = ssl_verify
|
62
61
|
self.root = root.rstrip('/')
|
@@ -411,7 +410,7 @@ class ApiManager:
|
|
411
410
|
uuid_res.append(val['uuid'])
|
412
411
|
|
413
412
|
if none_count > 0:
|
414
|
-
|
413
|
+
logger.warning(f'{none_count} elements have not been matched with a uuid and can be found as None in the resutl list')
|
415
414
|
|
416
415
|
return uuid_res, get_count, post_count, put_count
|
417
416
|
|
@@ -468,7 +467,7 @@ def warning_wrong_parameters(func_name: str, params_from_user: dict, ufficial_pa
|
|
468
467
|
if ufficial_params_list is None: ufficial_params_list = []
|
469
468
|
for par in params_from_user:
|
470
469
|
if par not in ufficial_params_list:
|
471
|
-
|
470
|
+
logger.warning(f'from {func_name}, {par} is not in the official list of params.')
|
472
471
|
|
473
472
|
|
474
473
|
# gli import vengono messi qui per evitare una parziale import di api.py
|
@@ -492,6 +491,7 @@ from hive.cookbook.external_tickets import ExternalTickets
|
|
492
491
|
from hive.cookbook.features import Features
|
493
492
|
from hive.cookbook.firmware_updates import FirmwareUpdates
|
494
493
|
from hive.cookbook.groups import Groups
|
494
|
+
from hive.cookbook.automata_ingest import AutomataIngest
|
495
495
|
from hive.cookbook.metric_ingest import MetricIngest
|
496
496
|
from hive.cookbook.microsoft import Microsoft
|
497
497
|
from hive.cookbook.google import Google
|
@@ -516,6 +516,7 @@ from hive.cookbook.sites import Sites
|
|
516
516
|
from hive.cookbook.last_status import LastStatus
|
517
517
|
from hive.cookbook.terms_and_conditions import TermsAndConditions
|
518
518
|
from hive.cookbook.tree_hierarchy import TreeHierarchy
|
519
|
+
from hive.cookbook.ts_automata_state import TsAutomataState
|
519
520
|
from hive.cookbook.ts_cost_azure_raw import TsCostAzureRaw
|
520
521
|
from hive.cookbook.ts_cost_management import TsCostManagement
|
521
522
|
from hive.cookbook.ts_metric_status import TsMetricStatus
|
@@ -532,7 +533,7 @@ from hive.cookbook.widget_groups import WidgetGroups
|
|
532
533
|
# hive imports stop
|
533
534
|
|
534
535
|
|
535
|
-
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, CostTagging, CostTags, CostViews, CostTreeNodes, CostTreeResources, 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):
|
536
|
+
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, CostTagging, CostTags, CostViews, CostTreeNodes, CostTreeResources, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, Features, FirmwareUpdates, Groups, AutomataIngest, MetricIngest, Microsoft, Google, Login, Jobs, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, TermsAndConditions, TreeHierarchy, TsAutomataState, TsCostAzureRaw, TsCostManagement, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
536
537
|
"""
|
537
538
|
Class with each specific API, based on the ApiManager Class created for a more general interaction with Xautomata API
|
538
539
|
"""
|
@@ -0,0 +1,40 @@
|
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
|
+
|
3
|
+
|
4
|
+
class AutomataIngest(ApiManager):
|
5
|
+
"""Class that handles all the XAutomata automata_ingest APIs"""
|
6
|
+
|
7
|
+
def automata_ingest_create(self, kwargs: dict = None, **payload) -> list:
|
8
|
+
"""Insert Automata
|
9
|
+
|
10
|
+
Args:
|
11
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
12
|
+
**payload: additional parameters for the API.
|
13
|
+
|
14
|
+
Keyword Args:
|
15
|
+
extended_attributes (string optional): additional filter - payload
|
16
|
+
uuid_automata_instance (string required): additional filter - payload
|
17
|
+
timestamp (integer required): additional filter - payload
|
18
|
+
group_label (string optional): additional filter - payload
|
19
|
+
xal_name (string optional): additional filter - payload
|
20
|
+
automata_name (string optional): additional filter - payload
|
21
|
+
automata_version (string optional): additional filter - payload
|
22
|
+
current_state (string optional): additional filter - payload
|
23
|
+
|
24
|
+
Returns: list"""
|
25
|
+
if kwargs is None:
|
26
|
+
kwargs = dict()
|
27
|
+
official_payload_list = ['extended_attributes',
|
28
|
+
'uuid_automata_instance', 'timestamp', 'group_label',
|
29
|
+
'xal_name', 'automata_name', 'automata_version', 'current_state']
|
30
|
+
payload.get('extended_attributes'), payload.get(
|
31
|
+
'uuid_automata_instance'), payload.get('timestamp'), payload.get(
|
32
|
+
'group_label'), payload.get('xal_name'), payload.get(
|
33
|
+
'automata_name'), payload.get('automata_version'), payload.get(
|
34
|
+
'current_state')
|
35
|
+
if not self._silence_warning:
|
36
|
+
warning_wrong_parameters(self.automata_ingest_create.__name__,
|
37
|
+
payload, official_payload_list)
|
38
|
+
response = self.execute('POST', path=f'/automata_ingest/', payload=
|
39
|
+
payload, **kwargs)
|
40
|
+
return response
|
@@ -74,12 +74,13 @@ class CostTags(ApiManager):
|
|
74
74
|
payload, **kwargs)
|
75
75
|
return response
|
76
76
|
|
77
|
-
def
|
78
|
-
|
79
|
-
kwargs: dict = None, **params) -> list:
|
77
|
+
def cost_tags_query_bulk(self, payload: dict = False,
|
78
|
+
warm_start: bool = False, single_page: bool = False,
|
79
|
+
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
80
80
|
"""Get Ts Costs Rows
|
81
81
|
|
82
82
|
Args:
|
83
|
+
payload (dict, optional): additional parameters for the API.
|
83
84
|
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.
|
84
85
|
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
85
86
|
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
@@ -89,30 +90,33 @@ class CostTags(ApiManager):
|
|
89
90
|
Keyword Args:
|
90
91
|
date_start (string required): additional filter - parameter
|
91
92
|
date_end (string required): additional filter - parameter
|
92
|
-
uuid_view (string required): additional filter - parameter
|
93
|
-
select_operation (None optional): additional filter - parameter
|
94
|
-
selected_tags (string optional): additional filter - parameter
|
95
|
-
unselect_operation (None optional): additional filter - parameter
|
96
|
-
unselected_tags (string optional): additional filter - parameter
|
97
93
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
98
94
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
95
|
+
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
|
96
|
+
|
97
|
+
Examples:
|
98
|
+
payload =
|
99
|
+
{
|
100
|
+
"uuid_view": "string", required
|
101
|
+
"select_operation": "None", required
|
102
|
+
"selected_tags": "array", optional
|
103
|
+
"unselect_operation": "None", required
|
104
|
+
"unselected_tags": "array", optional
|
105
|
+
}
|
99
106
|
|
100
107
|
Returns: list"""
|
101
108
|
if kwargs is None:
|
102
109
|
kwargs = dict()
|
103
|
-
official_params_list = ['date_start', 'date_end', '
|
104
|
-
'
|
105
|
-
|
106
|
-
|
107
|
-
'uuid_view'), params.get('select_operation'), params.get(
|
108
|
-
'selected_tags'), params.get('unselect_operation'), params.get(
|
109
|
-
'unselected_tags'), params.get('skip'), params.get('limit')
|
110
|
+
official_params_list = ['date_start', 'date_end', 'skip', 'limit',
|
111
|
+
'sort_by']
|
112
|
+
params.get('date_start'), params.get('date_end'), params.get('skip'
|
113
|
+
), params.get('limit'), params.get('sort_by')
|
110
114
|
if not self._silence_warning:
|
111
|
-
warning_wrong_parameters(self.
|
112
|
-
official_params_list)
|
113
|
-
response = self.execute('
|
115
|
+
warning_wrong_parameters(self.cost_tags_query_bulk.__name__,
|
116
|
+
params, official_params_list)
|
117
|
+
response = self.execute('POST', path=f'/cost_tags/query/',
|
114
118
|
single_page=single_page, page_size=page_size, warm_start=
|
115
|
-
warm_start, params=params, **kwargs)
|
119
|
+
warm_start, params=params, payload=payload, **kwargs)
|
116
120
|
return response
|
117
121
|
|
118
122
|
def cost_tag(self, uuid: str, warm_start: bool = False,
|
@@ -62,14 +62,17 @@ class CostTreeNodes(ApiManager):
|
|
62
62
|
description (string optional): additional filter - payload
|
63
63
|
uuid_view (string required): additional filter - payload
|
64
64
|
budget (integer optional): additional filter - payload
|
65
|
+
criteria (array object optional): additional filter - payload
|
66
|
+
virtual (boolean optional): additional filter - payload
|
65
67
|
|
66
68
|
Returns: list"""
|
67
69
|
if kwargs is None:
|
68
70
|
kwargs = dict()
|
69
71
|
official_payload_list = ['uuid_parent', 'code', 'description',
|
70
|
-
'uuid_view', 'budget']
|
72
|
+
'uuid_view', 'budget', 'criteria', 'virtual']
|
71
73
|
payload.get('uuid_parent'), payload.get('code'), payload.get(
|
72
|
-
'description'), payload.get('uuid_view'), payload.get('budget'
|
74
|
+
'description'), payload.get('uuid_view'), payload.get('budget'
|
75
|
+
), payload.get('criteria'), payload.get('virtual')
|
73
76
|
if not self._silence_warning:
|
74
77
|
warning_wrong_parameters(self.cost_tree_nodes_create.__name__,
|
75
78
|
payload, official_payload_list)
|
@@ -119,14 +122,17 @@ class CostTreeNodes(ApiManager):
|
|
119
122
|
description (string optional): additional filter - payload
|
120
123
|
uuid_view (string optional): additional filter - payload
|
121
124
|
budget (integer optional): additional filter - payload
|
125
|
+
criteria (array object optional): additional filter - payload
|
126
|
+
virtual (boolean optional): additional filter - payload
|
122
127
|
|
123
128
|
Returns: list"""
|
124
129
|
if kwargs is None:
|
125
130
|
kwargs = dict()
|
126
131
|
official_payload_list = ['uuid_parent', 'code', 'description',
|
127
|
-
'uuid_view', 'budget']
|
132
|
+
'uuid_view', 'budget', 'criteria', 'virtual']
|
128
133
|
payload.get('uuid_parent'), payload.get('code'), payload.get(
|
129
|
-
'description'), payload.get('uuid_view'), payload.get('budget'
|
134
|
+
'description'), payload.get('uuid_view'), payload.get('budget'
|
135
|
+
), payload.get('criteria'), payload.get('virtual')
|
130
136
|
if not self._silence_warning:
|
131
137
|
warning_wrong_parameters(self.cost_tree_nodes_put.__name__,
|
132
138
|
payload, official_payload_list)
|
@@ -162,15 +168,17 @@ class CostTreeNodes(ApiManager):
|
|
162
168
|
date_start (string required): additional filter - parameter
|
163
169
|
date_end (string required): additional filter - parameter
|
164
170
|
resource_id (string optional): additional filter - parameter
|
171
|
+
previous_period (boolean optional): additional filter - parameter
|
165
172
|
|
166
173
|
Returns: list"""
|
167
174
|
if kwargs is None:
|
168
175
|
kwargs = dict()
|
169
176
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
170
177
|
=params)
|
171
|
-
official_params_list = ['date_start', 'date_end', 'resource_id'
|
178
|
+
official_params_list = ['date_start', 'date_end', 'resource_id',
|
179
|
+
'previous_period']
|
172
180
|
params.get('date_start'), params.get('date_end'), params.get(
|
173
|
-
'resource_id')
|
181
|
+
'resource_id'), params.get('previous_period')
|
174
182
|
if not self._silence_warning:
|
175
183
|
warning_wrong_parameters(self.cost_tree_nodes_navigate_tree.
|
176
184
|
__name__, params, official_params_list)
|
@@ -218,9 +226,9 @@ class CostTreeNodes(ApiManager):
|
|
218
226
|
=params, **kwargs)
|
219
227
|
return response
|
220
228
|
|
221
|
-
def
|
229
|
+
def cost_tree_nodes_resources_by_criteria(self, uuid: str,
|
222
230
|
warm_start: bool = False, kwargs: dict = None, **params) -> list:
|
223
|
-
"""Get
|
231
|
+
"""Get Resources From Node By Criteria
|
224
232
|
|
225
233
|
Args:
|
226
234
|
uuid (str, required): uuid
|
@@ -231,20 +239,19 @@ class CostTreeNodes(ApiManager):
|
|
231
239
|
Keyword Args:
|
232
240
|
date_start (string required): additional filter - parameter
|
233
241
|
date_end (string required): additional filter - parameter
|
234
|
-
resource_id (string optional): additional filter - parameter
|
235
242
|
|
236
243
|
Returns: list"""
|
237
244
|
if kwargs is None:
|
238
245
|
kwargs = dict()
|
239
246
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
240
247
|
=params)
|
241
|
-
official_params_list = ['date_start', 'date_end'
|
242
|
-
params.get('date_start'), params.get('date_end')
|
243
|
-
'resource_id')
|
248
|
+
official_params_list = ['date_start', 'date_end']
|
249
|
+
params.get('date_start'), params.get('date_end')
|
244
250
|
if not self._silence_warning:
|
245
|
-
warning_wrong_parameters(self.
|
246
|
-
__name__, params,
|
251
|
+
warning_wrong_parameters(self.
|
252
|
+
cost_tree_nodes_resources_by_criteria.__name__, params,
|
253
|
+
official_params_list)
|
247
254
|
response = self.execute('GET', path=
|
248
|
-
f'/cost_tree_nodes/
|
255
|
+
f'/cost_tree_nodes/{uuid}/resources_by_criteria', warm_start=
|
249
256
|
warm_start, params=params, **kwargs)
|
250
257
|
return response
|
@@ -189,3 +189,32 @@ class CostTreeResources(ApiManager):
|
|
189
189
|
f'/cost_tree_resources/{uuid_view}/unfully_assigned_resources/',
|
190
190
|
warm_start=warm_start, params=params, **kwargs)
|
191
191
|
return response
|
192
|
+
|
193
|
+
def cost_tree_resources_delete_bulk(self, payload: list,
|
194
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
195
|
+
) -> list:
|
196
|
+
"""Bulk Delete Tree Resources
|
197
|
+
|
198
|
+
Args:
|
199
|
+
payload (list[dict], optional): List dict to create.
|
200
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
201
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
202
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
203
|
+
|
204
|
+
Examples:
|
205
|
+
payload =
|
206
|
+
[
|
207
|
+
{
|
208
|
+
"uuid_tree_node": "string", required
|
209
|
+
"cost_category": "string", required
|
210
|
+
"cost_category_value": "string", required
|
211
|
+
}
|
212
|
+
]
|
213
|
+
|
214
|
+
Returns: list"""
|
215
|
+
if kwargs is None:
|
216
|
+
kwargs = dict()
|
217
|
+
response = self.execute('POST', path=
|
218
|
+
f'/cost_tree_resources/bulk/delete/', single_page=single_page,
|
219
|
+
page_size=page_size, payload=payload, **kwargs)
|
220
|
+
return response
|
@@ -21,6 +21,7 @@ class CostViews(ApiManager):
|
|
21
21
|
name (string optional): additional filter - parameter
|
22
22
|
description (string optional): additional filter - parameter
|
23
23
|
type (string optional): additional filter - parameter
|
24
|
+
uuid_customer (string optional): additional filter - parameter
|
24
25
|
null_fields (string optional): additional filter - parameter
|
25
26
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
26
27
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -32,11 +33,12 @@ class CostViews(ApiManager):
|
|
32
33
|
if kwargs is None:
|
33
34
|
kwargs = dict()
|
34
35
|
official_params_list = ['sort_by', 'name', 'description', 'type',
|
35
|
-
'null_fields', 'skip', 'limit', 'like', 'join',
|
36
|
+
'uuid_customer', 'null_fields', 'skip', 'limit', 'like', 'join',
|
37
|
+
'count']
|
36
38
|
params.get('sort_by'), params.get('name'), params.get('description'
|
37
|
-
), params.get('type'), params.get('
|
38
|
-
|
39
|
-
), params.get('count')
|
39
|
+
), params.get('type'), params.get('uuid_customer'), params.get(
|
40
|
+
'null_fields'), params.get('skip'), params.get('limit'
|
41
|
+
), params.get('like'), params.get('join'), params.get('count')
|
40
42
|
if not self._silence_warning:
|
41
43
|
warning_wrong_parameters(self.cost_views.__name__, params,
|
42
44
|
official_params_list)
|
@@ -206,3 +208,29 @@ class CostViews(ApiManager):
|
|
206
208
|
response = self.execute('DELETE', path=
|
207
209
|
f'/cost_views/{uuid}/users/{name}', **kwargs)
|
208
210
|
return response
|
211
|
+
|
212
|
+
def cost_views_assign_resources_create(self, uuid: str,
|
213
|
+
kwargs: dict = None, **params) -> list:
|
214
|
+
"""Set Resources From Node By Criteria
|
215
|
+
|
216
|
+
Args:
|
217
|
+
uuid (str, required): uuid
|
218
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
219
|
+
**params: additional parameters for the API.
|
220
|
+
|
221
|
+
Keyword Args:
|
222
|
+
date_start (string required): additional filter - parameter
|
223
|
+
date_end (string required): additional filter - parameter
|
224
|
+
|
225
|
+
Returns: list"""
|
226
|
+
if kwargs is None:
|
227
|
+
kwargs = dict()
|
228
|
+
official_params_list = ['date_start', 'date_end']
|
229
|
+
params.get('date_start'), params.get('date_end')
|
230
|
+
if not self._silence_warning:
|
231
|
+
warning_wrong_parameters(self.
|
232
|
+
cost_views_assign_resources_create.__name__, params,
|
233
|
+
official_params_list)
|
234
|
+
response = self.execute('POST', path=
|
235
|
+
f'/cost_views/{uuid}/assign_resources', params=params, **kwargs)
|
236
|
+
return response
|
@@ -748,6 +748,8 @@ class Customers(ApiManager):
|
|
748
748
|
**params: additional parameters for the API.
|
749
749
|
|
750
750
|
Keyword Args:
|
751
|
+
not_in (boolean optional): additional filter - parameter
|
752
|
+
name (string optional): additional filter - parameter
|
751
753
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
752
754
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
753
755
|
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
|
@@ -757,9 +759,11 @@ class Customers(ApiManager):
|
|
757
759
|
Returns: list"""
|
758
760
|
if kwargs is None:
|
759
761
|
kwargs = dict()
|
760
|
-
official_params_list = ['
|
761
|
-
|
762
|
-
|
762
|
+
official_params_list = ['not_in', 'name', 'skip', 'limit', 'like',
|
763
|
+
'join', 'count']
|
764
|
+
params.get('not_in'), params.get('name'), params.get('skip'
|
765
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
766
|
+
), params.get('count')
|
763
767
|
if not self._silence_warning:
|
764
768
|
warning_wrong_parameters(self.customers_dashboards.__name__,
|
765
769
|
params, official_params_list)
|
@@ -1204,17 +1208,15 @@ class Customers(ApiManager):
|
|
1204
1208
|
kwargs)
|
1205
1209
|
return response
|
1206
1210
|
|
1207
|
-
def customers_aws_v2_subscription_create(self,
|
1208
|
-
|
1211
|
+
def customers_aws_v2_subscription_create(self, kwargs: dict = None, **
|
1212
|
+
payload) -> list:
|
1209
1213
|
"""Create Aws Customer Sub
|
1210
1214
|
|
1211
1215
|
Args:
|
1212
|
-
params (dict, optional): additional parameters for the API.
|
1213
1216
|
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1214
1217
|
**payload: additional parameters for the API.
|
1215
1218
|
|
1216
1219
|
Keyword Args:
|
1217
|
-
extract_resource_id (boolean optional): additional filter - parameter
|
1218
1220
|
customer (None required): additional filter - payload
|
1219
1221
|
aws_customer (None required): additional filter - payload
|
1220
1222
|
|
@@ -1228,22 +1230,19 @@ class Customers(ApiManager):
|
|
1228
1230
|
customers_aws_v2_subscription_create.__name__, payload,
|
1229
1231
|
official_payload_list)
|
1230
1232
|
response = self.execute('POST', path=
|
1231
|
-
f'/customers/aws/v2/subscription/',
|
1232
|
-
payload, **kwargs)
|
1233
|
+
f'/customers/aws/v2/subscription/', payload=payload, **kwargs)
|
1233
1234
|
return response
|
1234
1235
|
|
1235
1236
|
def customers_aws_v2_subscription_create_uuid(self, uuid: str,
|
1236
|
-
|
1237
|
+
kwargs: dict = None, **payload) -> list:
|
1237
1238
|
"""Create Aws Customer From V2 Sub
|
1238
1239
|
|
1239
1240
|
Args:
|
1240
|
-
params (dict, optional): additional parameters for the API.
|
1241
1241
|
uuid (str, required): uuid
|
1242
1242
|
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1243
1243
|
**payload: additional parameters for the API.
|
1244
1244
|
|
1245
1245
|
Keyword Args:
|
1246
|
-
extract_resource_id (boolean optional): additional filter - parameter
|
1247
1246
|
target_company (string required): additional filter - payload
|
1248
1247
|
target_code (string required): additional filter - payload
|
1249
1248
|
address (string optional): additional filter - payload
|
@@ -1275,8 +1274,8 @@ class Customers(ApiManager):
|
|
1275
1274
|
customers_aws_v2_subscription_create.__name__, payload,
|
1276
1275
|
official_payload_list)
|
1277
1276
|
response = self.execute('POST', path=
|
1278
|
-
f'/customers/aws/v2/subscription/{uuid}',
|
1279
|
-
|
1277
|
+
f'/customers/aws/v2/subscription/{uuid}', payload=payload, **kwargs
|
1278
|
+
)
|
1280
1279
|
return response
|
1281
1280
|
|
1282
1281
|
def customers_networks(self, uuid_customer: str,
|
@@ -404,6 +404,8 @@ class Dashboards(ApiManager):
|
|
404
404
|
**params: additional parameters for the API.
|
405
405
|
|
406
406
|
Keyword Args:
|
407
|
+
not_in (boolean optional): additional filter - parameter
|
408
|
+
company_name (string optional): additional filter - parameter
|
407
409
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
408
410
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
409
411
|
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
|
@@ -413,9 +415,11 @@ class Dashboards(ApiManager):
|
|
413
415
|
Returns: list"""
|
414
416
|
if kwargs is None:
|
415
417
|
kwargs = dict()
|
416
|
-
official_params_list = ['
|
417
|
-
|
418
|
-
|
418
|
+
official_params_list = ['not_in', 'company_name', 'skip', 'limit',
|
419
|
+
'like', 'join', 'count']
|
420
|
+
params.get('not_in'), params.get('company_name'), params.get('skip'
|
421
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
422
|
+
), params.get('count')
|
419
423
|
if not self._silence_warning:
|
420
424
|
warning_wrong_parameters(self.dashboards_customers.__name__,
|
421
425
|
params, official_params_list)
|
@@ -145,21 +145,20 @@ class Login(ApiManager):
|
|
145
145
|
|
146
146
|
Keyword Args:
|
147
147
|
phone (string optional): additional filter - payload
|
148
|
-
verified_email (boolean optional): additional filter - payload
|
149
148
|
profile (string optional): additional filter - payload
|
150
|
-
password (string optional): additional filter - payload
|
151
149
|
email (string optional): additional filter - payload
|
152
150
|
stage (string optional): additional filter - payload
|
151
|
+
password (string optional): additional filter - payload
|
153
152
|
active (boolean optional): additional filter - payload
|
154
153
|
|
155
154
|
Returns: list"""
|
156
155
|
if kwargs is None:
|
157
156
|
kwargs = dict()
|
158
|
-
official_payload_list = ['phone', '
|
159
|
-
'password', '
|
160
|
-
payload.get('phone'), payload.get('
|
161
|
-
'
|
162
|
-
|
157
|
+
official_payload_list = ['phone', 'profile', 'email', 'stage',
|
158
|
+
'password', 'active']
|
159
|
+
payload.get('phone'), payload.get('profile'), payload.get('email'
|
160
|
+
), payload.get('stage'), payload.get('password'), payload.get(
|
161
|
+
'active')
|
163
162
|
if not self._silence_warning:
|
164
163
|
warning_wrong_parameters(self.login_current_user_put.__name__,
|
165
164
|
payload, official_payload_list)
|
@@ -444,3 +443,41 @@ class Login(ApiManager):
|
|
444
443
|
f'/login/current_user/terms_and_conditions', payload=payload,
|
445
444
|
**kwargs)
|
446
445
|
return response
|
446
|
+
|
447
|
+
def login_current_user_verify_email_put(self, kwargs: dict = None, **params
|
448
|
+
) -> list:
|
449
|
+
"""Verify Current User Email
|
450
|
+
|
451
|
+
Args:
|
452
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
453
|
+
**params: additional parameters for the API.
|
454
|
+
|
455
|
+
Keyword Args:
|
456
|
+
verification_code (string required): additional filter - parameter
|
457
|
+
|
458
|
+
Returns: list"""
|
459
|
+
if kwargs is None:
|
460
|
+
kwargs = dict()
|
461
|
+
official_params_list = ['verification_code']
|
462
|
+
params.get('verification_code')
|
463
|
+
if not self._silence_warning:
|
464
|
+
warning_wrong_parameters(self.
|
465
|
+
login_current_user_verify_email_put.__name__, params,
|
466
|
+
official_params_list)
|
467
|
+
response = self.execute('PUT', path=
|
468
|
+
f'/login/current_user/verify_email', params=params, **kwargs)
|
469
|
+
return response
|
470
|
+
|
471
|
+
def login_current_user_verify_email_create(self, kwargs: dict = None
|
472
|
+
) -> list:
|
473
|
+
"""Send Request To Verify Current User Email
|
474
|
+
|
475
|
+
Args:
|
476
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
477
|
+
|
478
|
+
Returns: list"""
|
479
|
+
if kwargs is None:
|
480
|
+
kwargs = dict()
|
481
|
+
response = self.execute('POST', path=
|
482
|
+
f'/login/current_user/verify_email', **kwargs)
|
483
|
+
return response
|
@@ -133,17 +133,19 @@ class Probes(ApiManager):
|
|
133
133
|
notes (string optional): additional filter - payload
|
134
134
|
status (string optional): additional filter - payload
|
135
135
|
last_seen (string optional): additional filter - payload
|
136
|
+
ingest_frequency (number optional): additional filter - payload
|
136
137
|
|
137
138
|
Returns: list"""
|
138
139
|
if kwargs is None:
|
139
140
|
kwargs = dict()
|
140
141
|
official_payload_list = ['uuid_virtual_domain', 'uuid_probe_type',
|
141
142
|
'uuid_host', 'name', 'description', 'data_profile', 'notes',
|
142
|
-
'status', 'last_seen']
|
143
|
+
'status', 'last_seen', 'ingest_frequency']
|
143
144
|
payload.get('uuid_virtual_domain'), payload.get('uuid_probe_type'
|
144
145
|
), payload.get('uuid_host'), payload.get('name'), payload.get(
|
145
146
|
'description'), payload.get('data_profile'), payload.get('notes'
|
146
|
-
), payload.get('status'), payload.get('last_seen')
|
147
|
+
), payload.get('status'), payload.get('last_seen'), payload.get(
|
148
|
+
'ingest_frequency')
|
147
149
|
if not self._silence_warning:
|
148
150
|
warning_wrong_parameters(self.probes_put.__name__, payload,
|
149
151
|
official_payload_list)
|
@@ -175,24 +177,24 @@ class Probes(ApiManager):
|
|
175
177
|
|
176
178
|
Keyword Args:
|
177
179
|
phone (string optional): additional filter - payload
|
178
|
-
verified_email (boolean optional): additional filter - payload
|
179
180
|
profile (string optional): additional filter - payload
|
180
|
-
password (string optional): additional filter - payload
|
181
181
|
email (string optional): additional filter - payload
|
182
182
|
stage (string optional): additional filter - payload
|
183
|
+
password (string optional): additional filter - payload
|
183
184
|
active (boolean optional): additional filter - payload
|
184
185
|
acl (object optional): additional filter - payload
|
185
186
|
uuid_acl_override (string optional): additional filter - payload
|
187
|
+
verified_email (boolean optional): additional filter - payload
|
186
188
|
|
187
189
|
Returns: list"""
|
188
190
|
if kwargs is None:
|
189
191
|
kwargs = dict()
|
190
|
-
official_payload_list = ['phone', '
|
191
|
-
'password', '
|
192
|
-
payload.get('phone'), payload.get('
|
193
|
-
'
|
194
|
-
|
195
|
-
), payload.get('
|
192
|
+
official_payload_list = ['phone', 'profile', 'email', 'stage',
|
193
|
+
'password', 'active', 'acl', 'uuid_acl_override', 'verified_email']
|
194
|
+
payload.get('phone'), payload.get('profile'), payload.get('email'
|
195
|
+
), payload.get('stage'), payload.get('password'), payload.get(
|
196
|
+
'active'), payload.get('acl'), payload.get('uuid_acl_override'
|
197
|
+
), payload.get('verified_email')
|
196
198
|
if not self._silence_warning:
|
197
199
|
warning_wrong_parameters(self.probes_agent_put.__name__,
|
198
200
|
payload, official_payload_list)
|
@@ -0,0 +1,99 @@
|
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
|
+
|
3
|
+
|
4
|
+
class TsAutomataState(ApiManager):
|
5
|
+
"""Class that handles all the XAutomata ts_automata_state APIs"""
|
6
|
+
|
7
|
+
def ts_automata_state(self, warm_start: bool = False,
|
8
|
+
single_page: bool = False, page_size: int = 5000,
|
9
|
+
kwargs: dict = None, **params) -> list:
|
10
|
+
"""Read Automaton States
|
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
|
+
timestamp_start (string optional): additional filter - parameter
|
22
|
+
timestamp_end (string optional): additional filter - parameter
|
23
|
+
ingest_timestamp_start (string optional): additional filter - parameter
|
24
|
+
ingest_timestamp_end (string optional): additional filter - parameter
|
25
|
+
database_timestamp_start (string optional): additional filter - parameter
|
26
|
+
database_timestamp_end (string optional): additional filter - parameter
|
27
|
+
group_label (string optional): additional filter - parameter
|
28
|
+
xal_name (string optional): additional filter - parameter
|
29
|
+
automata_name (string optional): additional filter - parameter
|
30
|
+
automata_version (string optional): additional filter - parameter
|
31
|
+
current_state (string optional): additional filter - parameter
|
32
|
+
null_fields (string optional): additional filter - parameter
|
33
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
34
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
35
|
+
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
|
36
|
+
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
|
37
|
+
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
|
38
|
+
|
39
|
+
Returns: list"""
|
40
|
+
if kwargs is None:
|
41
|
+
kwargs = dict()
|
42
|
+
official_params_list = ['sort_by', 'timestamp_start',
|
43
|
+
'timestamp_end', 'ingest_timestamp_start',
|
44
|
+
'ingest_timestamp_end', 'database_timestamp_start',
|
45
|
+
'database_timestamp_end', 'group_label', 'xal_name',
|
46
|
+
'automata_name', 'automata_version', 'current_state',
|
47
|
+
'null_fields', 'skip', 'limit', 'like', 'join', 'count']
|
48
|
+
params.get('sort_by'), params.get('timestamp_start'), params.get(
|
49
|
+
'timestamp_end'), params.get('ingest_timestamp_start'), params.get(
|
50
|
+
'ingest_timestamp_end'), params.get('database_timestamp_start'
|
51
|
+
), params.get('database_timestamp_end'), params.get('group_label'
|
52
|
+
), params.get('xal_name'), params.get('automata_name'), params.get(
|
53
|
+
'automata_version'), params.get('current_state'), params.get(
|
54
|
+
'null_fields'), params.get('skip'), params.get('limit'
|
55
|
+
), params.get('like'), params.get('join'), params.get('count')
|
56
|
+
if not self._silence_warning:
|
57
|
+
warning_wrong_parameters(self.ts_automata_state.__name__,
|
58
|
+
params, official_params_list)
|
59
|
+
response = self.execute('GET', path=f'/ts_automata_state/',
|
60
|
+
single_page=single_page, page_size=page_size, warm_start=
|
61
|
+
warm_start, params=params, **kwargs)
|
62
|
+
return response
|
63
|
+
|
64
|
+
def ts_automata_state_bulk(self, payload: list,
|
65
|
+
warm_start: bool = False, single_page: bool = False,
|
66
|
+
page_size: int = 50, kwargs: dict = None, **params) -> list:
|
67
|
+
"""Bulk Read Automaton States
|
68
|
+
|
69
|
+
Args:
|
70
|
+
payload (list[dict], optional): List dict to create.
|
71
|
+
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.
|
72
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
73
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
74
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
75
|
+
**params: additional parameters for the API.
|
76
|
+
|
77
|
+
Keyword Args:
|
78
|
+
ts_start (string required): additional filter - parameter
|
79
|
+
ts_end (string required): additional filter - parameter
|
80
|
+
|
81
|
+
Examples:
|
82
|
+
payload =
|
83
|
+
[
|
84
|
+
"uuid": "str", required
|
85
|
+
]
|
86
|
+
|
87
|
+
Returns: list"""
|
88
|
+
if kwargs is None:
|
89
|
+
kwargs = dict()
|
90
|
+
official_params_list = ['ts_start', 'ts_end']
|
91
|
+
params.get('ts_start'), params.get('ts_end')
|
92
|
+
if not self._silence_warning:
|
93
|
+
warning_wrong_parameters(self.ts_automata_state_bulk.__name__,
|
94
|
+
params, official_params_list)
|
95
|
+
response = self.execute('POST', path=
|
96
|
+
f'/ts_automata_state/bulk/read/', single_page=single_page,
|
97
|
+
page_size=page_size, warm_start=warm_start, params=params,
|
98
|
+
payload=payload, **kwargs)
|
99
|
+
return response
|
@@ -65,7 +65,7 @@ class TsMetricStatus(ApiManager):
|
|
65
65
|
def ts_metric_status_bulk(self, payload: list, warm_start: bool = False,
|
66
66
|
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
67
67
|
**params) -> list:
|
68
|
-
"""Read Status Metrics
|
68
|
+
"""Bulk Read Status Metrics
|
69
69
|
|
70
70
|
Args:
|
71
71
|
payload (list[dict], optional): List dict to create.
|
@@ -254,7 +254,7 @@ class TsServiceValue(ApiManager):
|
|
254
254
|
if not self._silence_warning:
|
255
255
|
warning_wrong_parameters(self.ts_service_value_delete_bulk.
|
256
256
|
__name__, params, official_params_list)
|
257
|
-
response = self.execute('
|
257
|
+
response = self.execute('POST', path=
|
258
258
|
f'/ts_service_value/bulk/delete/', single_page=single_page,
|
259
259
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
260
260
|
return response
|
@@ -164,23 +164,23 @@ class Users(ApiManager):
|
|
164
164
|
|
165
165
|
Keyword Args:
|
166
166
|
phone (string optional): additional filter - payload
|
167
|
-
verified_email (boolean optional): additional filter - payload
|
168
167
|
profile (string optional): additional filter - payload
|
169
168
|
name (string required): additional filter - payload
|
170
169
|
email (string required): additional filter - payload
|
171
170
|
active (boolean required): additional filter - payload
|
172
171
|
acl (object required): additional filter - payload
|
173
172
|
uuid_acl_override (string optional): additional filter - payload
|
173
|
+
verified_email (boolean optional): additional filter - payload
|
174
174
|
password (string required): additional filter - payload
|
175
175
|
|
176
176
|
Returns: list"""
|
177
177
|
if kwargs is None:
|
178
178
|
kwargs = dict()
|
179
|
-
official_payload_list = ['phone', '
|
180
|
-
'
|
181
|
-
payload.get('phone'), payload.get('
|
182
|
-
|
183
|
-
|
179
|
+
official_payload_list = ['phone', 'profile', 'name', 'email',
|
180
|
+
'active', 'acl', 'uuid_acl_override', 'verified_email', 'password']
|
181
|
+
payload.get('phone'), payload.get('profile'), payload.get('name'
|
182
|
+
), payload.get('email'), payload.get('active'), payload.get('acl'
|
183
|
+
), payload.get('uuid_acl_override'), payload.get('verified_email'
|
184
184
|
), payload.get('password')
|
185
185
|
if not self._silence_warning:
|
186
186
|
warning_wrong_parameters(self.users_create.__name__, payload,
|
@@ -202,22 +202,22 @@ class Users(ApiManager):
|
|
202
202
|
Keyword Args:
|
203
203
|
send_mail (boolean optional): additional filter - parameter
|
204
204
|
phone (string optional): additional filter - payload
|
205
|
-
verified_email (boolean optional): additional filter - payload
|
206
205
|
profile (string optional): additional filter - payload
|
207
206
|
name (string required): additional filter - payload
|
208
207
|
email (string required): additional filter - payload
|
209
208
|
active (boolean required): additional filter - payload
|
210
209
|
acl (object required): additional filter - payload
|
211
210
|
uuid_acl_override (string optional): additional filter - payload
|
211
|
+
verified_email (boolean optional): additional filter - payload
|
212
212
|
|
213
213
|
Returns: list"""
|
214
214
|
if kwargs is None:
|
215
215
|
kwargs = dict()
|
216
|
-
official_payload_list = ['phone', '
|
217
|
-
'
|
218
|
-
payload.get('phone'), payload.get('
|
219
|
-
|
220
|
-
|
216
|
+
official_payload_list = ['phone', 'profile', 'name', 'email',
|
217
|
+
'active', 'acl', 'uuid_acl_override', 'verified_email']
|
218
|
+
payload.get('phone'), payload.get('profile'), payload.get('name'
|
219
|
+
), payload.get('email'), payload.get('active'), payload.get('acl'
|
220
|
+
), payload.get('uuid_acl_override'), payload.get('verified_email')
|
221
221
|
if not self._silence_warning:
|
222
222
|
warning_wrong_parameters(self.users_create.__name__, payload,
|
223
223
|
official_payload_list)
|
@@ -251,24 +251,24 @@ class Users(ApiManager):
|
|
251
251
|
|
252
252
|
Keyword Args:
|
253
253
|
phone (string optional): additional filter - payload
|
254
|
-
verified_email (boolean optional): additional filter - payload
|
255
254
|
profile (string optional): additional filter - payload
|
256
|
-
password (string optional): additional filter - payload
|
257
255
|
email (string optional): additional filter - payload
|
258
256
|
stage (string optional): additional filter - payload
|
257
|
+
password (string optional): additional filter - payload
|
259
258
|
active (boolean optional): additional filter - payload
|
260
259
|
acl (object optional): additional filter - payload
|
261
260
|
uuid_acl_override (string optional): additional filter - payload
|
261
|
+
verified_email (boolean optional): additional filter - payload
|
262
262
|
|
263
263
|
Returns: list"""
|
264
264
|
if kwargs is None:
|
265
265
|
kwargs = dict()
|
266
|
-
official_payload_list = ['phone', '
|
267
|
-
'password', '
|
268
|
-
payload.get('phone'), payload.get('
|
269
|
-
'
|
270
|
-
|
271
|
-
), payload.get('
|
266
|
+
official_payload_list = ['phone', 'profile', 'email', 'stage',
|
267
|
+
'password', 'active', 'acl', 'uuid_acl_override', 'verified_email']
|
268
|
+
payload.get('phone'), payload.get('profile'), payload.get('email'
|
269
|
+
), payload.get('stage'), payload.get('password'), payload.get(
|
270
|
+
'active'), payload.get('acl'), payload.get('uuid_acl_override'
|
271
|
+
), payload.get('verified_email')
|
272
272
|
if not self._silence_warning:
|
273
273
|
warning_wrong_parameters(self.users_put.__name__, payload,
|
274
274
|
official_payload_list)
|
@@ -0,0 +1 @@
|
|
1
|
+
version = '3.19.1'
|
@@ -15,9 +15,9 @@ with open("hive/version.py", "r") as f:
|
|
15
15
|
version = version[0].split("'")[1]
|
16
16
|
|
17
17
|
# version go
|
18
|
+
requests = 'requests==2.31.0'
|
18
19
|
tqdm = 'tqdm==4.64.1'
|
19
20
|
urllib3 = 'urllib3==2.0.4'
|
20
|
-
requests = 'requests==2.31.0'
|
21
21
|
# version end
|
22
22
|
|
23
23
|
setup(
|
@@ -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=[tqdm, urllib3
|
35
|
+
install_requires=[requests, tqdm, urllib3],
|
36
36
|
)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: xautomata-hive
|
3
|
-
Version: 3.
|
3
|
+
Version: 3.19.1
|
4
4
|
Home-page: https://github.com/sherlogic/xautomata-hive.git
|
5
5
|
Author: Enrico Ferro - Andrea Jacassi
|
6
6
|
Author-email:
|
@@ -8,9 +8,9 @@ License: MIT
|
|
8
8
|
Requires-Python: >=3.8.0
|
9
9
|
Description-Content-Type: text/markdown
|
10
10
|
License-File: LICENSE
|
11
|
+
Requires-Dist: requests==2.31.0
|
11
12
|
Requires-Dist: tqdm==4.64.1
|
12
13
|
Requires-Dist: urllib3==2.0.4
|
13
|
-
Requires-Dist: requests==2.31.0
|
14
14
|
|
15
15
|
# Xautomata API
|
16
16
|
Pacchetto che fornisca una interfaccia semplice per usare le API di Xautomata in python
|
@@ -13,6 +13,7 @@ hive/cookbook/acl_docs.py
|
|
13
13
|
hive/cookbook/acl_overrides.py
|
14
14
|
hive/cookbook/analytics.py
|
15
15
|
hive/cookbook/anomalies.py
|
16
|
+
hive/cookbook/automata_ingest.py
|
16
17
|
hive/cookbook/calendars.py
|
17
18
|
hive/cookbook/contacts.py
|
18
19
|
hive/cookbook/cost_tagging.py
|
@@ -52,6 +53,7 @@ hive/cookbook/services.py
|
|
52
53
|
hive/cookbook/sites.py
|
53
54
|
hive/cookbook/terms_and_conditions.py
|
54
55
|
hive/cookbook/tree_hierarchy.py
|
56
|
+
hive/cookbook/ts_automata_state.py
|
55
57
|
hive/cookbook/ts_cost_azure_raw.py
|
56
58
|
hive/cookbook/ts_cost_management.py
|
57
59
|
hive/cookbook/ts_metric_status.py
|
@@ -1 +0,0 @@
|
|
1
|
-
version = '3.18.2'
|
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
|
@@ -18,29 +18,29 @@ class MetricIngest(ApiManager):
|
|
18
18
|
payload =
|
19
19
|
[
|
20
20
|
{
|
21
|
+
"extended_attributes_0": "string", optional
|
21
22
|
"uuid_metric_0": "string", required
|
22
23
|
"uuid_probe_0": "string", required
|
23
24
|
"timestamp_0": "integer", required
|
24
25
|
"object_type_0": "None", optional
|
25
|
-
"extended_attributes_0": "string", optional
|
26
26
|
"value_0": "string", required
|
27
27
|
"unit_0": "string", required
|
28
28
|
"description_0": "string", required
|
29
29
|
"status_0": "None", required
|
30
30
|
"ranking_0": "integer", required
|
31
|
+
"extended_attributes_1": "string", optional
|
31
32
|
"uuid_metric_1": "string", required
|
32
33
|
"uuid_probe_1": "string", required
|
33
34
|
"timestamp_1": "integer", required
|
34
35
|
"object_type_1": "None", optional
|
35
|
-
"extended_attributes_1": "string", optional
|
36
36
|
"status_1": "None", required
|
37
37
|
"ranking_1": "integer", required
|
38
38
|
"description_1": "string", required
|
39
|
+
"extended_attributes_2": "string", required
|
39
40
|
"uuid_metric_2": "string", required
|
40
41
|
"uuid_probe_2": "string", required
|
41
42
|
"timestamp_2": "integer", required
|
42
43
|
"object_type_2": "None", optional
|
43
|
-
"extended_attributes_2": "string", required
|
44
44
|
"description_2": "string", optional
|
45
45
|
"uuid_metric_3": "string", required
|
46
46
|
"uuid_probe_3": "string", required
|
File without changes
|
File without changes
|
File without changes
|
{xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/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
|
File without changes
|
{xautomata_hive-3.18.2 → xautomata_hive-3.19.1}/xautomata_hive.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|