@itentialopensource/adapter-db_oracle 0.2.0 → 0.3.0

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,20 @@
1
1
 
2
+ ## 0.3.0 [07-09-2024]
3
+
4
+ * Add routes
5
+
6
+ See merge request itentialopensource/adapters/persistence/adapter-db_oracle!7
7
+
8
+ ---
9
+
10
+ ## 0.2.1 [05-15-2024]
11
+
12
+ * Patch/adapt 3377
13
+
14
+ See merge request itentialopensource/adapters/persistence/adapter-db_oracle!6
15
+
16
+ ---
17
+
2
18
  ## 0.2.0 [01-06-2024]
3
19
 
4
20
  * 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.3.0",
4
4
  "description": "Itential adapter to connect to oracle",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
package/pronghorn.json CHANGED
@@ -29,6 +29,10 @@
29
29
  "roles": [
30
30
  "admin"
31
31
  ],
32
+ "route": {
33
+ "verb": "POST",
34
+ "path": "/query"
35
+ },
32
36
  "task": true
33
37
  },
34
38
  {
@@ -51,6 +55,10 @@
51
55
  "roles": [
52
56
  "admin"
53
57
  ],
58
+ "route": {
59
+ "verb": "POST",
60
+ "path": "/create"
61
+ },
54
62
  "task": true
55
63
  },
56
64
  {
@@ -73,6 +81,10 @@
73
81
  "roles": [
74
82
  "admin"
75
83
  ],
84
+ "route": {
85
+ "verb": "POST",
86
+ "path": "/select"
87
+ },
76
88
  "task": true
77
89
  },
78
90
  {
@@ -95,6 +107,10 @@
95
107
  "roles": [
96
108
  "admin"
97
109
  ],
110
+ "route": {
111
+ "verb": "POST",
112
+ "path": "/insert"
113
+ },
98
114
  "task": true
99
115
  },
100
116
  {
@@ -117,6 +133,10 @@
117
133
  "roles": [
118
134
  "admin"
119
135
  ],
136
+ "route": {
137
+ "verb": "POST",
138
+ "path": "/update"
139
+ },
120
140
  "task": true
121
141
  },
122
142
  {
@@ -139,6 +159,10 @@
139
159
  "roles": [
140
160
  "admin"
141
161
  ],
162
+ "route": {
163
+ "verb": "POST",
164
+ "path": "/delete"
165
+ },
142
166
  "task": true
143
167
  },
144
168
  {
@@ -161,6 +185,10 @@
161
185
  "roles": [
162
186
  "admin"
163
187
  ],
188
+ "route": {
189
+ "verb": "POST",
190
+ "path": "/drop"
191
+ },
164
192
  "task": true
165
193
  }
166
194
  ]
Binary file