xautomata-hive 3.20.0__tar.gz → 3.20.2__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.20.0/xautomata_hive.egg-info → xautomata_hive-3.20.2}/PKG-INFO +2 -2
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/api.py +3 -1
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/calendars.py +86 -78
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/cost_tree_nodes.py +33 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/cost_tree_resources.py +78 -0
- xautomata_hive-3.20.2/hive/cookbook/files.py +87 -0
- xautomata_hive-3.20.2/hive/cookbook/last_object_status.py +213 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/objects.py +63 -6
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/probes.py +28 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/questions.py +27 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/sites.py +57 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_cost_azure_raw.py +54 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/users.py +5 -4
- xautomata_hive-3.20.2/hive/version.py +1 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/setup.py +2 -2
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2/xautomata_hive.egg-info}/PKG-INFO +2 -2
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/xautomata_hive.egg-info/SOURCES.txt +2 -0
- xautomata_hive-3.20.0/hive/version.py +0 -1
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/LICENSE +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/README.md +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/__init__.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/__init__.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/acl_docs.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/acl_overrides.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/analytics.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/anomalies.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/automata_ingest.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/contacts.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/cost_tagging.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/cost_tags.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/cost_views.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/customers.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/dashboards.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/dispatchers.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/downtimes.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/external_tickets.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/features.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/firmware_updates.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/google.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/groups.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/jobs.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/last_status.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/last_status_v2.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/login.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/messages.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/metric_ingest.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/metric_types.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/metrics.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/microsoft.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/notification_provider_types.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/notification_providers.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/opening_reasons.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/probe_types.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/probes_log_ingest.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/profile_topics.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/reason_for_closure.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/retention_rules.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/schedules.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/services.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/terms_and_conditions.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/tree_hierarchy.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/tree_hierarchy_v2.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_automata_state.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_cost_management.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_cost_management_v2.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_metric_status.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_metric_value.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_ntop_flows.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_service_status.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/ts_service_value.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/users_notifications.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/virtual_domains.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/webhooks.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/widget_groups.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/cookbook/widgets.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/decorators.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/exceptions.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/infrastrucure_keys.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/hive/tools.py +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/setup.cfg +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/xautomata_hive.egg-info/dependency_links.txt +0 -0
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/xautomata_hive.egg-info/requires.txt +1 -1
- {xautomata_hive-3.20.0 → xautomata_hive-3.20.2}/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.20.
|
3
|
+
Version: 3.20.2
|
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: tqdm==4.64.1
|
12
11
|
Requires-Dist: urllib3==2.0.4
|
13
12
|
Requires-Dist: requests==2.31.0
|
13
|
+
Requires-Dist: tqdm==4.64.1
|
14
14
|
|
15
15
|
# Xautomata API
|
16
16
|
Pacchetto che fornisca una interfaccia semplice per usare le API di Xautomata in python
|
@@ -489,6 +489,7 @@ from hive.cookbook.dispatchers import Dispatchers
|
|
489
489
|
from hive.cookbook.downtimes import Downtimes
|
490
490
|
from hive.cookbook.external_tickets import ExternalTickets
|
491
491
|
from hive.cookbook.features import Features
|
492
|
+
from hive.cookbook.files import Files
|
492
493
|
from hive.cookbook.firmware_updates import FirmwareUpdates
|
493
494
|
from hive.cookbook.groups import Groups
|
494
495
|
from hive.cookbook.automata_ingest import AutomataIngest
|
@@ -515,6 +516,7 @@ from hive.cookbook.schedules import Schedules
|
|
515
516
|
from hive.cookbook.services import Services
|
516
517
|
from hive.cookbook.sites import Sites
|
517
518
|
from hive.cookbook.last_status import LastStatus
|
519
|
+
from hive.cookbook.last_object_status import LastObjectStatus
|
518
520
|
from hive.cookbook.last_status_v2 import LastStatusV2
|
519
521
|
from hive.cookbook.terms_and_conditions import TermsAndConditions
|
520
522
|
from hive.cookbook.tree_hierarchy import TreeHierarchy
|
@@ -537,7 +539,7 @@ from hive.cookbook.widget_groups import WidgetGroups
|
|
537
539
|
# hive imports stop
|
538
540
|
|
539
541
|
|
540
|
-
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, Questions, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, LastStatusV2, TermsAndConditions, TreeHierarchy, TreeHierarchyV2, TsAutomataState, TsCostAzureRaw, TsCostManagement, TsCostManagementV2, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
542
|
+
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, Jobs, Messages, Metrics, ProbesLogIngest, MetricTypes, NotificationProviders, NotificationProviderTypes, Objects, OpeningReasons, Probes, ProbeTypes, ProfileTopics, Questions, ReasonForClosure, RetentionRules, Schedules, Services, Sites, LastStatus, LastObjectStatus, LastStatusV2, TermsAndConditions, TreeHierarchy, TreeHierarchyV2, TsAutomataState, TsCostAzureRaw, TsCostManagement, TsCostManagementV2, TsMetricStatus, TsMetricValue, TsNtopFlows, TsServiceStatus, TsServiceValue, Users, UsersNotifications, VirtualDomains, Widgets, Webhooks, WidgetGroups):
|
541
543
|
"""
|
542
544
|
Class with each specific API, based on the ApiManager Class created for a more general interaction with Xautomata API
|
543
545
|
"""
|
@@ -20,6 +20,7 @@ class Calendars(ApiManager):
|
|
20
20
|
null_fields (string optional): additional filter - parameter
|
21
21
|
name (string optional): additional filter - parameter
|
22
22
|
local_public_holidays (boolean optional): additional filter - parameter
|
23
|
+
timezone (string optional): additional filter - parameter
|
23
24
|
mon_int1_start (string optional): additional filter - parameter
|
24
25
|
mon_int1_end (string optional): additional filter - parameter
|
25
26
|
mon_int2_start (string optional): additional filter - parameter
|
@@ -58,35 +59,35 @@ class Calendars(ApiManager):
|
|
58
59
|
if kwargs is None:
|
59
60
|
kwargs = dict()
|
60
61
|
official_params_list = ['sort_by', 'null_fields', 'name',
|
61
|
-
'local_public_holidays', '
|
62
|
-
'
|
63
|
-
'
|
64
|
-
'
|
65
|
-
'
|
66
|
-
'
|
67
|
-
'
|
68
|
-
'
|
69
|
-
'
|
70
|
-
'
|
71
|
-
'join', 'count']
|
62
|
+
'local_public_holidays', 'timezone', 'mon_int1_start',
|
63
|
+
'mon_int1_end', 'mon_int2_start', 'mon_int2_end',
|
64
|
+
'tue_int1_start', 'tue_int1_end', 'tue_int2_start',
|
65
|
+
'tue_int2_end', 'wed_int1_start', 'wed_int1_end',
|
66
|
+
'wed_int2_start', 'wed_int2_end', 'thu_int1_start',
|
67
|
+
'thu_int1_end', 'thu_int2_start', 'thu_int2_end',
|
68
|
+
'fri_int1_start', 'fri_int1_end', 'fri_int2_start',
|
69
|
+
'fri_int2_end', 'sat_int1_start', 'sat_int1_end',
|
70
|
+
'sat_int2_start', 'sat_int2_end', 'sun_int1_start',
|
71
|
+
'sun_int1_end', 'sun_int2_start', 'sun_int2_end', 'skip',
|
72
|
+
'limit', 'like', 'join', 'count']
|
72
73
|
params.get('sort_by'), params.get('null_fields'), params.get('name'
|
73
|
-
), params.get('local_public_holidays'), params.get('
|
74
|
-
), params.get('
|
75
|
-
), params.get('
|
76
|
-
), params.get('
|
77
|
-
), params.get('
|
78
|
-
), params.get('
|
79
|
-
), params.get('
|
80
|
-
), params.get('
|
81
|
-
), params.get('
|
82
|
-
), params.get('
|
83
|
-
), params.get('
|
84
|
-
), params.get('
|
85
|
-
), params.get('
|
86
|
-
), params.get('
|
87
|
-
), params.get('
|
88
|
-
|
89
|
-
'count')
|
74
|
+
), params.get('local_public_holidays'), params.get('timezone'
|
75
|
+
), params.get('mon_int1_start'), params.get('mon_int1_end'
|
76
|
+
), params.get('mon_int2_start'), params.get('mon_int2_end'
|
77
|
+
), params.get('tue_int1_start'), params.get('tue_int1_end'
|
78
|
+
), params.get('tue_int2_start'), params.get('tue_int2_end'
|
79
|
+
), params.get('wed_int1_start'), params.get('wed_int1_end'
|
80
|
+
), params.get('wed_int2_start'), params.get('wed_int2_end'
|
81
|
+
), params.get('thu_int1_start'), params.get('thu_int1_end'
|
82
|
+
), params.get('thu_int2_start'), params.get('thu_int2_end'
|
83
|
+
), params.get('fri_int1_start'), params.get('fri_int1_end'
|
84
|
+
), params.get('fri_int2_start'), params.get('fri_int2_end'
|
85
|
+
), params.get('sat_int1_start'), params.get('sat_int1_end'
|
86
|
+
), params.get('sat_int2_start'), params.get('sat_int2_end'
|
87
|
+
), params.get('sun_int1_start'), params.get('sun_int1_end'
|
88
|
+
), params.get('sun_int2_start'), params.get('sun_int2_end'
|
89
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
90
|
+
), params.get('join'), params.get('count')
|
90
91
|
if not self._silence_warning:
|
91
92
|
warning_wrong_parameters(self.calendars.__name__, params,
|
92
93
|
official_params_list)
|
@@ -104,6 +105,7 @@ class Calendars(ApiManager):
|
|
104
105
|
|
105
106
|
Keyword Args:
|
106
107
|
name (string required): additional filter - payload
|
108
|
+
timezone (string required): additional filter - payload
|
107
109
|
local_public_holidays (boolean required): additional filter - payload
|
108
110
|
mon_int1_start (string optional): additional filter - payload
|
109
111
|
mon_int1_end (string optional): additional filter - payload
|
@@ -137,31 +139,33 @@ class Calendars(ApiManager):
|
|
137
139
|
Returns: list"""
|
138
140
|
if kwargs is None:
|
139
141
|
kwargs = dict()
|
140
|
-
official_payload_list = ['name', '
|
141
|
-
'
|
142
|
-
'
|
143
|
-
'
|
144
|
-
'
|
145
|
-
'
|
146
|
-
'
|
147
|
-
'
|
148
|
-
'
|
149
|
-
'
|
150
|
-
|
151
|
-
|
152
|
-
'
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
'
|
142
|
+
official_payload_list = ['name', 'timezone',
|
143
|
+
'local_public_holidays', 'mon_int1_start', 'mon_int1_end',
|
144
|
+
'mon_int2_start', 'mon_int2_end', 'tue_int1_start',
|
145
|
+
'tue_int1_end', 'tue_int2_start', 'tue_int2_end',
|
146
|
+
'wed_int1_start', 'wed_int1_end', 'wed_int2_start',
|
147
|
+
'wed_int2_end', 'thu_int1_start', 'thu_int1_end',
|
148
|
+
'thu_int2_start', 'thu_int2_end', 'fri_int1_start',
|
149
|
+
'fri_int1_end', 'fri_int2_start', 'fri_int2_end',
|
150
|
+
'sat_int1_start', 'sat_int1_end', 'sat_int2_start',
|
151
|
+
'sat_int2_end', 'sun_int1_start', 'sun_int1_end',
|
152
|
+
'sun_int2_start', 'sun_int2_end']
|
153
|
+
payload.get('name'), payload.get('timezone'), payload.get(
|
154
|
+
'local_public_holidays'), payload.get('mon_int1_start'
|
155
|
+
), payload.get('mon_int1_end'), payload.get('mon_int2_start'
|
156
|
+
), payload.get('mon_int2_end'), payload.get('tue_int1_start'
|
157
|
+
), payload.get('tue_int1_end'), payload.get('tue_int2_start'
|
158
|
+
), payload.get('tue_int2_end'), payload.get('wed_int1_start'
|
159
|
+
), payload.get('wed_int1_end'), payload.get('wed_int2_start'
|
160
|
+
), payload.get('wed_int2_end'), payload.get('thu_int1_start'
|
161
|
+
), payload.get('thu_int1_end'), payload.get('thu_int2_start'
|
162
|
+
), payload.get('thu_int2_end'), payload.get('fri_int1_start'
|
163
|
+
), payload.get('fri_int1_end'), payload.get('fri_int2_start'
|
164
|
+
), payload.get('fri_int2_end'), payload.get('sat_int1_start'
|
165
|
+
), payload.get('sat_int1_end'), payload.get('sat_int2_start'
|
166
|
+
), payload.get('sat_int2_end'), payload.get('sun_int1_start'
|
167
|
+
), payload.get('sun_int1_end'), payload.get('sun_int2_start'
|
168
|
+
), payload.get('sun_int2_end')
|
165
169
|
if not self._silence_warning:
|
166
170
|
warning_wrong_parameters(self.calendars_create.__name__,
|
167
171
|
payload, official_payload_list)
|
@@ -195,6 +199,7 @@ class Calendars(ApiManager):
|
|
195
199
|
|
196
200
|
Keyword Args:
|
197
201
|
name (string optional): additional filter - payload
|
202
|
+
timezone (string optional): additional filter - payload
|
198
203
|
local_public_holidays (boolean optional): additional filter - payload
|
199
204
|
mon_int1_start (string optional): additional filter - payload
|
200
205
|
mon_int1_end (string optional): additional filter - payload
|
@@ -228,31 +233,33 @@ class Calendars(ApiManager):
|
|
228
233
|
Returns: list"""
|
229
234
|
if kwargs is None:
|
230
235
|
kwargs = dict()
|
231
|
-
official_payload_list = ['name', '
|
232
|
-
'
|
233
|
-
'
|
234
|
-
'
|
235
|
-
'
|
236
|
-
'
|
237
|
-
'
|
238
|
-
'
|
239
|
-
'
|
240
|
-
'
|
241
|
-
|
242
|
-
|
243
|
-
'
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
'
|
236
|
+
official_payload_list = ['name', 'timezone',
|
237
|
+
'local_public_holidays', 'mon_int1_start', 'mon_int1_end',
|
238
|
+
'mon_int2_start', 'mon_int2_end', 'tue_int1_start',
|
239
|
+
'tue_int1_end', 'tue_int2_start', 'tue_int2_end',
|
240
|
+
'wed_int1_start', 'wed_int1_end', 'wed_int2_start',
|
241
|
+
'wed_int2_end', 'thu_int1_start', 'thu_int1_end',
|
242
|
+
'thu_int2_start', 'thu_int2_end', 'fri_int1_start',
|
243
|
+
'fri_int1_end', 'fri_int2_start', 'fri_int2_end',
|
244
|
+
'sat_int1_start', 'sat_int1_end', 'sat_int2_start',
|
245
|
+
'sat_int2_end', 'sun_int1_start', 'sun_int1_end',
|
246
|
+
'sun_int2_start', 'sun_int2_end']
|
247
|
+
payload.get('name'), payload.get('timezone'), payload.get(
|
248
|
+
'local_public_holidays'), payload.get('mon_int1_start'
|
249
|
+
), payload.get('mon_int1_end'), payload.get('mon_int2_start'
|
250
|
+
), payload.get('mon_int2_end'), payload.get('tue_int1_start'
|
251
|
+
), payload.get('tue_int1_end'), payload.get('tue_int2_start'
|
252
|
+
), payload.get('tue_int2_end'), payload.get('wed_int1_start'
|
253
|
+
), payload.get('wed_int1_end'), payload.get('wed_int2_start'
|
254
|
+
), payload.get('wed_int2_end'), payload.get('thu_int1_start'
|
255
|
+
), payload.get('thu_int1_end'), payload.get('thu_int2_start'
|
256
|
+
), payload.get('thu_int2_end'), payload.get('fri_int1_start'
|
257
|
+
), payload.get('fri_int1_end'), payload.get('fri_int2_start'
|
258
|
+
), payload.get('fri_int2_end'), payload.get('sat_int1_start'
|
259
|
+
), payload.get('sat_int1_end'), payload.get('sat_int2_start'
|
260
|
+
), payload.get('sat_int2_end'), payload.get('sun_int1_start'
|
261
|
+
), payload.get('sun_int1_end'), payload.get('sun_int2_start'
|
262
|
+
), payload.get('sun_int2_end')
|
256
263
|
if not self._silence_warning:
|
257
264
|
warning_wrong_parameters(self.calendars_put.__name__, payload,
|
258
265
|
official_payload_list)
|
@@ -328,6 +335,7 @@ class Calendars(ApiManager):
|
|
328
335
|
[
|
329
336
|
{
|
330
337
|
"name": "string", required
|
338
|
+
"timezone": "string", required
|
331
339
|
"local_public_holidays": "boolean", required
|
332
340
|
"mon_int1_start": "string", optional
|
333
341
|
"mon_int1_end": "string", optional
|
@@ -197,6 +197,39 @@ class CostTreeNodes(ApiManager):
|
|
197
197
|
params=params, **kwargs)
|
198
198
|
return response
|
199
199
|
|
200
|
+
def cost_tree_nodes_navigate_tree_v2(self, uuid: str,
|
201
|
+
warm_start: bool = False, kwargs: dict = None, **params) -> list:
|
202
|
+
"""Get Tree From Node V2
|
203
|
+
|
204
|
+
Args:
|
205
|
+
uuid (str, required): uuid
|
206
|
+
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.
|
207
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
208
|
+
**params: additional parameters for the API.
|
209
|
+
|
210
|
+
Keyword Args:
|
211
|
+
date_start (string required): additional filter - parameter
|
212
|
+
date_end (string required): additional filter - parameter
|
213
|
+
resource_id (string optional): additional filter - parameter
|
214
|
+
previous_period (boolean optional): additional filter - parameter
|
215
|
+
|
216
|
+
Returns: list"""
|
217
|
+
if kwargs is None:
|
218
|
+
kwargs = dict()
|
219
|
+
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
220
|
+
=params)
|
221
|
+
official_params_list = ['date_start', 'date_end', 'resource_id',
|
222
|
+
'previous_period']
|
223
|
+
params.get('date_start'), params.get('date_end'), params.get(
|
224
|
+
'resource_id'), params.get('previous_period')
|
225
|
+
if not self._silence_warning:
|
226
|
+
warning_wrong_parameters(self.cost_tree_nodes_navigate_tree_v2.
|
227
|
+
__name__, params, official_params_list)
|
228
|
+
response = self.execute('GET', path=
|
229
|
+
f'/cost_tree_nodes/navigate_tree/{uuid}/v2', warm_start=
|
230
|
+
warm_start, params=params, **kwargs)
|
231
|
+
return response
|
232
|
+
|
200
233
|
def cost_tree_nodes_get_node_resources(self, uuid: str,
|
201
234
|
warm_start: bool = False, single_page: bool = False,
|
202
235
|
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
@@ -119,6 +119,48 @@ class CostTreeResources(ApiManager):
|
|
119
119
|
=params, **kwargs)
|
120
120
|
return response
|
121
121
|
|
122
|
+
def cost_tree_resources_all_resource_ids_v2(self,
|
123
|
+
warm_start: bool = False, single_page: bool = False,
|
124
|
+
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
125
|
+
"""Get Resource Ids V2
|
126
|
+
|
127
|
+
Args:
|
128
|
+
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.
|
129
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
130
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
131
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
132
|
+
**params: additional parameters for the API.
|
133
|
+
|
134
|
+
Keyword Args:
|
135
|
+
date_start (string required): additional filter - parameter
|
136
|
+
date_end (string required): additional filter - parameter
|
137
|
+
uuid_customer (string optional): additional filter - parameter
|
138
|
+
uuid_view (string optional): additional filter - parameter
|
139
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
140
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
141
|
+
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
|
142
|
+
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
|
143
|
+
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
|
144
|
+
|
145
|
+
Returns: list"""
|
146
|
+
if kwargs is None:
|
147
|
+
kwargs = dict()
|
148
|
+
official_params_list = ['date_start', 'date_end', 'uuid_customer',
|
149
|
+
'uuid_view', 'skip', 'limit', 'like', 'join', 'count']
|
150
|
+
params.get('date_start'), params.get('date_end'), params.get(
|
151
|
+
'uuid_customer'), params.get('uuid_view'), params.get('skip'
|
152
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
153
|
+
), params.get('count')
|
154
|
+
if not self._silence_warning:
|
155
|
+
warning_wrong_parameters(self.
|
156
|
+
cost_tree_resources_all_resource_ids_v2.__name__, params,
|
157
|
+
official_params_list)
|
158
|
+
response = self.execute('GET', path=
|
159
|
+
f'/cost_tree_resources/all_resource_ids/v2', single_page=
|
160
|
+
single_page, page_size=page_size, warm_start=warm_start, params
|
161
|
+
=params, **kwargs)
|
162
|
+
return response
|
163
|
+
|
122
164
|
def cost_tree_resources_unfully_assigned_resource_ids(self,
|
123
165
|
uuid_view: str, warm_start: bool = False, single_page: bool = False,
|
124
166
|
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
@@ -155,6 +197,42 @@ class CostTreeResources(ApiManager):
|
|
155
197
|
warm_start, params=params, **kwargs)
|
156
198
|
return response
|
157
199
|
|
200
|
+
def cost_tree_resources_unfully_assigned_resource_ids_v2(self,
|
201
|
+
uuid_view: str, warm_start: bool = False, single_page: bool = False,
|
202
|
+
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
203
|
+
"""Get Unfully Assigned Resource Ids V2
|
204
|
+
|
205
|
+
Args:
|
206
|
+
uuid_view (str, required): uuid_view
|
207
|
+
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.
|
208
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
209
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
210
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
211
|
+
**params: additional parameters for the API.
|
212
|
+
|
213
|
+
Keyword Args:
|
214
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
215
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
216
|
+
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
|
217
|
+
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
|
218
|
+
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
|
219
|
+
|
220
|
+
Returns: list"""
|
221
|
+
if kwargs is None:
|
222
|
+
kwargs = dict()
|
223
|
+
official_params_list = ['skip', 'limit', 'like', 'join', 'count']
|
224
|
+
params.get('skip'), params.get('limit'), params.get('like'
|
225
|
+
), params.get('join'), params.get('count')
|
226
|
+
if not self._silence_warning:
|
227
|
+
warning_wrong_parameters(self.
|
228
|
+
cost_tree_resources_unfully_assigned_resource_ids_v2.
|
229
|
+
__name__, params, official_params_list)
|
230
|
+
response = self.execute('GET', path=
|
231
|
+
f'/cost_tree_resources/{uuid_view}/unfully_assigned_resource_ids/v2'
|
232
|
+
, single_page=single_page, page_size=page_size, warm_start=
|
233
|
+
warm_start, params=params, **kwargs)
|
234
|
+
return response
|
235
|
+
|
158
236
|
def cost_tree_resources_unfully_assigned_resources(self, uuid_view: str,
|
159
237
|
warm_start: bool = False, single_page: bool = False,
|
160
238
|
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
@@ -0,0 +1,87 @@
|
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
|
+
|
3
|
+
|
4
|
+
class Files(ApiManager):
|
5
|
+
"""Class that handles all the XAutomata files APIs"""
|
6
|
+
|
7
|
+
def files(self, warm_start: bool = False, single_page: bool = False,
|
8
|
+
page_size: int = 5000, kwargs: dict = None, **params) -> list:
|
9
|
+
"""List User Files
|
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
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
14
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
15
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
16
|
+
**params: additional parameters for the API.
|
17
|
+
|
18
|
+
Keyword Args:
|
19
|
+
name (string optional): additional filter - parameter
|
20
|
+
username (string optional): additional filter - parameter
|
21
|
+
uuid_service (string optional): additional filter - parameter
|
22
|
+
type (string optional): additional filter - parameter
|
23
|
+
start_ts (string optional): additional filter - parameter
|
24
|
+
end_ts (string optional): additional filter - parameter
|
25
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
26
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
27
|
+
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
|
28
|
+
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
|
29
|
+
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
|
30
|
+
|
31
|
+
Returns: list"""
|
32
|
+
if kwargs is None:
|
33
|
+
kwargs = dict()
|
34
|
+
official_params_list = ['name', 'username', 'uuid_service', 'type',
|
35
|
+
'start_ts', 'end_ts', 'skip', 'limit', 'like', 'join', 'count']
|
36
|
+
params.get('name'), params.get('username'), params.get('uuid_service'
|
37
|
+
), params.get('type'), params.get('start_ts'), params.get('end_ts'
|
38
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
39
|
+
), params.get('join'), params.get('count')
|
40
|
+
if not self._silence_warning:
|
41
|
+
warning_wrong_parameters(self.files.__name__, params,
|
42
|
+
official_params_list)
|
43
|
+
response = self.execute('GET', path=f'/files/', single_page=
|
44
|
+
single_page, page_size=page_size, warm_start=warm_start, params
|
45
|
+
=params, **kwargs)
|
46
|
+
return response
|
47
|
+
|
48
|
+
def files_create(self, params: dict = False, kwargs: dict = None, **payload
|
49
|
+
) -> list:
|
50
|
+
"""Post User File
|
51
|
+
|
52
|
+
Args:
|
53
|
+
params (dict, optional): additional parameters for the API.
|
54
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
55
|
+
**payload: additional parameters for the API.
|
56
|
+
|
57
|
+
Keyword Args:
|
58
|
+
uuid_service (string optional): additional filter - parameter
|
59
|
+
file (string required): additional filter - payload
|
60
|
+
|
61
|
+
Returns: list"""
|
62
|
+
if kwargs is None:
|
63
|
+
kwargs = dict()
|
64
|
+
official_payload_list = ['file']
|
65
|
+
payload.get('file')
|
66
|
+
if not self._silence_warning:
|
67
|
+
warning_wrong_parameters(self.files_create.__name__, payload,
|
68
|
+
official_payload_list)
|
69
|
+
response = self.execute('POST', path=f'/files/', params=params,
|
70
|
+
payload=payload, **kwargs)
|
71
|
+
return response
|
72
|
+
|
73
|
+
def files_download(self, uuid: str, warm_start: bool = False,
|
74
|
+
kwargs: dict = None) -> list:
|
75
|
+
"""Download User File
|
76
|
+
|
77
|
+
Args:
|
78
|
+
uuid (str, required): uuid
|
79
|
+
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.
|
80
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
81
|
+
|
82
|
+
Returns: list"""
|
83
|
+
if kwargs is None:
|
84
|
+
kwargs = dict()
|
85
|
+
response = self.execute('GET', path=f'/files/{uuid}/download',
|
86
|
+
warm_start=warm_start, **kwargs)
|
87
|
+
return response
|