pyegeria 0.7.45.1__py3-none-any.whl → 0.8.1__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 (47) hide show
  1. examples/widgets/cat/list_cert_types.py +61 -43
  2. examples/widgets/cat/list_projects.py +1 -1
  3. examples/widgets/my/my_profile_actions.py +51 -32
  4. examples/widgets/ops/engine_actions.py +35 -23
  5. examples/widgets/ops/integration_daemon_actions.py +51 -32
  6. examples/widgets/tech/get_element_info.py +63 -38
  7. examples/widgets/tech/get_guid_info.py +50 -27
  8. examples/widgets/tech/list_asset_types.py +33 -23
  9. examples/widgets/tech/list_elements.py +44 -34
  10. examples/widgets/tech/list_elements_x.py +69 -49
  11. examples/widgets/tech/list_registered_services.py +44 -24
  12. examples/widgets/tech/list_related_specification.py +70 -45
  13. examples/widgets/tech/list_relationship_types.py +50 -31
  14. examples/widgets/tech/list_valid_metadata_values.py +57 -28
  15. examples/widgets/tech/x_list_related_elements.py +54 -34
  16. pyegeria/Xloaded_resources_omvs.py +43 -41
  17. pyegeria/__init__.py +6 -2
  18. pyegeria/_client.py +142 -102
  19. pyegeria/_deprecated_gov_engine.py +218 -167
  20. pyegeria/action_author_omvs.py +107 -88
  21. pyegeria/asset_catalog_omvs.py +467 -395
  22. pyegeria/automated_curation_omvs.py +2 -2
  23. pyegeria/classification_manager_omvs.py +3 -9
  24. pyegeria/collection_manager_omvs.py +1957 -1519
  25. pyegeria/core_omag_server_config.py +310 -192
  26. pyegeria/egeria_cat_client.py +88 -0
  27. pyegeria/egeria_config_client.py +37 -0
  28. pyegeria/egeria_my_client.py +47 -0
  29. pyegeria/egeria_ops_client.py +67 -0
  30. pyegeria/egeria_tech_client.py +77 -0
  31. pyegeria/feedback_manager_omvs.py +633 -631
  32. pyegeria/full_omag_server_config.py +330 -158
  33. pyegeria/glossary_browser_omvs.py +927 -474
  34. pyegeria/glossary_manager_omvs.py +1033 -543
  35. pyegeria/my_profile_omvs.py +714 -574
  36. pyegeria/platform_services.py +228 -176
  37. pyegeria/project_manager_omvs.py +1158 -903
  38. pyegeria/registered_info.py +76 -74
  39. pyegeria/runtime_manager_omvs.py +749 -670
  40. pyegeria/server_operations.py +123 -85
  41. pyegeria/valid_metadata_omvs.py +268 -168
  42. {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/METADATA +1 -1
  43. {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/RECORD +46 -42
  44. pyegeria/tech_guids_31-08-2024 14:33.py +0 -79
  45. {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/LICENSE +0 -0
  46. {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/WHEEL +0 -0
  47. {pyegeria-0.7.45.1.dist-info → pyegeria-0.8.1.dist-info}/entry_points.txt +0 -0
@@ -9,7 +9,7 @@ Copyright Contributors to the ODPi Egeria project.
9
9
  import json
10
10
 
11
11
  from pyegeria import Client
12
- from pyegeria import (InvalidParameterException)
12
+ from pyegeria import InvalidParameterException
13
13
  from pyegeria._globals import enable_ssl_check
14
14
  from pyegeria._validators import validate_name, validate_url
15
15
  from .core_omag_server_config import CoreServerConfig
@@ -34,14 +34,23 @@ class FullServerConfig(CoreServerConfig):
34
34
 
35
35
  """
36
36
 
37
- def __init__(self, server_name: str, platform_url: str, user_id: str, user_pwd: str = None,
38
- verify_flag: bool = enable_ssl_check, ):
37
+ def __init__(
38
+ self,
39
+ server_name: str,
40
+ platform_url: str,
41
+ user_id: str,
42
+ user_pwd: str = None,
43
+ ):
39
44
  self.admin_command_root: str
40
- Client.__init__(self, server_name, platform_url, user_id, user_pwd, verify_flag)
41
- self.admin_command_root = (self.platform_url + "/open-metadata/admin-services/users/" + user_id)
42
-
43
- def get_access_services_topic_names(self, access_service_name: str, server_name: str = None) -> list[str]:
44
- """ Retrieve the topic names for this access service.
45
+ Client.__init__(self, server_name, platform_url, user_id, user_pwd)
46
+ self.admin_command_root = (
47
+ self.platform_url + "/open-metadata/admin-services/users/" + user_id
48
+ )
49
+
50
+ def get_access_services_topic_names(
51
+ self, access_service_name: str, server_name: str = None
52
+ ) -> list[str]:
53
+ """Retrieve the topic names for this access service.
45
54
  Parameters
46
55
  ----------
47
56
  access_service_name : str
@@ -60,14 +69,19 @@ class FullServerConfig(CoreServerConfig):
60
69
  server_name = self.server_name
61
70
  validate_name(access_service_name)
62
71
  url = (
63
- self.admin_command_root + "/servers/" + server_name + "/access-services/" + access_service_name +
64
- "/topic-names")
72
+ self.admin_command_root
73
+ + "/servers/"
74
+ + server_name
75
+ + "/access-services/"
76
+ + access_service_name
77
+ + "/topic-names"
78
+ )
65
79
  response = self.make_request("GET", url)
66
80
 
67
81
  return response.json() # todo fix
68
82
 
69
83
  def get_all_access_services_topic_names(self, server_name: str = None) -> list:
70
- """ Retrieve the topic names for all access services.
84
+ """Retrieve the topic names for all access services.
71
85
  Parameters
72
86
  ----------
73
87
  server_name : str, optional
@@ -82,13 +96,20 @@ class FullServerConfig(CoreServerConfig):
82
96
  if server_name is None:
83
97
  server_name = self.server_name
84
98
 
85
- url = (self.admin_command_root + "/servers/" + server_name + "/access-services/topic-names")
99
+ url = (
100
+ self.admin_command_root
101
+ + "/servers/"
102
+ + server_name
103
+ + "/access-services/topic-names"
104
+ )
86
105
  response = self.make_request("GET", url)
87
106
 
88
107
  return response.json() # todo fix
89
108
 
90
- def set_access_services_configuration(self, access_services_body: str, server_name: str = None) -> None:
91
- """ Set up the configuration for selected open metadata access services (OMASs).
109
+ def set_access_services_configuration(
110
+ self, access_services_body: str, server_name: str = None
111
+ ) -> None:
112
+ """Set up the configuration for selected open metadata access services (OMASs).
92
113
  This overrides the current configured values.
93
114
 
94
115
  Parameters
@@ -108,36 +129,55 @@ class FullServerConfig(CoreServerConfig):
108
129
  if server_name is None:
109
130
  server_name = self.server_name
110
131
 
111
- url = self.admin_command_root + "/servers/" + server_name + "/access-services/configuration"
132
+ url = (
133
+ self.admin_command_root
134
+ + "/servers/"
135
+ + server_name
136
+ + "/access-services/configuration"
137
+ )
112
138
  self.make_request("POST", url, access_services_body)
113
139
  return
114
140
 
115
- def override_access_service_in_topic_name(self, access_service_name: str, new_topic_name: str,
116
- server_name: str = None) -> None:
141
+ def override_access_service_in_topic_name(
142
+ self, access_service_name: str, new_topic_name: str, server_name: str = None
143
+ ) -> None:
117
144
  """override the in topic for the access service"""
118
145
  if server_name is None:
119
146
  server_name = self.server_name
120
147
 
121
148
  url = (
122
- self.admin_command_root + "/servers/" + server_name + "/access-services/" + access_service_name +
123
- "/topic-names/in-topic")
149
+ self.admin_command_root
150
+ + "/servers/"
151
+ + server_name
152
+ + "/access-services/"
153
+ + access_service_name
154
+ + "/topic-names/in-topic"
155
+ )
124
156
  self.make_request("POST", url, new_topic_name)
125
157
  return
126
158
 
127
- def override_access_service_out_topic_name(self, access_service_name: str, new_topic_name: str,
128
- server_name: str = None) -> None:
129
- """ override the out topic for the access service"""
159
+ def override_access_service_out_topic_name(
160
+ self, access_service_name: str, new_topic_name: str, server_name: str = None
161
+ ) -> None:
162
+ """override the out topic for the access service"""
130
163
  if server_name is None:
131
164
  server_name = self.server_name
132
165
 
133
166
  url = (
134
- self.admin_command_root + "/servers/" + server_name + "/access-services/" + access_service_name +
135
- "/topic-names/out-topic")
167
+ self.admin_command_root
168
+ + "/servers/"
169
+ + server_name
170
+ + "/access-services/"
171
+ + access_service_name
172
+ + "/topic-names/out-topic"
173
+ )
136
174
  self.make_request("POST", url, new_topic_name)
137
175
  return
138
176
 
139
- def set_audit_log_destinations(self, audit_dest_body: str, server_name: str = None) -> None:
140
- """ Sets the audit log destinations for a server
177
+ def set_audit_log_destinations(
178
+ self, audit_dest_body: str, server_name: str = None
179
+ ) -> None:
180
+ """Sets the audit log destinations for a server
141
181
 
142
182
  /open-metadata/admin-services/users/{userId}/servers/{serverName}/audit-log-destinations
143
183
 
@@ -167,12 +207,19 @@ class FullServerConfig(CoreServerConfig):
167
207
  if server_name is None:
168
208
  server_name = self.server_name
169
209
 
170
- url = self.admin_command_root + "/servers/" + server_name + "/audit-log-destinations"
210
+ url = (
211
+ self.admin_command_root
212
+ + "/servers/"
213
+ + server_name
214
+ + "/audit-log-destinations"
215
+ )
171
216
  self.make_request("POST", url, audit_dest_body)
172
217
  return
173
218
 
174
- def update_audit_log_destination(self, connection_name: str, audit_dest_body: str, server_name: str = None) -> None:
175
- """ Update an audit log destination that is identified with the supplied destination name
219
+ def update_audit_log_destination(
220
+ self, connection_name: str, audit_dest_body: str, server_name: str = None
221
+ ) -> None:
222
+ """Update an audit log destination that is identified with the supplied destination name
176
223
  with the supplied connection object.
177
224
  Parameters
178
225
  ----------
@@ -196,13 +243,20 @@ class FullServerConfig(CoreServerConfig):
196
243
  if server_name is None:
197
244
  server_name = self.server_name
198
245
 
199
- url = (self.admin_command_root + "/servers/" + server_name + "/audit-log-destinations/connection/" +
200
- connection_name)
246
+ url = (
247
+ self.admin_command_root
248
+ + "/servers/"
249
+ + server_name
250
+ + "/audit-log-destinations/connection/"
251
+ + connection_name
252
+ )
201
253
  self.make_request("POST", url, audit_dest_body)
202
254
  return
203
255
 
204
- def add_audit_log_destination(self, connection_body: str, server_name: str = None) -> None:
205
- """ Adds an audit log destination to a server.
256
+ def add_audit_log_destination(
257
+ self, connection_body: str, server_name: str = None
258
+ ) -> None:
259
+ """Adds an audit log destination to a server.
206
260
 
207
261
  /open-metadata/admin-services/users/{userId}/servers/{serverName}/audit-log-destinations/connection
208
262
 
@@ -233,12 +287,19 @@ class FullServerConfig(CoreServerConfig):
233
287
  if server_name is None:
234
288
  server_name = self.server_name
235
289
 
236
- url = self.admin_command_root + "/servers/" + server_name + "/audit-log-destinations/connection"
290
+ url = (
291
+ self.admin_command_root
292
+ + "/servers/"
293
+ + server_name
294
+ + "/audit-log-destinations/connection"
295
+ )
237
296
  self.make_request("POST", url, connection_body)
238
297
  return
239
298
 
240
- def set_cohort_config(self, cohort_name: str, cohort_config_body: str, server_name: str = None) -> None:
241
- """ Set up the configuration properties for a cohort. This may reconfigure an existing cohort or
299
+ def set_cohort_config(
300
+ self, cohort_name: str, cohort_config_body: str, server_name: str = None
301
+ ) -> None:
302
+ """Set up the configuration properties for a cohort. This may reconfigure an existing cohort or
242
303
  create a cohort. Use setCohortMode to delete a cohort.
243
304
  Parameters
244
305
  ----------
@@ -265,12 +326,21 @@ class FullServerConfig(CoreServerConfig):
265
326
  if cohort_config_body is None:
266
327
  raise InvalidParameterException(cohort_config_body)
267
328
 
268
- url = self.admin_command_root + "/servers/" + server_name + "/cohorts/" + cohort_name + "/configuration"
329
+ url = (
330
+ self.admin_command_root
331
+ + "/servers/"
332
+ + server_name
333
+ + "/cohorts/"
334
+ + cohort_name
335
+ + "/configuration"
336
+ )
269
337
  self.make_request("POST", url, cohort_config_body)
270
338
  return
271
339
 
272
- def clear_cohort_configuration(self, cohort_name: str, server_name: str = None) -> None:
273
- """ Retrieves the stored configurations for a server
340
+ def clear_cohort_configuration(
341
+ self, cohort_name: str, server_name: str = None
342
+ ) -> None:
343
+ """Retrieves the stored configurations for a server
274
344
  Parameters
275
345
  ----------
276
346
  cohort_name : str
@@ -297,8 +367,10 @@ class FullServerConfig(CoreServerConfig):
297
367
 
298
368
  self.make_request("DELETE", url)
299
369
 
300
- def get_dedicated_cohort_topic_names(self, cohort_name: str, server_name: str = None) -> list:
301
- """ Retrieve the current topic name for the cohort. This call can only be made once the cohort is set up with
370
+ def get_dedicated_cohort_topic_names(
371
+ self, cohort_name: str, server_name: str = None
372
+ ) -> list:
373
+ """Retrieve the current topic name for the cohort. This call can only be made once the cohort is set up with
302
374
  add_cohort_registration().
303
375
 
304
376
  Parameters
@@ -320,12 +392,19 @@ class FullServerConfig(CoreServerConfig):
320
392
 
321
393
  validate_name(cohort_name)
322
394
 
323
- url = self.admin_command_root + "/servers/" + server_name + "/cohorts/" + cohort_name + "/dedicated-topic-names"
395
+ url = (
396
+ self.admin_command_root
397
+ + "/servers/"
398
+ + server_name
399
+ + "/cohorts/"
400
+ + cohort_name
401
+ + "/dedicated-topic-names"
402
+ )
324
403
  response = self.make_request("POST", url)
325
404
  return response.json().get("topicNames")
326
405
 
327
406
  def get_cohort_topic_name(self, cohort_name: str, server_name: str = None) -> str:
328
- """ Retrieve the current topic name for the cohort. This call can only be made once the
407
+ """Retrieve the current topic name for the cohort. This call can only be made once the
329
408
  cohort is set up with add_cohort_registration().
330
409
  Parameters
331
410
  ----------
@@ -353,8 +432,10 @@ class FullServerConfig(CoreServerConfig):
353
432
  response = self.make_request("GET", url)
354
433
  return response.json().get("topicName")
355
434
 
356
- def override_cohort_topic_name(self, cohort_name: str, topic_override: str, server_name: str = None) -> None:
357
- """ Override the current name for the single topic for the cohort. This call can only be made once the
435
+ def override_cohort_topic_name(
436
+ self, cohort_name: str, topic_override: str, server_name: str = None
437
+ ) -> None:
438
+ """Override the current name for the single topic for the cohort. This call can only be made once the
358
439
  cohort is set up with add_cohort_registration().
359
440
  Parameters
360
441
  ----------
@@ -373,13 +454,21 @@ class FullServerConfig(CoreServerConfig):
373
454
  validate_name(cohort_name)
374
455
  validate_name(topic_override)
375
456
 
376
- url = self.admin_command_root + "/servers/" + server_name + "/cohorts/" + cohort_name + "/topic-name-override"
457
+ url = (
458
+ self.admin_command_root
459
+ + "/servers/"
460
+ + server_name
461
+ + "/cohorts/"
462
+ + cohort_name
463
+ + "/topic-name-override"
464
+ )
377
465
  self.make_request("POST", url, topic_override)
378
466
  return
379
467
 
380
- def override_instances_cohort_topic_name(self, cohort_name: str, topic_override: str,
381
- server_name: str = None) -> None:
382
- """ Override the current name for the "instances" topic for the cohort. This call can only be made once
468
+ def override_instances_cohort_topic_name(
469
+ self, cohort_name: str, topic_override: str, server_name: str = None
470
+ ) -> None:
471
+ """Override the current name for the "instances" topic for the cohort. This call can only be made once
383
472
  the cohort is set up with add_cohort_registration().
384
473
  Parameters
385
474
  ----------
@@ -399,14 +488,21 @@ class FullServerConfig(CoreServerConfig):
399
488
  validate_name(cohort_name)
400
489
  validate_name(topic_override)
401
490
 
402
- url = (self.admin_command_root + "/servers/" + server_name + "/cohorts/" + cohort_name +
403
- "/topic-name-override/instances")
491
+ url = (
492
+ self.admin_command_root
493
+ + "/servers/"
494
+ + server_name
495
+ + "/cohorts/"
496
+ + cohort_name
497
+ + "/topic-name-override/instances"
498
+ )
404
499
  self.make_request("POST", url, topic_override)
405
500
  return
406
501
 
407
- def override_registration_cohort_topic_name(self, cohort_name: str, topic_override: str,
408
- server_name: str = None) -> None:
409
- """ Override the current name for the registration topic for the cohort. This call can only be made once
502
+ def override_registration_cohort_topic_name(
503
+ self, cohort_name: str, topic_override: str, server_name: str = None
504
+ ) -> None:
505
+ """Override the current name for the registration topic for the cohort. This call can only be made once
410
506
  the cohort is set up with add_cohort_registration().
411
507
  Parameters
412
508
  ----------
@@ -428,13 +524,21 @@ class FullServerConfig(CoreServerConfig):
428
524
  validate_name(cohort_name)
429
525
  validate_name(topic_override)
430
526
 
431
- url = (self.admin_command_root + "/servers/" + server_name + "/cohorts/" + cohort_name +
432
- "/topic-name-override/registration")
527
+ url = (
528
+ self.admin_command_root
529
+ + "/servers/"
530
+ + server_name
531
+ + "/cohorts/"
532
+ + cohort_name
533
+ + "/topic-name-override/registration"
534
+ )
433
535
  self.make_request("POST", url, topic_override)
434
536
  return
435
537
 
436
- def override_types_cohort_topic_name(self, cohort_name: str, topic_override: str, server_name: str = None) -> None:
437
- """ Override the current name for the "types" topic for the cohort. This call can only be made once
538
+ def override_types_cohort_topic_name(
539
+ self, cohort_name: str, topic_override: str, server_name: str = None
540
+ ) -> None:
541
+ """Override the current name for the "types" topic for the cohort. This call can only be made once
438
542
  the cohort is set up with add_cohort_registration().
439
543
  Parameters
440
544
  ----------
@@ -456,42 +560,50 @@ class FullServerConfig(CoreServerConfig):
456
560
  validate_name(cohort_name)
457
561
  validate_name(topic_override)
458
562
 
459
- url = (self.admin_command_root + "/servers/" + server_name + "/cohorts/" + cohort_name +
460
- "/topic-name-override/types")
563
+ url = (
564
+ self.admin_command_root
565
+ + "/servers/"
566
+ + server_name
567
+ + "/cohorts/"
568
+ + cohort_name
569
+ + "/topic-name-override/types"
570
+ )
461
571
  self.make_request("POST", url, topic_override)
462
572
  return
463
573
 
464
- def add_full_cohort_registration(self, cohort_name: str, topic_structure: str, server_name: str = None) -> None:
465
- """ add a full cohort registration
574
+ def add_full_cohort_registration(
575
+ self, cohort_name: str, topic_structure: str, server_name: str = None
576
+ ) -> None:
577
+ """add a full cohort registration
466
578
 
467
- Parameters
468
- ----------
469
- cohort_name : str
470
- Name of the cohort to be registered.
471
- topic_structure : str
472
- Topic structure for the cohort. This is a string from an enumerated list.
473
- 'Dedicated Cohort Topics', description='The cohort members use three topics to exchange information.
474
- One for registration requests, one for type validation and one for exchange of instances stored by the
475
- cohort members.
476
- This is the preferred and optimal approach
477
- 'Single Topic', description='All asynchronous communication between cohort members is via a single topic.
478
- This is the original design and may still be used when communicating with back level cohort members.
479
- 'Both Single and Dedicated Topics', description='Both the single cohort topic and the dedicated topics are
480
- set up and used. This is necessary when the cohort has members with different capabilities.
481
- This configuration may cause some events to be processed twice.'
482
- server_name : str, optional
483
- Name of the server to which the cohort should be added. Defaults to None.
579
+ Parameters
580
+ ----------
581
+ cohort_name : str
582
+ Name of the cohort to be registered.
583
+ topic_structure : str
584
+ Topic structure for the cohort. This is a string from an enumerated list.
585
+ 'Dedicated Cohort Topics', description='The cohort members use three topics to exchange information.
586
+ One for registration requests, one for type validation and one for exchange of instances stored by the
587
+ cohort members.
588
+ This is the preferred and optimal approach
589
+ 'Single Topic', description='All asynchronous communication between cohort members is via a single topic.
590
+ This is the original design and may still be used when communicating with back level cohort members.
591
+ 'Both Single and Dedicated Topics', description='Both the single cohort topic and the dedicated topics are
592
+ set up and used. This is necessary when the cohort has members with different capabilities.
593
+ This configuration may cause some events to be processed twice.'
594
+ server_name : str, optional
595
+ Name of the server to which the cohort should be added. Defaults to None.
484
596
 
485
- Returns
486
- -------
487
- None
597
+ Returns
598
+ -------
599
+ None
488
600
 
489
- Raises
490
- ------
491
- InvalidParameterException
492
- If the response code is not 200 after making the POST request.
601
+ Raises
602
+ ------
603
+ InvalidParameterException
604
+ If the response code is not 200 after making the POST request.
493
605
 
494
- """
606
+ """
495
607
  if server_name is None:
496
608
  server_name = self.server_name
497
609
  validate_name(cohort_name)
@@ -499,8 +611,10 @@ class FullServerConfig(CoreServerConfig):
499
611
  url = f"{self.admin_command_root}/servers/{server_name}/cohorts/{cohort_name}/topic-structure/{topic_structure}"
500
612
  self.make_request("POST", url)
501
613
 
502
- def set_server_configuration(self, config_body: str, server_name: str = None) -> None | str:
503
- """ Sets the configurations for a server
614
+ def set_server_configuration(
615
+ self, config_body: str, server_name: str = None
616
+ ) -> None | str:
617
+ """Sets the configurations for a server
504
618
  Parameters
505
619
  ----------
506
620
 
@@ -536,7 +650,7 @@ class FullServerConfig(CoreServerConfig):
536
650
  raise InvalidParameterException(response.content)
537
651
 
538
652
  def clear_stored_configuration(self, server_name: str = None) -> None | str:
539
- """ Retrieves the stored configurations for a server
653
+ """Retrieves the stored configurations for a server
540
654
  Parameters
541
655
  ----------
542
656
 
@@ -571,8 +685,10 @@ class FullServerConfig(CoreServerConfig):
571
685
  else:
572
686
  raise InvalidParameterException(response.content)
573
687
 
574
- def deploy_stored_configurations(self, target_url_root: str, server_name: str = None) -> None:
575
- """ Push the configuration for the server to another OMAG Server Platform.
688
+ def deploy_stored_configurations(
689
+ self, target_url_root: str, server_name: str = None
690
+ ) -> None:
691
+ """Push the configuration for the server to another OMAG Server Platform.
576
692
  Parameters
577
693
  ----------
578
694
  target_url_root : str
@@ -599,7 +715,7 @@ class FullServerConfig(CoreServerConfig):
599
715
  self.make_request("POST", url, target_url_root)
600
716
 
601
717
  def get_event_bus(self, server_name: str = None) -> dict:
602
- """ Returns the event bus configuration for the specified server
718
+ """Returns the event bus configuration for the specified server
603
719
 
604
720
  Parameters
605
721
  ----------
@@ -628,7 +744,9 @@ class FullServerConfig(CoreServerConfig):
628
744
  response = self.make_request("GET", url)
629
745
  return response.json().get("config")
630
746
 
631
- def set_event_bus_detailed(self, connector_provider: str, topic_url_root: str, server_name: str = None) -> None:
747
+ def set_event_bus_detailed(
748
+ self, connector_provider: str, topic_url_root: str, server_name: str = None
749
+ ) -> None:
632
750
  """
633
751
  Parameters
634
752
  ----------
@@ -665,12 +783,14 @@ class FullServerConfig(CoreServerConfig):
665
783
  if server_name is None:
666
784
  server_name = self.server_name
667
785
 
668
- url = (f"{self.admin_command_root}/servers/{server_name}/event-bus?connectorProvider="
669
- f"{connector_provider}&topicURLRoot={topic_url_root}")
786
+ url = (
787
+ f"{self.admin_command_root}/servers/{server_name}/event-bus?connectorProvider="
788
+ f"{connector_provider}&topicURLRoot={topic_url_root}"
789
+ )
670
790
  self.make_request("POST", url)
671
791
 
672
792
  def delete_event_bus(self, server_name: str = None) -> None:
673
- """ Delete the event bus configuration for the given server.
793
+ """Delete the event bus configuration for the given server.
674
794
 
675
795
  Parameters
676
796
  ----------
@@ -755,7 +875,9 @@ class FullServerConfig(CoreServerConfig):
755
875
  else:
756
876
  return
757
877
 
758
- def set_server_user_password(self, server_user_pwd: str, server_name: str = None) -> None:
878
+ def set_server_user_password(
879
+ self, server_user_pwd: str, server_name: str = None
880
+ ) -> None:
759
881
  if server_name is None:
760
882
  server_name = self.server_name
761
883
  url = f"{self.admin_command_root}/servers/{server_name}/server-user-password?password={server_user_pwd}"
@@ -777,10 +899,17 @@ class FullServerConfig(CoreServerConfig):
777
899
  else:
778
900
  return
779
901
 
780
- def set_local_repository_config(self, repository_body: str, server_name: str = None) -> None:
902
+ def set_local_repository_config(
903
+ self, repository_body: str, server_name: str = None
904
+ ) -> None:
781
905
  if server_name is None:
782
906
  server_name = self.server_name
783
- url = self.admin_command_root + "/servers/" + server_name + "/local-repository/configuration"
907
+ url = (
908
+ self.admin_command_root
909
+ + "/servers/"
910
+ + server_name
911
+ + "/local-repository/configuration"
912
+ )
784
913
  response = self.make_request("POST", url, payload=repository_body)
785
914
  related_code = response.json().get("relatedHTTPCode")
786
915
  if related_code != 200:
@@ -788,15 +917,18 @@ class FullServerConfig(CoreServerConfig):
788
917
  else:
789
918
  return
790
919
 
791
- def set_plug_in_repository_connection(self, repository_connection_body: str, server_name: str = None) -> None:
920
+ def set_plug_in_repository_connection(
921
+ self, repository_connection_body: str, server_name: str = None
922
+ ) -> None:
792
923
  if server_name is None:
793
924
  server_name = self.server_name
794
925
  url = f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/connection"
795
926
  self.make_request("POST", url, payload=repository_connection_body)
796
927
 
797
- def set_plug_in_repository_connection_provider(self, repository_connection_provider: str,
798
- server_name: str = None) -> None:
799
- """ Set the local repository connection with a user specified connection provider
928
+ def set_plug_in_repository_connection_provider(
929
+ self, repository_connection_provider: str, server_name: str = None
930
+ ) -> None:
931
+ """Set the local repository connection with a user specified connection provider
800
932
 
801
933
  Parameters
802
934
  ----------
@@ -822,11 +954,15 @@ class FullServerConfig(CoreServerConfig):
822
954
  """
823
955
  if server_name is None:
824
956
  server_name = self.server_name
825
- url = (f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/"
826
- f"details?connectionProvider={repository_connection_provider}")
957
+ url = (
958
+ f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/"
959
+ f"details?connectionProvider={repository_connection_provider}"
960
+ )
827
961
  self.make_request("POST", url)
828
962
 
829
- def set_open_metadata_archives(self, archives_list_body: str, server_name: str = None) -> None:
963
+ def set_open_metadata_archives(
964
+ self, archives_list_body: str, server_name: str = None
965
+ ) -> None:
830
966
  if server_name is None:
831
967
  server_name = self.server_name
832
968
  url = f"{self.admin_command_root}/servers/{server_name}/open-metadata-archives"
@@ -837,32 +973,34 @@ class FullServerConfig(CoreServerConfig):
837
973
  else:
838
974
  return
839
975
 
840
- def set_descriptive_server_type(self, type_name: str, server_name: str = None) -> None:
841
- """ Set descriptiveServerType for this OMAG server
976
+ def set_descriptive_server_type(
977
+ self, type_name: str, server_name: str = None
978
+ ) -> None:
979
+ """Set descriptiveServerType for this OMAG server
842
980
 
843
- Parameters
844
- ----------
845
- type_name : str
846
- The name of the descriptive server type to set.
981
+ Parameters
982
+ ----------
983
+ type_name : str
984
+ The name of the descriptive server type to set.
847
985
 
848
- server_name : str, optional
849
- The name of the server for which the descriptive server type is being set. If not provided, the
850
- default server name associated with the object is used.
986
+ server_name : str, optional
987
+ The name of the server for which the descriptive server type is being set. If not provided, the
988
+ default server name associated with the object is used.
851
989
 
852
- Returns
853
- -------
854
- None
990
+ Returns
991
+ -------
992
+ None
855
993
 
856
- Raises
857
- ------
858
- InvalidParameterException
859
- If the response code is not 200.
860
- PropertyServerException:
861
- Raised by the server when an issue arises in processing a valid request
862
- NotAuthorizedException:
863
- The principle specified by the user_id does not have authorization for the requested action
994
+ Raises
995
+ ------
996
+ InvalidParameterException
997
+ If the response code is not 200.
998
+ PropertyServerException:
999
+ Raised by the server when an issue arises in processing a valid request
1000
+ NotAuthorizedException:
1001
+ The principle specified by the user_id does not have authorization for the requested action
864
1002
 
865
- """
1003
+ """
866
1004
  if server_name is None:
867
1005
  server_name = self.server_name
868
1006
  url = f"{self.admin_command_root}/servers/{server_name}/server-type?typeName={type_name}"
@@ -880,7 +1018,7 @@ class FullServerConfig(CoreServerConfig):
880
1018
  return
881
1019
 
882
1020
  def set_server_type(self, server_type: str, server_name: str = None) -> None:
883
- """ Sets the server type for the given server
1021
+ """Sets the server type for the given server
884
1022
 
885
1023
  Parameters
886
1024
  ----------
@@ -912,12 +1050,14 @@ class FullServerConfig(CoreServerConfig):
912
1050
  if server_name is None:
913
1051
  server_name = self.server_name
914
1052
 
915
- url = (f"{self.admin_command_root}/servers/{server_name}/"
916
- f"server-type?typename={server_type}")
1053
+ url = (
1054
+ f"{self.admin_command_root}/servers/{server_name}/"
1055
+ f"server-type?typename={server_type}"
1056
+ )
917
1057
  self.make_request("POST", url)
918
1058
 
919
1059
  def clear_server_type(self, server_name: str = None) -> None:
920
- """ Clears the server type for the given server
1060
+ """Clears the server type for the given server
921
1061
 
922
1062
  Parameters
923
1063
  ----------
@@ -940,11 +1080,15 @@ class FullServerConfig(CoreServerConfig):
940
1080
  """
941
1081
  if server_name is None:
942
1082
  server_name = self.server_name
943
- url = f"{self.admin_command_root}/servers/{server_name}/server-type?typeName="
1083
+ url = (
1084
+ f"{self.admin_command_root}/servers/{server_name}/server-type?typeName="
1085
+ )
944
1086
  self.make_request("POST", url)
945
1087
 
946
- def config_view_service(self, service_url_marker: str, view_service_body: dict, server_name: str = None) -> None:
947
- """ Configure a the view service specified by the service_url_marker using the view_service_body.
1088
+ def config_view_service(
1089
+ self, service_url_marker: str, view_service_body: dict, server_name: str = None
1090
+ ) -> None:
1091
+ """Configure a the view service specified by the service_url_marker using the view_service_body.
948
1092
 
949
1093
  Parameters
950
1094
  ----------
@@ -987,8 +1131,10 @@ class FullServerConfig(CoreServerConfig):
987
1131
  self.make_request("POST", url, view_service_body)
988
1132
 
989
1133
  # todo - this may not be used anymore - old
990
- def set_view_svcs_config(self, view_svcs_config_body: dict, server_name: str = None) -> None:
991
- """ Set up the configuration for all the open metadata integration groups. This overrides the current values.
1134
+ def set_view_svcs_config(
1135
+ self, view_svcs_config_body: dict, server_name: str = None
1136
+ ) -> None:
1137
+ """Set up the configuration for all the open metadata integration groups. This overrides the current values.
992
1138
 
993
1139
  Parameters
994
1140
  ----------
@@ -1024,8 +1170,10 @@ class FullServerConfig(CoreServerConfig):
1024
1170
  url = f"{self.admin_command_root}/servers/{server_name}/view-services/configuration"
1025
1171
  self.make_request("POST", url, view_svcs_config_body)
1026
1172
 
1027
- def set_integration_groups_config(self, integration_groups_config_body: dict, server_name: str = None) -> None:
1028
- """ Set up the configuration for all the open metadata integration groups. This overrides the current values.
1173
+ def set_integration_groups_config(
1174
+ self, integration_groups_config_body: dict, server_name: str = None
1175
+ ) -> None:
1176
+ """Set up the configuration for all the open metadata integration groups. This overrides the current values.
1029
1177
  Parameters
1030
1178
  ----------
1031
1179
  integration_groups_config_body : dict
@@ -1077,15 +1225,20 @@ class FullServerConfig(CoreServerConfig):
1077
1225
  # pass a json list
1078
1226
  pass
1079
1227
 
1080
- def config_integration_service(self, remote_omag_server: str, remote_omag_platform_url: str,
1081
- service_url_marker: str, integration_service_options: dict, connector_configs: list,
1082
- server_name: str = None) -> None:
1083
-
1228
+ def config_integration_service(
1229
+ self,
1230
+ remote_omag_server: str,
1231
+ remote_omag_platform_url: str,
1232
+ service_url_marker: str,
1233
+ integration_service_options: dict,
1234
+ connector_configs: list,
1235
+ server_name: str = None,
1236
+ ) -> None:
1084
1237
  if server_name is None:
1085
1238
  server_name = self.server_name
1086
1239
 
1087
1240
  if not isinstance(connector_configs, list):
1088
- exc_msg = ' ==> connector_configs must be a list of dictionaries'
1241
+ exc_msg = " ==> connector_configs must be a list of dictionaries"
1089
1242
  raise Exception(exc_msg)
1090
1243
 
1091
1244
  validate_name(remote_omag_server)
@@ -1093,9 +1246,13 @@ class FullServerConfig(CoreServerConfig):
1093
1246
 
1094
1247
  validate_name(service_url_marker)
1095
1248
 
1096
- request_body = {"class": "IntegrationServiceRequestBody", "omagserverPlatformRootURL": remote_omag_platform_url,
1097
- "omagserverName": remote_omag_server, "integrationServiceOptions": integration_service_options,
1098
- "integrationConnectorConfigs": connector_configs}
1249
+ request_body = {
1250
+ "class": "IntegrationServiceRequestBody",
1251
+ "omagserverPlatformRootURL": remote_omag_platform_url,
1252
+ "omagserverName": remote_omag_server,
1253
+ "integrationServiceOptions": integration_service_options,
1254
+ "integrationConnectorConfigs": connector_configs,
1255
+ }
1099
1256
 
1100
1257
  url = f"{self.admin_command_root}/servers/{server_name}/integration-services/{service_url_marker}"
1101
1258
  # print(f"URL is : {url}")
@@ -1104,19 +1261,30 @@ class FullServerConfig(CoreServerConfig):
1104
1261
  self.make_request("POST", url, request_body)
1105
1262
  return
1106
1263
 
1107
- def config_all_integration_services(self, remote_omag_server: str, remote_omag_platform_url: str,
1108
- integration_service_options: dict, connector_configs: dict,
1109
- server_name: str = None) -> None:
1110
-
1264
+ def config_all_integration_services(
1265
+ self,
1266
+ remote_omag_server: str,
1267
+ remote_omag_platform_url: str,
1268
+ integration_service_options: dict,
1269
+ connector_configs: dict,
1270
+ server_name: str = None,
1271
+ ) -> None:
1111
1272
  if server_name is None:
1112
1273
  server_name = self.server_name
1113
1274
  validate_name(remote_omag_server)
1114
1275
  validate_url(remote_omag_platform_url)
1115
1276
 
1116
- request_body = {"IntegrationConnectorConfigs": [
1117
- {"class": "IntegrationServiceRequestBody", "omagserverPlatformRootURL": remote_omag_platform_url,
1118
- "omagserverName": remote_omag_server, "integrationServiceOptions": integration_service_options,
1119
- "integrationConnectorConfigs": connector_configs}]}
1277
+ request_body = {
1278
+ "IntegrationConnectorConfigs": [
1279
+ {
1280
+ "class": "IntegrationServiceRequestBody",
1281
+ "omagserverPlatformRootURL": remote_omag_platform_url,
1282
+ "omagserverName": remote_omag_server,
1283
+ "integrationServiceOptions": integration_service_options,
1284
+ "integrationConnectorConfigs": connector_configs,
1285
+ }
1286
+ ]
1287
+ }
1120
1288
 
1121
1289
  url = f"{self.admin_command_root}/servers/{server_name}/integration-services"
1122
1290
  print(f"URL is : {url}")
@@ -1124,7 +1292,9 @@ class FullServerConfig(CoreServerConfig):
1124
1292
 
1125
1293
  self.make_request("POST", url, request_body)
1126
1294
 
1127
- def clear_integration_service(self, service_url_marker: str, server_name: str = None) -> None:
1295
+ def clear_integration_service(
1296
+ self, service_url_marker: str, server_name: str = None
1297
+ ) -> None:
1128
1298
  if server_name is None:
1129
1299
  server_name = self.server_name
1130
1300
  validate_name(service_url_marker)
@@ -1132,7 +1302,9 @@ class FullServerConfig(CoreServerConfig):
1132
1302
  url = f"{self.admin_command_root}/servers/{server_name}/integration-services/{service_url_marker}"
1133
1303
  self.make_request("DELETE", url)
1134
1304
 
1135
- def get_integration_service_config(self, service_url_marker: str, server_name: str = None) -> dict | str:
1305
+ def get_integration_service_config(
1306
+ self, service_url_marker: str, server_name: str = None
1307
+ ) -> dict | str:
1136
1308
  if server_name is None:
1137
1309
  server_name = self.server_name
1138
1310
  validate_name(service_url_marker)
@@ -1154,4 +1326,4 @@ class FullServerConfig(CoreServerConfig):
1154
1326
 
1155
1327
  def remove_lineage_warehouse_services(self, lineage_server: str = None) -> None:
1156
1328
  url = f"{self.admin_command_root}/servers/{lineage_server}/lineage-warehouse/configuration"
1157
- self.make_request("DELETE", url)
1329
+ self.make_request("DELETE", url)