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

Omf connection revamp #5

Merged
merged 9 commits into from
Nov 21, 2023
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
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Version History

## 1.1.0 / 2023-05-03

- Removed Topics and subscriptions from code and documentation
- Parametrize apiversion
- Update documentation links to Aveva domain
- Added build status to readme file

## 1.0.2 / 2022-08-17

- Automate dependabot approval and automerge
Expand Down
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# OMF to Data Hub Quick Start Guide

**Version:** 1.0.2
**Version:** 1.1.0

[![Build Status](https://dev.azure.com/osieng/engineering/_apis/build/status%2Fproduct-readiness%2FADH%2Fsample-adh-omf_to_adh_quick_start-guide_jupyter-python?repoName=osisoft%2Fsample-adh-omf_to_adh_quick_start-guide_jupyter-python&branchName=main)](https://dev.azure.com/osieng/engineering/_build/latest?definitionId=4706&repoName=osisoft%2Fsample-adh-omf_to_adh_quick_start-guide_jupyter-python&branchName=main)

The sample code in this folder demonstrates an example of using OMF to send data into AVEVA Data Hub and the Sequential Data Store (SDS) using Python Jupyter Notebook. In order to run this sample, you need to have [Python](https://www.python.org/downloads/) installed.

Expand All @@ -16,29 +18,28 @@ The example in this guide will send data for a drone, including its location, ba
```json
{
"Resource": "PLACEHOLDER_REPLACE_WITH_RESOURCE",
"ClientId": "PLACEHOLDER_REPLACE_WITH_CLIENT_ID",
"ClientSecret": "PLACEHOLDER_REPLACE_WITH_CLIENT_SECRET",
"ApiVersion": "PLACEHOLDER_REPLACE_WITH_API_VERSION",
"TenantId": "PLACEHOLDER_REPLACE_WITH_TENANT_ID",
"NamespaceId": "PLACEHOLDER_REPLACE_WITH_NAMESPACE_ID",
"TopicName": "PLACEHOLDER_REPLACE_WITH_TOPIC_NAME",
"TopicDescription": "PLACEHOLDER_REPLACE_WITH_TOPIC_DESCRIPTION",
"SubscriptionName": "PLACEHOLDER_REPLACE_WITH_SUBSCRIPTION_NAME",
"SubscriptionDescription": "PLACEHOLDER_REPLACE_WITH_SUBSCRIPTION_DESCRIPTION"
"CommunityId": "PLACEHOLDER_REPLACE_WITH_COMMUNITY_ID",
"ClientId": "PLACEHOLDER_REPLACE_WITH_APPLICATION_IDENTIFIER",
"ClientSecret": "PLACEHOLDER_REPLACE_WITH_APPLICATION_SECRET",
"OMFConnectionName" : "PLACEHOLDER_REPLACE_WITH_OMF_CONNECTION_NAME",
"OMFConnectionDescription" : "PLACEHOLDER_REPLACE_WITH_OMF_CONNECTION_DESCRIPTION"
}
```

| Parameters | Required | Type | Description |
| --------------- | -------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Resource | required | string | The endpoint for ADH of the namespace. If the namespace is located in NA, it is https://uswe.datahub.connect.aveva.com and if in EMEA, it is https://euno.datahub.connect.aveva.com |
| ClientId | required | string | The id of the client credentials client to use |
| ClientSecret | required | string | The secret of the client credentials client to use |
| ApiVersion | required | string | The version of the API to be used |
| TenantId | required | string | The id of the tenant to use |
| NamespaceId | required | string | The id of the namespace to use |
| TopicName | required | string | The name of the OMF topic to create
| TopicDescription | optional | string | The description of the OMF topic to create
| SubscriptionName | required | string | The name of the OMF subscription to create
| SubscriptionDescription | optional | string | The description of the OMF subscription to create

| CommunityID | options | string | The name of the community to use (if any)
| ClientId | required | string | The id of the client credentials client to use |
| ClientSecret | required | string | The secret of the client credentials client to use
| OMFConnectionName | required | string | The name of the OMF connection to create |
| OMFConnectionDescription | optional | string | The description of the OMF connection to create

### Running the Jupyter Notebook

Expand All @@ -50,7 +51,7 @@ The example in this guide will send data for a drone, including its location, ba

## Documentation

The documentation for the various topics and APIs used here can be found at the [AVEVA Data Hub documentation website](https://docs.osisoft.com/category/adh-get-started)
The documentation for the various topics and APIs used here can be found at the [AVEVA Data Hub documentation website](https://docs.aveva.com/category/adh-get-started)

---

Expand Down
18 changes: 9 additions & 9 deletions appsettings.placeholder.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"Resource": "PLACEHOLDER_REPLACE_WITH_RESOURCE",
"ClientId": "PLACEHOLDER_REPLACE_WITH_CLIENT_ID",
"ClientSecret": "PLACEHOLDER_REPLACE_WITH_CLIENT_SECRET",
"TenantId": "PLACEHOLDER_REPLACE_WITH_TENANT_ID",
"NamespaceId": "PLACEHOLDER_REPLACE_WITH_NAMESPACE_ID",
"TopicName": "PLACEHOLDER_REPLACE_WITH_TOPIC_NAME",
"TopicDescription": "PLACEHOLDER_REPLACE_WITH_TOPIC_DESCRIPTION",
"SubscriptionName": "PLACEHOLDER_REPLACE_WITH_SUBSCRIPTION_NAME",
"SubscriptionDescription": "PLACEHOLDER_REPLACE_WITH_SUBSCRIPTION_DESCRIPTION"
"Resource": "PLACEHOLDER_REPLACE_WITH_RESOURCE",
"ApiVersion": "v1",
"TenantId": "PLACEHOLDER_REPLACE_WITH_TENANT_ID",
"NamespaceId": "PLACEHOLDER_REPLACE_WITH_NAMESPACE_ID",
"CommunityId": "PLACEHOLDER_REPLACE_WITH_COMMUNITY_ID",
"ClientId": "PLACEHOLDER_REPLACE_WITH_APPLICATION_IDENTIFIER",
"ClientSecret": "PLACEHOLDER_REPLACE_WITH_APPLICATION_SECRET",
"OMFConnectionName" : "PLACEHOLDER_REPLACE_WITH_OMF_CONNECTION_NAME",
"OMFConnectionDescription" : "PLACEHOLDER_REPLACE_WITH_OMF_CONNECTION_DESCRIPTION"
}
7 changes: 1 addition & 6 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,10 @@ jobs:
pool:
name: ${{ parameters.pool }}
demands: ${{ parameters.containerDemands }}
variables:
- name: ClientId
value: $(OMFQuickStartClientId)
- name: ClientSecret
value: $(OMFQuickStartClientSecret)
steps:
- template: '/miscellaneous/build_templates/appsettings.yml@templates'
parameters:
secrets: 'OMFQuickStartClientId, OMFQuickStartClientSecret, TopicName, SubscriptionName, TenantId, NamespaceId, Resource'
secrets: 'ClientId, ClientSecret, OMFConnectionName, TenantId, NamespaceId, Resource'

- script: |
echo Install pip
Expand Down
Binary file added images/OMF_FLOW.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/topicsub.png
Binary file not shown.
Loading