pyegeria 0.7.45__py3-none-any.whl → 0.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. examples/widgets/cat/list_cert_types.py +61 -43
  2. examples/widgets/cat/list_projects.py +1 -1
  3. examples/widgets/cli/egeria.py +18 -2
  4. examples/widgets/cli/egeria_tech.py +299 -98
  5. examples/widgets/my/my_profile_actions.py +51 -32
  6. examples/widgets/ops/engine_actions.py +35 -23
  7. examples/widgets/ops/integration_daemon_actions.py +51 -32
  8. examples/widgets/tech/get_element_info.py +63 -38
  9. examples/widgets/tech/get_guid_info.py +50 -27
  10. examples/widgets/tech/list_asset_types.py +33 -23
  11. examples/widgets/tech/list_elements.py +44 -34
  12. examples/widgets/tech/list_elements_x.py +69 -49
  13. examples/widgets/tech/list_registered_services.py +44 -24
  14. examples/widgets/tech/list_related_specification.py +70 -45
  15. examples/widgets/tech/list_relationship_types.py +50 -31
  16. examples/widgets/tech/list_valid_metadata_values.py +57 -28
  17. examples/widgets/tech/x_list_related_elements.py +54 -34
  18. pyegeria/Xloaded_resources_omvs.py +43 -41
  19. pyegeria/__init__.py +5 -1
  20. pyegeria/_client.py +142 -102
  21. pyegeria/_deprecated_gov_engine.py +218 -167
  22. pyegeria/action_author_omvs.py +107 -88
  23. pyegeria/asset_catalog_omvs.py +467 -395
  24. pyegeria/automated_curation_omvs.py +2 -2
  25. pyegeria/classification_manager_omvs.py +1920 -868
  26. pyegeria/collection_manager_omvs.py +1957 -1519
  27. pyegeria/core_omag_server_config.py +310 -192
  28. pyegeria/egeria_cat_client.py +88 -0
  29. pyegeria/egeria_config_client.py +37 -0
  30. pyegeria/egeria_my_client.py +47 -0
  31. pyegeria/egeria_ops_client.py +67 -0
  32. pyegeria/egeria_tech_client.py +77 -0
  33. pyegeria/feedback_manager_omvs.py +633 -631
  34. pyegeria/full_omag_server_config.py +330 -158
  35. pyegeria/glossary_browser_omvs.py +927 -474
  36. pyegeria/glossary_manager_omvs.py +1033 -543
  37. pyegeria/mermaid_utilities.py +1 -1
  38. pyegeria/my_profile_omvs.py +714 -574
  39. pyegeria/platform_services.py +228 -176
  40. pyegeria/project_manager_omvs.py +1158 -903
  41. pyegeria/registered_info.py +76 -74
  42. pyegeria/runtime_manager_omvs.py +749 -670
  43. pyegeria/server_operations.py +123 -85
  44. pyegeria/valid_metadata_omvs.py +268 -168
  45. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/METADATA +1 -1
  46. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/RECORD +49 -46
  47. examples/widgets/tech/list_gov_processes.py +0 -162
  48. pyegeria/tech_guids_31-08-2024 14:33.py +0 -79
  49. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/LICENSE +0 -0
  50. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/WHEEL +0 -0
  51. {pyegeria-0.7.45.dist-info → pyegeria-0.8.0.dist-info}/entry_points.txt +0 -0
@@ -6,13 +6,10 @@ Runtime manager is a view service that supports user interaction with the runnin
6
6
 
7
7
  """
8
8
  import asyncio
9
- from requests import Response
10
9
 
11
- from pyegeria._exceptions import (
12
- InvalidParameterException,
13
- )
14
- from pyegeria import Client, AutomatedCuration, max_paging_size, body_slimmer
10
+ from requests import Response
15
11
 
12
+ from pyegeria import Client, max_paging_size, body_slimmer
16
13
 
17
14
 
18
15
  class RuntimeManager(Client):
@@ -30,938 +27,1020 @@ class RuntimeManager(Client):
30
27
  when the user doesn't pass the user_id on a method call.
31
28
  user_pwd: str
32
29
  The password associated with the user_id. Defaults to None
33
- verify_flag: bool
34
- Flag to indicate if SSL Certificates should be verified in the HTTP requests.
35
- Defaults to False.
30
+ token: str, optional
31
+ Bearer token
36
32
 
37
33
  Methods:
38
34
 
39
35
  """
40
36
 
41
37
  def __init__(
42
- self,
43
- server_name: str,
44
- platform_url: str,
45
- user_id: str,
46
- user_pwd: str = None,
47
- verify_flag: bool = False,
48
- ):
49
- Client.__init__(self, server_name, platform_url, user_id,
50
- user_pwd, verify_flag)
38
+ self,
39
+ server_name: str,
40
+ platform_url: str,
41
+ user_id: str,
42
+ user_pwd: str = None,
43
+ token: str = None,
44
+ ):
45
+ Client.__init__(self, server_name, platform_url, user_id, user_pwd, token=token)
51
46
  self.cur_command_root = f"{platform_url}/servers/"
52
- self.platform_guid = "44bf319f-1e41-4da1-b771-2753b92b631a" # this is platform @ 9443 from the core content archive
53
- self.default_platform_name = "Default Local OMAG Server Platform" # this from the core content archive
54
-
55
- async def _async_get_platforms_by_name(self, filter: str = None, server:str = None, effective_time: str = None,
56
- start_from: int = 0, page_size: int = max_paging_size )-> str | list:
57
- """ Returns the list of platforms with a particular name. The name is specified in the filter. Async version.
58
- Parameters
59
- ----------
60
- filter : str, opt
61
- Filter specifies the display name or qualified name of the platforms to return information for. If the
62
- value is None, we will default to the default_platform_name that comes from the core content pack.
63
-
64
- server : str, optional
65
- The name of the server to get governance engine summaries from. If not provided, the default server name
66
- will be used.
67
-
68
- start_from : int, optional
69
- The index from which to start fetching the engine actions. Default is 0.
70
-
71
- page_size : int, optional
72
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
73
-
74
- Returns
75
- -------
76
- Response
77
- A lit of json dict with the platform reports.
78
-
79
- Raises
80
- ------
81
- InvalidParameterException
82
- PropertyServerException
83
- UserNotAuthorizedException
47
+ self.platform_guid = "44bf319f-1e41-4da1-b771-2753b92b631a" # this is platform @ 9443 from the core content archive
48
+ self.default_platform_name = (
49
+ "Default Local OMAG Server Platform" # this from the core content archive
50
+ )
51
+
52
+ async def _async_get_platforms_by_name(
53
+ self,
54
+ filter: str = None,
55
+ server: str = None,
56
+ effective_time: str = None,
57
+ start_from: int = 0,
58
+ page_size: int = max_paging_size,
59
+ ) -> str | list:
60
+ """Returns the list of platforms with a particular name. The name is specified in the filter. Async version.
61
+ Parameters
62
+ ----------
63
+ filter : str, opt
64
+ Filter specifies the display name or qualified name of the platforms to return information for. If the
65
+ value is None, we will default to the default_platform_name that comes from the core content pack.
66
+
67
+ server : str, optional
68
+ The name of the server to get governance engine summaries from. If not provided, the default server name
69
+ will be used.
70
+
71
+ start_from : int, optional
72
+ The index from which to start fetching the engine actions. Default is 0.
73
+
74
+ page_size : int, optional
75
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
76
+
77
+ Returns
78
+ -------
79
+ Response
80
+ A lit of json dict with the platform reports.
81
+
82
+ Raises
83
+ ------
84
+ InvalidParameterException
85
+ PropertyServerException
86
+ UserNotAuthorizedException
84
87
 
85
88
  """
86
89
  if server is None:
87
- server = self.server_name
90
+ server = self.server_name
88
91
 
89
92
  if filter is None:
90
93
  filter = self.default_platform_name
91
94
 
92
-
93
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/by-name?"
94
- f"startFrom={start_from}&pageSize={page_size}")
95
+ url = (
96
+ f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/by-name?"
97
+ f"startFrom={start_from}&pageSize={page_size}"
98
+ )
95
99
  if effective_time is not None:
96
- body = {
97
- "filter" : filter,
98
- "effectiveTime" : effective_time
99
- }
100
+ body = {"filter": filter, "effectiveTime": effective_time}
100
101
  else:
101
- body = {
102
- "filter": filter
103
- }
102
+ body = {"filter": filter}
104
103
 
105
104
  response = await self._async_make_request("POST", url, body)
106
105
 
107
- return response.json().get('elementList','No platforms found')
108
-
109
-
110
- def get_platforms_by_name(self, filter: str = None, server: str = None, effective_time: str = None,
111
- start_from: int = 0, page_size: int = max_paging_size) -> str | list:
112
- """ Returns the list of platforms with a particular name. The name is specified in the filter.
113
-
114
- Parameters
115
- ----------
116
- filter : str, opt
117
- Filter specifies the display name or qualified name of the platforms to return information for. If the
118
- value is None, we will default to the default_platform_name that comes from the core content pack.
119
-
120
- server : str, optional
121
- The name of the server to get governance engine summaries from. If not provided, the default server name
122
- will be used.
123
-
124
- start_from : int, optional
125
- The index from which to start fetching the engine actions. Default is 0.
126
-
127
-
128
- page_size : int, optional
129
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
130
-
131
- Returns
132
- -------
133
- Response
134
- A lit of json dict with the platform reports.
135
-
136
- Raises
137
- ------
138
- InvalidParameterException
139
- PropertyServerException
140
- UserNotAuthorizedException
106
+ return response.json().get("elementList", "No platforms found")
107
+
108
+ def get_platforms_by_name(
109
+ self,
110
+ filter: str = None,
111
+ server: str = None,
112
+ effective_time: str = None,
113
+ start_from: int = 0,
114
+ page_size: int = max_paging_size,
115
+ ) -> str | list:
116
+ """Returns the list of platforms with a particular name. The name is specified in the filter.
117
+
118
+ Parameters
119
+ ----------
120
+ filter : str, opt
121
+ Filter specifies the display name or qualified name of the platforms to return information for. If the
122
+ value is None, we will default to the default_platform_name that comes from the core content pack.
123
+
124
+ server : str, optional
125
+ The name of the server to get governance engine summaries from. If not provided, the default server name
126
+ will be used.
127
+
128
+ start_from : int, optional
129
+ The index from which to start fetching the engine actions. Default is 0.
130
+
131
+
132
+ page_size : int, optional
133
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
134
+
135
+ Returns
136
+ -------
137
+ Response
138
+ A lit of json dict with the platform reports.
139
+
140
+ Raises
141
+ ------
142
+ InvalidParameterException
143
+ PropertyServerException
144
+ UserNotAuthorizedException
141
145
  """
142
146
  loop = asyncio.get_event_loop()
143
- response = loop.run_until_complete(self._async_get_platforms_by_name(filter, server,
144
- effective_time,
145
- start_from, page_size))
147
+ response = loop.run_until_complete(
148
+ self._async_get_platforms_by_name(
149
+ filter, server, effective_time, start_from, page_size
150
+ )
151
+ )
146
152
  return response
147
153
 
148
- async def _async_get_platforms_by_type(self, filter: str = None, server:str = None, effective_time: str = None,
149
- start_from: int = 0, page_size: int = max_paging_size )-> str | list:
150
- """ Returns the list of platforms with a particular deployed implementation type. The value is specified in
151
- the filter. If it is null, or no request body is supplied, all platforms are returned. Async version.
152
-
153
- Parameters
154
- ----------
155
- filter : str, opt
156
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
157
- If the value is None, we will default to the "OMAG Server Platform".
158
-
159
- server : str, optional
160
- The name of the server to get governance engine summaries from. If not provided, the default server name
161
- will be used.
154
+ async def _async_get_platforms_by_type(
155
+ self,
156
+ filter: str = None,
157
+ server: str = None,
158
+ effective_time: str = None,
159
+ start_from: int = 0,
160
+ page_size: int = max_paging_size,
161
+ ) -> str | list:
162
+ """Returns the list of platforms with a particular deployed implementation type. The value is specified in
163
+ the filter. If it is null, or no request body is supplied, all platforms are returned. Async version.
164
+
165
+ Parameters
166
+ ----------
167
+ filter : str, opt
168
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
169
+ If the value is None, we will default to the "OMAG Server Platform".
170
+
171
+ server : str, optional
172
+ The name of the server to get governance engine summaries from. If not provided, the default server name
173
+ will be used.
162
174
 
163
- start_from : int, optional
164
- The index from which to start fetching the engine actions. Default is 0.
175
+ start_from : int, optional
176
+ The index from which to start fetching the engine actions. Default is 0.
165
177
 
166
- page_size : int, optional
167
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
178
+ page_size : int, optional
179
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
168
180
 
169
- Returns
170
- -------
171
- Response
172
- A lit of json dict with the platform reports.
181
+ Returns
182
+ -------
183
+ Response
184
+ A lit of json dict with the platform reports.
173
185
 
174
- Raises
175
- ------
176
- InvalidParameterException
177
- PropertyServerException
178
- UserNotAuthorizedException
186
+ Raises
187
+ ------
188
+ InvalidParameterException
189
+ PropertyServerException
190
+ UserNotAuthorizedException
179
191
 
180
192
  """
181
193
  if server is None:
182
- server = self.server_name
194
+ server = self.server_name
183
195
 
184
196
  if filter is None:
185
197
  filter = "OMAG Server Platform"
186
198
 
187
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/"
188
- f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}")
199
+ url = (
200
+ f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/"
201
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
202
+ )
189
203
 
190
204
  if effective_time is not None:
191
- body = {
192
- "filter": filter,
193
- "effectiveTime": effective_time
194
- }
205
+ body = {"filter": filter, "effectiveTime": effective_time}
195
206
  else:
196
- body = {
197
- "filter": filter
198
- }
207
+ body = {"filter": filter}
199
208
 
200
209
  response = await self._async_make_request("POST", url, body)
201
- return response.json().get('elements','No platforms found')
202
-
203
- def get_platforms_by_type(self, filter: str = None, server:str = None, effective_time: str = None,
204
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
205
- """ Returns the list of platforms with a particular deployed implementation type. The value is specified in
206
- the filter. If it is null, or no request body is supplied, all platforms are returned.
207
-
208
- Parameters
209
- ----------
210
- filter : str, opt
211
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
212
- If the value is None, we will default to the "OMAG Server Platform".
213
-
214
- server : str, optional
215
- The name of the server to get governance engine summaries from. If not provided, the default server name
216
- will be used.
217
-
218
- start_from : int, optional
219
- The index from which to start fetching the engine actions. Default is 0.
220
-
221
-
222
- page_size : int, optional
223
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
224
-
225
- Returns
226
- -------
227
- Response
228
- A lit of json dict with the platform reports.
229
-
230
- Raises
231
- ------
232
- InvalidParameterException
233
- PropertyServerException
234
- UserNotAuthorizedException
210
+ return response.json().get("elements", "No platforms found")
211
+
212
+ def get_platforms_by_type(
213
+ self,
214
+ filter: str = None,
215
+ server: str = None,
216
+ effective_time: str = None,
217
+ start_from: int = 0,
218
+ page_size: int = max_paging_size,
219
+ ) -> str | list:
220
+ """Returns the list of platforms with a particular deployed implementation type. The value is specified in
221
+ the filter. If it is null, or no request body is supplied, all platforms are returned.
222
+
223
+ Parameters
224
+ ----------
225
+ filter : str, opt
226
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
227
+ If the value is None, we will default to the "OMAG Server Platform".
228
+
229
+ server : str, optional
230
+ The name of the server to get governance engine summaries from. If not provided, the default server name
231
+ will be used.
232
+
233
+ start_from : int, optional
234
+ The index from which to start fetching the engine actions. Default is 0.
235
+
236
+
237
+ page_size : int, optional
238
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
239
+
240
+ Returns
241
+ -------
242
+ Response
243
+ A lit of json dict with the platform reports.
244
+
245
+ Raises
246
+ ------
247
+ InvalidParameterException
248
+ PropertyServerException
249
+ UserNotAuthorizedException
235
250
 
236
251
  """
237
252
  loop = asyncio.get_event_loop()
238
- response = loop.run_until_complete(self._async_get_platforms_by_type(filter, server, effective_time,
239
- start_from, page_size))
253
+ response = loop.run_until_complete(
254
+ self._async_get_platforms_by_type(
255
+ filter, server, effective_time, start_from, page_size
256
+ )
257
+ )
240
258
  return response
241
259
 
242
- async def _async_get_platform_templates_by_type(self, filter: str = None, server:str = None, effective_time: str = None,
243
- start_from: int = 0, page_size: int = max_paging_size )-> str | list:
244
- """ Returns the list of platform templates for a particular deployed implementation type. The value is
245
- specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
246
- Async version.
247
-
248
- Parameters
249
- ----------
250
- filter : str, opt
251
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
252
- If the value is None, we will default to the "OMAG Server Platform".
253
-
254
- server : str, optional
255
- The name of the server to get governance engine summaries from. If not provided, the default server name
256
- will be used.
260
+ async def _async_get_platform_templates_by_type(
261
+ self,
262
+ filter: str = None,
263
+ server: str = None,
264
+ effective_time: str = None,
265
+ start_from: int = 0,
266
+ page_size: int = max_paging_size,
267
+ ) -> str | list:
268
+ """Returns the list of platform templates for a particular deployed implementation type. The value is
269
+ specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
270
+ Async version.
271
+
272
+ Parameters
273
+ ----------
274
+ filter : str, opt
275
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
276
+ If the value is None, we will default to the "OMAG Server Platform".
277
+
278
+ server : str, optional
279
+ The name of the server to get governance engine summaries from. If not provided, the default server name
280
+ will be used.
257
281
 
258
- start_from : int, optional
259
- The index from which to start fetching the engine actions. Default is 0.
282
+ start_from : int, optional
283
+ The index from which to start fetching the engine actions. Default is 0.
260
284
 
261
- page_size : int, optional
262
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
285
+ page_size : int, optional
286
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
263
287
 
264
- Returns
265
- -------
266
- Response
267
- A lit of json dict with the platform reports.
288
+ Returns
289
+ -------
290
+ Response
291
+ A lit of json dict with the platform reports.
268
292
 
269
- Raises
270
- ------
271
- InvalidParameterException
272
- PropertyServerException
273
- UserNotAuthorizedException
293
+ Raises
294
+ ------
295
+ InvalidParameterException
296
+ PropertyServerException
297
+ UserNotAuthorizedException
274
298
 
275
299
  """
276
300
  if server is None:
277
- server = self.server_name
301
+ server = self.server_name
278
302
 
279
303
  if filter is None:
280
304
  filter = "OMAG Server Platform"
281
305
 
282
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/"
283
- f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true")
306
+ url = (
307
+ f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/"
308
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
309
+ )
284
310
 
285
311
  if effective_time is not None:
286
- body = {
287
- "filter": filter,
288
- "effectiveTime": effective_time
289
- }
312
+ body = {"filter": filter, "effectiveTime": effective_time}
290
313
  else:
291
- body = {
292
- "filter": filter
293
- }
314
+ body = {"filter": filter}
294
315
 
295
316
  response = await self._async_make_request("POST", url, body)
296
- return response.json().get('elements','No platforms found')
297
-
298
-
299
- def get_platform_templates_by_type(self, filter: str = None, server:str = None, effective_time: str = None,
300
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
301
- """ Returns the list of platform templates with a particular deployed implementation type. The value is
302
- specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
303
-
304
- Parameters
305
- ----------
306
- filter : str, opt
307
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
308
- If the value is None, we will default to the "OMAG Server Platform".
309
-
310
- server : str, optional
311
- The name of the server to get governance engine summaries from. If not provided, the default server name
312
- will be used.
313
-
314
- start_from : int, optional
315
- The index from which to start fetching the engine actions. Default is 0.
316
-
317
-
318
- page_size : int, optional
319
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
320
-
321
- Returns
322
- -------
323
- Response
324
- A lit of json dict with the platform reports.
325
-
326
- Raises
327
- ------
328
- InvalidParameterException
329
- PropertyServerException
330
- UserNotAuthorizedException
317
+ return response.json().get("elements", "No platforms found")
318
+
319
+ def get_platform_templates_by_type(
320
+ self,
321
+ filter: str = None,
322
+ server: str = None,
323
+ effective_time: str = None,
324
+ start_from: int = 0,
325
+ page_size: int = max_paging_size,
326
+ ) -> str | list:
327
+ """Returns the list of platform templates with a particular deployed implementation type. The value is
328
+ specified in the filter. If it is null, or no request body is supplied, all platforms are returned.
329
+
330
+ Parameters
331
+ ----------
332
+ filter : str, opt
333
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
334
+ If the value is None, we will default to the "OMAG Server Platform".
335
+
336
+ server : str, optional
337
+ The name of the server to get governance engine summaries from. If not provided, the default server name
338
+ will be used.
339
+
340
+ start_from : int, optional
341
+ The index from which to start fetching the engine actions. Default is 0.
342
+
343
+
344
+ page_size : int, optional
345
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
346
+
347
+ Returns
348
+ -------
349
+ Response
350
+ A lit of json dict with the platform reports.
351
+
352
+ Raises
353
+ ------
354
+ InvalidParameterException
355
+ PropertyServerException
356
+ UserNotAuthorizedException
331
357
 
332
358
  """
333
359
  loop = asyncio.get_event_loop()
334
- response = loop.run_until_complete(self._async_get_platforms_by_type(filter, server, effective_time,
335
- start_from, page_size))
360
+ response = loop.run_until_complete(
361
+ self._async_get_platforms_by_type(
362
+ filter, server, effective_time, start_from, page_size
363
+ )
364
+ )
336
365
  return response
337
366
 
338
- async def _async_get_platform_report(self, platform_guid: str = None, server:str = None) -> str | list:
339
- """ Returns details about the running platform. Async version.
367
+ async def _async_get_platform_report(
368
+ self, platform_guid: str = None, server: str = None
369
+ ) -> str | list:
370
+ """Returns details about the running platform. Async version.
340
371
 
341
- Parameters
342
- ----------
343
- platform_guid : str
344
- The unique identifier for the platform.
372
+ Parameters
373
+ ----------
374
+ platform_guid : str
375
+ The unique identifier for the platform.
345
376
 
346
- server : str, optional
347
- The name of the server to get governance engine summaries from. If not provided, the default server name
348
- will be used.
377
+ server : str, optional
378
+ The name of the server to get governance engine summaries from. If not provided, the default server name
379
+ will be used.
349
380
 
350
- Returns
351
- -------
352
- Response
353
- A json dict with the platform report.
381
+ Returns
382
+ -------
383
+ Response
384
+ A json dict with the platform report.
354
385
 
355
- Raises
356
- ------
357
- InvalidParameterException
358
- PropertyServerException
359
- UserNotAuthorizedException
386
+ Raises
387
+ ------
388
+ InvalidParameterException
389
+ PropertyServerException
390
+ UserNotAuthorizedException
360
391
 
361
392
  """
362
393
  if server is None:
363
- server = self.server_name
394
+ server = self.server_name
364
395
 
365
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/{platform_guid}/report")
396
+ url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/{platform_guid}/report"
366
397
 
367
398
  response = await self._async_make_request("GET", url)
368
399
 
369
- return response.json().get('element','No platforms found')
400
+ return response.json().get("element", "No platforms found")
370
401
 
371
- def get_platform_report(self, platform_guid: str = None, server: str = None) -> str | list:
372
- """ Returns details about the running platform.
402
+ def get_platform_report(
403
+ self, platform_guid: str = None, server: str = None
404
+ ) -> str | list:
405
+ """Returns details about the running platform.
373
406
 
374
- Parameters
375
- ----------
376
- platform_guid : str
377
- The unique identifier for the platform.
407
+ Parameters
408
+ ----------
409
+ platform_guid : str
410
+ The unique identifier for the platform.
378
411
 
379
- server : str, optional
380
- The name of the server to get governance engine summaries from. If not provided, the default server name
381
- will be used.
412
+ server : str, optional
413
+ The name of the server to get governance engine summaries from. If not provided, the default server name
414
+ will be used.
382
415
 
383
416
 
384
- Returns
385
- -------
386
- Response
387
- A json dict with the platform report.
417
+ Returns
418
+ -------
419
+ Response
420
+ A json dict with the platform report.
388
421
 
389
- Raises
390
- ------
391
- InvalidParameterException
392
- PropertyServerException
393
- UserNotAuthorizedException
422
+ Raises
423
+ ------
424
+ InvalidParameterException
425
+ PropertyServerException
426
+ UserNotAuthorizedException
394
427
 
395
428
  """
396
429
  loop = asyncio.get_event_loop()
397
- response = loop.run_until_complete(self._async_get_platform_report(platform_guid, server))
430
+ response = loop.run_until_complete(
431
+ self._async_get_platform_report(platform_guid, server)
432
+ )
398
433
  return response
399
434
 
400
- async def _async_get_platform_by_guid(self, platform_guid: str = None, server:str = None,
401
- effective_time: str = None) -> str | list:
402
- """ Returns details about the platform's catalog entry (asset). Async version.
435
+ async def _async_get_platform_by_guid(
436
+ self, platform_guid: str = None, server: str = None, effective_time: str = None
437
+ ) -> str | list:
438
+ """Returns details about the platform's catalog entry (asset). Async version.
403
439
 
404
- Parameters
405
- ----------
406
- filter : str, opt
407
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
408
- If the value is None, we will default to the "OMAG Server Platform".
440
+ Parameters
441
+ ----------
442
+ filter : str, opt
443
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
444
+ If the value is None, we will default to the "OMAG Server Platform".
409
445
 
410
- server : str, optional
411
- The name of the server to get governance engine summaries from. If not provided, the default server name
412
- will be used.
446
+ server : str, optional
447
+ The name of the server to get governance engine summaries from. If not provided, the default server name
448
+ will be used.
413
449
 
414
- start_from : int, optional
415
- The index from which to start fetching the engine actions. Default is 0.
450
+ start_from : int, optional
451
+ The index from which to start fetching the engine actions. Default is 0.
416
452
 
417
453
 
418
- page_size : int, optional
419
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
454
+ page_size : int, optional
455
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
420
456
 
421
- Returns
422
- -------
423
- Response
424
- A lit of json dict with the platform reports.
457
+ Returns
458
+ -------
459
+ Response
460
+ A lit of json dict with the platform reports.
425
461
 
426
462
  """
427
463
  if server is None:
428
- server = self.server_name
464
+ server = self.server_name
429
465
 
430
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/{platform_guid}")
466
+ url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/platforms/{platform_guid}"
431
467
 
432
468
  if effective_time is not None:
433
- body = {
434
- "effectiveTime": effective_time
435
- }
469
+ body = {"effectiveTime": effective_time}
436
470
  response = await self._async_make_request("POST", url, body)
437
471
 
438
472
  else:
439
473
  response = await self._async_make_request("POST", url)
440
474
 
441
- return response.json().get('elements','No platforms found')
475
+ return response.json().get("elements", "No platforms found")
442
476
 
443
- def get_platform_by_guid(self, platform_guid: str = None, server: str = None,
444
- effective_time: str = None) -> str | list:
445
- """ Returns details about the platform's catalog entry (asset).
477
+ def get_platform_by_guid(
478
+ self, platform_guid: str = None, server: str = None, effective_time: str = None
479
+ ) -> str | list:
480
+ """Returns details about the platform's catalog entry (asset).
446
481
 
447
- Parameters
448
- ----------
449
- filter : str, opt
450
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
451
- If the value is None, we will default to the "OMAG Server Platform".
482
+ Parameters
483
+ ----------
484
+ filter : str, opt
485
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
486
+ If the value is None, we will default to the "OMAG Server Platform".
452
487
 
453
- server : str, optional
454
- The name of the server to get governance engine summaries from. If not provided, the default server name
455
- will be used.
488
+ server : str, optional
489
+ The name of the server to get governance engine summaries from. If not provided, the default server name
490
+ will be used.
456
491
 
457
- start_from : int, optional
458
- The index from which to start fetching the engine actions. Default is 0.
492
+ start_from : int, optional
493
+ The index from which to start fetching the engine actions. Default is 0.
459
494
 
460
495
 
461
- page_size : int, optional
462
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
496
+ page_size : int, optional
497
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
463
498
 
464
- Returns
465
- -------
466
- Response
467
- A lit of json dict with the platform reports.
499
+ Returns
500
+ -------
501
+ Response
502
+ A lit of json dict with the platform reports.
468
503
 
469
- Raises
470
- ------
471
- InvalidParameterException
472
- PropertyServerException
473
- UserNotAuthorizedException
504
+ Raises
505
+ ------
506
+ InvalidParameterException
507
+ PropertyServerException
508
+ UserNotAuthorizedException
474
509
 
475
510
  """
476
511
  loop = asyncio.get_event_loop()
477
- response = loop.run_until_complete(self._async_get_platforms_by_guid(platform_guid, server,
478
- effective_time))
512
+ response = loop.run_until_complete(
513
+ self._async_get_platforms_by_guid(platform_guid, server, effective_time)
514
+ )
479
515
  return response
480
516
 
481
- async def _async_get_server_by_guid(self, server_guid: str, server:str = None,
482
- effective_time: str = None) -> str | dict:
483
- """ Returns details about the server's catalog entry (asset). Async version.
517
+ async def _async_get_server_by_guid(
518
+ self, server_guid: str, server: str = None, effective_time: str = None
519
+ ) -> str | dict:
520
+ """Returns details about the server's catalog entry (asset). Async version.
484
521
 
485
- Parameters
486
- ----------
487
- server_guid : str
488
- The unique identifier for the platform.
522
+ Parameters
523
+ ----------
524
+ server_guid : str
525
+ The unique identifier for the platform.
489
526
 
490
- server : str, optional
491
- The name of the server to get governance engine summaries from. If not provided, the default server name
492
- will be used.
527
+ server : str, optional
528
+ The name of the server to get governance engine summaries from. If not provided, the default server name
529
+ will be used.
493
530
 
494
- Returns
495
- -------
496
- Response
497
- A lit of json dict with the platform reports.
531
+ Returns
532
+ -------
533
+ Response
534
+ A lit of json dict with the platform reports.
498
535
 
499
- Raises
500
- ------
501
- InvalidParameterException
502
- PropertyServerException
503
- UserNotAuthorizedException
536
+ Raises
537
+ ------
538
+ InvalidParameterException
539
+ PropertyServerException
540
+ UserNotAuthorizedException
504
541
 
505
542
  """
506
543
  if server is None:
507
- server = self.server_name
544
+ server = self.server_name
508
545
 
509
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}")
546
+ url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}"
510
547
 
511
548
  if effective_time is not None:
512
- body = {
513
- "effectiveTime": effective_time
514
- }
549
+ body = {"effectiveTime": effective_time}
515
550
  response = await self._async_make_request("POST", url, body)
516
551
 
517
552
  else:
518
553
  response = await self._async_make_request("POST", url)
519
554
 
520
- return response.json().get('elements','No server found')
555
+ return response.json().get("elements", "No server found")
521
556
 
522
- def get_server_by_guid(self, server_guid: str, server: str = None,
523
- effective_time: str = None) -> str | dict:
524
- """ Returns details about the platform's catalog entry (asset).
557
+ def get_server_by_guid(
558
+ self, server_guid: str, server: str = None, effective_time: str = None
559
+ ) -> str | dict:
560
+ """Returns details about the platform's catalog entry (asset).
525
561
 
526
- Parameters
527
- ----------
528
- server_guid : str
529
- The unique identifier for the platform.
562
+ Parameters
563
+ ----------
564
+ server_guid : str
565
+ The unique identifier for the platform.
530
566
 
531
- server : str, optional
532
- The name of the server to get governance engine summaries from. If not provided, the default server name
533
- will be used.
567
+ server : str, optional
568
+ The name of the server to get governance engine summaries from. If not provided, the default server name
569
+ will be used.
534
570
 
535
- Returns
536
- -------
537
- Response
538
- A lit of json dict with the platform reports.
571
+ Returns
572
+ -------
573
+ Response
574
+ A lit of json dict with the platform reports.
539
575
 
540
- Raises
541
- ------
542
- InvalidParameterException
543
- PropertyServerException
544
- UserNotAuthorizedException
576
+ Raises
577
+ ------
578
+ InvalidParameterException
579
+ PropertyServerException
580
+ UserNotAuthorizedException
545
581
 
546
582
  """
547
583
  loop = asyncio.get_event_loop()
548
- response = loop.run_until_complete(self._async_get_server_by_guid(server_guid, server, effective_time))
584
+ response = loop.run_until_complete(
585
+ self._async_get_server_by_guid(server_guid, server, effective_time)
586
+ )
549
587
  return response
550
588
 
589
+ async def _async_get_servers_by_name(
590
+ self,
591
+ filter: str,
592
+ server: str = None,
593
+ effective_time: str = None,
594
+ start_from: int = 0,
595
+ page_size: int = max_paging_size,
596
+ ) -> str | list:
597
+ """Returns the list of servers with a particular name. The name is specified in the filter. Async version.
551
598
 
552
- async def _async_get_servers_by_name(self, filter: str, server:str = None, effective_time: str = None,
553
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
554
- """ Returns the list of servers with a particular name. The name is specified in the filter. Async version.
599
+ Parameters
600
+ ----------
601
+ filter : str, opt
602
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
603
+ If the value is None, we will default to the "OMAG Server Platform".
555
604
 
556
- Parameters
557
- ----------
558
- filter : str, opt
559
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
560
- If the value is None, we will default to the "OMAG Server Platform".
605
+ server : str, optional
606
+ The name of the server to get governance engine summaries from. If not provided, the default server name
607
+ will be used.
561
608
 
562
- server : str, optional
563
- The name of the server to get governance engine summaries from. If not provided, the default server name
564
- will be used.
565
-
566
- start_from : int, optional
567
- The index from which to start fetching the engine actions. Default is 0.
609
+ start_from : int, optional
610
+ The index from which to start fetching the engine actions. Default is 0.
568
611
 
569
612
 
570
- page_size : int, optional
571
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
613
+ page_size : int, optional
614
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
572
615
 
573
- Returns
574
- -------
575
- Response
576
- A lit of json dict with the platform reports.
616
+ Returns
617
+ -------
618
+ Response
619
+ A lit of json dict with the platform reports.
577
620
 
578
- Raises
579
- ------
580
- InvalidParameterException
581
- PropertyServerException
582
- UserNotAuthorizedException
621
+ Raises
622
+ ------
623
+ InvalidParameterException
624
+ PropertyServerException
625
+ UserNotAuthorizedException
583
626
 
584
627
  """
585
628
  if server is None:
586
- server = self.server_name
629
+ server = self.server_name
587
630
 
588
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/by-name?"
589
- f"startFrom={start_from}&pageSize={page_size}")
631
+ url = (
632
+ f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/by-name?"
633
+ f"startFrom={start_from}&pageSize={page_size}"
634
+ )
590
635
 
591
636
  if effective_time is None:
592
- body = {
593
- "filter": filter
594
- }
637
+ body = {"filter": filter}
595
638
  else:
596
- body = {
597
- "filter": filter,
598
- "effective_time": effective_time
599
- }
639
+ body = {"filter": filter, "effective_time": effective_time}
600
640
  response = await self._async_make_request("POST", url, body)
601
641
 
602
- return response.json().get('elements','No platforms found')
642
+ return response.json().get("elements", "No platforms found")
603
643
 
604
644
  def get_servers_by_name(self, filter: str, server: str = None) -> str | list:
605
- """ Returns the list of servers with a particular name. The name is specified in the filter.
645
+ """Returns the list of servers with a particular name. The name is specified in the filter.
606
646
 
607
- Parameters
608
- ----------
609
- filter : str, opt
610
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
611
- If the value is None, we will default to the "OMAG Server Platform".
647
+ Parameters
648
+ ----------
649
+ filter : str, opt
650
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
651
+ If the value is None, we will default to the "OMAG Server Platform".
612
652
 
613
- server : str, optional
614
- The name of the server to get governance engine summaries from. If not provided, the default server name
615
- will be used.
653
+ server : str, optional
654
+ The name of the server to get governance engine summaries from. If not provided, the default server name
655
+ will be used.
616
656
 
617
- start_from : int, optional
618
- The index from which to start fetching the engine actions. Default is 0.
657
+ start_from : int, optional
658
+ The index from which to start fetching the engine actions. Default is 0.
619
659
 
620
660
 
621
- page_size : int, optional
622
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
661
+ page_size : int, optional
662
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
623
663
 
624
- Returns
625
- -------
626
- Response
627
- A lit of json dict with the platform reports.
664
+ Returns
665
+ -------
666
+ Response
667
+ A lit of json dict with the platform reports.
628
668
 
629
- Raises
630
- ------
631
- InvalidParameterException
632
- PropertyServerException
633
- UserNotAuthorizedException
669
+ Raises
670
+ ------
671
+ InvalidParameterException
672
+ PropertyServerException
673
+ UserNotAuthorizedException
634
674
 
635
675
  """
636
676
  loop = asyncio.get_event_loop()
637
- response = loop.run_until_complete(self._async_get_servers_by_name(filter, server))
677
+ response = loop.run_until_complete(
678
+ self._async_get_servers_by_name(filter, server)
679
+ )
638
680
  return response
639
681
 
640
- async def _async_get_servers_by_dep_impl_type(self, filter: str = "*", server:str = None, effective_time: str = None,
641
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
642
- """ Returns the list of servers with a particular deployed implementation type. The value is specified
643
- in the filter. If it is null, or no request body is supplied, all servers are returned.
644
- Async version.
645
-
646
- Parameters
647
- ----------
648
- filter : str, opt
649
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
650
- If the value is None, we will default to the "OMAG Server Platform".
651
-
652
- server : str, optional
653
- The name of the server to get governance engine summaries from. If not provided, the default server name
654
- will be used.
655
-
656
- start_from : int, optional
657
- The index from which to start fetching the engine actions. Default is 0.
658
-
659
-
660
- page_size : int, optional
661
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
662
-
663
- Returns
664
- -------
665
- Response
666
- A lit of json dict with the platform reports.
667
-
668
- Raises
669
- ------
670
- InvalidParameterException
671
- PropertyServerException
672
- UserNotAuthorizedException
682
+ async def _async_get_servers_by_dep_impl_type(
683
+ self,
684
+ filter: str = "*",
685
+ server: str = None,
686
+ effective_time: str = None,
687
+ start_from: int = 0,
688
+ page_size: int = max_paging_size,
689
+ ) -> str | list:
690
+ """Returns the list of servers with a particular deployed implementation type. The value is specified
691
+ in the filter. If it is null, or no request body is supplied, all servers are returned.
692
+ Async version.
693
+
694
+ Parameters
695
+ ----------
696
+ filter : str, opt
697
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
698
+ If the value is None, we will default to the "OMAG Server Platform".
699
+
700
+ server : str, optional
701
+ The name of the server to get governance engine summaries from. If not provided, the default server name
702
+ will be used.
703
+
704
+ start_from : int, optional
705
+ The index from which to start fetching the engine actions. Default is 0.
706
+
707
+
708
+ page_size : int, optional
709
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
710
+
711
+ Returns
712
+ -------
713
+ Response
714
+ A lit of json dict with the platform reports.
715
+
716
+ Raises
717
+ ------
718
+ InvalidParameterException
719
+ PropertyServerException
720
+ UserNotAuthorizedException
673
721
 
674
722
  """
675
723
  if server is None:
676
- server = self.server_name
724
+ server = self.server_name
677
725
 
678
- if filter == '*':
726
+ if filter == "*":
679
727
  filter = None
680
728
 
681
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/"
682
- f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}")
729
+ url = (
730
+ f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/"
731
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}"
732
+ )
683
733
 
684
- body = body_slimmer({ "filter": filter, "effective_time": effective_time})
734
+ body = body_slimmer({"filter": filter, "effective_time": effective_time})
685
735
 
686
736
  response = await self._async_make_request("POST", url, body)
687
737
 
688
- return response.json().get('elements','No platforms found')
738
+ return response.json().get("elements", "No platforms found")
689
739
 
690
- def get_servers_by_dep_impl_type(self, filter: str = "*", server:str = None, effective_time: str = None,
691
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
692
- """ Returns the list of servers with a particular deployed implementation type.
693
- The value is specified in the filter. If it is null, or no request body is supplied,
694
- all servers are returned.
740
+ def get_servers_by_dep_impl_type(
741
+ self,
742
+ filter: str = "*",
743
+ server: str = None,
744
+ effective_time: str = None,
745
+ start_from: int = 0,
746
+ page_size: int = max_paging_size,
747
+ ) -> str | list:
748
+ """Returns the list of servers with a particular deployed implementation type.
749
+ The value is specified in the filter. If it is null, or no request body is supplied,
750
+ all servers are returned.
695
751
 
696
- Parameters
697
- ----------
698
- filter : str, opt
699
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
700
- If the value is None, we will default to the "OMAG Server Platform".
752
+ Parameters
753
+ ----------
754
+ filter : str, opt
755
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
756
+ If the value is None, we will default to the "OMAG Server Platform".
701
757
 
702
- server : str, optional
703
- The name of the server to get governance engine summaries from. If not provided, the default server name
704
- will be used.
758
+ server : str, optional
759
+ The name of the server to get governance engine summaries from. If not provided, the default server name
760
+ will be used.
705
761
 
706
- start_from : int, optional
707
- The index from which to start fetching the engine actions. Default is 0.
762
+ start_from : int, optional
763
+ The index from which to start fetching the engine actions. Default is 0.
708
764
 
709
765
 
710
- page_size : int, optional
711
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
766
+ page_size : int, optional
767
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
712
768
 
713
- Returns
714
- -------
715
- Response
716
- A lit of json dict with the platform reports.
769
+ Returns
770
+ -------
771
+ Response
772
+ A lit of json dict with the platform reports.
717
773
 
718
- Raises
719
- ------
720
- InvalidParameterException
721
- PropertyServerException
722
- UserNotAuthorizedException
774
+ Raises
775
+ ------
776
+ InvalidParameterException
777
+ PropertyServerException
778
+ UserNotAuthorizedException
723
779
 
724
780
  """
725
781
  loop = asyncio.get_event_loop()
726
- response = loop.run_until_complete(self._async_get_servers_by_dep_impl_type(filter, server, effective_time,
727
- start_from, page_size))
782
+ response = loop.run_until_complete(
783
+ self._async_get_servers_by_dep_impl_type(
784
+ filter, server, effective_time, start_from, page_size
785
+ )
786
+ )
728
787
  return response
729
788
 
730
- async def _async_get_server_templates_by_dep_impl_type(self, filter: str = "*", server:str = None, effective_time: str = None,
731
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
732
- """ Returns the list of server templates with a particular deployed implementation type. The value is
733
- specified in the filter. If it is null, or no request body is supplied, all servers are returned.
734
- Async version.
735
-
736
- Parameters
737
- ----------
738
- filter : str, opt
739
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
740
- If the value is None, we will default to the "OMAG Server Platform".
741
-
742
- server : str, optional
743
- The name of the server to get governance engine summaries from. If not provided, the default server name
744
- will be used.
745
-
746
- start_from : int, optional
747
- The index from which to start fetching the engine actions. Default is 0.
748
-
749
-
750
- page_size : int, optional
751
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
752
-
753
- Returns
754
- -------
755
- Response
756
- A lit of json dict with the platform reports.
757
-
758
- Raises
759
- ------
760
- InvalidParameterException
761
- PropertyServerException
762
- UserNotAuthorizedException
789
+ async def _async_get_server_templates_by_dep_impl_type(
790
+ self,
791
+ filter: str = "*",
792
+ server: str = None,
793
+ effective_time: str = None,
794
+ start_from: int = 0,
795
+ page_size: int = max_paging_size,
796
+ ) -> str | list:
797
+ """Returns the list of server templates with a particular deployed implementation type. The value is
798
+ specified in the filter. If it is null, or no request body is supplied, all servers are returned.
799
+ Async version.
800
+
801
+ Parameters
802
+ ----------
803
+ filter : str, opt
804
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
805
+ If the value is None, we will default to the "OMAG Server Platform".
806
+
807
+ server : str, optional
808
+ The name of the server to get governance engine summaries from. If not provided, the default server name
809
+ will be used.
810
+
811
+ start_from : int, optional
812
+ The index from which to start fetching the engine actions. Default is 0.
813
+
814
+
815
+ page_size : int, optional
816
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
817
+
818
+ Returns
819
+ -------
820
+ Response
821
+ A lit of json dict with the platform reports.
822
+
823
+ Raises
824
+ ------
825
+ InvalidParameterException
826
+ PropertyServerException
827
+ UserNotAuthorizedException
763
828
 
764
829
  """
765
830
  if server is None:
766
- server = self.server_name
831
+ server = self.server_name
767
832
 
768
- if filter == '*':
833
+ if filter == "*":
769
834
  filter = None
770
835
 
771
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/"
772
- f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true")
836
+ url = (
837
+ f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/"
838
+ f"by-deployed-implementation-type?startFrom={start_from}&pageSize={page_size}&getTemplates=true"
839
+ )
773
840
 
774
- body = body_slimmer({ "filter": filter, "effective_time": effective_time})
841
+ body = body_slimmer({"filter": filter, "effective_time": effective_time})
775
842
 
776
843
  response = await self._async_make_request("POST", url, body)
777
844
 
778
- return response.json().get('elements','No platforms found')
845
+ return response.json().get("elements", "No platforms found")
779
846
 
780
- def get_server_templates_by_dep_impl_type(self, filter: str = "*", server:str = None, effective_time: str = None,
781
- start_from: int = 0, page_size: int = max_paging_size ) -> str | list:
782
- """ Returns the list of server templates with a particular deployed implementation type.
783
- The value is specified in the filter. If it is null, or no request body is supplied,
784
- all servers are returned.
847
+ def get_server_templates_by_dep_impl_type(
848
+ self,
849
+ filter: str = "*",
850
+ server: str = None,
851
+ effective_time: str = None,
852
+ start_from: int = 0,
853
+ page_size: int = max_paging_size,
854
+ ) -> str | list:
855
+ """Returns the list of server templates with a particular deployed implementation type.
856
+ The value is specified in the filter. If it is null, or no request body is supplied,
857
+ all servers are returned.
785
858
 
786
- Parameters
787
- ----------
788
- filter : str, opt
789
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
790
- If the value is None, we will default to the "OMAG Server Platform".
859
+ Parameters
860
+ ----------
861
+ filter : str, opt
862
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
863
+ If the value is None, we will default to the "OMAG Server Platform".
791
864
 
792
- server : str, optional
793
- The name of the server to get governance engine summaries from. If not provided, the default server name
794
- will be used.
865
+ server : str, optional
866
+ The name of the server to get governance engine summaries from. If not provided, the default server name
867
+ will be used.
795
868
 
796
- start_from : int, optional
797
- The index from which to start fetching the engine actions. Default is 0.
869
+ start_from : int, optional
870
+ The index from which to start fetching the engine actions. Default is 0.
798
871
 
799
872
 
800
- page_size : int, optional
801
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
873
+ page_size : int, optional
874
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
802
875
 
803
- Returns
804
- -------
805
- Response
806
- A lit of json dict with the platform reports.
876
+ Returns
877
+ -------
878
+ Response
879
+ A lit of json dict with the platform reports.
807
880
 
808
- Raises
809
- ------
810
- InvalidParameterException
811
- PropertyServerException
812
- UserNotAuthorizedException
881
+ Raises
882
+ ------
883
+ InvalidParameterException
884
+ PropertyServerException
885
+ UserNotAuthorizedException
813
886
 
814
887
  """
815
888
  loop = asyncio.get_event_loop()
816
- response = loop.run_until_complete(self._async_get_server_templates_by_dep_impl_type(filter, server, effective_time,
817
- start_from, page_size))
889
+ response = loop.run_until_complete(
890
+ self._async_get_server_templates_by_dep_impl_type(
891
+ filter, server, effective_time, start_from, page_size
892
+ )
893
+ )
818
894
  return response
819
895
 
896
+ async def _async_get_server_by_guid(
897
+ self, server_guid: str = None, server: str = None, effective_time: str = None
898
+ ) -> str | list:
899
+ """Returns details about the server's catalog entry (asset). Async version.
820
900
 
821
- async def _async_get_server_by_guid(self, server_guid: str = None, server:str = None,
822
- effective_time: str = None) -> str | list:
823
- """ Returns details about the server's catalog entry (asset). Async version.
901
+ Parameters
902
+ ----------
903
+ filter : str, opt
904
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
905
+ If the value is None, we will default to the "OMAG Server Platform".
824
906
 
825
- Parameters
826
- ----------
827
- filter : str, opt
828
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
829
- If the value is None, we will default to the "OMAG Server Platform".
907
+ server : str, optional
908
+ The name of the server to get governance engine summaries from. If not provided, the default server name
909
+ will be used.
830
910
 
831
- server : str, optional
832
- The name of the server to get governance engine summaries from. If not provided, the default server name
833
- will be used.
834
-
835
- start_from : int, optional
836
- The index from which to start fetching the engine actions. Default is 0.
911
+ start_from : int, optional
912
+ The index from which to start fetching the engine actions. Default is 0.
837
913
 
838
914
 
839
- page_size : int, optional
840
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
915
+ page_size : int, optional
916
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
841
917
 
842
- Returns
843
- -------
844
- Response
845
- A lit of json dict with the platform reports.
918
+ Returns
919
+ -------
920
+ Response
921
+ A lit of json dict with the platform reports.
846
922
 
847
- Raises
848
- ------
849
- InvalidParameterException
850
- PropertyServerException
851
- UserNotAuthorizedException
923
+ Raises
924
+ ------
925
+ InvalidParameterException
926
+ PropertyServerException
927
+ UserNotAuthorizedException
852
928
 
853
929
  """
854
930
  if server is None:
855
- server = self.server_name
931
+ server = self.server_name
856
932
 
857
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}")
933
+ url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}"
858
934
 
859
935
  if effective_time is not None:
860
- body = {
861
- "effectiveTime": effective_time
862
- }
936
+ body = {"effectiveTime": effective_time}
863
937
  response = await self._async_make_request("POST", url, body)
864
938
 
865
939
  else:
866
940
  response = await self._async_make_request("POST", url)
867
941
 
868
- return response.json().get('element','No servers found')
942
+ return response.json().get("element", "No servers found")
869
943
 
870
- def get_server_by_guid(self, server_guid: str = None, server: str = None,
871
- effective_time: str = None) -> str | list:
872
- """ Returns details about the server's catalog entry (asset). Async version.
944
+ def get_server_by_guid(
945
+ self, server_guid: str = None, server: str = None, effective_time: str = None
946
+ ) -> str | list:
947
+ """Returns details about the server's catalog entry (asset). Async version.
873
948
 
874
- Parameters
875
- ----------
876
- filter : str, opt
877
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
878
- If the value is None, we will default to the "OMAG Server Platform".
949
+ Parameters
950
+ ----------
951
+ filter : str, opt
952
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
953
+ If the value is None, we will default to the "OMAG Server Platform".
879
954
 
880
- server : str, optional
881
- The name of the server to get governance engine summaries from. If not provided, the default server name
882
- will be used.
955
+ server : str, optional
956
+ The name of the server to get governance engine summaries from. If not provided, the default server name
957
+ will be used.
883
958
 
884
- start_from : int, optional
885
- The index from which to start fetching the engine actions. Default is 0.
959
+ start_from : int, optional
960
+ The index from which to start fetching the engine actions. Default is 0.
886
961
 
887
962
 
888
- page_size : int, optional
889
- The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
963
+ page_size : int, optional
964
+ The maximum number of engine actions to fetch in a single request. Default is `max_paging_size`.
890
965
 
891
- Returns
892
- -------
893
- Response
894
- A lit of json dict with the platform reports.
966
+ Returns
967
+ -------
968
+ Response
969
+ A lit of json dict with the platform reports.
895
970
 
896
971
  """
897
972
  loop = asyncio.get_event_loop()
898
- response = loop.run_until_complete(self._async_get_server_by_guid(server_guid, server,
899
- effective_time))
973
+ response = loop.run_until_complete(
974
+ self._async_get_server_by_guid(server_guid, server, effective_time)
975
+ )
900
976
  return response
901
977
 
978
+ async def _async_get_server_report(
979
+ self, server_guid: str = None, server: str = None
980
+ ) -> str | list:
981
+ """Returns details about the running server. Async version.
902
982
 
903
- async def _async_get_server_report(self, server_guid: str = None, server: str = None) -> str | list:
904
- """ Returns details about the running server. Async version.
983
+ Parameters
984
+ ----------
985
+ filter : str, opt
986
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
987
+ If the value is None, we will default to the "OMAG Server Platform".
905
988
 
906
- Parameters
907
- ----------
908
- filter : str, opt
909
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
910
- If the value is None, we will default to the "OMAG Server Platform".
989
+ server : str, optional
990
+ The name of the server to get governance engine summaries from. If not provided, the default server name
991
+ will be used.
911
992
 
912
- server : str, optional
913
- The name of the server to get governance engine summaries from. If not provided, the default server name
914
- will be used.
915
993
 
994
+ Returns
995
+ -------
996
+ Response
997
+ A lit of json dict with the platform reports.
916
998
 
917
- Returns
918
- -------
919
- Response
920
- A lit of json dict with the platform reports.
921
-
922
- Raises
923
- ------
924
- InvalidParameterException
925
- PropertyServerException
926
- UserNotAuthorizedException
999
+ Raises
1000
+ ------
1001
+ InvalidParameterException
1002
+ PropertyServerException
1003
+ UserNotAuthorizedException
927
1004
 
928
1005
  """
929
1006
  if server is None:
930
1007
  server = self.server_name
931
1008
 
932
- url = (f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}/report")
1009
+ url = f"{self.platform_url}/servers/{server}/api/open-metadata/runtime-manager/software-servers/{server_guid}/report"
933
1010
 
934
1011
  response = await self._async_make_request("GET", url)
935
1012
 
936
- return response.json().get('elements', 'No server found')
1013
+ return response.json().get("elements", "No server found")
937
1014
 
1015
+ def get_server_report(
1016
+ self, server_guid: str = None, server: str = None
1017
+ ) -> str | list:
1018
+ """Returns details about the running server.
938
1019
 
939
- def get_server_report(self, server_guid: str = None, server: str = None) -> str | list:
940
- """ Returns details about the running server.
1020
+ Parameters
1021
+ ----------
1022
+ filter : str, opt
1023
+ Filter specifies the kind of deployed implementation type of the platforms to return information for.
1024
+ If the value is None, we will default to the "OMAG Server Platform".
941
1025
 
942
- Parameters
943
- ----------
944
- filter : str, opt
945
- Filter specifies the kind of deployed implementation type of the platforms to return information for.
946
- If the value is None, we will default to the "OMAG Server Platform".
1026
+ server : str, optional
1027
+ The name of the server to get governance engine summaries from. If not provided, the default server name
1028
+ will be used.
947
1029
 
948
- server : str, optional
949
- The name of the server to get governance engine summaries from. If not provided, the default server name
950
- will be used.
951
-
952
- Returns
953
- -------
954
- Response
955
- A lit of json dict with the platform reports.
1030
+ Returns
1031
+ -------
1032
+ Response
1033
+ A lit of json dict with the platform reports.
956
1034
 
957
- Raises
958
- ------
959
- InvalidParameterException
960
- PropertyServerException
961
- UserNotAuthorizedException
1035
+ Raises
1036
+ ------
1037
+ InvalidParameterException
1038
+ PropertyServerException
1039
+ UserNotAuthorizedException
962
1040
 
963
1041
  """
964
1042
  loop = asyncio.get_event_loop()
965
- response = loop.run_until_complete(self._async_get_server_report(server_guid, server))
1043
+ response = loop.run_until_complete(
1044
+ self._async_get_server_report(server_guid, server)
1045
+ )
966
1046
  return response
967
-