Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make CatalogTarget relationship multi-link #8255

Merged
merged 2 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .github/workflows/merge-v5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,25 +108,6 @@ jobs:
tags: odpi/egeria-platform:${{ env.VERSION }}, quay.io/odpi/egeria-platform:${{ env.VERSION }}
context: ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz
platforms: linux/amd64,linux/arm64
# Publish container images(egeria-configure) to quay.io and docker.io
- name: Build and push(egeria-configure) to quay.io and docker.io (tag latest)
if: ${{ github.ref == 'refs/heads/main'}}
uses: docker/build-push-action@v5
with:
push: true
tags: odpi/egeria-configure:${{ env.VERSION }}, odpi/egeria-configure:latest, quay.io/odpi/egeria-configure:${{ env.VERSION }}, quay.io/odpi/egeria-configure:latest
context: ./open-metadata-resources/open-metadata-deployment/docker/configure
platforms: linux/amd64,linux/arm64
# --
# Publish container images(egeria-configure) to quay.io and docker.io
- name: Build and push(egeria-configure) to quay.io and docker.io (no tag latest)
if: ${{ github.ref != 'refs/heads/main'}}
uses: docker/build-push-action@v5
with:
push: true
tags: odpi/egeria-configure:${{ env.VERSION }}, quay.io/odpi/egeria-configure:${{ env.VERSION }}
context: ./open-metadata-resources/open-metadata-deployment/docker/configure
platforms: linux/amd64,linux/arm64
# --
- name: Upload Log of any dependency failures
uses: actions/[email protected]
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/release-v5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ jobs:
tags: odpi/egeria-platform:${{ env.VERSION }}, odpi/egeria-platform:stable, quay.io/odpi/egeria-platform:${{ env.VERSION }}, quay.io/odpi/egeria-platform:stable
context: ./open-metadata-distribution/omag-server-platform/build/unpacked/egeria-platform-${{ env.VERSION }}-distribution.tar.gz
platforms: linux/amd64,linux/arm64
# Publish container images(egeria-configure) to quay.io and docker.io
- name: Build and push(egeria-configure) to quay.io and docker.io
uses: docker/build-push-action@v5
with:
push: true
tags: odpi/egeria-configure:${{ env.VERSION }}, odpi/egeria-configure:stable, quay.io/odpi/egeria-configure:${{ env.VERSION }}, quay.io/odpi/egeria-configure:stable
context: ./open-metadata-resources/open-metadata-deployment/docker/configure
platforms: linux/amd64,linux/arm64
# Mostly for verification - not published to the release itself for now
- name: Upload assemblies
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion CoreContentPackGUIDMap.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -359,36 +359,52 @@ void unregisterIntegrationConnectorFromGroup(String userId,
* @param metadataElementGUID unique identifier of the metadata element that is a catalog target.
* @param properties properties for the relationship.
*
* @return catalog target GUID
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem storing the catalog target definition.
*/
void addCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID,
CatalogTargetProperties properties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
String addCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID,
CatalogTargetProperties properties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Update a catalog target for an integration connector.
*
* @param userId identifier of calling user.
* @param catalogTargetGUID unique identifier of the relationship.
* @param properties properties for the relationship.
*
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem storing the catalog target definition.
*/
void updateCatalogTarget(String userId,
String catalogTargetGUID,
CatalogTargetProperties properties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;


/**
* Retrieve a specific catalog target associated with an integration connector.
*
* @param userId identifier of calling user.
* @param integrationConnectorGUID unique identifier of the integration service.
* @param metadataElementGUID unique identifier of the metadata element that is a catalog target.
* @param relationshipGUID unique identifier of the catalog target.
*
* @return details of the integration connector and the elements it is to catalog
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem retrieving the integration connector definition.
*/
CatalogTarget getCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
String relationshipGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;



Expand Down Expand Up @@ -417,16 +433,14 @@ List<CatalogTarget> getCatalogTargets(String userId,
* Unregister a catalog target from the integration connector.
*
* @param userId identifier of calling user.
* @param integrationConnectorGUID unique identifier of the integration connector.
* @param metadataElementGUID unique identifier of the metadata element.
* @param relationshipGUID unique identifier of the catalog target relationship.
*
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem accessing/updating the integration connector definition.
*/
void removeCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
String relationshipGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException;
}
Original file line number Diff line number Diff line change
Expand Up @@ -796,17 +796,18 @@ public void unregisterIntegrationConnectorFromGroup(String userId,
* @param metadataElementGUID unique identifier of the metadata element that is a catalog target.
* @param properties properties for the relationship.
*
* @return catalog target GUID
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem storing the catalog target definition.
*/
@Override
public void addCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID,
CatalogTargetProperties properties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
public String addCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID,
CatalogTargetProperties properties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
final String methodName = "addCatalogTarget";
final String propertiesParameterName = "properties";
Expand All @@ -819,23 +820,59 @@ public void addCatalogTarget(String userId,
invalidParameterHandler.validateGUID(metadataElementGUID, metadataElementGUIDParameter, methodName);
invalidParameterHandler.validateObject(properties, propertiesParameterName, methodName);

GUIDResponse response = restClient.callGUIDPostRESTCall(methodName,
urlTemplate,
properties,
serverName,
userId,
integrationConnectorGUID,
metadataElementGUID);

return response.getGUID();
}


/**
* Update a catalog target for an integration connector.
*
* @param userId identifier of calling user.
* @param relationshipGUID unique identifier of the relationship.
* @param properties properties for the relationship.
*
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem storing the catalog target definition.
*/
@Override
public void updateCatalogTarget(String userId,
String relationshipGUID,
CatalogTargetProperties properties) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
final String methodName = "updateCatalogTarget";
final String propertiesParameterName = "properties";
final String integrationConnectorGUIDParameter = "relationshipGUID";
final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-engine/users/{1}/catalog-targets/{2}/update";

invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(relationshipGUID, integrationConnectorGUIDParameter, methodName);
invalidParameterHandler.validateObject(properties, propertiesParameterName, methodName);

restClient.callVoidPostRESTCall(methodName,
urlTemplate,
properties,
serverName,
userId,
integrationConnectorGUID,
metadataElementGUID);
relationshipGUID);
}



/**
* Retrieve a specific catalog target associated with an integration connector.
*
* @param userId identifier of calling user.
* @param integrationConnectorGUID unique identifier of the integration service.
* @param metadataElementGUID unique identifier of the metadata element that is a catalog target.
* @param relationshipGUID unique identifier of the integration service.
*
* @return details of the integration connector and the elements it is to catalog
* @throws InvalidParameterException one of the parameters is null or invalid.
Expand All @@ -844,24 +881,22 @@ public void addCatalogTarget(String userId,
*/
@Override
public CatalogTarget getCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
String relationshipGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
final String methodName = "getCatalogTarget";
final String integrationConnectorGUIDParameter = "integrationConnectorGUID";
final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-engine/users/{1}/integration-connectors/{2}/catalog-targets/{3}";
final String integrationConnectorGUIDParameter = "relationshipGUID";
final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-engine/users/{1}/catalog-targets/{2}";

invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(integrationConnectorGUID, integrationConnectorGUIDParameter, methodName);
invalidParameterHandler.validateGUID(relationshipGUID, integrationConnectorGUIDParameter, methodName);

CatalogTargetResponse restResult = restClient.callCatalogTargetGetRESTCall(methodName,
urlTemplate,
serverName,
userId,
integrationConnectorGUID,
metadataElementGUID);
relationshipGUID);

return restResult.getElement();
}
Expand Down Expand Up @@ -913,35 +948,30 @@ public List<CatalogTarget> getCatalogTargets(String userId,
* Unregister a catalog target from the integration connector.
*
* @param userId identifier of calling user.
* @param integrationConnectorGUID unique identifier of the integration connector.
* @param metadataElementGUID unique identifier of the metadata element.
* @param relationshipGUID unique identifier of the integration connector.
*
* @throws InvalidParameterException one of the parameters is null or invalid.
* @throws UserNotAuthorizedException user not authorized to issue this request.
* @throws PropertyServerException problem accessing/updating the integration connector definition.
*/
@Override
public void removeCatalogTarget(String userId,
String integrationConnectorGUID,
String metadataElementGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
String relationshipGUID) throws InvalidParameterException,
UserNotAuthorizedException,
PropertyServerException
{
final String methodName = "removeCatalogTarget";
final String integrationConnectorGUIDParameter = "integrationConnectorGUID";
final String metadataElementGUIDParameter = "metadataElementGUID";
final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-engine/users/{1}/integration-connectors/{2}/catalog-targets/{3}/delete";
final String integrationConnectorGUIDParameter = "relationshipGUID";
final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/access-services/governance-engine/users/{1}/catalog-targets/{2}/delete";

invalidParameterHandler.validateUserId(userId, methodName);
invalidParameterHandler.validateGUID(integrationConnectorGUID, integrationConnectorGUIDParameter, methodName);
invalidParameterHandler.validateGUID(metadataElementGUID, metadataElementGUIDParameter, methodName);
invalidParameterHandler.validateGUID(relationshipGUID, integrationConnectorGUIDParameter, methodName);

restClient.callVoidPostRESTCall(methodName,
urlTemplate,
nullRequestBody,
serverName,
userId,
integrationConnectorGUID,
metadataElementGUID);
relationshipGUID);
}
}
Loading
Loading