Skip to content

Commit

Permalink
Merge branch 'main' into code2024
Browse files Browse the repository at this point in the history
  • Loading branch information
mandy-chessell committed Jan 26, 2024
2 parents 5535691 + 2de28af commit 5551a73
Show file tree
Hide file tree
Showing 28 changed files with 3,872 additions and 808 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,4 @@ THIRD_PARTY*.txt
build/
*.gz
*.tmp
/.run/
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
# Egeria-open-metadata-conformance-suite

###
# group: Configuration
# @name Query cSuite server's configuration
# Query the current configuration of the conformance suite server.
GET {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/configuration

###
# group: Configuration
# @name Set cSuite server's user Id
# Set up the user Id that this server should use on open metadata requests.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/server-user-id?
id={{user}}

###
# group: Configuration
# @name Set cSuite server's password
# Set up the password that the conformance suite server should use on open metadata requests.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/server-user-password?
password={{password}}

###
# group: Configuration
# @name Set up event bus to connect to cohort topics
# Set up the common properties needed to call your event bus. These properties are passed in the request body.
# This request just sets up the defaults that will be incorporated into any future configuration that includes an event bus topic.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/event-bus
Content-Type: application/json

{
"producer": {
"bootstrap.servers": "{{kafkaep}}"
},
"consumer":{
"bootstrap.servers": "{{kafkaep}}"
}
}

###
# group: Configuration
# @name Enable access to the cohort
# Request registration to a cohort.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/cohorts/{{cohort}}

###
# group: Configuration
# @name Disable access to the cohort
# Unregister from a cohort.
DELETE {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/cohorts/{{cohort}}

###
# group: Configuration
# @name Configure the test of an open metadata repository
# Activate the repository workbench tests to validate the behaviour of a specific repository.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/conformance-suite-workbenches/repository-workbench/repositories/{{tutServer}}

###
# group: Configuration
# @name Configure the test of an open metadata server platform
# Activate the repository workbench tests to validate the behaviour of a specific server platform.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/conformance-suite-workbenches/platform-workbench/platforms/{{tutPlatformURLroot}}

###
# group: Configuration
# @name Delete the repository workbench configuration
# Remove all of the configuration for the open metadata conformance suite.
DELETE {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/conformance-suite-workbenches/repository-workbench

###
# group: Configuration
# @name Delete the platform workbench configuration
# Remove the configuration for the platform workbench of the open metadata conformance suite.
DELETE {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/conformance-suite-workbenches/platform-workbench

###
# group: Configuration
# @name Delete the conformance suite configuration
# Remove all of the configuration for the open metadata conformance suite.
DELETE {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{server}}/conformance-suite-workbenches

###
# group: Starting/Stopping CTS server
# @name Activate conformance suite using config
# Activate open metadata conformance suite services.
POST {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/server-platform/servers/{{server}}/instance

###
# group: Starting/Stopping CTS server
# @name Deactivate conformance suite server
# Deactivate open metadata conformance suite services for this server.
DELETE {{baseURL}}/open-metadata/platform-services/users/{{adminUserId}}/server-platform/servers/{{server}}/instance

###
# group: Getting Results
# @name Retrieve platform workbench results
# Retrieve the results from the platform workbench tests.
GET {{baseURL}}/servers/{{server}}/open-metadata/conformance-suite/users/{{adminUserId}}/report/workbenches/platform-workbench

###
# group: Getting Results
# @name Retrieve repository workbench results
# Retrieve the results from the repository workbench tests.
GET {{baseURL}}/servers/{{server}}/open-metadata/conformance-suite/users/{{adminUserId}}/report/workbenches/repository-workbench

###
# group: Getting Results
# @name Retrieve full report of results
# Retrieve all of the results of the conformance suite testing.
GET {{baseURL}}/servers/{{server}}/open-metadata/conformance-suite/users/{{adminUserId}}/report

###
# group: Getting Results
# @name Retrieve summary report of results
# Retrieve all of the results of the conformance suite testing.
GET {{baseURL}}/servers/{{server}}/open-metadata/conformance-suite/users/{{adminUserId}}/report/summary

###
# group: Getting Results
# @name Retrieve report of failed test cases
# Retrieve the results of all failed test cases.
GET {{baseURL}}/servers/{{server}}/open-metadata/conformance-suite/users/{{adminUserId}}/report/test-cases/failed

###
# group: Getting Results
# @name Retrieve report of a specific test case
# Retrieve the results of all failed test cases.
GET {{baseURL}}/servers/{{server}}/open-metadata/conformance-suite/users/{{adminUserId}}/report/test-cases/repository-metadata-collection
45 changes: 43 additions & 2 deletions open-metadata-distribution/omag-server-platform/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,11 @@ distributions {
from { "$rootProject.projectDir/open-metadata-distribution/omag-server-platform/docs/postman-collections" }
fileMode = 0755
}
into('assembly/opt/http-client-collections') {
// Describe the sample-clients layout
from { "$rootProject.projectDir/open-metadata-distribution/omag-server-platform/docs/http-client-collections" }
fileMode = 0755
}
into('assembly/opt/postman-collections') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-samples/postman-rest-samples" }
{
Expand All @@ -347,6 +352,20 @@ distributions {
}
fileMode = 0755
}
into('assembly/opt/http-client-collections') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-samples/postman-rest-samples" }
{
include 'Egeria*.http'
}
from { "$rootProject.projectDir/open-metadata-implementation" }
{
include 'admin-services/Egeria*.http'
include 'repository-services/Egeria*.http'
include 'platform-services/Egeria*.http'
include 'access-services/*/Egeria*.http'
}
fileMode = 0755
}
into('assembly/opt/postman-collections/framework-services') {
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/ocf-metadata-management" }
{
Expand All @@ -362,13 +381,35 @@ distributions {
}
fileMode = 0755
}
into('assembly/opt/postman-collections/sample-configs') {
from { "$rootProject.projectDir/open-metadata-resources/open-metadata-deployment" }
into('assembly/opt/http-client-collections/framework-services') {
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/ocf-metadata-management" }
{
include 'Egeria*.http'
}
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/oif-metadata-management" }
{
include 'Egeria*.http'
}
from { "$rootProject.projectDir/open-metadata-implementation/framework-services/gaf-metadata-management" }
{
include 'Egeria*.http'
}
fileMode = 0755
}
into('assembly/opt/postman-collections/conformance-suite') {
from { "$rootProject.projectDir/open-metadata-conformance-suite" }
{
include 'Egeria*.json'
}
fileMode = 0755
}
into('assembly/opt/http-client-collections/conformance-suite') {
from { "$rootProject.projectDir/open-metadata-conformance-suite" }
{
include 'Egeria*.http'
}
fileMode = 0755
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!-- SPDX-License-Identifier: CC-BY-4.0 -->
<!-- Copyright Contributors to the Egeria project. -->

# Sample JetBrains HTTP Scripts

The JetBrains HTTP Client is a useful utility for testing REST APIs that is both integrated into the JetBrains tooling
and freely available to be run standalone. Further information can be found at
[JetBrains HTTP Client](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html).
Information about the freely downloadable client can be found at
[Download HTTP Client CLI: CI-friendly way of executing .http files](https://www.jetbrains.com/ijhttp/download/#section=zip-archive).


It captures, stores and executes specific REST API calls, so you do not have to keep typing the URL and parameters
each time you want to issue a request. You can also sequence and script REST calls into scenarios for testing or
demonstration.


## Sample Collections

Collections help to group related REST API calls together. Collections are stored in files with a `.http` suffix.
In the Egeria source you can see collections for many of the Egeria modules. When Egeria is built, these collections are
assembled into the Egeria distribution and can be found at `egeria-distribution-root/opt/http-client/collections`.
You can, of course, create your own collections using the contents of the these samples as starting points.

In order to run these, you should have a set of environment variables configured as detailed in the [next section](#environment-variables).



## Environment variables

The HTTP Client supports the definition of variables like hostname, kafka queue, userId, etc. These can then be used in
specific HTTP Client commands. This makes it easier for them to be used by multiple users, or with different
configurations. Environment variables are stored in a file named either `http-client.env.json` or
`http-client.private.env.json`. The first is meant to be shared across all users and the second meant for private
customizations.

A superset of potential variables that we use in our samples (along with default values) are provided in:
`open-metadata-resources/open-metadata-deployment/http-client-rest-samples/http-client.env.json`. This file contains
several JSON structures that
group environment variables for different purposes - the Egeria grouping has generally used variables while, for
instance an Atlas grouping has variables specialized for Atlas. This file can be copied, into your own private environment
file and adapted to your own environment and requirements. The default private environment file is called
`http-client-private.env.json`.

You will most likely want to override some of these values (such as `baseURL` or `kafkaep`) depending on your
own environment's configuration - updating the `http-client-private.env.json` file with your own customizations make it
easy to preserve the defaults but select the configuration you need. A given environment file can have many configuration
sets within it, each created to support a different use case. Selection of the environment to use can be done
at execution time or when editing the requests file. You can, for example, set up different environments for development,
test, and production.

Note that many of the variables are optional, depending on your particular configuration. The most commonly used
variables are the following:

- `baseURL`: the base URL of your Egeria OMAG Server Platform, including the 'https://' prefix
- `user`: the user name of the user carrying out operations within the Egeria OMAG Server Platform
- `server`: the name of the server within the Platform in which to carry out operations
- `cohort`: the name of the cohort with which the server should interact
- `kafkaep`: the Apache Kafka endpoint (hostname:port) to use for Egeria's event bus

[Learn more about the HTTP Client](https://www.jetbrains.com/help/idea/http-client-in-product-code-editor.html#composing-http-requests).


----
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
Copyright Contributors to the Egeria project.
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"Egeria": {
"access_service": "stewardship-action",
"adminUserId": "garygeeke",
"assetGUID": "an asset guid",
"assetType": "an asset type",
"baseURL": "https://localhost:9443",
"cohort": "myCohort",
"connectionName": "aConnection",
"connectionProfileClassName": "aConnectionProfileClassName",
"guid": "a guid",
"intDaemon": "an integration daemon",
"kafkaep": "localhost:9092",
"max_page_size": "100",
"mc_name": "myMetadataCollection",
"mdrServer": "a metadata repository server",
"name": "a name",
"organization_name": "myOrg",
"password": "a password",
"user": "erinoverview",
"search-criteria": "some search criteria",
"server": "myserver",
"server-user": "myserverUserId",
"server-password": "myserverPassword",
"igc_host": "ibm-infosvr",
"igc_port": "9445",
"igc_user": "isadmin",
"igc_password": "isadmin",
"igc_kafka": "ibm-infosvr:59092",
"callerId": "aCaller",
"classificationName": "aClassification",
"databaseGUID": "a-databaseGUID",
"databaseSchemaGUID": "a-databaseSchemaGUID",
"databaseTableGUID": "a-databaseTableGUID",
"elementGUID": "an-element GUID",
"externalSourceGUID": "an external source guid",
"externalSourceName": "an external source name",
"glossaryCategoryGUID": "a glossary category GUID",
"glossaryGUID": "a glossary guid",
"glossaryTermGUID": "a term guid",
"glossaryTermRevisionLogGUID": "a revision guid",
"limit": "a limit",
"parentElementGUID": "a parent element guid",
"parentElementTypeName": "a parent element type",
"reportGUID": "a report guid",
"relationshipType": "a relationship type",
"schemaTypeGUID": "a schema type guid",
"serviceURLName": "a service URL Name",
"templateGUID": "a template guid",
"tutPlatformURLroot": "URL root for test platform",
"tutServer": "server for test",
"type": "a type",
"typeName": "name of type",
"useExternalSourceProvenance": "use External",
"validValueSetGUID": "a valid value set guid",
"validValueGUID": "a valid value guid"
},
"atlasConfig": {
"atlasGlossary": "a-glossary",
"atlasHost": "https://localhost",
"atlasKafka": "localhost:9026",
"atlasPassword": "admin",
"atlasPort": "21000",
"atlas_sub_category": "an atlas sub-category",
"atlas_term": "an atlas term",
"atlas_top_category": "an atlas top category",
"atlasUser": "admin"
},
"glossaryEnv": {
"baseURL": "https://localhost:9443",
"mdrServer": "a metadata repository server",
"server": "myserver",
"viewServer": "a view server",
"user": "erinoverview"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"my-private-config": {
"adminUserId": "garygeeke",
"assetGUID": "an asset guid",
"assetType": "an asset type",
"baseURL": "https://localhost:9443",
"cohort": "myCohort"
}
}
Loading

0 comments on commit 5551a73

Please sign in to comment.