pyegeria 0.8.4.36__py3-none-any.whl → 0.8.4.38__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.
@@ -41,14 +41,19 @@ class CollectionManager(Client):
41
41
 
42
42
  def __init__(
43
43
  self,
44
- server_name: str,
44
+ view_server: str,
45
45
  platform_url: str,
46
46
  user_id: str,
47
47
  user_pwd: str = None,
48
48
  token: str = None,
49
49
  ):
50
- self.command_base: str = f"/api/open-metadata/collection-manager/collections"
51
- Client.__init__(self, server_name, platform_url, user_id, user_pwd, token)
50
+ self.view_server = view_server
51
+ self.platform_url = platform_url
52
+ self.user_id = user_id
53
+ self.user_pwd = user_pwd
54
+
55
+ self.collection_command_root: str = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/collections"
56
+ Client.__init__(self, view_server, platform_url, user_id, user_pwd, token)
52
57
 
53
58
  #
54
59
  # Retrieving Collections - https://egeria-project.org/concepts/collection
@@ -56,7 +61,6 @@ class CollectionManager(Client):
56
61
  async def _async_get_linked_collections(
57
62
  self,
58
63
  parent_guid: str,
59
- server_name: str = None,
60
64
  start_from: int = 0,
61
65
  page_size: int = None,
62
66
  ) -> list:
@@ -66,9 +70,9 @@ class CollectionManager(Client):
66
70
  ----------
67
71
  parent_guid: str
68
72
  The identity of the parent to find linked collections from.
69
- server_name : str, optional
70
- The name of the server to configure.
71
- If not provided, the server name associated with the instance is used.
73
+
74
+
75
+
72
76
  start_from: int, [default=0], optional
73
77
  When multiple pages of results are available, the page number to start from.
74
78
  page_size: int, [default=None]
@@ -91,15 +95,14 @@ class CollectionManager(Client):
91
95
  The principle specified by the user_id does not have authorization for the requested action
92
96
 
93
97
  """
94
- if server_name is None:
95
- server_name = self.server_name
98
+
96
99
  if page_size is None:
97
100
  page_size = self.page_size
98
101
 
99
102
  body = {}
100
103
 
101
104
  url = (
102
- f"{self.platform_url}/servers/{server_name}/api/open-metadata/collection-manager/"
105
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/"
103
106
  f"metadata-elements/{parent_guid}/collections?startFrom={start_from}&pageSize={page_size}"
104
107
  )
105
108
 
@@ -109,7 +112,6 @@ class CollectionManager(Client):
109
112
  def get_linked_collections(
110
113
  self,
111
114
  parent_guid: str,
112
- server_name: str = None,
113
115
  start_from: int = 0,
114
116
  page_size: int = None,
115
117
  ) -> list:
@@ -119,9 +121,9 @@ class CollectionManager(Client):
119
121
  ----------
120
122
  parent_guid: str
121
123
  The identity of the parent to find linked collections from.
122
- server_name : str, optional
123
- The name of the server to configure.
124
- If not provided, the server name associated with the instance is used.
124
+
125
+
126
+
125
127
  start_from: int, [default=0], optional
126
128
  When multiple pages of results are available, the page number to start from.
127
129
  page_size: int, [default=None]
@@ -146,16 +148,13 @@ class CollectionManager(Client):
146
148
  """
147
149
  loop = asyncio.get_event_loop()
148
150
  resp = loop.run_until_complete(
149
- self._async_get_linked_collections(
150
- parent_guid, server_name, start_from, page_size
151
- )
151
+ self._async_get_linked_collections(parent_guid, start_from, page_size)
152
152
  )
153
153
  return resp
154
154
 
155
155
  async def _async_get_classified_collections(
156
156
  self,
157
157
  classification: str,
158
- server_name: str = None,
159
158
  start_from: int = 0,
160
159
  page_size: int = None,
161
160
  ) -> list | str:
@@ -166,9 +165,9 @@ class CollectionManager(Client):
166
165
  ----------
167
166
  classification: str
168
167
  The classification of the collection to inspect.
169
- server_name : str, optional
170
- The name of the server to configure.
171
- If not provided, the server name associated with the instance is used.
168
+
169
+
170
+
172
171
  start_from: int, [default=0], optional
173
172
  When multiple pages of results are available, the page number to start from.
174
173
  page_size: int, [default=None]
@@ -191,15 +190,14 @@ class CollectionManager(Client):
191
190
  Notes
192
191
  -----
193
192
  """
194
- if server_name is None:
195
- server_name = self.server_name
193
+
196
194
  if page_size is None:
197
195
  page_size = self.page_size
198
196
 
199
197
  body = {"filter": classification}
200
198
 
201
199
  url = (
202
- f"{self.platform_url}/servers/{server_name}{self.command_base}/by-classifications?"
200
+ f"{self.collection_command_root}/by-classifications?"
203
201
  f"startFrom={start_from}&pageSize={page_size}"
204
202
  )
205
203
 
@@ -211,7 +209,6 @@ class CollectionManager(Client):
211
209
  def get_classified_collections(
212
210
  self,
213
211
  classification: str,
214
- server_name: str = None,
215
212
  start_from: int = 0,
216
213
  page_size: int = None,
217
214
  ) -> list | str:
@@ -222,9 +219,9 @@ class CollectionManager(Client):
222
219
  ----------
223
220
  classification: str
224
221
  The classification of the collection to inspect.
225
- server_name : str, optional
226
- The name of the server to configure.
227
- If not provided, the server name associated with the instance is used.
222
+
223
+
224
+
228
225
  start_from: int, [default=0], optional
229
226
  When multiple pages of results are available, the page number to start from.
230
227
  page_size: int, [default=None]
@@ -250,7 +247,7 @@ class CollectionManager(Client):
250
247
  loop = asyncio.get_event_loop()
251
248
  resp = loop.run_until_complete(
252
249
  self._async_get_classified_collections(
253
- classification, server_name, start_from, page_size
250
+ classification, start_from, page_size
254
251
  )
255
252
  )
256
253
  return resp
@@ -262,7 +259,6 @@ class CollectionManager(Client):
262
259
  starts_with: bool = False,
263
260
  ends_with: bool = False,
264
261
  ignore_case: bool = False,
265
- server_name: str = None,
266
262
  start_from: int = 0,
267
263
  page_size: int = None,
268
264
  ) -> list | str:
@@ -276,9 +272,9 @@ class CollectionManager(Client):
276
272
  Search string to use to find matching collections. If the search string is '*' then all glossaries returned.
277
273
  effective_time: str, [default=None], optional
278
274
  Effective time of the query. If not specified will default to any time. ISO8601 format is assumed.
279
- server_name : str, optional
280
- The name of the server to configure.
281
- If not provided, the server name associated with the instance is used.
275
+
276
+
277
+
282
278
  starts_with : bool, [default=False], optional
283
279
  Starts with the supplied string.
284
280
  ends_with : bool, [default=False], optional
@@ -307,8 +303,7 @@ class CollectionManager(Client):
307
303
  The principle specified by the user_id does not have authorization for the requested action
308
304
 
309
305
  """
310
- if server_name is None:
311
- server_name = self.server_name
306
+
312
307
  if page_size is None:
313
308
  page_size = self.page_size
314
309
  starts_with_s = str(starts_with).lower()
@@ -324,7 +319,7 @@ class CollectionManager(Client):
324
319
 
325
320
  body_s = body_slimmer(body)
326
321
  url = (
327
- f"{self.platform_url}/servers/{server_name}{self.command_base}/"
322
+ f"{self.collection_command_root}/"
328
323
  f"by-search-string?startFrom={start_from}&pageSize={page_size}&startsWith={starts_with_s}&"
329
324
  f"endsWith={ends_with_s}&ignoreCase={ignore_case_s}"
330
325
  )
@@ -339,7 +334,6 @@ class CollectionManager(Client):
339
334
  starts_with: bool = False,
340
335
  ends_with: bool = False,
341
336
  ignore_case: bool = False,
342
- server_name: str = None,
343
337
  start_from: int = 0,
344
338
  page_size: int = None,
345
339
  ) -> list | str:
@@ -353,9 +347,9 @@ class CollectionManager(Client):
353
347
  Search string to use to find matching collections. If the search string is '*' then all glossaries returned.
354
348
  effective_time: str, [default=None], optional
355
349
  Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
356
- server_name : str, optional
357
- The name of the server to configure.
358
- If not provided, the server name associated with the instance is used.
350
+
351
+
352
+
359
353
  starts_with : bool, [default=False], optional
360
354
  Starts with the supplied string.
361
355
  ends_with : bool, [default=False], optional
@@ -392,7 +386,6 @@ class CollectionManager(Client):
392
386
  starts_with,
393
387
  ends_with,
394
388
  ignore_case,
395
- server_name,
396
389
  start_from,
397
390
  page_size,
398
391
  )
@@ -404,7 +397,6 @@ class CollectionManager(Client):
404
397
  self,
405
398
  name: str,
406
399
  effective_time: str = None,
407
- server_name: str = None,
408
400
  start_from: int = 0,
409
401
  page_size: int = None,
410
402
  ) -> list | str:
@@ -416,9 +408,9 @@ class CollectionManager(Client):
416
408
  name to use to find matching collections.
417
409
  effective_time: str, [default=None], optional
418
410
  Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
419
- server_name : str, optional
420
- The name of the server to configure.
421
- If not provided, the server name associated with the instance is used.
411
+
412
+
413
+
422
414
  start_from: int, [default=0], optional
423
415
  When multiple pages of results are available, the page number to start from.
424
416
  page_size: int, [default=None]
@@ -441,8 +433,7 @@ class CollectionManager(Client):
441
433
  The principle specified by the user_id does not have authorization for the requested action
442
434
 
443
435
  """
444
- if server_name is None:
445
- server_name = self.server_name
436
+
446
437
  if page_size is None:
447
438
  page_size = self.page_size
448
439
 
@@ -454,7 +445,7 @@ class CollectionManager(Client):
454
445
  }
455
446
  body_s = body_slimmer(body)
456
447
  url = (
457
- f"{self.platform_url}/servers/{server_name}{self.command_base}/"
448
+ f"{self.collection_command_root}/"
458
449
  f"by-name?startFrom={start_from}&pageSize={page_size}"
459
450
  )
460
451
 
@@ -465,7 +456,6 @@ class CollectionManager(Client):
465
456
  self,
466
457
  name: str,
467
458
  effective_time: str = None,
468
- server_name: str = None,
469
459
  start_from: int = 0,
470
460
  page_size: int = None,
471
461
  ) -> list | str:
@@ -479,9 +469,9 @@ class CollectionManager(Client):
479
469
  name to use to find matching collections.
480
470
  effective_time: str, [default=None], optional
481
471
  Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
482
- server_name : str, optional
483
- The name of the server to configure.
484
- If not provided, the server name associated with the instance is used.
472
+
473
+
474
+
485
475
  start_from: int, [default=0], optional
486
476
  When multiple pages of results are available, the page number to start from.
487
477
  page_size: int, [default=None]
@@ -508,7 +498,7 @@ class CollectionManager(Client):
508
498
  loop = asyncio.get_event_loop()
509
499
  resp = loop.run_until_complete(
510
500
  self._async_get_collections_by_name(
511
- name, effective_time, server_name, start_from, page_size
501
+ name, effective_time, start_from, page_size
512
502
  )
513
503
  )
514
504
 
@@ -518,7 +508,6 @@ class CollectionManager(Client):
518
508
  self,
519
509
  collection_type: str,
520
510
  effective_time: str = None,
521
- server_name: str = None,
522
511
  start_from: int = 0,
523
512
  page_size: int = None,
524
513
  ) -> list | str:
@@ -531,9 +520,9 @@ class CollectionManager(Client):
531
520
  collection_type to use to find matching collections.
532
521
  effective_time: str, [default=None], optional
533
522
  Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
534
- server_name : str, optional
535
- The name of the server to configure.
536
- If not provided, the server name associated with the instance is used.
523
+
524
+
525
+
537
526
  start_from: int, [default=0], optional
538
527
  When multiple pages of results are available, the page number to start from.
539
528
  page_size: int, [default=None]
@@ -557,8 +546,7 @@ class CollectionManager(Client):
557
546
  The principle specified by the user_id does not have authorization for the requested action
558
547
 
559
548
  """
560
- if server_name is None:
561
- server_name = self.server_name
549
+
562
550
  if page_size is None:
563
551
  page_size = self.page_size
564
552
 
@@ -571,7 +559,7 @@ class CollectionManager(Client):
571
559
  body_s = body_slimmer(body)
572
560
 
573
561
  url = (
574
- f"{self.platform_url}/servers/{server_name}{self.command_base}/"
562
+ f"{self.collection_command_root}/"
575
563
  f"by-collection-type?startFrom={start_from}&pageSize={page_size}"
576
564
  )
577
565
 
@@ -582,7 +570,6 @@ class CollectionManager(Client):
582
570
  self,
583
571
  collection_type: str,
584
572
  effective_time: str = None,
585
- server_name: str = None,
586
573
  start_from: int = 0,
587
574
  page_size: int = None,
588
575
  ) -> list | str:
@@ -596,9 +583,9 @@ class CollectionManager(Client):
596
583
  collection type to find.
597
584
  effective_time: str, [default=None], optional
598
585
  Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
599
- server_name : str, optional
600
- The name of the server to configure.
601
- If not provided, the server name associated with the instance is used.
586
+
587
+
588
+
602
589
  start_from: int, [default=0], optional
603
590
  When multiple pages of results are available, the page number to start from.
604
591
  page_size: int, [default=None]
@@ -625,14 +612,14 @@ class CollectionManager(Client):
625
612
  loop = asyncio.get_event_loop()
626
613
  resp = loop.run_until_complete(
627
614
  self._async_get_collections_by_type(
628
- collection_type, effective_time, server_name, start_from, page_size
615
+ collection_type, effective_time, start_from, page_size
629
616
  )
630
617
  )
631
618
 
632
619
  return resp
633
620
 
634
621
  async def _async_get_collection(
635
- self, collection_guid: str, effective_time: str = None, server_name: str = None
622
+ self, collection_guid: str, effective_time: str = None
636
623
  ) -> dict | str:
637
624
  """Return the properties of a specific collection. Async version.
638
625
 
@@ -642,9 +629,9 @@ class CollectionManager(Client):
642
629
  unique identifier of the collection.
643
630
  effective_time: str, [default=None], optional
644
631
  Effective time of the query. If not specified will default to any time. Time in ISO8601 format is assumed.
645
- server_name : str, optional
646
- The name of the server to configure.
647
- If not provided, the server name associated with the instance is used.
632
+
633
+
634
+
648
635
 
649
636
  Returns
650
637
  -------
@@ -663,12 +650,10 @@ class CollectionManager(Client):
663
650
  The principle specified by the user_id does not have authorization for the requested action
664
651
 
665
652
  """
666
- if server_name is None:
667
- server_name = self.server_name
668
653
 
669
654
  validate_guid(collection_guid)
670
655
 
671
- url = f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}"
656
+ url = f"{self.collection_command_root}/{collection_guid}"
672
657
  body = {
673
658
  "effective_time": effective_time,
674
659
  }
@@ -676,7 +661,7 @@ class CollectionManager(Client):
676
661
  return resp.json()
677
662
 
678
663
  def get_collection(
679
- self, collection_guid: str, effective_time: str = None, server_name: str = None
664
+ self, collection_guid: str, effective_time: str = None
680
665
  ) -> dict | str:
681
666
  """Return the properties of a specific collection.
682
667
 
@@ -686,9 +671,9 @@ class CollectionManager(Client):
686
671
  unique identifier of the collection.
687
672
  effective_time: str, [default=None], optional
688
673
  Effective time of the query. If not specified will default to any time.
689
- server_name : str, optional
690
- The name of the server to configure.
691
- If not provided, the server name associated with the instance is used.
674
+
675
+
676
+
692
677
 
693
678
  Returns
694
679
  -------
@@ -709,7 +694,7 @@ class CollectionManager(Client):
709
694
  """
710
695
  loop = asyncio.get_event_loop()
711
696
  resp = loop.run_until_complete(
712
- self._async_get_collection(collection_guid, effective_time, server_name)
697
+ self._async_get_collection(collection_guid, effective_time)
713
698
  )
714
699
 
715
700
  return resp
@@ -718,7 +703,7 @@ class CollectionManager(Client):
718
703
  # Create collection methods
719
704
  #
720
705
  async def _async_create_collection_w_body(
721
- self, classification_name: str, body: dict, server_name: str = None
706
+ self, classification_name: str, body: dict
722
707
  ) -> str:
723
708
  """Create Collections: https://egeria-project.org/concepts/collection Async version.
724
709
 
@@ -728,9 +713,7 @@ class CollectionManager(Client):
728
713
  Type of collection to create; e.g RootCollection, Folder, Set, DigitalProduct, etc.
729
714
  body: dict
730
715
  A dict representing the details of the collection to create.
731
- server_name: str, optional, defaults to None
732
- The name of the server to configure. If not provided, the server name associated with the
733
- instance is used.
716
+
734
717
 
735
718
  Returns
736
719
  -------
@@ -748,20 +731,16 @@ class CollectionManager(Client):
748
731
  The principle specified by the user_id does not have authorization for the requested action
749
732
 
750
733
  """
751
- if server_name is None:
752
- server_name = self.server_name
753
734
 
754
735
  url = (
755
- f"{self.platform_url}/servers/{server_name}{self.command_base}?"
736
+ f"{self.collection_command_root}?"
756
737
  f"classificationName={classification_name}"
757
738
  )
758
739
 
759
740
  resp = await self._async_make_request("POST", url, body)
760
741
  return resp.json().get("guid", "No GUID returned")
761
742
 
762
- def create_collection_w_body(
763
- self, classification_name: str, body: dict, server_name: str = None
764
- ) -> str:
743
+ def create_collection_w_body(self, classification_name: str, body: dict) -> str:
765
744
  """Create Collections: https://egeria-project.org/concepts/collection
766
745
 
767
746
  Parameters
@@ -770,8 +749,8 @@ class CollectionManager(Client):
770
749
  Type of collection to create; e.g RootCollection, Folder, Set, DigitalProduct, etc.
771
750
  body: dict
772
751
  A dict representing the details of the collection to create.
773
- server_name: str, optional, defaults to None
774
- The name of the server to configure. If not provided, the server name associated with the instance is
752
+
753
+ If not provided, the server name associated with the instance is
775
754
  used.
776
755
 
777
756
  Returns
@@ -792,7 +771,7 @@ class CollectionManager(Client):
792
771
  """
793
772
  loop = asyncio.get_event_loop()
794
773
  resp = loop.run_until_complete(
795
- self._async_create_collection_w_body(classification_name, body, server_name)
774
+ self._async_create_collection_w_body(classification_name, body)
796
775
  )
797
776
  return resp
798
777
 
@@ -809,7 +788,6 @@ class CollectionManager(Client):
809
788
  is_own_anchor: bool = False,
810
789
  collection_ordering: str = None,
811
790
  order_property_name: str = None,
812
- server_name: str = None,
813
791
  ) -> str:
814
792
  """Create Collections: https://egeria-project.org/concepts/collection Async version.
815
793
 
@@ -842,9 +820,7 @@ class CollectionManager(Client):
842
820
  "OTHER"
843
821
  order_property_name: str, optional, defaults to "Something"
844
822
  Property to use for sequencing if collection_ordering is "OTHER"
845
- server_name: str, optional, defaults to None
846
- The name of the server to configure. If not provided, the server name associated with the instance is
847
- used.
823
+
848
824
 
849
825
  Returns
850
826
  -------
@@ -862,15 +838,13 @@ class CollectionManager(Client):
862
838
  The principle specified by the user_id does not have authorization for the requested action
863
839
 
864
840
  """
865
- if server_name is None:
866
- server_name = self.server_name
867
841
 
868
842
  if parent_guid is None:
869
843
  is_own_anchor = False
870
844
  is_own_anchor_s = str(is_own_anchor).lower()
871
845
 
872
846
  url = (
873
- f"{self.platform_url}/servers/{server_name}{self.command_base}?"
847
+ f"{self.collection_command_root}?"
874
848
  f"classificationName={classification_name}"
875
849
  )
876
850
 
@@ -907,7 +881,6 @@ class CollectionManager(Client):
907
881
  is_own_anchor: bool = False,
908
882
  collection_ordering: str = "OTHER",
909
883
  order_property_name: str = "Something",
910
- server_name: str = None,
911
884
  ) -> str:
912
885
  """Create Collections: https://egeria-project.org/concepts/collection
913
886
 
@@ -941,9 +914,7 @@ class CollectionManager(Client):
941
914
  "DATE_CREATED", "OTHER"
942
915
  order_property_name: str, optional, defaults to "Something"
943
916
  Property to use for sequencing if collection_ordering is "OTHER"
944
- server_name: str, optional, defaults to None
945
- The name of the server to configure. If not provided, the server name associated with the
946
- instance is used.
917
+
947
918
 
948
919
  Returns
949
920
  -------
@@ -975,7 +946,6 @@ class CollectionManager(Client):
975
946
  is_own_anchor,
976
947
  collection_ordering,
977
948
  order_property_name,
978
- server_name,
979
949
  )
980
950
  )
981
951
  return resp
@@ -990,7 +960,6 @@ class CollectionManager(Client):
990
960
  description: str,
991
961
  collection_type: str,
992
962
  is_own_anchor: bool = False,
993
- server_name: str = None,
994
963
  ) -> str:
995
964
  """Create a new collection with the RootCollection classification. Used to identify the top of a
996
965
  collection hierarchy. Async version.
@@ -1016,8 +985,6 @@ class CollectionManager(Client):
1016
985
  Add appropriate valid value for the collection type.
1017
986
  is_own_anchor: bool, optional, defaults to False
1018
987
  Indicates if the collection should classified as its own anchor or not.
1019
- server_name: str, optional, defaults to None
1020
- The name of the server to configure. If none, the server name associated with the instance is used.
1021
988
 
1022
989
  Returns
1023
990
  -------
@@ -1035,10 +1002,9 @@ class CollectionManager(Client):
1035
1002
  The principle specified by the user_id does not have authorization for the requested action
1036
1003
 
1037
1004
  """
1038
- if server_name is None:
1039
- server_name = self.server_name
1005
+
1040
1006
  is_own_anchor_s = str(is_own_anchor).lower()
1041
- url = f"{self.platform_url}/servers/{server_name}{self.command_base}/root-collection"
1007
+ url = f"{self.collection_command_root}/root-collection"
1042
1008
 
1043
1009
  body = {
1044
1010
  "anchorGUID": anchor_guid,
@@ -1068,7 +1034,6 @@ class CollectionManager(Client):
1068
1034
  description: str,
1069
1035
  collection_type: str,
1070
1036
  is_own_anchor: bool = False,
1071
- server_name: str = None,
1072
1037
  ) -> str:
1073
1038
  """Create a new collection with the RootCollection classification. Used to identify the top of a
1074
1039
  collection hierarchy.
@@ -1095,8 +1060,6 @@ class CollectionManager(Client):
1095
1060
  Add appropriate valid value for the collection type.
1096
1061
  is_own_anchor: bool, optional, defaults to False
1097
1062
  Indicates if the collection should classified as its own anchor or not.
1098
- server_name: str, optional, defaults to None
1099
- The name of the server to configure. If None, the server name associated with the instance is used.
1100
1063
 
1101
1064
  Returns
1102
1065
  -------
@@ -1125,7 +1088,6 @@ class CollectionManager(Client):
1125
1088
  description,
1126
1089
  collection_type,
1127
1090
  is_own_anchor,
1128
- server_name,
1129
1091
  )
1130
1092
  )
1131
1093
  return resp
@@ -1142,7 +1104,6 @@ class CollectionManager(Client):
1142
1104
  is_own_anchor: bool = True,
1143
1105
  collection_ordering: str = "OTHER",
1144
1106
  order_property_name: str = "Something",
1145
- server_name: str = None,
1146
1107
  ) -> str:
1147
1108
  """Create a new collection with the DataSpec classification. Used to identify a collection of data fields
1148
1109
  and schema types. Async version.
@@ -1173,8 +1134,6 @@ class CollectionManager(Client):
1173
1134
  "DATE_CREATED", "OTHER"
1174
1135
  order_property_name: str, optional, defaults to "Something"
1175
1136
  Property to use for sequencing if collection_ordering is "OTHER"
1176
- server_name: str, optional, defaults to None
1177
- The name of the server to configure. If None, the server name associated with the instance is used.
1178
1137
 
1179
1138
  Returns
1180
1139
  -------
@@ -1192,10 +1151,8 @@ class CollectionManager(Client):
1192
1151
  The principle specified by the user_id does not have authorization for the requested action
1193
1152
  """
1194
1153
 
1195
- if server_name is None:
1196
- server_name = self.server_name
1197
1154
  is_own_anchor_s = str(is_own_anchor).lower()
1198
- url = f"{self.platform_url}/servers/{server_name}{self.command_base}/data-spec-collection"
1155
+ url = f"{self.collection_command_root}/data-spec-collection"
1199
1156
 
1200
1157
  body = {
1201
1158
  "anchorGUID": anchor_guid,
@@ -1229,7 +1186,6 @@ class CollectionManager(Client):
1229
1186
  is_own_anchor: bool,
1230
1187
  collection_ordering: str = "OTHER",
1231
1188
  order_property_name: str = "Something",
1232
- server_name: str = None,
1233
1189
  ) -> str:
1234
1190
  """Create a new collection with the DataSpec classification. Used to identify a collection of data fields
1235
1191
  and schema types.
@@ -1259,8 +1215,8 @@ class CollectionManager(Client):
1259
1215
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER", "DATE_CREATED", "OTHER"
1260
1216
  order_property_name: str, optional, defaults to "Something"
1261
1217
  Property to use for sequencing if collection_ordering is "OTHER"
1262
- server_name: str, optional, defaults to None
1263
- The name of the server to configure. If not provided, the server name associated with the instance is used.
1218
+
1219
+
1264
1220
 
1265
1221
  Returns
1266
1222
  -------
@@ -1291,7 +1247,6 @@ class CollectionManager(Client):
1291
1247
  is_own_anchor,
1292
1248
  collection_ordering,
1293
1249
  order_property_name,
1294
- server_name,
1295
1250
  )
1296
1251
  )
1297
1252
  return resp
@@ -1308,7 +1263,6 @@ class CollectionManager(Client):
1308
1263
  is_own_anchor: bool = True,
1309
1264
  collection_ordering: str = "OTHER",
1310
1265
  order_property_name: str = "Something",
1311
- server_name: str = None,
1312
1266
  ) -> str:
1313
1267
  """Create a new collection with the Folder classification. This is used to identify the organizing
1314
1268
  collections in a collection hierarchy. Async version.
@@ -1339,8 +1293,6 @@ class CollectionManager(Client):
1339
1293
  "DATE_CREATED", "OTHER"
1340
1294
  order_property_name: str, optional, defaults to "Something"
1341
1295
  Property to use for sequencing if collection_ordering is "OTHER"
1342
- server_name: str, optional, defaults to None
1343
- The name of the server to configure. If None, the server name associated with the instance is used.
1344
1296
 
1345
1297
  Returns
1346
1298
  -------
@@ -1358,11 +1310,10 @@ class CollectionManager(Client):
1358
1310
  The principle specified by the user_id does not have authorization for the requested action
1359
1311
 
1360
1312
  """
1361
- if server_name is None:
1362
- server_name = self.server_name
1313
+
1363
1314
  is_own_anchor_s = str(is_own_anchor).lower()
1364
1315
 
1365
- url = f"{self.platform_url}/servers/{server_name}{self.command_base}/folder"
1316
+ url = f"{self.collection_command_root}/folder"
1366
1317
 
1367
1318
  body = {
1368
1319
  "anchorGUID": anchor_guid,
@@ -1396,7 +1347,6 @@ class CollectionManager(Client):
1396
1347
  is_own_anchor: bool,
1397
1348
  collection_ordering: str = "OTHER",
1398
1349
  order_property_name: str = "Something",
1399
- server_name: str = None,
1400
1350
  ) -> str:
1401
1351
  """Create a new collection with the Folder classification. This is used to identify the organizing
1402
1352
  collections in a collection hierarchy.
@@ -1427,8 +1377,6 @@ class CollectionManager(Client):
1427
1377
  "OTHER"
1428
1378
  order_property_name: str, optional, defaults to "Something"
1429
1379
  Property to use for sequencing if collection_ordering is "OTHER"
1430
- server_name: str, optional, defaults to None
1431
- The name of the server to configure. If None, the server name associated with the instance is used.
1432
1380
 
1433
1381
  Returns
1434
1382
  -------
@@ -1459,14 +1407,11 @@ class CollectionManager(Client):
1459
1407
  is_own_anchor,
1460
1408
  collection_ordering,
1461
1409
  order_property_name,
1462
- server_name,
1463
1410
  )
1464
1411
  )
1465
1412
  return resp
1466
1413
 
1467
- async def _async_create_collection_from_template(
1468
- self, body: dict, server_name: str = None
1469
- ) -> str:
1414
+ async def _async_create_collection_from_template(self, body: dict) -> str:
1470
1415
  """Create a new metadata element to represent a collection using an existing metadata element as a template.
1471
1416
  The template defines additional classifications and relationships that are added to the new collection.
1472
1417
  Async version.
@@ -1476,8 +1421,6 @@ class CollectionManager(Client):
1476
1421
 
1477
1422
  body: dict
1478
1423
  A dict representing the details of the collection to create.
1479
- server_name: str, optional, defaults to None
1480
- The name of the server to configure. If None, the server name associated with the instance is used.
1481
1424
 
1482
1425
  Returns
1483
1426
  -------
@@ -1522,17 +1465,13 @@ class CollectionManager(Client):
1522
1465
  }
1523
1466
 
1524
1467
  """
1525
- if server_name is None:
1526
- server_name = self.server_name
1527
1468
 
1528
- url = f"{self.platform_url}/servers/{server_name}{self.command_base}/from-template"
1469
+ url = f"{self.collection_command_root}/from-template"
1529
1470
 
1530
1471
  resp = await self._async_make_request("POST", url, body)
1531
1472
  return resp.json().get("guid", "No GUID Returned")
1532
1473
 
1533
- def create_collection_from_template(
1534
- self, body: dict, server_name: str = None
1535
- ) -> str:
1474
+ def create_collection_from_template(self, body: dict) -> str:
1536
1475
  """Create a new metadata element to represent a collection using an existing metadata element as a template.
1537
1476
  The template defines additional classifications and relationships that are added to the new collection.
1538
1477
 
@@ -1540,8 +1479,6 @@ class CollectionManager(Client):
1540
1479
  ----------
1541
1480
  body: dict
1542
1481
  A dict representing the details of the collection to create.
1543
- server_name: str, optional, defaults to None
1544
- The name of the server to configure. If None, the server name associated with the instance is used.
1545
1482
 
1546
1483
  Returns
1547
1484
  -------
@@ -1587,21 +1524,19 @@ class CollectionManager(Client):
1587
1524
  """
1588
1525
  loop = asyncio.get_event_loop()
1589
1526
  resp = loop.run_until_complete(
1590
- self._async_create_collection_from_template(body, server_name)
1527
+ self._async_create_collection_from_template(body)
1591
1528
  )
1592
1529
  return resp
1593
1530
 
1594
- async def _async_create_digital_product(
1595
- self, body: dict, server_name: str = None
1596
- ) -> str:
1531
+ async def _async_create_digital_product(self, body: dict) -> str:
1597
1532
  """Create a new collection that represents a digital product. Async version.
1598
1533
 
1599
1534
  Parameters
1600
1535
  ----------
1601
1536
  body: dict
1602
1537
  A dict representing the details of the collection to create.
1603
- server_name: str, optional, defaults to None
1604
- The name of the server to configure. If not provided, the server name associated
1538
+
1539
+ If not provided, the server name associated
1605
1540
  with the instance is used.
1606
1541
 
1607
1542
  Returns
@@ -1655,23 +1590,21 @@ class CollectionManager(Client):
1655
1590
  }
1656
1591
  }
1657
1592
  """
1658
- if server_name is None:
1659
- server_name = self.server_name
1660
1593
 
1661
- url = f"{self.platform_url}/servers/{server_name}/api/open-metadata/collection-manager/digital-products"
1594
+ url = f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/digital-products"
1662
1595
 
1663
1596
  resp = await self._async_make_request("POST", url, body)
1664
1597
  return resp.json().get("guid", "No GUID returned")
1665
1598
 
1666
- def create_digital_product(self, body: dict, server_name: str = None) -> str:
1599
+ def create_digital_product(self, body: dict) -> str:
1667
1600
  """Create a new collection that represents a digital product. Async version.
1668
1601
 
1669
1602
  Parameters
1670
1603
  ----------
1671
1604
  body: dict
1672
1605
  A dict representing the details of the collection to create.
1673
- server_name: str, optional, defaults to None
1674
- The name of the server to configure. If not provided, the server name associated
1606
+
1607
+ If not provided, the server name associated
1675
1608
  with the instance is used.
1676
1609
 
1677
1610
  Returns
@@ -1726,9 +1659,7 @@ class CollectionManager(Client):
1726
1659
  }
1727
1660
  """
1728
1661
  loop = asyncio.get_event_loop()
1729
- resp = loop.run_until_complete(
1730
- self._async_create_digital_product(body, server_name)
1731
- )
1662
+ resp = loop.run_until_complete(self._async_create_digital_product(body))
1732
1663
  return resp
1733
1664
 
1734
1665
  #
@@ -1744,7 +1675,6 @@ class CollectionManager(Client):
1744
1675
  collection_ordering: str = None,
1745
1676
  order_property_name: str = None,
1746
1677
  replace_all_props: bool = False,
1747
- server_name: str = None,
1748
1678
  ) -> None:
1749
1679
  """Update the properties of a collection. Async version.
1750
1680
 
@@ -1767,8 +1697,8 @@ class CollectionManager(Client):
1767
1697
  Property to use for sequencing if collection_ordering is "OTHER"
1768
1698
  replace_all_props: bool, optional, defaults to False
1769
1699
  Whether to replace all properties in the collection.
1770
- server_name: str, optional, defaults to None
1771
- The name of the server to configure. If not provided, the server name associated
1700
+
1701
+ If not provided, the server name associated
1772
1702
  with the instance is used.
1773
1703
 
1774
1704
  Returns
@@ -1784,11 +1714,10 @@ class CollectionManager(Client):
1784
1714
  NotAuthorizedException
1785
1715
  The principle specified by the user_id does not have authorization for the requested action
1786
1716
  """
1787
- if server_name is None:
1788
- server_name = self.server_name
1717
+
1789
1718
  replace_all_props_s = str(replace_all_props).lower()
1790
1719
  url = (
1791
- f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}/update?"
1720
+ f"{self.collection_command_root}/{collection_guid}/update?"
1792
1721
  f"replaceAllProperties={replace_all_props_s}"
1793
1722
  )
1794
1723
 
@@ -1815,7 +1744,6 @@ class CollectionManager(Client):
1815
1744
  collection_ordering: str = None,
1816
1745
  order_property_name: str = None,
1817
1746
  replace_all_props: bool = False,
1818
- server_name: str = None,
1819
1747
  ) -> None:
1820
1748
  """Update the properties of a collection.
1821
1749
 
@@ -1838,8 +1766,8 @@ class CollectionManager(Client):
1838
1766
  Property to use for sequencing if collection_ordering is "OTHER"
1839
1767
  replace_all_props: bool, optional, defaults to False
1840
1768
  Whether to replace all properties in the collection.
1841
- server_name: str, optional, defaults to None
1842
- The name of the server to configure. If not provided, the server name associated
1769
+
1770
+ If not provided, the server name associated
1843
1771
  with the instance is used.
1844
1772
 
1845
1773
  Returns
@@ -1866,7 +1794,6 @@ class CollectionManager(Client):
1866
1794
  collection_ordering,
1867
1795
  order_property_name,
1868
1796
  replace_all_props,
1869
- server_name,
1870
1797
  )
1871
1798
  )
1872
1799
  return
@@ -1876,7 +1803,6 @@ class CollectionManager(Client):
1876
1803
  collection_guid: str,
1877
1804
  body: dict,
1878
1805
  replace_all_props: bool = False,
1879
- server_name: str = None,
1880
1806
  ):
1881
1807
  """Update the properties of the DigitalProduct classification attached to a collection. Async version.
1882
1808
 
@@ -1888,9 +1814,7 @@ class CollectionManager(Client):
1888
1814
  A dict representing the details of the collection to create.
1889
1815
  replace_all_props: bool, optional, defaults to False
1890
1816
  Whether to replace all properties in the collection.
1891
- server_name: str, optional, defaults to None
1892
- The name of the server to configure. If not provided, the server name associated with the
1893
- instance is used.
1817
+
1894
1818
 
1895
1819
  Returns
1896
1820
  -------
@@ -1926,12 +1850,10 @@ class CollectionManager(Client):
1926
1850
  }
1927
1851
  }
1928
1852
  """
1929
- if server_name is None:
1930
- server_name = self.server_name
1931
1853
 
1932
1854
  replace_all_props_s = str(replace_all_props).lower()
1933
1855
  url = (
1934
- f"{self.platform_url}/servers/{server_name}/api/open-metadata/collection-manager/digital-products/"
1856
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/digital-products/"
1935
1857
  f"{collection_guid}/update?replaceAllProperties={replace_all_props_s}"
1936
1858
  )
1937
1859
 
@@ -1943,7 +1865,6 @@ class CollectionManager(Client):
1943
1865
  collection_guid: str,
1944
1866
  body: dict,
1945
1867
  replace_all_props: bool = False,
1946
- server_name: str = None,
1947
1868
  ):
1948
1869
  """Update the properties of the DigitalProduct classification attached to a collection.
1949
1870
 
@@ -1955,9 +1876,7 @@ class CollectionManager(Client):
1955
1876
  A dict representing the details of the collection to create.
1956
1877
  replace_all_props: bool, optional, defaults to False
1957
1878
  Whether to replace all properties in the collection.
1958
- server_name: str, optional, defaults to None
1959
- The name of the server to configure. If not provided, the server name associated with the
1960
- instance is used.
1879
+
1961
1880
 
1962
1881
  Returns
1963
1882
  -------
@@ -1995,9 +1914,7 @@ class CollectionManager(Client):
1995
1914
  """
1996
1915
  loop = asyncio.get_event_loop()
1997
1916
  loop.run_until_complete(
1998
- self._async_update_digital_product(
1999
- collection_guid, body, replace_all_props, server_name
2000
- )
1917
+ self._async_update_digital_product(collection_guid, body, replace_all_props)
2001
1918
  )
2002
1919
  return
2003
1920
 
@@ -2010,7 +1927,6 @@ class CollectionManager(Client):
2010
1927
  resource_use_props: dict = None,
2011
1928
  watch_resources: bool = False,
2012
1929
  make_anchor: bool = False,
2013
- server_name: str = None,
2014
1930
  ) -> None:
2015
1931
  """Connect an existing collection to an element using the ResourceList relationship (0019). Async version.
2016
1932
  Parameters
@@ -2029,9 +1945,7 @@ class CollectionManager(Client):
2029
1945
  Whether to watch for the resources to be updated.
2030
1946
  make_anchor, bool, optional, defaults to False
2031
1947
  Whether to make the this an anchor.
2032
- server_name: str, optional, defaults to None
2033
- The name of the server to configure. If not provided, the server name associated with the
2034
- instance is used.
1948
+
2035
1949
 
2036
1950
  Returns
2037
1951
  -------
@@ -2047,13 +1961,12 @@ class CollectionManager(Client):
2047
1961
  The principle specified by the user_id does not have authorization for the requested action
2048
1962
 
2049
1963
  """
2050
- if server_name is None:
2051
- server_name = self.server_name
1964
+
2052
1965
  watch_resources_s = str(watch_resources).lower()
2053
1966
  make_anchor_s = str(make_anchor).lower()
2054
1967
 
2055
1968
  url = (
2056
- f"{self.platform_url}/servers/{server_name}/api/open-metadata/collection-manager/metadata-elements/"
1969
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/metadata-elements/"
2057
1970
  f"{element_guid}/collections/{collection_guid}/attach?makeAnchor={make_anchor_s}"
2058
1971
  )
2059
1972
 
@@ -2076,7 +1989,6 @@ class CollectionManager(Client):
2076
1989
  resource_use_props: dict = None,
2077
1990
  watch_resources: bool = False,
2078
1991
  make_anchor: bool = False,
2079
- server_name: str = None,
2080
1992
  ) -> None:
2081
1993
  """Connect an existing collection to an element using the ResourceList relationship (0019).
2082
1994
  Parameters
@@ -2095,8 +2007,8 @@ class CollectionManager(Client):
2095
2007
  Whether to watch for the resources to be updated.
2096
2008
  make_anchor: bool, optional, defaults to False
2097
2009
  Whether to make the this an anchor.
2098
- server_name: str, optional, defaults to None
2099
- The name of the server to configure. If not provided, the server name associated
2010
+
2011
+ If not provided, the server name associated
2100
2012
  with the instance is used.
2101
2013
 
2102
2014
  Returns
@@ -2123,13 +2035,12 @@ class CollectionManager(Client):
2123
2035
  resource_use_props,
2124
2036
  watch_resources,
2125
2037
  make_anchor,
2126
- server_name,
2127
2038
  )
2128
2039
  )
2129
2040
  return
2130
2041
 
2131
2042
  async def _async_detach_collection(
2132
- self, collection_guid: str, element_guid: str, server_name: str = None
2043
+ self, collection_guid: str, element_guid: str
2133
2044
  ) -> None:
2134
2045
  """Detach an existing collection from an element. If the collection is anchored to the element, it is deleted.
2135
2046
  Async version.
@@ -2140,8 +2051,8 @@ class CollectionManager(Client):
2140
2051
  The guid of the collection to update.
2141
2052
  element_guid: str
2142
2053
  The guid of the element to attach.
2143
- server_name: str, optional, defaults to None
2144
- The name of the server to configure. If not provided, the server name associated
2054
+
2055
+ If not provided, the server name associated
2145
2056
  with the instance is used.
2146
2057
 
2147
2058
  Returns
@@ -2158,10 +2069,9 @@ class CollectionManager(Client):
2158
2069
  The principle specified by the user_id does not have authorization for the requested action
2159
2070
 
2160
2071
  """
2161
- if server_name is None:
2162
- server_name = self.server_name
2072
+
2163
2073
  url = (
2164
- f"{self.platform_url}/servers/{server_name}/api/open-metadata/collection-manager/metadata-elements/"
2074
+ f"{self.platform_url}/servers/{self.view_server}/api/open-metadata/collection-manager/metadata-elements/"
2165
2075
  f"{element_guid}/collections/{collection_guid}/detach"
2166
2076
  )
2167
2077
 
@@ -2170,9 +2080,7 @@ class CollectionManager(Client):
2170
2080
  await self._async_make_request("POST", url, body)
2171
2081
  return
2172
2082
 
2173
- def detach_collection(
2174
- self, collection_guid: str, element_guid: str, server_name: str = None
2175
- ) -> None:
2083
+ def detach_collection(self, collection_guid: str, element_guid: str) -> None:
2176
2084
  """Connect an existing collection to an element using the ResourceList relationship (0019).
2177
2085
  Parameters
2178
2086
  ----------
@@ -2180,8 +2088,8 @@ class CollectionManager(Client):
2180
2088
  The guid of the collection to update.
2181
2089
  element_guid: str
2182
2090
  The guid of the element to attach.
2183
- server_name: str, optional, defaults to None
2184
- The name of the server to configure. If not provided, the server name associated
2091
+
2092
+ If not provided, the server name associated
2185
2093
  with the instance is used.
2186
2094
 
2187
2095
  Returns
@@ -2200,13 +2108,11 @@ class CollectionManager(Client):
2200
2108
  """
2201
2109
  loop = asyncio.get_event_loop()
2202
2110
  loop.run_until_complete(
2203
- self._async_detach_collection(collection_guid, element_guid, server_name)
2111
+ self._async_detach_collection(collection_guid, element_guid)
2204
2112
  )
2205
2113
  return
2206
2114
 
2207
- async def _async_delete_collection(
2208
- self, collection_guid: str, server_name: str = None
2209
- ) -> None:
2115
+ async def _async_delete_collection(self, collection_guid: str) -> None:
2210
2116
  """Delete a collection. It is detected from all parent elements. If members are anchored to the collection
2211
2117
  then they are also deleted. Async version
2212
2118
 
@@ -2215,8 +2121,8 @@ class CollectionManager(Client):
2215
2121
  ----------
2216
2122
  collection_guid: str
2217
2123
  The guid of the collection to update.
2218
- server_name: str, optional, defaults to None
2219
- The name of the server to configure. If not provided, the server name associated
2124
+
2125
+ If not provided, the server name associated
2220
2126
  with the instance is used.
2221
2127
 
2222
2128
  Returns
@@ -2233,15 +2139,14 @@ class CollectionManager(Client):
2233
2139
  The principle specified by the user_id does not have authorization for the requested action
2234
2140
 
2235
2141
  """
2236
- if server_name is None:
2237
- server_name = self.server_name
2238
- url = f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}/delete"
2142
+
2143
+ url = f"{self.collection_command_root}/{collection_guid}/delete"
2239
2144
  body = {"class": "NullRequestBody"}
2240
2145
 
2241
2146
  await self._async_make_request("POST", url, body)
2242
2147
  return
2243
2148
 
2244
- def delete_collection(self, collection_guid: str, server_name: str = None) -> None:
2149
+ def delete_collection(self, collection_guid: str) -> None:
2245
2150
  """Delete a collection. It is detected from all parent elements. If members are anchored to the collection
2246
2151
  then they are also deleted.
2247
2152
 
@@ -2249,8 +2154,8 @@ class CollectionManager(Client):
2249
2154
  ----------
2250
2155
  collection_guid: str
2251
2156
  The guid of the collection to update.
2252
- server_name: str, optional, defaults to None
2253
- The name of the server to configure. If not provided, the server name associated
2157
+
2158
+ If not provided, the server name associated
2254
2159
  with the instance is used.
2255
2160
 
2256
2161
  Returns
@@ -2269,16 +2174,13 @@ class CollectionManager(Client):
2269
2174
 
2270
2175
  """
2271
2176
  loop = asyncio.get_event_loop()
2272
- loop.run_until_complete(
2273
- self._async_delete_collection(collection_guid, server_name)
2274
- )
2177
+ loop.run_until_complete(self._async_delete_collection(collection_guid))
2275
2178
  return
2276
2179
 
2277
2180
  async def _async_get_collection_members(
2278
2181
  self,
2279
2182
  collection_guid: str,
2280
2183
  effective_time: str = None,
2281
- server_name: str = None,
2282
2184
  start_from: int = 0,
2283
2185
  page_size: int = None,
2284
2186
  ) -> list | str:
@@ -2290,9 +2192,9 @@ class CollectionManager(Client):
2290
2192
  identity of the collection to return members for.
2291
2193
  effective_time: str, [default=None], optional
2292
2194
  Effective time of the query. If not specified will default to any time.
2293
- server_name : str, optional
2294
- The name of the server to configure.
2295
- If not provided, the server name associated with the instance is used.
2195
+
2196
+
2197
+
2296
2198
  start_from: int, [default=0], optional
2297
2199
  When multiple pages of results are available, the page number to start from.
2298
2200
  page_size: int, [default=None]
@@ -2315,13 +2217,12 @@ class CollectionManager(Client):
2315
2217
  The principle specified by the user_id does not have authorization for the requested action
2316
2218
 
2317
2219
  """
2318
- if server_name is None:
2319
- server_name = self.server_name
2220
+
2320
2221
  if page_size is None:
2321
2222
  page_size = self.page_size
2322
2223
 
2323
2224
  url = (
2324
- f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}/"
2225
+ f"{self.collection_command_root}/{collection_guid}/"
2325
2226
  f"members?startFrom={start_from}&pageSize={page_size}"
2326
2227
  )
2327
2228
 
@@ -2332,7 +2233,6 @@ class CollectionManager(Client):
2332
2233
  self,
2333
2234
  collection_guid: str,
2334
2235
  effective_time: str = None,
2335
- server_name: str = None,
2336
2236
  start_from: int = 0,
2337
2237
  page_size: int = None,
2338
2238
  ) -> list | str:
@@ -2344,9 +2244,9 @@ class CollectionManager(Client):
2344
2244
  identity of the collection to return members for.
2345
2245
  effective_time: str, [default=None], optional
2346
2246
  Effective time of the query. If not specified will default to any time.
2347
- server_name : str, optional
2348
- The name of the server to configure.
2349
- If not provided, the server name associated with the instance is used.
2247
+
2248
+
2249
+
2350
2250
  start_from: int, [default=0], optional
2351
2251
  When multiple pages of results are available, the page number to start from.
2352
2252
  page_size: int, [default=None]
@@ -2372,7 +2272,7 @@ class CollectionManager(Client):
2372
2272
  loop = asyncio.get_event_loop()
2373
2273
  resp = loop.run_until_complete(
2374
2274
  self._async_get_collection_members(
2375
- collection_guid, effective_time, server_name, start_from, page_size
2275
+ collection_guid, effective_time, start_from, page_size
2376
2276
  )
2377
2277
  )
2378
2278
 
@@ -2383,7 +2283,6 @@ class CollectionManager(Client):
2383
2283
  collection_guid: str,
2384
2284
  element_guid: str,
2385
2285
  body: dict = None,
2386
- server_name: str = None,
2387
2286
  ) -> None:
2388
2287
  """Add an element to a collection. The request body is optional. Async version.
2389
2288
 
@@ -2395,9 +2294,9 @@ class CollectionManager(Client):
2395
2294
  Effective time of the query. If not specified will default to any time.
2396
2295
  body: dict, optional, defaults to None
2397
2296
  The body of the request to add to the collection. See notes.
2398
- server_name : str, optional
2297
+
2399
2298
  The name of the server to use.
2400
- If not provided, the server name associated with the instance is used.
2299
+
2401
2300
 
2402
2301
  Returns
2403
2302
  -------
@@ -2432,11 +2331,9 @@ class CollectionManager(Client):
2432
2331
  }
2433
2332
 
2434
2333
  """
2435
- if server_name is None:
2436
- server_name = self.server_name
2437
2334
 
2438
2335
  url = (
2439
- f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}/members/"
2336
+ f"{self.collection_command_root}/{collection_guid}/members/"
2440
2337
  f"{element_guid}/attach"
2441
2338
  )
2442
2339
  body_s = body_slimmer(body)
@@ -2448,7 +2345,6 @@ class CollectionManager(Client):
2448
2345
  collection_guid: str,
2449
2346
  element_guid: str,
2450
2347
  body: dict = None,
2451
- server_name: str = None,
2452
2348
  ) -> None:
2453
2349
  """Add an element to a collection. The request body is optional.
2454
2350
 
@@ -2460,9 +2356,9 @@ class CollectionManager(Client):
2460
2356
  Effective time of the query. If not specified will default to any time.
2461
2357
  body: dict, optional, defaults to None
2462
2358
  The body of the request to add to the collection. See notes.
2463
- server_name : str, optional
2359
+
2464
2360
  The name of the server to use.
2465
- If not provided, the server name associated with the instance is used.
2361
+
2466
2362
 
2467
2363
  Returns
2468
2364
  -------
@@ -2499,9 +2395,7 @@ class CollectionManager(Client):
2499
2395
  """
2500
2396
  loop = asyncio.get_event_loop()
2501
2397
  loop.run_until_complete(
2502
- self._async_add_to_collection(
2503
- collection_guid, element_guid, body, server_name
2504
- )
2398
+ self._async_add_to_collection(collection_guid, element_guid, body)
2505
2399
  )
2506
2400
  return
2507
2401
 
@@ -2511,7 +2405,6 @@ class CollectionManager(Client):
2511
2405
  element_guid: str,
2512
2406
  body: dict = None,
2513
2407
  replace_all_props: bool = False,
2514
- server_name: str = None,
2515
2408
  ) -> None:
2516
2409
  """Update an element's membership to a collection. Async version.
2517
2410
 
@@ -2525,9 +2418,9 @@ class CollectionManager(Client):
2525
2418
  The body of the request to add to the collection. See notes.
2526
2419
  replace_all_props: bool, optional, defaults to False
2527
2420
  Replace all properties or just update ones specified in body.
2528
- server_name : str, optional
2421
+
2529
2422
  The name of the server to use.
2530
- If not provided, the server name associated with the instance is used.
2423
+
2531
2424
 
2532
2425
  Returns
2533
2426
  -------
@@ -2562,11 +2455,10 @@ class CollectionManager(Client):
2562
2455
  }
2563
2456
 
2564
2457
  """
2565
- if server_name is None:
2566
- server_name = self.server_name
2458
+
2567
2459
  replace_all_props_s = str(replace_all_props).lower()
2568
2460
  url = (
2569
- f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}/members/"
2461
+ f"{self.collection_command_root}/{collection_guid}/members/"
2570
2462
  f"{element_guid}/update?replaceAllProperties={replace_all_props_s}"
2571
2463
  )
2572
2464
  body_s = body_slimmer(body)
@@ -2579,7 +2471,6 @@ class CollectionManager(Client):
2579
2471
  element_guid: str,
2580
2472
  body: dict = None,
2581
2473
  replace_all_props: bool = False,
2582
- server_name: str = None,
2583
2474
  ) -> None:
2584
2475
  """Update an element's membership to a collection.
2585
2476
 
@@ -2593,9 +2484,9 @@ class CollectionManager(Client):
2593
2484
  The body of the request to add to the collection. See notes.
2594
2485
  replace_all_props: bool, optional, defaults to False
2595
2486
  Replace all properties or just update ones specified in body.
2596
- server_name : str, optional
2487
+
2597
2488
  The name of the server to use.
2598
- If not provided, the server name associated with the instance is used.
2489
+
2599
2490
 
2600
2491
  Returns
2601
2492
  -------
@@ -2633,13 +2524,13 @@ class CollectionManager(Client):
2633
2524
  loop = asyncio.get_event_loop()
2634
2525
  loop.run_until_complete(
2635
2526
  self._async_update_collection_membership(
2636
- collection_guid, element_guid, body, replace_all_props, server_name
2527
+ collection_guid, element_guid, body, replace_all_props
2637
2528
  )
2638
2529
  )
2639
2530
  return
2640
2531
 
2641
2532
  async def _async_remove_from_collection(
2642
- self, collection_guid: str, element_guid: str, server_name: str = None
2533
+ self, collection_guid: str, element_guid: str
2643
2534
  ) -> None:
2644
2535
  """Remove an element from a collection. Async version.
2645
2536
 
@@ -2649,9 +2540,9 @@ class CollectionManager(Client):
2649
2540
  identity of the collection to return members for.
2650
2541
  element_guid: str
2651
2542
  Effective time of the query. If not specified will default to any time.
2652
- server_name : str, optional
2543
+
2653
2544
  The name of the server to use.
2654
- If not provided, the server name associated with the instance is used.
2545
+
2655
2546
 
2656
2547
  Returns
2657
2548
  -------
@@ -2668,20 +2559,16 @@ class CollectionManager(Client):
2668
2559
  The principle specified by the user_id does not have authorization for the requested action
2669
2560
 
2670
2561
  """
2671
- if server_name is None:
2672
- server_name = self.server_name
2673
2562
 
2674
2563
  url = (
2675
- f"{self.platform_url}/servers/{server_name}{self.command_base}/{collection_guid}/members/"
2564
+ f"{self.collection_command_root}/{collection_guid}/members/"
2676
2565
  f"{element_guid}/detach"
2677
2566
  )
2678
2567
  body = {"class": "NullRequestBody"}
2679
2568
  await self._async_make_request("POST", url, body)
2680
2569
  return
2681
2570
 
2682
- def remove_from_collection(
2683
- self, collection_guid: str, element_guid: str, server_name: str = None
2684
- ) -> None:
2571
+ def remove_from_collection(self, collection_guid: str, element_guid: str) -> None:
2685
2572
  """Remove an element from a collection.
2686
2573
 
2687
2574
  Parameters
@@ -2690,9 +2577,9 @@ class CollectionManager(Client):
2690
2577
  identity of the collection to return members for.
2691
2578
  element_guid: str
2692
2579
  Effective time of the query. If not specified will default to any time.
2693
- server_name : str, optional
2580
+
2694
2581
  The name of the server to use.
2695
- If not provided, the server name associated with the instance is used.
2582
+
2696
2583
 
2697
2584
  Returns
2698
2585
  -------
@@ -2711,22 +2598,18 @@ class CollectionManager(Client):
2711
2598
  """
2712
2599
  loop = asyncio.get_event_loop()
2713
2600
  loop.run_until_complete(
2714
- self._async_remove_from_collection(
2715
- collection_guid, element_guid, server_name
2716
- )
2601
+ self._async_remove_from_collection(collection_guid, element_guid)
2717
2602
  )
2718
2603
  return
2719
2604
 
2720
- async def _async_get_member_list(
2721
- self, root_collection_guid: str, server_name: str = None
2722
- ) -> list | bool:
2605
+ async def _async_get_member_list(self, root_collection_guid: str) -> list | bool:
2723
2606
  """Get the member list for the collection - async version.
2724
2607
  Parameters
2725
2608
  ----------
2726
2609
  root_collection_guid : str
2727
2610
  The unique GUID of the root collection.
2728
2611
 
2729
- server_name : str, optional
2612
+
2730
2613
  The name of the server. If not provided, the default server name will be used.
2731
2614
 
2732
2615
  Returns
@@ -2740,8 +2623,7 @@ class CollectionManager(Client):
2740
2623
  If the root_collection_name does not have exactly one root collection.
2741
2624
 
2742
2625
  """
2743
- if server_name is None:
2744
- server_name = self.server_name
2626
+
2745
2627
  # first find the guid for the collection we are using as root
2746
2628
 
2747
2629
  # now find the members of the collection
@@ -2766,16 +2648,14 @@ class CollectionManager(Client):
2766
2648
 
2767
2649
  return member_list
2768
2650
 
2769
- def get_member_list(
2770
- self, root_collection_guid: str, server_name: str = None
2771
- ) -> list | bool:
2651
+ def get_member_list(self, root_collection_guid: str) -> list | bool:
2772
2652
  """Get the member list for the collection.
2773
2653
  Parameters
2774
2654
  ----------
2775
2655
  root_collection_guid : str
2776
2656
  The GUID of the root collection.
2777
2657
 
2778
- server_name : str, optional
2658
+
2779
2659
  The name of the server. If not provided, the default server name will be used.
2780
2660
 
2781
2661
  Returns
@@ -2791,7 +2671,7 @@ class CollectionManager(Client):
2791
2671
  """
2792
2672
  loop = asyncio.get_event_loop()
2793
2673
  resp = loop.run_until_complete(
2794
- self._async_get_member_list(root_collection_guid, server_name)
2674
+ self._async_get_member_list(root_collection_guid)
2795
2675
  )
2796
2676
  return resp
2797
2677