@itentialopensource/adapter-ciena_mcp 0.3.3 → 0.4.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.
Files changed (48) hide show
  1. package/AUTH.md +9 -10
  2. package/BROKER.md +3 -3
  3. package/CALLS.md +10042 -22
  4. package/CHANGELOG.md +16 -0
  5. package/CONTRIBUTING.md +1 -160
  6. package/ENHANCE.md +2 -2
  7. package/PROPERTIES.md +19 -19
  8. package/README.md +41 -32
  9. package/SUMMARY.md +2 -2
  10. package/SYSTEMINFO.md +12 -5
  11. package/TROUBLESHOOT.md +6 -6
  12. package/adapter.js +163 -334
  13. package/adapterBase.js +549 -879
  14. package/changelogs/CHANGELOG.md +24 -0
  15. package/metadata.json +60 -0
  16. package/package.json +23 -25
  17. package/pronghorn.json +986 -647
  18. package/propertiesSchema.json +433 -33
  19. package/refs?service=git-upload-pack +0 -0
  20. package/report/adapter-openapi.json +218608 -0
  21. package/report/adapter-openapi.yaml +159470 -0
  22. package/report/adapterInfo.json +8 -8
  23. package/report/updateReport1691507600369.json +120 -0
  24. package/report/updateReport1692202602603.json +120 -0
  25. package/report/updateReport1694461981982.json +120 -0
  26. package/report/updateReport1698420997295.json +120 -0
  27. package/sampleProperties.json +65 -4
  28. package/test/integration/adapterTestBasicGet.js +2 -4
  29. package/test/integration/adapterTestConnectivity.js +91 -42
  30. package/test/integration/adapterTestIntegration.js +131 -3
  31. package/test/unit/adapterBaseTestUnit.js +388 -313
  32. package/test/unit/adapterTestUnit.js +339 -113
  33. package/utils/adapterInfo.js +1 -1
  34. package/utils/addAuth.js +1 -1
  35. package/utils/artifactize.js +1 -1
  36. package/utils/checkMigrate.js +1 -1
  37. package/utils/entitiesToDB.js +2 -2
  38. package/utils/findPath.js +1 -1
  39. package/utils/methodDocumentor.js +273 -0
  40. package/utils/modify.js +13 -15
  41. package/utils/packModificationScript.js +1 -1
  42. package/utils/pre-commit.sh +2 -0
  43. package/utils/taskMover.js +309 -0
  44. package/utils/tbScript.js +89 -34
  45. package/utils/tbUtils.js +41 -21
  46. package/utils/testRunner.js +1 -1
  47. package/utils/troubleshootingAdapter.js +9 -6
  48. package/workflows/README.md +0 -3
package/AUTH.md CHANGED
@@ -1,9 +1,9 @@
1
1
  ## Authenticating Ciena MCP Adapter
2
2
 
3
- This document will go through the steps for authenticating the Ciena MCP adapter with Basic Authentication. 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://www.itential.com/automation-platform/integrations/adapters-resources/authentication/" target="_blank">HERE</a>.
3
+ This document will go through the steps for authenticating the Ciena MCP adapter with OAuth Authentication. 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>.
4
4
 
5
- ### Basic Authentication
6
- The Ciena MCP adapter requires Basic Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
5
+ ### OAuth Authentication
6
+ The Ciena MCP adapter requires OAuth Authentication. If you change authentication methods, you should change this section accordingly and merge it back into the adapter repository.
7
7
 
8
8
  STEPS
9
9
  1. Ensure you have access to a Ciena MCP server and that it is running
@@ -11,21 +11,19 @@ STEPS
11
11
  3. Use the properties below for the ```properties.authentication``` field
12
12
  ```json
13
13
  "authentication": {
14
- "auth_method": "basic user_password",
14
+ "auth_method": "request_token",
15
15
  "username": "<username>",
16
16
  "password": "<password>",
17
- "token": "",
18
17
  "token_timeout": 1800000,
19
18
  "token_cache": "local",
20
19
  "invalid_token_error": 401,
21
20
  "auth_field": "header.headers.Authorization",
22
- "auth_field_format": "Basic {b64}{username}:{password}{/b64}",
23
- "auth_logging": false,
24
- "client_id": "",
25
- "client_secret": "",
26
- "grant_type": ""
21
+ "auth_field_format": "Bearer {token}",
22
+ "auth_logging": false
27
23
  }
28
24
  ```
25
+ you can leave all of the other properties in the authentication section, they will not be used when the auth_method is request_token.
26
+
29
27
  4. Restart the adapter. If your properties were set correctly, the adapter should go online.
30
28
 
31
29
  ### Troubleshooting
@@ -36,4 +34,5 @@ STEPS
36
34
  - The FULL REQUEST log to make sure the proper headers are being sent with the request.
37
35
  - The FULL BODY log to make sure the payload is accurate.
38
36
  - The CALL RETURN log to see what the other system is telling us.
37
+ - Credentials should be ** masked ** by the adapter so make sure you verify the username and password - including that there are erroneous spaces at the front or end.
39
38
  - Remember when you are done to turn auth_logging off as you do not want to log credentials.
package/BROKER.md CHANGED
@@ -1,9 +1,9 @@
1
- ## Integrating Ciena MCP Adapter with IAP Device Broker
1
+ ## Integrating CienaMcp Adapter with IAP Device Broker
2
2
 
3
- This document will go through the steps for integrating the Ciena MCP adapter with IAP's Device Broker. IAP Device Broker integration allows for easier interation into several of IAPs applications (e.g. Configuration Manager). Properly configuring the properties for the adapter in IAP is critical for getting the device broker integration to work. Their is additional information in the configuration section of the adapter readme. This document will go through each of the calls that are utilized by the Device Broker.
3
+ This document will go through the steps for integrating the CienaMcp adapter with IAP's Device Broker. IAP Device Broker integration allows for easier interation into several of IAPs applications (e.g. Configuration Manager). Properly configuring the properties for the adapter in IAP is critical for getting the device broker integration to work. Their is additional information in the configuration section of the adapter readme. This document will go through each of the calls that are utilized by the Device Broker.
4
4
 
5
5
  ### getDevicesFiltered
6
- getDevicesFiltered(options, callback) → This call returns all of the devices within Ciena MCP that match the provided filter.
6
+ getDevicesFiltered(options, callback) → This call returns all of the devices within CienaMcp that match the provided filter.
7
7
 
8
8
  #### input
9
9