@itentialopensource/adapter-db_oracle 0.2.0 → 0.2.1

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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,12 @@
1
1
 
2
+ ## 0.2.1 [05-15-2024]
3
+
4
+ * Patch/adapt 3377
5
+
6
+ See merge request itentialopensource/adapters/persistence/adapter-db_oracle!6
7
+
8
+ ---
9
+
2
10
  ## 0.2.0 [01-06-2024]
3
11
 
4
12
  * Adapter Engine has been updated and the changes are being migrated to the adapter
package/TAB1.md ADDED
@@ -0,0 +1,5 @@
1
+ # Overview
2
+
3
+ This adapter is used to integrate the Itential Automation Platform (IAP) with the Oracle System. The API that was used to build the adapter for Oracle is usually available in the report directory of this adapter. The adapter utilizes the Oracle API to provide the integrations that are deemed pertinent to IAP. The ReadMe file is intended to provide information on this adapter it is generated from various other Markdown files.
4
+
5
+ For further technical details on how to install and use this adapter, please click the Technical Documentation tab.
package/TAB2.md ADDED
@@ -0,0 +1,57 @@
1
+ # Oracle SQL
2
+
3
+ ## Table of Contents
4
+
5
+ - [Specific Adapter Information](#specific-adapter-information)
6
+ - [Authentication](#authentication)
7
+ - [Sample Properties](#sample-properties)
8
+ - [Swagger](#swagger)
9
+ - [Generic Adapter Information](#generic-adapter-information)
10
+
11
+ ## Specific Adapter Information
12
+ ### Authentication
13
+
14
+ This document will go through the steps for authenticating the Oracle SQL adapter with. Properly configuring the properties for an adapter in IAP is critical for getting the adapter online. You can read more about adapter authentication <a href="https://docs.itential.com/opensource/docs/authentication" target="_blank">HERE</a>.
15
+
16
+ #### Database Library Authentication
17
+ The Oracle SQL adapter requires Database Library Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
18
+
19
+ STEPS
20
+ 1. Ensure you have access to a Oracle SQL server and that it is running
21
+ 2. Follow the steps in the README.md to import the adapter into IAP if you have not already done so
22
+ 3. Use the properties below for the ```properties.authentication``` field
23
+ ```json
24
+ "authentication": {
25
+ "dbAuth": true,
26
+ "domain": "",
27
+ "username": "sa",
28
+ "password": "Password"
29
+ }
30
+ ```
31
+ 4. Restart the adapter. If your properties were set correctly, the adapter should go online.
32
+
33
+ #### Troubleshooting
34
+ - Make sure you copied over the correct username and password.
35
+ - Turn on debug level logs for the adapter in IAP Admin Essentials.
36
+ - Investigate the logs
37
+
38
+ ### Sample Properties
39
+
40
+ Sample Properties can be used to help you configure the adapter in the Itential Automation Platform. You will need to update connectivity information such as the host, port, protocol and credentials.
41
+
42
+ ```json
43
+ "properties": {
44
+ "database": "your database name",
45
+ "host": "localhost",
46
+ "port": 3306,
47
+ "authentication": {
48
+ "username": "your username",
49
+ "password": "your password"
50
+ }
51
+ }
52
+ ```
53
+ ### Swagger
54
+
55
+ Note: The content for this section may be missing as its corresponding .json file is unavailable. This sections will be updated once adapter-openapi.json file is added.
56
+ ## [Generic Adapter Information](https://gitlab.com/itentialopensource/adapters/persistence/adapter-db_oracle/-/blob/master/README.md)
57
+
package/adapter.js CHANGED
@@ -138,7 +138,13 @@ class Oracle extends EventEmitter {
138
138
 
139
139
  // Get connection
140
140
  oracle.getConnection(connAttrs, (error, gotConn) => {
141
- if (error) {
141
+ // Emit online if on stub mode
142
+ if (this.props && this.props.stub === true) {
143
+ this.emit('ONLINE', {
144
+ id: this.id
145
+ });
146
+ log.info('EMITTED ONLINE ON STUB MODE');
147
+ } else if (error) {
142
148
  log.error(`error connecting to Oracle: ${error}`);
143
149
  // emit failure
144
150
  this.alive = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-db_oracle",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Itential adapter to connect to oracle",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
Binary file