pyegeria 0.2.4__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -108,7 +108,7 @@ class CoreServerConfig(Client):
108
108
  response = self.make_request("GET", url)
109
109
  return response.json().get("omagserverConfig", "No configuration found")
110
110
 
111
- def is_server_configured(self, server_name:str= None) -> bool:
111
+ def is_server_configured(self, server_name: str = None) -> bool:
112
112
  """ Check if the server has a stored configuration
113
113
 
114
114
  Parameters
@@ -131,7 +131,6 @@ class CoreServerConfig(Client):
131
131
  else:
132
132
  return False
133
133
 
134
-
135
134
  def get_configured_access_services(self, server_name: str = None) -> list | str:
136
135
  """ Return the list of access services that are configured for this server.
137
136
 
@@ -1135,7 +1134,41 @@ class CoreServerConfig(Client):
1135
1134
  url = f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/read-only-repository"
1136
1135
  self.make_request("POST", url)
1137
1136
 
1138
- def set_plug_in_repository(self, config_body: dict, server_name:str = None)-> None:
1137
+ def set_repository_proxy_details(self, connector_provider: str, server_name: str = None) -> None:
1138
+ """ Sets the local repository to use the proxy repository specified by the connection.
1139
+
1140
+ Parameters
1141
+ ----------
1142
+ connector_provider: str
1143
+ Specifies the class of the proxy connector provider.
1144
+ server_name : str, optional
1145
+ The name of the server. If not provided, the default server name of the instance will be used.
1146
+
1147
+ Returns
1148
+ -------
1149
+ None
1150
+ This method does not return anything.
1151
+
1152
+ Raises
1153
+ ------
1154
+ InvalidParameterException
1155
+ If the response code is not 200.
1156
+ PropertyServerException:
1157
+ Raised by the server when an issue arises in processing a valid request
1158
+ NotAuthorizedException:
1159
+ The principle specified by the user_id does not have authorization for the requested action
1160
+
1161
+ """
1162
+ if server_name is None:
1163
+ server_name = self.server_name
1164
+
1165
+ validate_name(connector_provider)
1166
+
1167
+ url = (f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/repository-proxy/"
1168
+ f"details?connectorProvider={connector_provider}")
1169
+ self.make_request("POST", url)
1170
+
1171
+ def set_plug_in_repository(self, config_body: dict, server_name: str = None) -> None:
1139
1172
  """ Configure the metadata repository using a full repository connection body.
1140
1173
 
1141
1174
  Parameters
@@ -1167,7 +1200,6 @@ class CoreServerConfig(Client):
1167
1200
  url = f"{self.admin_command_root}/servers/{server_name}/local-repository/mode/plugin-repository/connection"
1168
1201
  self.make_request("POST", url, config_body)
1169
1202
 
1170
-
1171
1203
  def set_xtdb_in_mem_repository(self, server_name: str = None) -> None:
1172
1204
  """ Set xtdb local repository connection to be XTDB with an in memory repository
1173
1205
 
@@ -1475,7 +1507,7 @@ class CoreServerConfig(Client):
1475
1507
  "maxPageSize": max_page_size
1476
1508
  }
1477
1509
  url = self.admin_command_root + "/servers/" + server_name + "/server-properties"
1478
- print(url)
1510
+
1479
1511
  self.make_request("POST", url, basic_props)
1480
1512
 
1481
1513
  def get_basic_server_properties(self, server_name: str = None) -> dict | str:
@@ -2534,5 +2566,4 @@ class CoreServerConfig(Client):
2534
2566
 
2535
2567
  """
2536
2568
  url = f"{self.admin_command_root}/stores/placeholder-variables"
2537
- self.make_request("DELETE", url)
2538
-
2569
+ self.make_request("DELETE", url)