Commit eaf83b27 authored by Abhishek Kumar (SLB)'s avatar Abhishek Kumar (SLB)
Browse files
parents 19de5d4c 9f776f75
......@@ -36,6 +36,7 @@ variables:
AWS_DEPLOY_TARGET: EKS
AWS_EKS_DEPLOYMENT_NAME: os-schema
OSDU_GCP_ENABLE_BOOTSTRAP: "true"
OSDU_GCP_SERVICE: schema
OSDU_GCP_VENDOR: gcp
OSDU_GCP_TESTS_SUBDIR: testing/schema-test-core
......@@ -44,9 +45,54 @@ variables:
OSDU_GCP_DEPLOYMENTS_SCRIPTS_SUBDIR: deployments/scripts
OSDU_GCP_HELM_CONFIG_SERVICE: schema-config
OSDU_GCP_HELM_DEPLOYMENT_SERVICE: schema-deploy
OSDU_GCP_HELM_CONFIG_SERVICE_VARS: "--set data.log_level=INFO --set data.authorize_api=$OSDU_GCP_AUTHORIZE_API --set data.google_audiences=$GOOGLE_AUDIENCE --set data.partition_api=$OSDU_GCP_PARTITION_API --set data.shared_tenant_name=$OSDU_GCP_TENANT"
OSDU_GCP_HELM_CONFIG_SERVICE_VARS_DEV2: "--set data.log_level=INFO --set data.authorize_api=$OSDU_GCP_AUTHORIZE_API --set data.google_audiences=$GOOGLE_AUDIENCE --set data.partition_api=$OSDU_GCP_PARTITION_API --set data.shared_tenant_name=$OSDU_GCP_TENANT"
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS: "--set data.image=$CI_REGISTRY_IMAGE/osdu-gcp:$CI_COMMIT_SHORT_SHA --set data.serviceAccountName=$OSDU_GCP_SERVICE-k8s"
OSDU_GCP_HELM_CONFIG_SERVICE_VARS: >
--set data.log_level=INFO
--set data.google_audiences=$GOOGLE_AUDIENCE
--set data.shared_tenant_name=$OSDU_GCP_TENANT
--set data.data_partition_id=$DATA_PARTITION_ID
OSDU_GCP_HELM_CONFIG_SERVICE_VARS_DEV2: >
--set data.log_level=INFO
--set data.google_audiences=$GOOGLE_AUDIENCE
--set data.shared_tenant_name=$OSDU_GCP_TENANT
--set data.data_partition_id=$DATA_PARTITION_ID
OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS: >
--set data.image=$CI_REGISTRY_IMAGE/osdu-gcp:$CI_COMMIT_SHORT_SHA
--set data.serviceAccountName=$OSDU_GCP_SERVICE-k8s
--set data.bootstrap_image=$CI_REGISTRY_IMAGE/osdu-gcp-bootstrap-$OSDU_GCP_SERVICE:$CI_COMMIT_SHORT_SHA
--set data.bootstrapServiceAccountName=datafier-workload-identity-gke
# FIXME add value below for DEV2 pipeline
# OSDU_GCP_HELM_DEPLOYMENT_SERVICE_VARS_DEV2: >
# REFACTOR to common pipeline
osdu-gcp-deploy-deployment:
needs:
- osdu-gcp-containerize-gitlab
- osdu-gcp-deploy-configmap
- osdu-gcp-containerize-bootstrap-gitlab
after_script:
- echo ----- Verify Bootstrap -----
- kubectl rollout status deployment.v1.apps/$OSDU_GCP_SERVICE-bootstrap -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s
- POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_SERVICE-bootstrap | tail -1 | awk '{print $1}')
- STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s)
- echo $STATUS
- if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
# REFACTOR to common pipeline for DEV2
# osdu-gcp-dev2-deploy-deployment:
# variables:
# OSDU_GCP_BOOTSTRAP_NAMESPACE: config
# OSDU_GCP_BOOTSTRAP_SERVICE_ACCOUNT: workload-gke-bootstrap-sa
# needs:
# - osdu-gcp-containerize-gitlab
# - osdu-gcp-deploy-configmap
# - osdu-gcp-containerize-bootstrap-schema
# after_script:
# - echo ----- Verify Bootstrap -----
# - kubectl rollout status deployment.v1.apps/$OSDU_GCP_SERVICE-bootstrap -n $OSDU_GCP_HELM_NAMESPACE --timeout=900s
# - POD=$(kubectl get pod --sort-by=.metadata.creationTimestamp -n $OSDU_GCP_HELM_NAMESPACE | grep $OSDU_GCP_SERVICE-bootstrap | tail -1 | awk '{print $1}')
# - STATUS=$(kubectl wait -n $OSDU_GCP_HELM_NAMESPACE --for=condition=Ready pod/$POD --timeout=300s)
# - echo $STATUS
# - if [[ "$STATUS" != *"met"* ]]; then echo "POD didn't start correctly" ; exit 1 ; fi
include:
- project: "osdu/platform/ci-cd-pipelines"
......@@ -79,7 +125,14 @@ include:
- local: "/devops/azure/gitlab-bootstrap.yml"
- local: "/devops/aws/bootstrap.yaml"
- local: "/devops/ibm/bootstrap.yaml"
- local: "/devops/gcp/bootstrap.yaml"
osdu-gcp-containerize-bootstrap-gitlab:
variables:
BUILD_PATH: devops/$OSDU_GCP_VENDOR/bootstrap-osdu-module/Dockerfile
osdu-gcp-containerize-bootstrap-gcr:
variables:
BUILD_PATH: devops/$OSDU_GCP_VENDOR/bootstrap-osdu-module/Dockerfile
osdu-gcp-test:
image: maven:3.8.2-jdk-8
......
This diff is collapsed.
......@@ -30,12 +30,10 @@ class DeploySharedSchemas:
self.schema_registered = None
self.schema_info_registered = None
self.headers = {
'data-partition-id': RunEnv.DATA_PARTITION,
'Content-Type': 'application/json',
'AppKey': RunEnv.APP_KEY,
'Authorization': RunEnv.BEARER_TOKEN
}
print('Current data-partition-id: {}'.format(RunEnv.DATA_PARTITION))
ok, error_mess = RunEnv().is_ok()
if not ok:
exit('Error: environment setting incomplete: {}'.format(error_mess))
......@@ -91,7 +89,7 @@ class DeploySharedSchemas:
return kind
def __register_one(self, kind, schema, messages):
method = 'POST'
method = 'PUT'
try_it = 'Try {} for id: {}'
print(try_it.format(method, kind))
response = requests.request(method, self.url, headers=self.headers, data=schema)
......@@ -117,6 +115,9 @@ class DeploySharedSchemas:
method = 'Give up'
error = code not in range(200, 300)
if error:
print(response.text)
print(response.url)
print(code)
# further test:
try:
js_err = json.loads(response.text)
......
......@@ -9,7 +9,7 @@ schema_namespace = os.environ.get("SCHEMA_NAMESPACE")
schema_kind = os.environ.get("SCHEMA_KIND")
shared_partition_id = os.environ.get("SHARED_PARTITION_ID", default="osdu")
default_namespace = "dataecosystem"
default_kind = "schema"
default_kind = "system_schema_osm"
def cleanup_datastore():
......
......@@ -12,7 +12,6 @@ class RunEnv(object):
APP_KEY = os.environ.get('APP_KEY')
SCHEMA_SERVICE_URL = None
STORAGE_SERVICE_URL = None
DATA_PARTITION = os.environ.get('DATA_PARTITION')
SCHEMA_AUTHORITY = os.environ.get('SCHEMA_AUTHORITY')
SCHEMAS_FOLDER = 'shared-schemas'
DEFAULT_BOOTSTRAP_OPTIONS = '[{"authority": "osdu", "folder": "osdu", "load-sequence": "load_sequence.1.0.0.json"}]'
......@@ -27,7 +26,7 @@ class RunEnv(object):
ok = True
if storage_service: ok = ok and self.STORAGE_SERVICE_URL is not None
if schema_service: ok = ok and self.SCHEMA_SERVICE_URL is not None
ok = ok and self.BEARER_TOKEN is not None and self.DATA_PARTITION is not None
ok = ok and self.BEARER_TOKEN is not None
message = self.__create_message(message, ok)
return ok, message
......@@ -38,15 +37,12 @@ class RunEnv(object):
parts.append('BEARER TOKEN')
if self.SCHEMA_SERVICE_URL is None:
parts.append('Schema service URL')
if self.DATA_PARTITION is None:
parts.append('Data-partition')
message = ', '.join(parts) + ' missing.'
return message
@staticmethod
def get_headers():
return {
'data-partition-id': RunEnv.DATA_PARTITION,
'Content-Type': 'application/json',
'AppKey': RunEnv.APP_KEY,
'Authorization': RunEnv.BEARER_TOKEN
......
......@@ -4,41 +4,97 @@
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os;
import boto3;
import jwt;
import os
import base64
import boto3
import requests
import json
from botocore.exceptions import ClientError
class AwsToken(object):
def get_aws_id_token(self):
if os.getenv("AWS_COGNITO_REGION") is not None:
region = os.environ["AWS_COGNITO_REGION"]
else:
region = os.environ["AWS_REGION"]
def _get_ssm_parameter(self, ssm_path, region):
ssm_client = boto3.client('ssm', region_name=region)
ssm_response = ssm_client.get_parameter(Name=ssm_path)
return ssm_response['Parameter']['Value']
def _get_secret(self, secret_name, secret_dict_key, region):
# Create a Secrets Manager client
client = boto3.client(
service_name='secretsmanager',
region_name=region
)
# In this sample we only handle the specific exceptions for the 'GetSecretValue' API.
# See https://docs.aws.amazon.com/secretsmanager/latest/apireference/API_GetSecretValue.html
# We rethrow the exception by default.
try:
get_secret_value_response = client.get_secret_value(
SecretId=secret_name
)
except ClientError as e:
print("Could not get client secret from secrets manager")
raise e
else:
# Decrypts secret using the associated KMS CMK.
# Depending on whether the secret is a string or binary, one of these fields will be populated.
if 'SecretString' in get_secret_value_response:
secret = get_secret_value_response['SecretString']
else:
decoded_binary_secret = base64.b64decode(get_secret_value_response['SecretBinary'])
return_secret_serialized = secret
if return_secret_serialized == None:
return_secret_serialized = decoded_binary_secret
return_secret = json.loads(return_secret_serialized)[secret_dict_key]
return return_secret
def get_service_principal_token(self):
if os.getenv("AWS_COGNITO_REGION") is not None:
region = os.environ["AWS_COGNITO_REGION"]
else:
region = os.environ["AWS_REGION"]
resource_prefix = os.environ["RESOURCE_PREFIX"]
token_url_ssm_path=f'/osdu/{resource_prefix}/oauth-token-uri'
oauth_custom_scope_ssm_path=f'/osdu/{resource_prefix}/oauth-custom-scope'
client_id_ssm_path=f'/osdu/{resource_prefix}/client-credentials-client-id'
client_secret_name=f'/osdu/{resource_prefix}/client_credentials_secret'
client_secret_dict_key='client_credentials_client_secret'
# session = boto3.session.Session()
client_id = self._get_ssm_parameter(client_id_ssm_path, region)
client_secret = self._get_secret(client_secret_name, client_secret_dict_key, region)
token_url = self._get_ssm_parameter(token_url_ssm_path, region)
oauth_custom_scope = self._get_ssm_parameter(oauth_custom_scope_ssm_path, region)
client = boto3.client('cognito-idp', region_name=region)
auth = '{}:{}'.format(client_id, client_secret)
encoded_auth = base64.b64encode(str.encode(auth))
userAuth = client.initiate_auth(
ClientId= os.environ['AWS_COGNITO_CLIENT_ID'],
headers = {}
headers['Authorization'] = 'Basic ' + encoded_auth.decode()
headers['Content-Type'] = 'application/x-www-form-urlencoded'
form_params={'grant_type': "client_credentials"}
AuthFlow= os.environ['AWS_COGNITO_AUTH_FLOW'],
AuthParameters= {
"USERNAME": os.environ['AWS_COGNITO_AUTH_PARAMS_USER'],
"PASSWORD": os.environ['AWS_COGNITO_AUTH_PARAMS_PASSWORD']
})
token_url = '{}?client_id={}&scope={}'.format(token_url, client_id, oauth_custom_scope)
token = 'Bearer ' + userAuth['AuthenticationResult']['AccessToken']
print(token)
return token
response = requests.post(url=token_url, headers=headers, data = form_params)
token = 'Bearer ' + json.loads(response.content.decode())['access_token']
print(token)
return token
if __name__ == '__main__':
AwsToken().get_aws_id_token()
\ No newline at end of file
AwsToken().get_service_principal_token()
\ No newline at end of file
......@@ -3,10 +3,7 @@
#AWS_BASE_URL
#AWS_DEPLOYMENTS_SUBDIR
#AWS_REGION
#AWS_COGNITO_CLIENT_ID
#AWS_COGNITO_AUTH_FLOW
#AWS_COGNITO_AUTH_PARAMS_USER
#AWS_COGNITO_AUTH_PARAMS_PASSWORD
#RESOURCE_PREFIX
if [ -z "$DEPLOYMENTS_BASE_DIR" ];
then export DEPLOYMENTS_BASE_DIR=deployments;
......@@ -15,7 +12,7 @@ fi
pip3 install -r $AWS_DEPLOYMENTS_SUBDIR/requirements.txt
echo $AWS_BASE_URL
export AWS_SCHEMA_SERVICE_URL=$AWS_BASE_URL/api/schema-service/v1/schema
export AWS_SCHEMA_SERVICE_URL=$AWS_BASE_URL/api/schema-service/v1/schemas/system
if [ -z "$BEARER_TOKEN" ];
then BEARER_TOKEN=`python3 $AWS_DEPLOYMENTS_SUBDIR/Token.py`;
......
boto3==1.17.1
botocore==1.20.1
PyJWT==1.7.1
requests
\ No newline at end of file
requests==2.23.00
\ No newline at end of file
......@@ -11,8 +11,7 @@ if [[ -z "${NAMESPACE}" ]]; then
NAMESPACE="osdu-azure"
fi
export AZURE_SCHEMA_URL="http://schema.${NAMESPACE}.svc.cluster.local/api/schema-service/v1/schema/"
export AZURE_SCHEMA_URL="http://schema.${NAMESPACE}.svc.cluster.local/api/schema-service/v1/schemas/system/"
currentStatus="success"
currentMessage="All schemas uploaded successfully"
BEARER_TOKEN=`python $AZURE_DEPLOYMENTS_SUBDIR/Token.py`
......@@ -38,4 +37,10 @@ if [ ! -z "$CONFIG_MAP_NAME" -a "$CONFIG_MAP_NAME" != " " ]; then
--from-literal=status="$currentStatus" \
--from-literal=message="$Message" \
-o yaml --dry-run=client | kubectl replace -f -
fi
\ No newline at end of file
fi
if [[ ${currentStatus} == "success" ]]; then
exit 0
else
exit 1
fi
curl -X DELETE -u $IBM_QA_DB_USER:$IBM_QA_DB_PASSWORD $IBM_QA_DB_URL/oc-cpd-dataecosystem-opendes-schema2
export IBM_SCHEMA_URL=$IBM_SCHEMA_HOST/api/schema-service/v1/schema
curl -X DELETE -u $IBM_QA_DB_USER:$IBM_QA_DB_PASSWORD $IBM_QA_DB_URL/oc-cpd-dataecosystem-common-schema2
export IBM_SCHEMA_URL=$IBM_SCHEMA_HOST/api/schema-service/v1/schemas/system
BEARER_TOKEN=`python $IBM_DEPLOYMENTS_SUBDIR/Token.py`
export BEARER_TOKEN=$BEARER_TOKEN
echo $BEARER_TOKEN
......
......@@ -38,7 +38,7 @@
"description": "The CRS reference into the CoordinateReferenceSystem catalog.",
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$",
"example": "namespace:reference-data--CoordinateReferenceSystem:BoundCRS.SLB.32021.15851:",
"example": "namespace:reference-data--CoordinateReferenceSystem:BoundProjected:EPSG::32021_EPSG::15851:",
"x-osdu-relationship": [
{
"GroupType": "reference-data",
......@@ -51,7 +51,7 @@
"description": "The explicit VerticalCRS reference into the CoordinateReferenceSystem catalog. This property stays empty for 2D geometries. Absent or empty values for 3D geometries mean the context may be provided by a CompoundCRS in 'CoordinateReferenceSystemID' or implicitly EPSG:5714 MSL height",
"type": "string",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-CoordinateReferenceSystem:[\\w\\-\\.\\:\\%]+:[0-9]*$",
"example": "namespace:reference-data--CoordinateReferenceSystem:VerticalCRS.EPSG.5773:",
"example": "namespace:reference-data--CoordinateReferenceSystem:Vertical:EPSG::5714:",
"x-osdu-relationship": [
{
"GroupType": "reference-data",
......@@ -63,13 +63,13 @@
"type": "string",
"title": "CRS Reference",
"description": "The CRS reference as persistableReference string. If populated, the CoordinateReferenceSystemID takes precedence.",
"example": "{\"lateBoundCRS\":{\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.1833333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.4833333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.6666666666667],UNIT[\\\"Foot_US\\\",0.304800609601219],AUTHORITY[\\\"EPSG\\\",32021]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"type\":\"LBC\"},\"singleCT\":{\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],AUTHORITY[\\\"EPSG\\\",15851]]\",\"ver\":\"PE_10_3_1\",\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"type\":\"ST\"},\"ver\":\"PE_10_3_1\",\"name\":\"NAD27 * OGP-Usa Conus / North Dakota South [32021,15851]\",\"authCode\":{\"auth\":\"SLB\",\"code\":\"32021079\"},\"type\":\"EBC\"}"
"example": "{\"authCode\":{\"auth\":\"OSDU\",\"code\":\"32021079\"},\"lateBoundCRS\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"32021\"},\"name\":\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"PROJCS[\\\"NAD_1927_StatePlane_North_Dakota_South_FIPS_3302\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],PROJECTION[\\\"Lambert_Conformal_Conic\\\"],PARAMETER[\\\"False_Easting\\\",2000000.0],PARAMETER[\\\"False_Northing\\\",0.0],PARAMETER[\\\"Central_Meridian\\\",-100.5],PARAMETER[\\\"Standard_Parallel_1\\\",46.18333333333333],PARAMETER[\\\"Standard_Parallel_2\\\",47.48333333333333],PARAMETER[\\\"Latitude_Of_Origin\\\",45.66666666666666],UNIT[\\\"Foot_US\\\",0.3048006096012192],AUTHORITY[\\\"EPSG\\\",32021]]\"},\"name\":\"NAD27 * OGP-Usa Conus / North Dakota CS27 South zone [32021,15851]\",\"singleCT\":{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"15851\"},\"name\":\"NAD_1927_To_WGS_1984_79_CONUS\",\"type\":\"ST\",\"ver\":\"PE_10_9_1\",\"wkt\":\"GEOGTRAN[\\\"NAD_1927_To_WGS_1984_79_CONUS\\\",GEOGCS[\\\"GCS_North_American_1927\\\",DATUM[\\\"D_North_American_1927\\\",SPHEROID[\\\"Clarke_1866\\\",6378206.4,294.9786982]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],GEOGCS[\\\"GCS_WGS_1984\\\",DATUM[\\\"D_WGS_1984\\\",SPHEROID[\\\"WGS_1984\\\",6378137.0,298.257223563]],PRIMEM[\\\"Greenwich\\\",0.0],UNIT[\\\"Degree\\\",0.0174532925199433]],METHOD[\\\"NADCON\\\"],PARAMETER[\\\"Dataset_conus\\\",0.0],OPERATIONACCURACY[5.0],AUTHORITY[\\\"EPSG\\\",15851]]\"},\"type\":\"EBC\",\"ver\":\"PE_10_9_1\"}"
},
"persistableReferenceVerticalCrs": {
"type": "string",
"title": "Vertical CRS Reference",
"description": "The VerticalCRS reference as persistableReference string. If populated, the VerticalCoordinateReferenceSystemID takes precedence. The property is null or empty for 2D geometries. For 3D geometries and absent or null persistableReferenceVerticalCrs the vertical CRS is either provided via persistableReferenceCrs's CompoundCRS or it is implicitly defined as EPSG:5714 MSL height.",
"example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5773\"},\"type\":\"LBC\",\"ver\":\"PE_10_3_1\",\"name\":\"EGM96_Geoid\",\"wkt\":\"VERTCS[\\\"EGM96_Geoid\\\",VDATUM[\\\"EGM96_Geoid\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5773]]\"}"
"example": "{\"authCode\":{\"auth\":\"EPSG\",\"code\":\"5714\"},\"name\":\"MSL_Height\",\"type\":\"LBC\",\"ver\":\"PE_10_9_1\",\"wkt\":\"VERTCS[\\\"MSL_Height\\\",VDATUM[\\\"Mean_Sea_Level\\\"],PARAMETER[\\\"Vertical_Shift\\\",0.0],PARAMETER[\\\"Direction\\\",1.0],UNIT[\\\"Meter\\\",1.0],AUTHORITY[\\\"EPSG\\\",5714]]\"}"
},
"persistableReferenceUnitZ": {
"type": "string",
......
......@@ -15,6 +15,7 @@
},
"schema": {
"x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"x-osdu-review-status": "Accepted",
"$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractBusinessRule.1.0.0.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"x-osdu-schema-source": "osdu:wks:AbstractBusinessRule:1.0.0",
......@@ -23,13 +24,20 @@
"type": "object",
"properties": {
"DataRuleSets": {
"description": "The list of data rule sets that is relevant for this business process. Each data rule set reference is associated with a run-status.",
"type": "array",
"title": "Data Rule Sets",
"description": "The list of data rule sets that is relevant for this business process. Each data rule set reference is associated with a run-status.",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"type": "object",
"title": "DataRuleSets",
"description": "The list of data rule sets that is relevant for this business process. Each data rule set reference is associated with a run-status.",
"properties": {
"DataRuleSetID": {
"type": "string",
"title": "DataRuleSet ID",
"description": "The relationship to the QualityDataRuleSet.",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QualityDataRuleSet:[\\w\\-\\.\\:\\%]+:[0-9]*$",
"x-osdu-relationship": [
......@@ -40,20 +48,28 @@
]
},
"DataRuleSetRunStatus": {
"description": "True if data ruleset rule has passed, False if data ruleset rule dit not pass.",
"type": "boolean"
"type": "boolean",
"title": "DataRuleSet Run Status",
"description": "True if data ruleset rule has passed, False if data ruleset rule dit not pass."
}
}
}
},
"DataRules": {
"description": "The list of individual data rules that is relevant for this business process. Each data rule reference is associated with a run-status.",
"type": "array",
"title": "Date Rules",
"description": "The list of individual data rules that is relevant for this business process. Each data rule reference is associated with a run-status.",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"type": "object",
"title": "DataRules",
"description": "The list of individual data rules that is relevant for this business process. Each data rule reference is associated with a run-status.",
"properties": {
"DataRuleID": {
"type": "string",
"title": "DataRule ID",
"description": "The relationship to the individual QualityDataRule.",
"pattern": "^[\\w\\-\\.]+:reference-data\\-\\-QualityDataRule:[\\w\\-\\.\\:\\%]+:[0-9]*$",
"x-osdu-relationship": [
......@@ -64,8 +80,9 @@
]
},
"DataRuleRunStatus": {
"description": "True if data rule has passed, False if data rule did not pass.",
"type": "boolean"
"type": "boolean",
"title": "DataRule Run Status",
"description": "True if data rule has passed, False if data rule did not pass."
}
}
}
......
{
"schemaInfo": {
"schemaIdentity": {
"authority": "{{schema-authority}}",
"source": "wks",
"entityType": "AbstractColumnBasedTable",
"schemaVersionMajor": 1,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": "{{schema-authority}}:wks:AbstractColumnBasedTable:1.0.0"
},
"createdBy": "OSDU Data Definition Group",
"scope": "SHARED",
"status": "DEVELOPMENT"
},
"schema": {
"x-osdu-license": "Copyright 2022, The Open Group \\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.",
"x-osdu-review-status": "Accepted",
"$id": "https://schema.osdu.opengroup.org/json/abstract/AbstractColumnBasedTable.1.0.0.json",
"$schema": "http://json-schema.org/draft-07/schema#",
"x-osdu-schema-source": "osdu:wks:AbstractColumnBasedTable:1.0.0",
"title": "AbstractColumnBasedTable",
"description": "The ColumnBasedTable is a set of columns, which have equal length (data.ColumnSize) included by types carrying embedded table properties. Columns have a Property Kind, UnitOfMeasure and Facet. There are KeyColumns (index columns) and Columns (for look-up values). Examples are KrPc, PVT and Facies tables.",
"type": "object",
"properties": {
"KeyColumns": {
"type": "array",
"title": "Key columns",
"description": "A column whose values are considered as keys/indices. Do not use this attribute if you want to follow a given ColumnBasedTableType.",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"$ref": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.1.0"
}
},
"Columns": {
"type": "array",
"title": "Common columns",
"description": "A common column storing values of a particular property kind. Do not use this attribute if you want to follow a given ColumnBasedTableType.",
"x-osdu-indexing": {
"type": "nested"
},
"items": {
"$ref": "{{schema-authority}}:wks:AbstractReferencePropertyType:1.1.0"
}
},
"ColumnSize": {
"type": "integer",
"title": "Size of columns",
"description": "The count of elements in each column",
"example": 5
},
"ColumnValues": {
"type": "array",
"title": "The values of each column",
"description": "First column values are related to first key column, second column values are related to the second key column, etc\u2026\nColumn values at index KeyColumns count are related to first (non key) column, Column values at index KeyColumns count + 1 are related to second (non key) column, etc...",
"items": {
"type": "object",
"title": "ColumnValues",
"description": "Value of the column. Generally only one of the attribute should be instantiated.",
"properties": {
"BooleanColumn": {
"type": "array",
"title": "Boolean Column",
"description": "A column of only boolean values",
"example": [
true,
false,
true,
true,
false
],
"items": {
"type": "boolean"
}
},
"IntegerColumn": {
"type": "array",
"title": "Integer Column",
"description": "A column of only integer values",
"format": "integer",
"pattern": "^[0-9]+$",
"example": [
0,
1,
2,
3,
4
],
"items": {
"type": "integer"
}
},
"NumberColumn": {
"type": "array",
"title": "Number Column",
"description": "A column of only number values",
"example": [
0.1,
2.3,
4.5,
6.7,
8.9
],
"items": {
"type": "number"
}
},
"StringColumn": {
"type": "array",
"title": "String Column",
"description": "A column of only string values",
"example": [
"foo",
"bar",
"foo again",
"bar again",
"foo bar"
],
"items": {
"type": "string"
}
},
"UndefinedValueRows": {