pyegeria 5.3.9.2__py3-none-any.whl → 5.3.9.4__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.
@@ -58,13 +58,14 @@ class CollectionManager(Client):
58
58
  #
59
59
  # Retrieving Collections - https://egeria-project.org/concepts/collection
60
60
  #
61
- async def _async_get_linked_collections(
61
+ async def _async_get_attached_collections(
62
62
  self,
63
63
  parent_guid: str,
64
64
  start_from: int = 0,
65
65
  page_size: int = None,
66
66
  ) -> list:
67
- """Returns the list of collections that are linked off of the supplied element. Async version.
67
+ """Returns the list of collections that are linked off of the supplied element using the ResourceList
68
+ relationship. Async version.
68
69
 
69
70
  Parameters
70
71
  ----------
@@ -109,7 +110,7 @@ class CollectionManager(Client):
109
110
  resp = await self._async_make_request("POST", url, body)
110
111
  return resp.json()
111
112
 
112
- def get_linked_collections(
113
+ def get_attached_collections(
113
114
  self,
114
115
  parent_guid: str,
115
116
  start_from: int = 0,
@@ -148,7 +149,7 @@ class CollectionManager(Client):
148
149
  """
149
150
  loop = asyncio.get_event_loop()
150
151
  resp = loop.run_until_complete(
151
- self._async_get_linked_collections(parent_guid, start_from, page_size)
152
+ self._async_get_attached_collections(parent_guid, start_from, page_size)
152
153
  )
153
154
  return resp
154
155
 
@@ -702,6 +703,26 @@ class CollectionManager(Client):
702
703
  #
703
704
  # Create collection methods
704
705
  #
706
+
707
+ ###
708
+ # =====================================================================================================================
709
+ # Create Collections: https://egeria-project.org/concepts/collection
710
+ # These requests use the following parameters:
711
+ #
712
+ # anchorGUID - the unique identifier of the element that should be the anchor for the new element. Set to null if no anchor,
713
+ # or if this collection is to be its own anchor.
714
+ #
715
+ # isOwnAnchor -this element should be classified as its own anchor or not. The default is false.
716
+ #
717
+ # parentGUID - the optional unique identifier for an element that should be connected to the newly created element.
718
+ # If this property is specified, parentRelationshipTypeName must also be specified
719
+ #
720
+ # parentRelationshipTypeName - the name of the relationship, if any, that should be established between the new element and the parent element.
721
+ # Examples could be "ResourceList" or "DigitalServiceProduct".
722
+ #
723
+ # parentAtEnd1 -identifies which end any parent entity sits on the relationship.
724
+ #
725
+
705
726
  async def _async_create_collection_w_body(
706
727
  self, classification_name: str, body: dict
707
728
  ) -> str:
@@ -730,6 +751,36 @@ class CollectionManager(Client):
730
751
  NotAuthorizedException
731
752
  The principle specified by the user_id does not have authorization for the requested action
732
753
 
754
+ Notes:
755
+ -----
756
+
757
+ Sample body:
758
+ {
759
+ "isOwnAnchor" : true,
760
+ "collectionProperties": {
761
+ "class" : "CollectionProperties",
762
+ "qualifiedName": "Must provide a unique name here",
763
+ "name" : "Add display name here",
764
+ "description" : "Add description of the collection here",
765
+ "collectionType": "Add appropriate valid value for type"
766
+ }
767
+ }
768
+ or
769
+ {
770
+ "anchorGUID" : "anchor GUID, if set then isOwnAnchor=false",
771
+ "isOwnAnchor" : false,
772
+ "anchorScopeGUID" : "optional GUID of search scope",
773
+ "parentGUID" : "parent GUID, if set, set all parameters beginning 'parent'",
774
+ "parentRelationshipTypeName" : "open metadata type name",
775
+ "parentAtEnd1": true,
776
+ "collectionProperties": {
777
+ "class" : "CollectionProperties",
778
+ "qualifiedName": "Must provide a unique name here",
779
+ "name" : "Add display name here",
780
+ "description" : "Add description of the collection here",
781
+ "collectionType": "Add appropriate valid value for type"
782
+ }
783
+ }
733
784
  """
734
785
 
735
786
  url = (
@@ -740,6 +791,7 @@ class CollectionManager(Client):
740
791
  resp = await self._async_make_request("POST", url, body)
741
792
  return resp.json().get("guid", "No GUID returned")
742
793
 
794
+
743
795
  def create_collection_w_body(self, classification_name: str, body: dict) -> str:
744
796
  """Create Collections: https://egeria-project.org/concepts/collection
745
797
 
@@ -768,6 +820,37 @@ class CollectionManager(Client):
768
820
  NotAuthorizedException
769
821
  The principle specified by the user_id does not have authorization for the requested action
770
822
 
823
+
824
+ Notes:
825
+ -----
826
+
827
+ Sample body:
828
+ {
829
+ "isOwnAnchor" : true,
830
+ "collectionProperties": {
831
+ "class" : "CollectionProperties",
832
+ "qualifiedName": "Must provide a unique name here",
833
+ "name" : "Add display name here",
834
+ "description" : "Add description of the collection here",
835
+ "collectionType": "Add appropriate valid value for type"
836
+ }
837
+ }
838
+ or
839
+ {
840
+ "anchorGUID" : "anchor GUID, if set then isOwnAnchor=false",
841
+ "isOwnAnchor" : false,
842
+ "anchorScopeGUID" : "optional GUID of search scope",
843
+ "parentGUID" : "parent GUID, if set, set all parameters beginning 'parent'",
844
+ "parentRelationshipTypeName" : "open metadata type name",
845
+ "parentAtEnd1": true,
846
+ "collectionProperties": {
847
+ "class" : "CollectionProperties",
848
+ "qualifiedName": "Must provide a unique name here",
849
+ "name" : "Add display name here",
850
+ "description" : "Add description of the collection here",
851
+ "collectionType": "Add appropriate valid value for type"
852
+ }
853
+ }
771
854
  """
772
855
  loop = asyncio.get_event_loop()
773
856
  resp = loop.run_until_complete(
@@ -785,6 +868,7 @@ class CollectionManager(Client):
785
868
  display_name: str,
786
869
  description: str,
787
870
  collection_type: str,
871
+ anchor_scope_guid: str = None,
788
872
  is_own_anchor: bool = False,
789
873
  collection_ordering: str = None,
790
874
  order_property_name: str = None,
@@ -812,9 +896,11 @@ class CollectionManager(Client):
812
896
  description: str
813
897
  A description of the collection.
814
898
  collection_type: str
815
- Add appropriate valid value for the collection type.
899
+ Adds an appropriate valid value for the collection type.
900
+ anchor_scope_guid: str, optional, defaults to None
901
+ optional GUID of search scope
816
902
  is_own_anchor: bool, optional, defaults to False
817
- Indicates if the collection should classified as its own anchor or not.
903
+ Indicates if the collection should be classified as its own anchor or not.
818
904
  collection_ordering: str, optional, defaults to "OTHER"
819
905
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER", "DATE_CREATED",
820
906
  "OTHER"
@@ -842,6 +928,7 @@ class CollectionManager(Client):
842
928
  if parent_guid is None:
843
929
  is_own_anchor = False
844
930
  is_own_anchor_s = str(is_own_anchor).lower()
931
+ parent_at_end1_s = str(parent_at_end1).lower()
845
932
 
846
933
  url = (
847
934
  f"{self.collection_command_root}?"
@@ -850,13 +937,14 @@ class CollectionManager(Client):
850
937
 
851
938
  body = {
852
939
  "anchorGUID": anchor_guid,
940
+ "anchorScopeGUID": anchor_scope_guid,
853
941
  "isOwnAnchor": is_own_anchor_s,
854
942
  "parentGUID": parent_guid,
855
943
  "parentRelationshipTypeName": parent_relationship_type_name,
856
- "parentAtEnd1": parent_at_end1,
944
+ "parentAtEnd1": parent_at_end1_s,
857
945
  "collectionProperties": {
858
946
  "class": "CollectionProperties",
859
- "qualifiedName": f"{classification_name}-{display_name}-{time.asctime()}",
947
+ "qualifiedName": f"{classification_name}::{display_name}",
860
948
  "name": display_name,
861
949
  "description": description,
862
950
  "collectionType": collection_type,
@@ -865,7 +953,7 @@ class CollectionManager(Client):
865
953
  },
866
954
  }
867
955
 
868
- resp = await self._async_make_request("POST", url, body)
956
+ resp = await self._async_make_request("POST", url, body_slimmer(body))
869
957
  return resp.json().get("guid", "No GUID returned")
870
958
 
871
959
  def create_collection(
@@ -878,6 +966,7 @@ class CollectionManager(Client):
878
966
  display_name: str,
879
967
  description: str,
880
968
  collection_type: str,
969
+ anchor_scope_guid: str = None,
881
970
  is_own_anchor: bool = False,
882
971
  collection_ordering: str = "OTHER",
883
972
  order_property_name: str = "Something",
@@ -906,9 +995,11 @@ class CollectionManager(Client):
906
995
  description: str
907
996
  A description of the collection.
908
997
  collection_type: str
909
- Add appropriate valid value for the collection type.
998
+ Adds an appropriate valid value for the collection type.
999
+ anchor_scope_guid: str, optional, defaults to None
1000
+ optional GUID of search scope
910
1001
  is_own_anchor: bool, optional, defaults to False
911
- Indicates if the collection should classified as its own anchor or not.
1002
+ Indicates if the collection should be classified as its own anchor or not.
912
1003
  collection_ordering: str, optional, defaults to "OTHER"
913
1004
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER",
914
1005
  "DATE_CREATED", "OTHER"
@@ -920,8 +1011,6 @@ class CollectionManager(Client):
920
1011
  -------
921
1012
  str - the guid of the created collection
922
1013
 
923
- A JSON dict representing the specified collection. Returns a string if none found.
924
-
925
1014
  Raises
926
1015
  ------
927
1016
  InvalidParameterException
@@ -943,9 +1032,10 @@ class CollectionManager(Client):
943
1032
  display_name,
944
1033
  description,
945
1034
  collection_type,
1035
+ anchor_scope_guid,
946
1036
  is_own_anchor,
947
1037
  collection_ordering,
948
- order_property_name,
1038
+ order_property_name
949
1039
  )
950
1040
  )
951
1041
  return resp
@@ -959,6 +1049,7 @@ class CollectionManager(Client):
959
1049
  display_name: str,
960
1050
  description: str,
961
1051
  collection_type: str,
1052
+ anchor_scope_guid: str = None,
962
1053
  is_own_anchor: bool = False,
963
1054
  ) -> str:
964
1055
  """Create a new collection with the RootCollection classification. Used to identify the top of a
@@ -982,16 +1073,16 @@ class CollectionManager(Client):
982
1073
  description: str
983
1074
  A description of the collection.
984
1075
  collection_type: str
985
- Add appropriate valid value for the collection type.
1076
+ Adds an appropriate valid value for the collection type.
1077
+ anchor_scope_guid: str, optional, defaults to None
1078
+ optional GUID of search scope
986
1079
  is_own_anchor: bool, optional, defaults to False
987
- Indicates if the collection should classified as its own anchor or not.
1080
+ Indicates if the collection should be classified as its own anchor or not.
988
1081
 
989
1082
  Returns
990
1083
  -------
991
1084
  str - the guid of the created collection
992
1085
 
993
- A JSON dict representing the specified collection. Returns a string if none found.
994
-
995
1086
  Raises
996
1087
  ------
997
1088
  InvalidParameterException
@@ -1004,24 +1095,26 @@ class CollectionManager(Client):
1004
1095
  """
1005
1096
 
1006
1097
  is_own_anchor_s = str(is_own_anchor).lower()
1098
+ parent_at_end1_s = str(parent_at_end1).lower()
1007
1099
  url = f"{self.collection_command_root}/root-collection"
1008
1100
 
1009
1101
  body = {
1010
1102
  "anchorGUID": anchor_guid,
1011
1103
  "isOwnAnchor": is_own_anchor_s,
1104
+ "anchorScopeGUID": anchor_scope_guid,
1012
1105
  "parentGUID": parent_guid,
1013
1106
  "parentRelationshipTypeName": parent_relationship_type_name,
1014
- "parentAtEnd1": parent_at_end1,
1107
+ "parentAtEnd1": parent_at_end1_s,
1015
1108
  "collectionProperties": {
1016
1109
  "class": "CollectionProperties",
1017
- "qualifiedName": f"root-collection-{display_name}-{time.asctime()}",
1110
+ "qualifiedName": f"root-collection::{display_name}",
1018
1111
  "name": display_name,
1019
1112
  "description": description,
1020
1113
  "collectionType": collection_type,
1021
1114
  },
1022
1115
  }
1023
1116
 
1024
- resp = await self._async_make_request("POST", url, body)
1117
+ resp = await self._async_make_request("POST", url, body_slimmer(body))
1025
1118
  return resp.json().get("guid", "No GUID Returned")
1026
1119
 
1027
1120
  def create_root_collection(
@@ -1033,6 +1126,7 @@ class CollectionManager(Client):
1033
1126
  display_name: str,
1034
1127
  description: str,
1035
1128
  collection_type: str,
1129
+ anchor_scope_guid: str = None,
1036
1130
  is_own_anchor: bool = False,
1037
1131
  ) -> str:
1038
1132
  """Create a new collection with the RootCollection classification. Used to identify the top of a
@@ -1057,16 +1151,16 @@ class CollectionManager(Client):
1057
1151
  description: str
1058
1152
  A description of the collection.
1059
1153
  collection_type: str
1060
- Add appropriate valid value for the collection type.
1154
+ Adds an appropriate valid value for the collection type.
1155
+ anchor_scope_guid: str, optional, defaults to None
1156
+ optional GUID of search scope
1061
1157
  is_own_anchor: bool, optional, defaults to False
1062
- Indicates if the collection should classified as its own anchor or not.
1158
+ Indicates if the collection should be classified as its own anchor or not.
1063
1159
 
1064
1160
  Returns
1065
1161
  -------
1066
1162
  str - the guid of the created collection
1067
1163
 
1068
- A JSON dict representing the specified collection. Returns a string if none found.
1069
-
1070
1164
  Raises
1071
1165
  ------
1072
1166
  InvalidParameterException
@@ -1087,6 +1181,7 @@ class CollectionManager(Client):
1087
1181
  display_name,
1088
1182
  description,
1089
1183
  collection_type,
1184
+ anchor_scope_guid,
1090
1185
  is_own_anchor,
1091
1186
  )
1092
1187
  )
@@ -1101,6 +1196,7 @@ class CollectionManager(Client):
1101
1196
  display_name: str,
1102
1197
  description: str,
1103
1198
  collection_type: str,
1199
+ anchor_scope_guid: str = None,
1104
1200
  is_own_anchor: bool = True,
1105
1201
  collection_ordering: str = "OTHER",
1106
1202
  order_property_name: str = "Something",
@@ -1126,9 +1222,11 @@ class CollectionManager(Client):
1126
1222
  description: str
1127
1223
  A description of the collection.
1128
1224
  collection_type: str
1129
- Add appropriate valid value for the collection type.
1225
+ Adds an appropriate valid value for the collection type.
1226
+ anchor_scope_guid: str, optional, defaults to None
1227
+ optional GUID of search scope
1130
1228
  is_own_anchor: bool, optional, defaults to False
1131
- Indicates if the collection should classified as its own anchor or not.
1229
+ Indicates if the collection should be classified as its own anchor or not.
1132
1230
  collection_ordering: str, optional, defaults to "OTHER"
1133
1231
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER",
1134
1232
  "DATE_CREATED", "OTHER"
@@ -1139,7 +1237,6 @@ class CollectionManager(Client):
1139
1237
  -------
1140
1238
  str - the guid of the created collection
1141
1239
 
1142
- A JSON dict representing the specified collection. Returns a string if none found.
1143
1240
 
1144
1241
  Raises
1145
1242
  ------
@@ -1152,17 +1249,19 @@ class CollectionManager(Client):
1152
1249
  """
1153
1250
 
1154
1251
  is_own_anchor_s = str(is_own_anchor).lower()
1252
+ parent_at_end1_s = str(parent_at_end1).lower()
1155
1253
  url = f"{self.collection_command_root}/data-spec-collection"
1156
1254
 
1157
1255
  body = {
1158
1256
  "anchorGUID": anchor_guid,
1257
+ "anchorScopeGUID": anchor_scope_guid,
1159
1258
  "isOwnAnchor": is_own_anchor_s,
1160
1259
  "parentGUID": parent_guid,
1161
1260
  "parentRelationshipTypeName": parent_relationship_type_name,
1162
- "parentAtEnd1": parent_at_end1,
1261
+ "parentAtEnd1": parent_at_end1_s,
1163
1262
  "collectionProperties": {
1164
1263
  "class": "CollectionProperties",
1165
- "qualifiedName": f"data-spec-collection-{display_name}-{time.asctime()}",
1264
+ "qualifiedName": f"data-spec-collection::{display_name}",
1166
1265
  "name": display_name,
1167
1266
  "description": description,
1168
1267
  "collectionType": collection_type,
@@ -1171,7 +1270,7 @@ class CollectionManager(Client):
1171
1270
  },
1172
1271
  }
1173
1272
 
1174
- resp = await self._async_make_request("POST", url, body)
1273
+ resp = await self._async_make_request("POST", url, body_slimmer(body))
1175
1274
  return resp.json().get("guid", "No GUID Returned")
1176
1275
 
1177
1276
  def create_data_spec_collection(
@@ -1183,7 +1282,8 @@ class CollectionManager(Client):
1183
1282
  display_name: str,
1184
1283
  description: str,
1185
1284
  collection_type: str,
1186
- is_own_anchor: bool,
1285
+ anchor_scope_guid: str = None,
1286
+ is_own_anchor: bool = False,
1187
1287
  collection_ordering: str = "OTHER",
1188
1288
  order_property_name: str = "Something",
1189
1289
  ) -> str:
@@ -1208,21 +1308,184 @@ class CollectionManager(Client):
1208
1308
  description: str
1209
1309
  A description of the collection.
1210
1310
  collection_type: str
1211
- Add appropriate valid value for the collection type.
1311
+ Adds an appropriate valid value for the collection type.
1312
+ anchor_scope_guid: str, optional, defaults to None
1313
+ optional GUID of search scope
1212
1314
  is_own_anchor: bool, optional, defaults to False
1213
- Indicates if the collection should classified as its own anchor or not.
1315
+ Indicates if the collection should be classified as its own anchor or not.
1214
1316
  collection_ordering: str, optional, defaults to "OTHER"
1215
1317
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER", "DATE_CREATED", "OTHER"
1216
1318
  order_property_name: str, optional, defaults to "Something"
1217
1319
  Property to use for sequencing if collection_ordering is "OTHER"
1218
1320
 
1321
+ Returns
1322
+ -------
1323
+ str - the guid of the created collection
1219
1324
 
1325
+ Raises
1326
+ ------
1327
+ InvalidParameterException
1328
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1329
+ PropertyServerException
1330
+ Raised by the server when an issue arises in processing a valid request
1331
+ NotAuthorizedException
1332
+ The principle specified by the user_id does not have authorization for the requested action
1333
+
1334
+ """
1335
+ loop = asyncio.get_event_loop()
1336
+ resp = loop.run_until_complete(
1337
+ self._async_create_data_spec_collection(
1338
+ anchor_guid,
1339
+ parent_guid,
1340
+ parent_relationship_type_name,
1341
+ parent_at_end1,
1342
+ display_name,
1343
+ description,
1344
+ collection_type,
1345
+ anchor_scope_guid,
1346
+ is_own_anchor,
1347
+ collection_ordering,
1348
+ order_property_name,
1349
+ )
1350
+ )
1351
+ return resp
1352
+
1353
+ async def _async_create_data_dictionary_collection(
1354
+ self,
1355
+ anchor_guid: str,
1356
+ parent_guid: str,
1357
+ parent_relationship_type_name: str,
1358
+ parent_at_end1: bool,
1359
+ display_name: str,
1360
+ description: str,
1361
+ collection_type: str,
1362
+ anchor_scope_guid: str = None,
1363
+ is_own_anchor: bool = True,
1364
+ collection_ordering: str = "OTHER",
1365
+ order_property_name: str = "Something",
1366
+ ) -> str:
1367
+ """ Create a new collection with the Data Dictionary classification. Used to identify a collection of
1368
+ data fields that represent a data store collection of common data types. Async version.
1369
+
1370
+ Parameters
1371
+ ----------
1372
+ anchor_guid: str
1373
+ The unique identifier of the element that should be the anchor for the new element.
1374
+ Set to null if no anchor, or if this collection is to be its own anchor.
1375
+ parent_guid: str
1376
+ The optional unique identifier for an element that should be connected to the newly created element.
1377
+ If this property is specified, parentRelationshipTypeName must also be specified
1378
+ parent_relationship_type_name: str
1379
+ The name of the relationship, if any, that should be established between the new element and the parent
1380
+ element. Examples could be "ResourceList" or "DigitalServiceProduct".
1381
+ parent_at_end1: bool
1382
+ Identifies which end any parent entity sits on the relationship.
1383
+ display_name: str
1384
+ The display name of the element. Will also be used as the basis of the qualified_name.
1385
+ description: str
1386
+ A description of the collection.
1387
+ collection_type: str
1388
+ Add an appropriate valid value for the collection type.
1389
+ anchor_scope_guid: str, optional, defaults to None
1390
+ GUID for search scope
1391
+ is_own_anchor: bool, optional, defaults to False
1392
+ Indicates if the collection should be classified as its own anchor or not.
1393
+ collection_ordering: str, optional, defaults to "OTHER"
1394
+ Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER",
1395
+ "DATE_CREATED", "OTHER"
1396
+ order_property_name: str, optional, defaults to "Something"
1397
+ Property to use for sequencing if collection_ordering is "OTHER"
1220
1398
 
1221
1399
  Returns
1222
1400
  -------
1223
1401
  str - the guid of the created collection
1224
1402
 
1225
- A JSON dict representing the specified collection. Returns a string if none found.
1403
+
1404
+ Raises
1405
+ ------
1406
+ InvalidParameterException
1407
+ If the client passes incorrect parameters on the request - such as bad URLs or invalid values
1408
+ PropertyServerException
1409
+ Raised by the server when an issue arises in processing a valid request
1410
+ NotAuthorizedException
1411
+ The principle specified by the user_id does not have authorization for the requested action
1412
+ """
1413
+
1414
+ is_own_anchor_s = str(is_own_anchor).lower()
1415
+ parent_at_end1_s = str(parent_at_end1).lower()
1416
+ url = f"{self.collection_command_root}/data-spec-collection"
1417
+
1418
+ body = {
1419
+ "anchorGUID": anchor_guid,
1420
+ "isOwnAnchor": is_own_anchor_s,
1421
+ "anchorScopeGUID": anchor_scope_guid,
1422
+ "parentGUID": parent_guid,
1423
+ "parentRelationshipTypeName": parent_relationship_type_name,
1424
+ "parentAtEnd1": parent_at_end1_s,
1425
+ "collectionProperties": {
1426
+ "class": "CollectionProperties",
1427
+ "qualifiedName": f"data-dict-collection::{display_name}",
1428
+ "name": display_name,
1429
+ "description": description,
1430
+ "collectionType": collection_type,
1431
+ "collectionOrdering": collection_ordering,
1432
+ "orderPropertyName": order_property_name,
1433
+ },
1434
+ }
1435
+
1436
+ resp = await self._async_make_request("POST", url, body_slimmer(body))
1437
+ return resp.json().get("guid", "No GUID Returned")
1438
+
1439
+ def create_data_dictionary_collection(
1440
+ self,
1441
+ anchor_guid: str,
1442
+ parent_guid: str,
1443
+ parent_relationship_type_name: str,
1444
+ parent_at_end1: bool,
1445
+ display_name: str,
1446
+ description: str,
1447
+ collection_type: str,
1448
+ anchor_scope_guid: str = None,
1449
+ is_own_anchor: bool = False,
1450
+ collection_ordering: str = "OTHER",
1451
+ order_property_name: str = "Something",
1452
+ ) -> str:
1453
+ """Create a new collection with the DataSpec classification. Used to identify a collection of data fields
1454
+ and schema types.
1455
+
1456
+ Parameters
1457
+ ----------
1458
+ anchor_guid: str
1459
+ The unique identifier of the element that should be the anchor for the new element.
1460
+ Set to null if no anchor, or if this collection is to be its own anchor.
1461
+ parent_guid: str
1462
+ The optional unique identifier for an element that should be connected to the newly created element.
1463
+ If this property is specified, parentRelationshipTypeName must also be specified
1464
+ parent_relationship_type_name: str
1465
+ The name of the relationship, if any, that should be established between the new element and the parent
1466
+ element. Examples could be "ResourceList" or "DigitalServiceProduct".
1467
+ parent_at_end1: bool
1468
+ Identifies which end any parent entity sits on the relationship.
1469
+ display_name: str
1470
+ The display name of the element. Will also be used as the basis of the qualified_name.
1471
+ description: str
1472
+ A description of the collection.
1473
+ collection_type: str
1474
+ Adds an appropriate valid value for the collection type.
1475
+ anchor_scope_guid: str, optional, defaults to None
1476
+ optional GUID of search scope
1477
+ is_own_anchor: bool, optional, defaults to False
1478
+ Indicates if the collection should be classified as its own anchor or not.
1479
+ collection_ordering: str, optional, defaults to "OTHER"
1480
+ Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER", "DATE_CREATED", "OTHER"
1481
+ order_property_name: str, optional, defaults to "Something"
1482
+ Property to use for sequencing if collection_ordering is "OTHER"
1483
+
1484
+
1485
+
1486
+ Returns
1487
+ -------
1488
+ str - the guid of the created collection
1226
1489
 
1227
1490
  Raises
1228
1491
  ------
@@ -1236,7 +1499,7 @@ class CollectionManager(Client):
1236
1499
  """
1237
1500
  loop = asyncio.get_event_loop()
1238
1501
  resp = loop.run_until_complete(
1239
- self._async_create_data_spec_collection(
1502
+ self._async_create_data_dictionary_collection(
1240
1503
  anchor_guid,
1241
1504
  parent_guid,
1242
1505
  parent_relationship_type_name,
@@ -1244,6 +1507,7 @@ class CollectionManager(Client):
1244
1507
  display_name,
1245
1508
  description,
1246
1509
  collection_type,
1510
+ anchor_scope_guid,
1247
1511
  is_own_anchor,
1248
1512
  collection_ordering,
1249
1513
  order_property_name,
@@ -1251,6 +1515,8 @@ class CollectionManager(Client):
1251
1515
  )
1252
1516
  return resp
1253
1517
 
1518
+
1519
+
1254
1520
  async def _async_create_folder_collection(
1255
1521
  self,
1256
1522
  anchor_guid: str,
@@ -1260,6 +1526,7 @@ class CollectionManager(Client):
1260
1526
  display_name: str,
1261
1527
  description: str,
1262
1528
  collection_type: str,
1529
+ anchor_scope_guid: str = None,
1263
1530
  is_own_anchor: bool = True,
1264
1531
  collection_ordering: str = "OTHER",
1265
1532
  order_property_name: str = "Something",
@@ -1285,9 +1552,11 @@ class CollectionManager(Client):
1285
1552
  description: str
1286
1553
  A description of the collection.
1287
1554
  collection_type: str
1288
- Add appropriate valid value for the collection type.
1555
+ Adds an appropriate valid value for the collection type.
1556
+ anchor_scope_guid: str, optional, defaults to None
1557
+ optional GUID of search scope
1289
1558
  is_own_anchor: bool, optional, defaults to False
1290
- Indicates if the collection should classified as its own anchor or not.
1559
+ Indicates if the collection should be classified as its own anchor or not.
1291
1560
  collection_ordering: str, optional, defaults to "OTHER"
1292
1561
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER",
1293
1562
  "DATE_CREATED", "OTHER"
@@ -1298,8 +1567,6 @@ class CollectionManager(Client):
1298
1567
  -------
1299
1568
  str - the guid of the created collection
1300
1569
 
1301
- A JSON dict representing the specified collection. Returns a string if none found.
1302
-
1303
1570
  Raises
1304
1571
  ------
1305
1572
  InvalidParameterException
@@ -1312,18 +1579,19 @@ class CollectionManager(Client):
1312
1579
  """
1313
1580
 
1314
1581
  is_own_anchor_s = str(is_own_anchor).lower()
1315
-
1582
+ parent_at_end1_s = str(parent_at_end1).lower()
1316
1583
  url = f"{self.collection_command_root}/folder"
1317
1584
 
1318
1585
  body = {
1319
1586
  "anchorGUID": anchor_guid,
1587
+ "anchorScopeGUID": anchor_scope_guid,
1320
1588
  "isOwnAnchor": is_own_anchor_s,
1321
1589
  "parentGUID": parent_guid,
1322
1590
  "parentRelationshipTypeName": parent_relationship_type_name,
1323
- "parentAtEnd1": parent_at_end1,
1591
+ "parentAtEnd1": parent_at_end1_s,
1324
1592
  "collectionProperties": {
1325
1593
  "class": "CollectionProperties",
1326
- "qualifiedName": f"folder-collection-{display_name}-{time.asctime()}",
1594
+ "qualifiedName": f"folder-collection::{display_name}",
1327
1595
  "name": display_name,
1328
1596
  "description": description,
1329
1597
  "collectionType": collection_type,
@@ -1332,7 +1600,7 @@ class CollectionManager(Client):
1332
1600
  },
1333
1601
  }
1334
1602
 
1335
- resp = await self._async_make_request("POST", url, body)
1603
+ resp = await self._async_make_request("POST", url, body_slimmer(body))
1336
1604
  return resp.json().get("guid", "No GUID returned")
1337
1605
 
1338
1606
  def create_folder_collection(
@@ -1344,7 +1612,8 @@ class CollectionManager(Client):
1344
1612
  display_name: str,
1345
1613
  description: str,
1346
1614
  collection_type: str,
1347
- is_own_anchor: bool,
1615
+ anchor_scope_guid: str = None,
1616
+ is_own_anchor: bool = True,
1348
1617
  collection_ordering: str = "OTHER",
1349
1618
  order_property_name: str = "Something",
1350
1619
  ) -> str:
@@ -1369,9 +1638,11 @@ class CollectionManager(Client):
1369
1638
  description: str
1370
1639
  A description of the collection.
1371
1640
  collection_type: str
1372
- Add appropriate valid value for the collection type.
1641
+ Adds an appropriate valid value for the collection type.
1642
+ anchor_scope_guid: str, optional, defaults to None
1643
+ optional GUID of search scope
1373
1644
  is_own_anchor: bool, optional, defaults to False
1374
- Indicates if the collection should classified as its own anchor or not.
1645
+ Indicates if the collection should be classified as its own anchor or not.
1375
1646
  collection_ordering: str, optional, defaults to "OTHER"
1376
1647
  Specifies the sequencing to use in a collection. Examples include "NAME", "OWNER", "DATE_CREATED",
1377
1648
  "OTHER"
@@ -1382,7 +1653,6 @@ class CollectionManager(Client):
1382
1653
  -------
1383
1654
  str - the guid of the created collection
1384
1655
 
1385
- A JSON dict representing the specified collection. Returns a string if none found.
1386
1656
 
1387
1657
  Raises
1388
1658
  ------
@@ -1404,6 +1674,7 @@ class CollectionManager(Client):
1404
1674
  display_name,
1405
1675
  description,
1406
1676
  collection_type,
1677
+ anchor_scope_guid,
1407
1678
  is_own_anchor,
1408
1679
  collection_ordering,
1409
1680
  order_property_name,
@@ -1928,7 +2199,7 @@ class CollectionManager(Client):
1928
2199
  watch_resources: bool = False,
1929
2200
  make_anchor: bool = False,
1930
2201
  ) -> None:
1931
- """Connect an existing collection to an element using the ResourceList relationship (0019). Async version.
2202
+ """ Connect an existing collection to an element using the ResourceList relationship (0019). Async version.
1932
2203
  Parameters
1933
2204
  ----------
1934
2205
  collection_guid: str
@@ -1938,13 +2209,13 @@ class CollectionManager(Client):
1938
2209
  resource_use: str,
1939
2210
  How the resource is being used.
1940
2211
  resource_use_description: str
1941
- Describe how the resource is being used.
2212
+ Describes how the resource is being used.
1942
2213
  resource_use_props: dict, optional, defaults to None
1943
2214
  The properties of the resource to be used.
1944
2215
  watch_resources, bool, optional, defaults to False
1945
2216
  Whether to watch for the resources to be updated.
1946
2217
  make_anchor, bool, optional, defaults to False
1947
- Whether to make the this an anchor.
2218
+ Whether to make this an anchor.
1948
2219
 
1949
2220
 
1950
2221
  Returns
@@ -1978,7 +2249,6 @@ class CollectionManager(Client):
1978
2249
  "resourceUseProperties": resource_use_props,
1979
2250
  }
1980
2251
  await self._async_make_request("POST", url, body)
1981
- return
1982
2252
 
1983
2253
  def attach_collection(
1984
2254
  self,
@@ -2182,7 +2452,6 @@ class CollectionManager(Client):
2182
2452
  collection_guid: str = None,
2183
2453
  collection_name: str = None,
2184
2454
  collection_qname: str = None,
2185
- effective_time: str = None,
2186
2455
  start_from: int = 0,
2187
2456
  page_size: int = None,
2188
2457
  ) -> list | str:
@@ -2194,13 +2463,11 @@ class CollectionManager(Client):
2194
2463
  identity of the collection to return members for. If none, collection_name or
2195
2464
  collection_qname are used.
2196
2465
  collection_name: str,
2197
- display name of the collection to return members for. If none, collection_guid
2466
+ display the name of the collection to return members for. If none, collection_guid
2198
2467
  or collection_qname are used.
2199
2468
  collection_qname: str,
2200
2469
  qualified name of the collection to return members for. If none, collection_guid
2201
2470
  or collection_name are used.
2202
- effective_time: str, [default=None], optional
2203
- Effective time of the query. If not specified will default to any time.
2204
2471
  start_from: int, [default=0], optional
2205
2472
  When multiple pages of results are available, the page number to start from.
2206
2473
  page_size: int, [default=None]
@@ -2246,7 +2513,6 @@ class CollectionManager(Client):
2246
2513
  collection_guid: str = None,
2247
2514
  collection_name: str = None,
2248
2515
  collection_qname: str = None,
2249
- effective_time: str = None,
2250
2516
  start_from: int = 0,
2251
2517
  page_size: int = None,
2252
2518
  ) -> list | str:
@@ -2258,13 +2524,11 @@ class CollectionManager(Client):
2258
2524
  identity of the collection to return members for. If none, collection_name or
2259
2525
  collection_qname are used.
2260
2526
  collection_name: str,
2261
- display name of the collection to return members for. If none, collection_guid
2527
+ display the name of the collection to return members for. If none, collection_guid
2262
2528
  or collection_qname are used.
2263
2529
  collection_qname: str,
2264
2530
  qualified name of the collection to return members for. If none, collection_guid
2265
2531
  or collection_name are used.
2266
- effective_time: str, [default=None], optional
2267
- Effective time of the query. If not specified will default to any time.
2268
2532
  start_from: int, [default=0], optional
2269
2533
  When multiple pages of results are available, the page number to start from.
2270
2534
  page_size: int, [default=None]
@@ -2293,7 +2557,6 @@ class CollectionManager(Client):
2293
2557
  collection_guid,
2294
2558
  collection_name,
2295
2559
  collection_qname,
2296
- effective_time,
2297
2560
  start_from,
2298
2561
  page_size,
2299
2562
  )