xautomata-hive 3.22.0__py3-none-any.whl → 3.22.2__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 +2 -1
- hive/cookbook/acl_overrides.py +7 -3
- hive/cookbook/apple.py +32 -0
- hive/cookbook/cost_tags.py +2 -2
- hive/cookbook/dashboards.py +6 -6
- hive/cookbook/dispatchers.py +399 -0
- hive/cookbook/groups.py +14 -9
- hive/cookbook/login.py +36 -0
- hive/cookbook/metric_types.py +8 -5
- hive/cookbook/metrics.py +459 -4
- hive/cookbook/objects.py +13 -8
- hive/cookbook/qr_code.py +19 -0
- hive/cookbook/services.py +208 -0
- hive/cookbook/sites.py +7 -4
- hive/cookbook/widgets.py +6 -6
- hive/version.py +1 -1
- {xautomata_hive-3.22.0.dist-info → xautomata_hive-3.22.2.dist-info}/METADATA +4 -3
- {xautomata_hive-3.22.0.dist-info → xautomata_hive-3.22.2.dist-info}/RECORD +21 -19
- {xautomata_hive-3.22.0.dist-info → xautomata_hive-3.22.2.dist-info}/WHEEL +1 -1
- {xautomata_hive-3.22.0.dist-info → xautomata_hive-3.22.2.dist-info/licenses}/LICENSE +0 -0
- {xautomata_hive-3.22.0.dist-info → xautomata_hive-3.22.2.dist-info}/top_level.txt +0 -0
hive/api.py
CHANGED
@@ -503,6 +503,7 @@ from hive.cookbook.automata_ingest import AutomataIngest
|
|
503
503
|
from hive.cookbook.metric_ingest import MetricIngest
|
504
504
|
from hive.cookbook.microsoft import Microsoft
|
505
505
|
from hive.cookbook.google import Google
|
506
|
+
from hive.cookbook.apple import Apple
|
506
507
|
from hive.cookbook.login import Login
|
507
508
|
from hive.cookbook.qr_code import QrCode
|
508
509
|
from hive.cookbook.jobs import Jobs
|
@@ -544,7 +545,7 @@ from hive.cookbook.widget_groups import WidgetGroups
|
|
544
545
|
# hive imports stop
|
545
546
|
|
546
547
|
|
547
|
-
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, CostTagging, CostTags, CostViews, CostTreeNodes, CostTreeResources, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, Features, Files, FirmwareUpdates, Groups, AutomataIngest, MetricIngest, Microsoft, Google, Login, QrCode, Jobs, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, Questions, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, LastObjectStatus, TermsAndConditions, TreeHierarchy, TsAutomataState, TsCostAzureRaw, TsCostManagement, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
548
|
+
class XautomataApi(AclDocs, AclOverrides, Analytics, Anomalies, Calendars, CostTagging, CostTags, CostViews, CostTreeNodes, CostTreeResources, Contacts, Customers, Dashboards, Dispatchers, Downtimes, ExternalTickets, Features, Files, FirmwareUpdates, Groups, AutomataIngest, MetricIngest, Microsoft, Google, Apple, Login, QrCode, Jobs, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, Questions, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, LastObjectStatus, TermsAndConditions, TreeHierarchy, TsAutomataState, TsCostAzureRaw, TsCostManagement, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
548
549
|
"""
|
549
550
|
Class with each specific API, based on the ApiManager Class created for a more general interaction with Xautomata API
|
550
551
|
"""
|
hive/cookbook/acl_overrides.py
CHANGED
@@ -136,6 +136,8 @@ class AclOverrides(ApiManager):
|
|
136
136
|
**params: additional parameters for the API.
|
137
137
|
|
138
138
|
Keyword Args:
|
139
|
+
not_in (boolean optional): additional filter - parameter
|
140
|
+
name (string optional): additional filter - parameter
|
139
141
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
140
142
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
141
143
|
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
|
@@ -145,9 +147,11 @@ class AclOverrides(ApiManager):
|
|
145
147
|
Returns: list"""
|
146
148
|
if kwargs is None:
|
147
149
|
kwargs = dict()
|
148
|
-
official_params_list = ['
|
149
|
-
|
150
|
-
|
150
|
+
official_params_list = ['not_in', 'name', 'skip', 'limit', 'like',
|
151
|
+
'join', 'count']
|
152
|
+
params.get('not_in'), params.get('name'), params.get('skip'
|
153
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
154
|
+
), params.get('count')
|
151
155
|
if not self._silence_warning:
|
152
156
|
warning_wrong_parameters(self.acl_overrides_users.__name__,
|
153
157
|
params, official_params_list)
|
hive/cookbook/apple.py
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
|
+
|
3
|
+
|
4
|
+
class Apple(ApiManager):
|
5
|
+
"""Class that handles all the XAutomata apple APIs"""
|
6
|
+
|
7
|
+
def apple_login(self, warm_start: bool = False, kwargs: dict = None
|
8
|
+
) -> list:
|
9
|
+
"""Apple Login
|
10
|
+
|
11
|
+
Args:
|
12
|
+
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.
|
13
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
14
|
+
|
15
|
+
Returns: list"""
|
16
|
+
if kwargs is None:
|
17
|
+
kwargs = dict()
|
18
|
+
response = self.execute('GET', path=f'/apple/login', warm_start=
|
19
|
+
warm_start, **kwargs)
|
20
|
+
return response
|
21
|
+
|
22
|
+
def apple_callback_create(self, kwargs: dict = None) -> list:
|
23
|
+
"""Apple Callback
|
24
|
+
|
25
|
+
Args:
|
26
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
27
|
+
|
28
|
+
Returns: list"""
|
29
|
+
if kwargs is None:
|
30
|
+
kwargs = dict()
|
31
|
+
response = self.execute('POST', path=f'/apple/callback', **kwargs)
|
32
|
+
return response
|
hive/cookbook/cost_tags.py
CHANGED
@@ -98,9 +98,9 @@ class CostTags(ApiManager):
|
|
98
98
|
payload =
|
99
99
|
{
|
100
100
|
"uuid_view": "string", required
|
101
|
-
"select_operation": "None",
|
101
|
+
"select_operation": "None", optional
|
102
102
|
"selected_tags": "array", optional
|
103
|
-
"unselect_operation": "None",
|
103
|
+
"unselect_operation": "None", optional
|
104
104
|
"unselected_tags": "array", optional
|
105
105
|
}
|
106
106
|
|
hive/cookbook/dashboards.py
CHANGED
@@ -320,9 +320,9 @@ class Dashboards(ApiManager):
|
|
320
320
|
**payload: additional parameters for the API.
|
321
321
|
|
322
322
|
Keyword Args:
|
323
|
-
index (integer
|
324
|
-
width (integer
|
325
|
-
height (integer
|
323
|
+
index (integer optional): additional filter - payload
|
324
|
+
width (integer optional): additional filter - payload
|
325
|
+
height (integer optional): additional filter - payload
|
326
326
|
grid_x (integer optional): additional filter - payload
|
327
327
|
grid_y (integer optional): additional filter - payload
|
328
328
|
settings (array object optional): additional filter - payload
|
@@ -646,9 +646,9 @@ class Dashboards(ApiManager):
|
|
646
646
|
payload =
|
647
647
|
[
|
648
648
|
{
|
649
|
-
"index": "integer",
|
650
|
-
"width": "integer",
|
651
|
-
"height": "integer",
|
649
|
+
"index": "integer", optional
|
650
|
+
"width": "integer", optional
|
651
|
+
"height": "integer", optional
|
652
652
|
"grid_x": "integer", optional
|
653
653
|
"grid_y": "integer", optional
|
654
654
|
"settings": "array object", optional
|
hive/cookbook/dispatchers.py
CHANGED
@@ -836,3 +836,402 @@ class Dispatchers(ApiManager):
|
|
836
836
|
f'/dispatchers/bulk/delete/contacts', single_page=single_page,
|
837
837
|
page_size=page_size, payload=payload, **kwargs)
|
838
838
|
return response
|
839
|
+
|
840
|
+
def dispatchers_groups_bulk(self, payload: list,
|
841
|
+
warm_start: bool = False, single_page: bool = False,
|
842
|
+
page_size: int = 50, kwargs: dict = None, **params) -> list:
|
843
|
+
"""Bulk Read Groups Dispatchers
|
844
|
+
|
845
|
+
Args:
|
846
|
+
payload (list[dict], optional): List dict to create.
|
847
|
+
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.
|
848
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
849
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
850
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
851
|
+
**params: additional parameters for the API.
|
852
|
+
|
853
|
+
Keyword Args:
|
854
|
+
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
|
855
|
+
|
856
|
+
Examples:
|
857
|
+
payload =
|
858
|
+
[
|
859
|
+
"uuid": "str", required
|
860
|
+
]
|
861
|
+
|
862
|
+
Returns: list"""
|
863
|
+
if kwargs is None:
|
864
|
+
kwargs = dict()
|
865
|
+
official_params_list = ['join']
|
866
|
+
params.get('join')
|
867
|
+
if not self._silence_warning:
|
868
|
+
warning_wrong_parameters(self.dispatchers_groups_bulk.__name__,
|
869
|
+
params, official_params_list)
|
870
|
+
response = self.execute('POST', path=
|
871
|
+
f'/dispatchers/bulk/read/groups', single_page=single_page,
|
872
|
+
page_size=page_size, warm_start=warm_start, params=params,
|
873
|
+
payload=payload, **kwargs)
|
874
|
+
return response
|
875
|
+
|
876
|
+
def dispatchers_groups_create_bulk(self, payload: list,
|
877
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
878
|
+
**params) -> list:
|
879
|
+
"""Bulk Link Groups
|
880
|
+
|
881
|
+
Args:
|
882
|
+
payload (list[dict], optional): List dict to create.
|
883
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
884
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
885
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
886
|
+
**params: additional parameters for the API.
|
887
|
+
|
888
|
+
Keyword Args:
|
889
|
+
best_effort (boolean optional): additional filter - parameter
|
890
|
+
|
891
|
+
Examples:
|
892
|
+
payload =
|
893
|
+
[
|
894
|
+
{
|
895
|
+
"uuid_dispatcher": "string", required
|
896
|
+
"uuid_group": "string", required
|
897
|
+
}
|
898
|
+
]
|
899
|
+
|
900
|
+
Returns: list"""
|
901
|
+
if kwargs is None:
|
902
|
+
kwargs = dict()
|
903
|
+
official_params_list = ['best_effort']
|
904
|
+
params.get('best_effort')
|
905
|
+
if not self._silence_warning:
|
906
|
+
warning_wrong_parameters(self.dispatchers_groups_create_bulk.
|
907
|
+
__name__, params, official_params_list)
|
908
|
+
response = self.execute('POST', path=
|
909
|
+
f'/dispatchers/bulk/create/groups', single_page=single_page,
|
910
|
+
page_size=page_size, params=params, payload=payload, **kwargs)
|
911
|
+
return response
|
912
|
+
|
913
|
+
def dispatchers_groups_delete_bulk(self, payload: list,
|
914
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
915
|
+
) -> list:
|
916
|
+
"""Bulk Unlink Groups
|
917
|
+
|
918
|
+
Args:
|
919
|
+
payload (list[dict], optional): List dict to create.
|
920
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
921
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
922
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
923
|
+
|
924
|
+
Examples:
|
925
|
+
payload =
|
926
|
+
[
|
927
|
+
{
|
928
|
+
"uuid_dispatcher": "string", required
|
929
|
+
"uuid_group": "string", required
|
930
|
+
}
|
931
|
+
]
|
932
|
+
|
933
|
+
Returns: list"""
|
934
|
+
if kwargs is None:
|
935
|
+
kwargs = dict()
|
936
|
+
response = self.execute('POST', path=
|
937
|
+
f'/dispatchers/bulk/delete/groups', single_page=single_page,
|
938
|
+
page_size=page_size, payload=payload, **kwargs)
|
939
|
+
return response
|
940
|
+
|
941
|
+
def dispatchers_objects_bulk(self, payload: list,
|
942
|
+
warm_start: bool = False, single_page: bool = False,
|
943
|
+
page_size: int = 50, kwargs: dict = None, **params) -> list:
|
944
|
+
"""Bulk Read Objects Dispatchers
|
945
|
+
|
946
|
+
Args:
|
947
|
+
payload (list[dict], optional): List dict to create.
|
948
|
+
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.
|
949
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
950
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
951
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
952
|
+
**params: additional parameters for the API.
|
953
|
+
|
954
|
+
Keyword Args:
|
955
|
+
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
|
956
|
+
|
957
|
+
Examples:
|
958
|
+
payload =
|
959
|
+
[
|
960
|
+
"uuid": "str", required
|
961
|
+
]
|
962
|
+
|
963
|
+
Returns: list"""
|
964
|
+
if kwargs is None:
|
965
|
+
kwargs = dict()
|
966
|
+
official_params_list = ['join']
|
967
|
+
params.get('join')
|
968
|
+
if not self._silence_warning:
|
969
|
+
warning_wrong_parameters(self.dispatchers_objects_bulk.__name__,
|
970
|
+
params, official_params_list)
|
971
|
+
response = self.execute('POST', path=
|
972
|
+
f'/dispatchers/bulk/read/objects', single_page=single_page,
|
973
|
+
page_size=page_size, warm_start=warm_start, params=params,
|
974
|
+
payload=payload, **kwargs)
|
975
|
+
return response
|
976
|
+
|
977
|
+
def dispatchers_objects_create_bulk(self, payload: list,
|
978
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
979
|
+
**params) -> list:
|
980
|
+
"""Bulk Link Objects
|
981
|
+
|
982
|
+
Args:
|
983
|
+
payload (list[dict], optional): List dict to create.
|
984
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
985
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
986
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
987
|
+
**params: additional parameters for the API.
|
988
|
+
|
989
|
+
Keyword Args:
|
990
|
+
best_effort (boolean optional): additional filter - parameter
|
991
|
+
|
992
|
+
Examples:
|
993
|
+
payload =
|
994
|
+
[
|
995
|
+
{
|
996
|
+
"uuid_dispatcher": "string", required
|
997
|
+
"uuid_object": "string", required
|
998
|
+
}
|
999
|
+
]
|
1000
|
+
|
1001
|
+
Returns: list"""
|
1002
|
+
if kwargs is None:
|
1003
|
+
kwargs = dict()
|
1004
|
+
official_params_list = ['best_effort']
|
1005
|
+
params.get('best_effort')
|
1006
|
+
if not self._silence_warning:
|
1007
|
+
warning_wrong_parameters(self.dispatchers_objects_create_bulk.
|
1008
|
+
__name__, params, official_params_list)
|
1009
|
+
response = self.execute('POST', path=
|
1010
|
+
f'/dispatchers/bulk/create/objects', single_page=single_page,
|
1011
|
+
page_size=page_size, params=params, payload=payload, **kwargs)
|
1012
|
+
return response
|
1013
|
+
|
1014
|
+
def dispatchers_objects_delete_bulk(self, payload: list,
|
1015
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
1016
|
+
) -> list:
|
1017
|
+
"""Bulk Unlink Objects
|
1018
|
+
|
1019
|
+
Args:
|
1020
|
+
payload (list[dict], optional): List dict to create.
|
1021
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1022
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1023
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1024
|
+
|
1025
|
+
Examples:
|
1026
|
+
payload =
|
1027
|
+
[
|
1028
|
+
{
|
1029
|
+
"uuid_dispatcher": "string", required
|
1030
|
+
"uuid_object": "string", required
|
1031
|
+
}
|
1032
|
+
]
|
1033
|
+
|
1034
|
+
Returns: list"""
|
1035
|
+
if kwargs is None:
|
1036
|
+
kwargs = dict()
|
1037
|
+
response = self.execute('POST', path=
|
1038
|
+
f'/dispatchers/bulk/delete/objects', single_page=single_page,
|
1039
|
+
page_size=page_size, payload=payload, **kwargs)
|
1040
|
+
return response
|
1041
|
+
|
1042
|
+
def dispatchers_metric_types_create_bulk(self, payload: list,
|
1043
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
1044
|
+
**params) -> list:
|
1045
|
+
"""Bulk Link Metric Types
|
1046
|
+
|
1047
|
+
Args:
|
1048
|
+
payload (list[dict], optional): List dict to create.
|
1049
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1050
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1051
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1052
|
+
**params: additional parameters for the API.
|
1053
|
+
|
1054
|
+
Keyword Args:
|
1055
|
+
best_effort (boolean optional): additional filter - parameter
|
1056
|
+
|
1057
|
+
Examples:
|
1058
|
+
payload =
|
1059
|
+
[
|
1060
|
+
{
|
1061
|
+
"uuid_dispatcher": "string", required
|
1062
|
+
"uuid_metric_type": "string", required
|
1063
|
+
}
|
1064
|
+
]
|
1065
|
+
|
1066
|
+
Returns: list"""
|
1067
|
+
if kwargs is None:
|
1068
|
+
kwargs = dict()
|
1069
|
+
official_params_list = ['best_effort']
|
1070
|
+
params.get('best_effort')
|
1071
|
+
if not self._silence_warning:
|
1072
|
+
warning_wrong_parameters(self.
|
1073
|
+
dispatchers_metric_types_create_bulk.__name__, params,
|
1074
|
+
official_params_list)
|
1075
|
+
response = self.execute('POST', path=
|
1076
|
+
f'/dispatchers/bulk/create/metric_types', single_page=
|
1077
|
+
single_page, page_size=page_size, params=params, payload=
|
1078
|
+
payload, **kwargs)
|
1079
|
+
return response
|
1080
|
+
|
1081
|
+
def dispatchers_metric_types_delete_bulk(self, payload: list,
|
1082
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
1083
|
+
) -> list:
|
1084
|
+
"""Bulk Unlink Metric Types
|
1085
|
+
|
1086
|
+
Args:
|
1087
|
+
payload (list[dict], optional): List dict to create.
|
1088
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1089
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1090
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1091
|
+
|
1092
|
+
Examples:
|
1093
|
+
payload =
|
1094
|
+
[
|
1095
|
+
{
|
1096
|
+
"uuid_dispatcher": "string", required
|
1097
|
+
"uuid_metric_type": "string", required
|
1098
|
+
}
|
1099
|
+
]
|
1100
|
+
|
1101
|
+
Returns: list"""
|
1102
|
+
if kwargs is None:
|
1103
|
+
kwargs = dict()
|
1104
|
+
response = self.execute('POST', path=
|
1105
|
+
f'/dispatchers/bulk/delete/metric_types', single_page=
|
1106
|
+
single_page, page_size=page_size, payload=payload, **kwargs)
|
1107
|
+
return response
|
1108
|
+
|
1109
|
+
def dispatchers_metrics_create_bulk(self, payload: list,
|
1110
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
1111
|
+
**params) -> list:
|
1112
|
+
"""Bulk Link Metrics
|
1113
|
+
|
1114
|
+
Args:
|
1115
|
+
payload (list[dict], optional): List dict to create.
|
1116
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1117
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1118
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1119
|
+
**params: additional parameters for the API.
|
1120
|
+
|
1121
|
+
Keyword Args:
|
1122
|
+
best_effort (boolean optional): additional filter - parameter
|
1123
|
+
|
1124
|
+
Examples:
|
1125
|
+
payload =
|
1126
|
+
[
|
1127
|
+
{
|
1128
|
+
"uuid_dispatcher": "string", required
|
1129
|
+
"uuid_metric": "string", required
|
1130
|
+
}
|
1131
|
+
]
|
1132
|
+
|
1133
|
+
Returns: list"""
|
1134
|
+
if kwargs is None:
|
1135
|
+
kwargs = dict()
|
1136
|
+
official_params_list = ['best_effort']
|
1137
|
+
params.get('best_effort')
|
1138
|
+
if not self._silence_warning:
|
1139
|
+
warning_wrong_parameters(self.dispatchers_metrics_create_bulk.
|
1140
|
+
__name__, params, official_params_list)
|
1141
|
+
response = self.execute('POST', path=
|
1142
|
+
f'/dispatchers/bulk/create/metrics', single_page=single_page,
|
1143
|
+
page_size=page_size, params=params, payload=payload, **kwargs)
|
1144
|
+
return response
|
1145
|
+
|
1146
|
+
def dispatchers_metrics_delete_bulk(self, payload: list,
|
1147
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
1148
|
+
) -> list:
|
1149
|
+
"""Bulk Unlink Metrics
|
1150
|
+
|
1151
|
+
Args:
|
1152
|
+
payload (list[dict], optional): List dict to create.
|
1153
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1154
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1155
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1156
|
+
|
1157
|
+
Examples:
|
1158
|
+
payload =
|
1159
|
+
[
|
1160
|
+
{
|
1161
|
+
"uuid_dispatcher": "string", required
|
1162
|
+
"uuid_metric": "string", required
|
1163
|
+
}
|
1164
|
+
]
|
1165
|
+
|
1166
|
+
Returns: list"""
|
1167
|
+
if kwargs is None:
|
1168
|
+
kwargs = dict()
|
1169
|
+
response = self.execute('POST', path=
|
1170
|
+
f'/dispatchers/bulk/delete/metrics', single_page=single_page,
|
1171
|
+
page_size=page_size, payload=payload, **kwargs)
|
1172
|
+
return response
|
1173
|
+
|
1174
|
+
def dispatchers_services_create_bulk(self, payload: list,
|
1175
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None,
|
1176
|
+
**params) -> list:
|
1177
|
+
"""Bulk Link Services
|
1178
|
+
|
1179
|
+
Args:
|
1180
|
+
payload (list[dict], optional): List dict to create.
|
1181
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1182
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1183
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1184
|
+
**params: additional parameters for the API.
|
1185
|
+
|
1186
|
+
Keyword Args:
|
1187
|
+
best_effort (boolean optional): additional filter - parameter
|
1188
|
+
|
1189
|
+
Examples:
|
1190
|
+
payload =
|
1191
|
+
[
|
1192
|
+
{
|
1193
|
+
"uuid_dispatcher": "string", required
|
1194
|
+
"uuid_service": "string", required
|
1195
|
+
}
|
1196
|
+
]
|
1197
|
+
|
1198
|
+
Returns: list"""
|
1199
|
+
if kwargs is None:
|
1200
|
+
kwargs = dict()
|
1201
|
+
official_params_list = ['best_effort']
|
1202
|
+
params.get('best_effort')
|
1203
|
+
if not self._silence_warning:
|
1204
|
+
warning_wrong_parameters(self.dispatchers_services_create_bulk.
|
1205
|
+
__name__, params, official_params_list)
|
1206
|
+
response = self.execute('POST', path=
|
1207
|
+
f'/dispatchers/bulk/create/services', single_page=single_page,
|
1208
|
+
page_size=page_size, params=params, payload=payload, **kwargs)
|
1209
|
+
return response
|
1210
|
+
|
1211
|
+
def dispatchers_services_delete_bulk(self, payload: list,
|
1212
|
+
single_page: bool = False, page_size: int = 50, kwargs: dict = None
|
1213
|
+
) -> list:
|
1214
|
+
"""Bulk Unlink Services
|
1215
|
+
|
1216
|
+
Args:
|
1217
|
+
payload (list[dict], optional): List dict to create.
|
1218
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
1219
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 50.
|
1220
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
1221
|
+
|
1222
|
+
Examples:
|
1223
|
+
payload =
|
1224
|
+
[
|
1225
|
+
{
|
1226
|
+
"uuid_dispatcher": "string", required
|
1227
|
+
"uuid_service": "string", required
|
1228
|
+
}
|
1229
|
+
]
|
1230
|
+
|
1231
|
+
Returns: list"""
|
1232
|
+
if kwargs is None:
|
1233
|
+
kwargs = dict()
|
1234
|
+
response = self.execute('POST', path=
|
1235
|
+
f'/dispatchers/bulk/delete/services', single_page=single_page,
|
1236
|
+
page_size=page_size, payload=payload, **kwargs)
|
1237
|
+
return response
|
hive/cookbook/groups.py
CHANGED
@@ -26,6 +26,8 @@ class Groups(ApiManager):
|
|
26
26
|
description (string optional): additional filter - parameter
|
27
27
|
status (string optional): additional filter - parameter
|
28
28
|
extract_severity (boolean optional): Se True nella risposta e' anche presente la severita, Default to False. - parameter
|
29
|
+
count_children (boolean optional): additional filter - parameter
|
30
|
+
severity (None optional): additional filter - parameter
|
29
31
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
30
32
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
31
33
|
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
|
@@ -37,14 +39,15 @@ class Groups(ApiManager):
|
|
37
39
|
kwargs = dict()
|
38
40
|
official_params_list = ['sort_by', 'null_fields', 'uuid_parent',
|
39
41
|
'uuid_site', 'uuid_virtual_domain', 'type', 'name',
|
40
|
-
'description', 'status', 'extract_severity', '
|
41
|
-
'like', 'join', 'count']
|
42
|
+
'description', 'status', 'extract_severity', 'count_children',
|
43
|
+
'severity', 'skip', 'limit', 'like', 'join', 'count']
|
42
44
|
params.get('sort_by'), params.get('null_fields'), params.get(
|
43
45
|
'uuid_parent'), params.get('uuid_site'), params.get(
|
44
46
|
'uuid_virtual_domain'), params.get('type'), params.get('name'
|
45
47
|
), params.get('description'), params.get('status'), params.get(
|
46
|
-
'extract_severity'), params.get('
|
47
|
-
), params.get('
|
48
|
+
'extract_severity'), params.get('count_children'), params.get(
|
49
|
+
'severity'), params.get('skip'), params.get('limit'), params.get(
|
50
|
+
'like'), params.get('join'), params.get('count')
|
48
51
|
if not self._silence_warning:
|
49
52
|
warning_wrong_parameters(self.groups.__name__, params,
|
50
53
|
official_params_list)
|
@@ -181,7 +184,9 @@ class Groups(ApiManager):
|
|
181
184
|
name (string optional): additional filter - parameter
|
182
185
|
profile (string optional): additional filter - parameter
|
183
186
|
extract_severity (boolean optional): Se True nella risposta e' anche presente la severita, Default to False. - parameter
|
187
|
+
count_children (boolean optional): additional filter - parameter
|
184
188
|
object_profile (string optional): additional filter - parameter
|
189
|
+
severity (None optional): additional filter - parameter
|
185
190
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
186
191
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
187
192
|
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
|
@@ -192,13 +197,13 @@ class Groups(ApiManager):
|
|
192
197
|
if kwargs is None:
|
193
198
|
kwargs = dict()
|
194
199
|
official_params_list = ['sort_by', 'not_in', 'name', 'profile',
|
195
|
-
'extract_severity', '
|
196
|
-
'join', 'count']
|
200
|
+
'extract_severity', 'count_children', 'object_profile',
|
201
|
+
'severity', 'skip', 'limit', 'like', 'join', 'count']
|
197
202
|
params.get('sort_by'), params.get('not_in'), params.get('name'
|
198
203
|
), params.get('profile'), params.get('extract_severity'
|
199
|
-
), params.get('
|
200
|
-
|
201
|
-
'count')
|
204
|
+
), params.get('count_children'), params.get('object_profile'
|
205
|
+
), params.get('severity'), params.get('skip'), params.get('limit'
|
206
|
+
), params.get('like'), params.get('join'), params.get('count')
|
202
207
|
if not self._silence_warning:
|
203
208
|
warning_wrong_parameters(self.groups_objects.__name__, params,
|
204
209
|
official_params_list)
|
hive/cookbook/login.py
CHANGED
@@ -166,6 +166,42 @@ class Login(ApiManager):
|
|
166
166
|
=payload, **kwargs)
|
167
167
|
return response
|
168
168
|
|
169
|
+
def login_current_user_dashboards(self, warm_start: bool = False,
|
170
|
+
single_page: bool = False, page_size: int = 5000,
|
171
|
+
kwargs: dict = None, **params) -> list:
|
172
|
+
"""Get Current User
|
173
|
+
|
174
|
+
Args:
|
175
|
+
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.
|
176
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
177
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
178
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
179
|
+
**params: additional parameters for the API.
|
180
|
+
|
181
|
+
Keyword Args:
|
182
|
+
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
|
183
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
184
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
185
|
+
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
|
186
|
+
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
|
187
|
+
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
|
188
|
+
|
189
|
+
Returns: list"""
|
190
|
+
if kwargs is None:
|
191
|
+
kwargs = dict()
|
192
|
+
official_params_list = ['sort_by', 'skip', 'limit', 'like', 'join',
|
193
|
+
'count']
|
194
|
+
params.get('sort_by'), params.get('skip'), params.get('limit'
|
195
|
+
), params.get('like'), params.get('join'), params.get('count')
|
196
|
+
if not self._silence_warning:
|
197
|
+
warning_wrong_parameters(self.login_current_user_dashboards.
|
198
|
+
__name__, params, official_params_list)
|
199
|
+
response = self.execute('GET', path=
|
200
|
+
f'/login/current_user/dashboards', single_page=single_page,
|
201
|
+
page_size=page_size, warm_start=warm_start, params=params, **kwargs
|
202
|
+
)
|
203
|
+
return response
|
204
|
+
|
169
205
|
def login_current_user_image(self, warm_start: bool = False,
|
170
206
|
kwargs: dict = None) -> list:
|
171
207
|
"""Get Image
|
hive/cookbook/metric_types.py
CHANGED
@@ -25,7 +25,9 @@ class MetricTypes(ApiManager):
|
|
25
25
|
feedback_for_operator (string optional): additional filter - parameter
|
26
26
|
profile (string optional): additional filter - parameter
|
27
27
|
status (string optional): additional filter - parameter
|
28
|
+
severity (None optional): additional filter - parameter
|
28
29
|
extract_severity (boolean optional): Se True nella risposta e' anche presente la severita, Default to False. - parameter
|
30
|
+
count_children (boolean optional): additional filter - parameter
|
29
31
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
30
32
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
31
33
|
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
|
@@ -37,14 +39,15 @@ class MetricTypes(ApiManager):
|
|
37
39
|
kwargs = dict()
|
38
40
|
official_params_list = ['sort_by', 'null_fields', 'uuid_object',
|
39
41
|
'name', 'description', 'feedback_for_operator', 'profile',
|
40
|
-
'status', '
|
41
|
-
'count']
|
42
|
+
'status', 'severity', 'extract_severity', 'count_children',
|
43
|
+
'skip', 'limit', 'like', 'join', 'count']
|
42
44
|
params.get('sort_by'), params.get('null_fields'), params.get(
|
43
45
|
'uuid_object'), params.get('name'), params.get('description'
|
44
46
|
), params.get('feedback_for_operator'), params.get('profile'
|
45
|
-
), params.get('status'), params.get('
|
46
|
-
|
47
|
-
), params.get('
|
47
|
+
), params.get('status'), params.get('severity'), params.get(
|
48
|
+
'extract_severity'), params.get('count_children'), params.get(
|
49
|
+
'skip'), params.get('limit'), params.get('like'), params.get('join'
|
50
|
+
), params.get('count')
|
48
51
|
if not self._silence_warning:
|
49
52
|
warning_wrong_parameters(self.metric_types.__name__, params,
|
50
53
|
official_params_list)
|