@itentialopensource/adapter-onap_blueprint_processor 0.1.6 → 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/.eslintrc.js +1 -0
- package/AUTH.md +4 -4
- package/BROKER.md +4 -4
- package/CALLS.md +9 -9
- package/ENHANCE.md +3 -3
- package/PROPERTIES.md +24 -9
- package/README.md +24 -23
- package/SUMMARY.md +2 -2
- package/SYSTEMINFO.md +1 -1
- package/TAB1.md +2 -2
- package/TAB2.md +9 -5
- package/TROUBLESHOOT.md +10 -1
- package/UTILITIES.md +473 -0
- package/adapter.js +5 -5
- package/adapterBase.js +52 -16
- package/package.json +24 -28
- package/pronghorn.json +17 -15
- package/propertiesSchema.json +76 -7
- package/report/adapterInfo.json +7 -7
- package/report/auto-adapter-openapi.json +26362 -0
- package/report/updateReport1748551529856.json +120 -0
- package/sampleProperties.json +4 -0
- package/test/integration/adapterTestBasicGet.js +88 -54
- package/test/integration/adapterTestConnectivity.js +15 -16
- package/test/integration/adapterTestIntegration.js +1 -38
- package/test/unit/adapterBaseTestUnit.js +641 -39
- package/test/unit/adapterTestUnit.js +17 -54
- package/utils/adapterInfo.js +114 -164
- package/utils/argParser.js +44 -0
- package/utils/checkMigrate.js +77 -38
- package/utils/entitiesToDB.js +53 -42
- package/utils/logger.js +26 -0
- package/utils/modify.js +56 -55
- package/utils/mongoDbConnection.js +79 -0
- package/utils/mongoUtils.js +162 -0
- package/utils/taskMover.js +31 -32
- package/utils/tbScript.js +36 -172
- package/utils/tbUtils.js +84 -226
- package/utils/troubleshootingAdapter.js +68 -84
- package/utils/updateAdapterConfig.js +158 -0
- package/utils/addAuth.js +0 -94
- package/utils/artifactize.js +0 -146
- package/utils/basicGet.js +0 -50
- package/utils/packModificationScript.js +0 -35
- package/utils/patches2bundledDeps.js +0 -90
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itentialopensource/adapter-onap_blueprint_processor",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "This adapter integrates with system described as: CDS Blueprint Processor.",
|
|
5
5
|
"main": "adapter.js",
|
|
6
6
|
"wizardVersion": "2.44.7",
|
|
7
|
-
"engineVersion": "1.
|
|
7
|
+
"engineVersion": "1.69.14",
|
|
8
8
|
"adapterType": "http",
|
|
9
9
|
"scripts": {
|
|
10
|
-
"artifactize": "npm i && node utils/packModificationScript.js",
|
|
11
10
|
"preinstall": "node utils/setup.js",
|
|
12
11
|
"deinstall": "node utils/removeHooks.js",
|
|
13
12
|
"lint": "node --max_old_space_size=4096 ./node_modules/eslint/bin/eslint.js . --ext .json --ext .js",
|
|
@@ -16,7 +15,6 @@
|
|
|
16
15
|
"test:unit": "mocha test/unit/adapterTestUnit.js --LOG=error",
|
|
17
16
|
"test:integration": "mocha test/integration/adapterTestIntegration.js --LOG=error",
|
|
18
17
|
"test": "npm run test:baseunit && npm run test:unit && npm run test:integration",
|
|
19
|
-
"adapter:install": "npm i && node utils/tbScript.js install",
|
|
20
18
|
"adapter:checkMigrate": "node utils/checkMigrate.js",
|
|
21
19
|
"adapter:findPath": "node utils/findPath.js",
|
|
22
20
|
"adapter:migrate": "node utils/modify.js -m",
|
|
@@ -31,10 +29,9 @@
|
|
|
31
29
|
},
|
|
32
30
|
"keywords": [
|
|
33
31
|
"Itential",
|
|
34
|
-
"
|
|
32
|
+
"Itential Platform",
|
|
35
33
|
"Automation",
|
|
36
34
|
"Integration",
|
|
37
|
-
"App-Artifacts",
|
|
38
35
|
"Adapter",
|
|
39
36
|
"onap_blueprint_processor",
|
|
40
37
|
"Pre-Release"
|
|
@@ -51,30 +48,29 @@
|
|
|
51
48
|
"author": "Itential",
|
|
52
49
|
"homepage": "https://gitlab.com/itentialopensource/adapters/adapter-onap_blueprint_processor#readme",
|
|
53
50
|
"dependencies": {
|
|
54
|
-
"@itentialopensource/adapter-utils": "
|
|
55
|
-
"acorn": "
|
|
56
|
-
"ajv": "
|
|
57
|
-
"axios": "
|
|
58
|
-
"commander": "
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"mocha": "
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"winston": "^3.14.2"
|
|
51
|
+
"@itentialopensource/adapter-utils": "5.10.19",
|
|
52
|
+
"acorn": "8.14.1",
|
|
53
|
+
"ajv": "8.17.1",
|
|
54
|
+
"axios": "1.9.0",
|
|
55
|
+
"commander": "11.1.0",
|
|
56
|
+
"fs-extra": "11.3.0",
|
|
57
|
+
"json-query": "2.2.2",
|
|
58
|
+
"mocha": "10.8.2",
|
|
59
|
+
"mocha-param": "2.0.1",
|
|
60
|
+
"mongodb": "4.17.2",
|
|
61
|
+
"ping": "0.4.4",
|
|
62
|
+
"prompts": "2.4.2",
|
|
63
|
+
"readline-sync": "1.4.10",
|
|
64
|
+
"semver": "7.7.2",
|
|
65
|
+
"winston": "3.17.0"
|
|
70
66
|
},
|
|
71
67
|
"devDependencies": {
|
|
72
|
-
"chai": "
|
|
73
|
-
"eslint": "
|
|
74
|
-
"eslint-config-airbnb-base": "
|
|
75
|
-
"eslint-plugin-import": "
|
|
76
|
-
"eslint-plugin-json": "
|
|
77
|
-
"testdouble": "
|
|
68
|
+
"chai": "4.5.0",
|
|
69
|
+
"eslint": "8.57.0",
|
|
70
|
+
"eslint-config-airbnb-base": "15.0.0",
|
|
71
|
+
"eslint-plugin-import": "2.31.0",
|
|
72
|
+
"eslint-plugin-json": "3.1.0",
|
|
73
|
+
"testdouble": "3.18.0"
|
|
78
74
|
},
|
|
79
75
|
"private": false
|
|
80
76
|
}
|
package/pronghorn.json
CHANGED
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
"name"
|
|
67
|
+
"name": "replace",
|
|
68
68
|
"type": "boolean",
|
|
69
69
|
"info": "True to replace entire mock data, false to merge/append",
|
|
70
70
|
"required": false,
|
|
71
71
|
"schema": {
|
|
72
72
|
"title": "replace",
|
|
73
|
-
"type"
|
|
73
|
+
"type": "boolean"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
],
|
|
@@ -226,16 +226,6 @@
|
|
|
226
226
|
"title": "props",
|
|
227
227
|
"type": "object"
|
|
228
228
|
}
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"name": "persistFlag",
|
|
232
|
-
"type": "boolean",
|
|
233
|
-
"info": "Whether the input properties should be saved",
|
|
234
|
-
"required": true,
|
|
235
|
-
"schema": {
|
|
236
|
-
"title": "persistFlag",
|
|
237
|
-
"type": "boolean"
|
|
238
|
-
}
|
|
239
229
|
}
|
|
240
230
|
],
|
|
241
231
|
"output": {
|
|
@@ -306,7 +296,19 @@
|
|
|
306
296
|
"name": "iapRunAdapterBasicGet",
|
|
307
297
|
"summary": "Runs basicGet script for adapter",
|
|
308
298
|
"description": "Runs basicGet script for adapter",
|
|
309
|
-
"input": [
|
|
299
|
+
"input": [
|
|
300
|
+
{
|
|
301
|
+
"name": "maxCalls",
|
|
302
|
+
"required": false,
|
|
303
|
+
"type": "number",
|
|
304
|
+
"info": "How many GET endpoints to test (defaults to 5)",
|
|
305
|
+
"schema": {
|
|
306
|
+
"title": "maxCalls",
|
|
307
|
+
"type": "number",
|
|
308
|
+
"default": 5
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
310
312
|
"output": {
|
|
311
313
|
"name": "result",
|
|
312
314
|
"type": "object",
|
|
@@ -327,8 +329,8 @@
|
|
|
327
329
|
},
|
|
328
330
|
{
|
|
329
331
|
"name": "iapMoveAdapterEntitiesToDB",
|
|
330
|
-
"summary": "Moves entities from an adapter into the
|
|
331
|
-
"description": "Moves entities from an adapter into the
|
|
332
|
+
"summary": "Moves entities from an adapter into the Itential Platform database",
|
|
333
|
+
"description": "Moves entities from an adapter into the Itential Platform database",
|
|
332
334
|
"input": [],
|
|
333
335
|
"output": {
|
|
334
336
|
"name": "res",
|
package/propertiesSchema.json
CHANGED
|
@@ -83,6 +83,14 @@
|
|
|
83
83
|
"https"
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
|
+
"service": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"description": "Service we are integrating with -- used with AWS Authentication",
|
|
89
|
+
"examples": [
|
|
90
|
+
"ec2",
|
|
91
|
+
"route53"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
86
94
|
"authentication": {
|
|
87
95
|
"$ref": "#/definitions/authentication"
|
|
88
96
|
},
|
|
@@ -756,6 +764,14 @@
|
|
|
756
764
|
"security/ca.pem"
|
|
757
765
|
]
|
|
758
766
|
},
|
|
767
|
+
"ca_file_content": {
|
|
768
|
+
"type": "string",
|
|
769
|
+
"description": "The content of the CA file used for SSL",
|
|
770
|
+
"default": "",
|
|
771
|
+
"examples": [
|
|
772
|
+
"-----BEGIN CERTIFICATE-----"
|
|
773
|
+
]
|
|
774
|
+
},
|
|
759
775
|
"key_file": {
|
|
760
776
|
"type": "string",
|
|
761
777
|
"description": "The fully qualified path name to the key file used for SSL",
|
|
@@ -845,32 +861,48 @@
|
|
|
845
861
|
"mongo": {
|
|
846
862
|
"type": "object",
|
|
847
863
|
"properties": {
|
|
864
|
+
"url": {
|
|
865
|
+
"type": "string",
|
|
866
|
+
"description": "Mongo's complete connection URL. This property overrides host, port, database, username, password and replSet settings.",
|
|
867
|
+
"examples": [
|
|
868
|
+
"mongodb://[username:password@]host1[:port1][,...hostN[:portN]][/[defaultauthdb][?options]]",
|
|
869
|
+
"mongodb+srv://[username:password@]cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]",
|
|
870
|
+
"mongodb+srv://cluster0.xxxxx.mongodb.net/[defaultauthdb][?options]"
|
|
871
|
+
]
|
|
872
|
+
},
|
|
848
873
|
"host": {
|
|
849
874
|
"type": "string",
|
|
850
|
-
"description": "
|
|
875
|
+
"description": "Host information for the Mongo server",
|
|
851
876
|
"default": "",
|
|
852
877
|
"examples": [
|
|
853
|
-
"localhost"
|
|
878
|
+
"localhost",
|
|
879
|
+
"cluster0.xxxxx.mongodb.net",
|
|
880
|
+
"my-cluster.example.com"
|
|
854
881
|
]
|
|
855
882
|
},
|
|
856
883
|
"port": {
|
|
857
884
|
"type": "integer",
|
|
858
|
-
"description": "
|
|
885
|
+
"description": "Port information for the Mongo server. Not used when using mongodb+srv:// protocol",
|
|
859
886
|
"default": 443,
|
|
860
887
|
"minimum": 0,
|
|
861
888
|
"maximum": 65535
|
|
862
889
|
},
|
|
863
890
|
"database": {
|
|
864
891
|
"type": "string",
|
|
865
|
-
"description": "The
|
|
892
|
+
"description": "The database for the adapter to use for its data.",
|
|
866
893
|
"default": "",
|
|
867
894
|
"examples": [
|
|
868
895
|
"adapter-xyz"
|
|
869
896
|
]
|
|
870
897
|
},
|
|
898
|
+
"dbAuth": {
|
|
899
|
+
"type": "boolean",
|
|
900
|
+
"description": "Whether to use authentication for MongoDB connection. Default is false.",
|
|
901
|
+
"default": false
|
|
902
|
+
},
|
|
871
903
|
"username": {
|
|
872
904
|
"type": "string",
|
|
873
|
-
"description": "
|
|
905
|
+
"description": "If credentials are required to access Mongo, this is the user to login as.",
|
|
874
906
|
"default": "",
|
|
875
907
|
"examples": [
|
|
876
908
|
"username"
|
|
@@ -878,7 +910,7 @@
|
|
|
878
910
|
},
|
|
879
911
|
"password": {
|
|
880
912
|
"type": "string",
|
|
881
|
-
"description": "
|
|
913
|
+
"description": "If credentials are required to access Mongo, this is the password to login with.",
|
|
882
914
|
"default": "",
|
|
883
915
|
"examples": [
|
|
884
916
|
"password"
|
|
@@ -886,12 +918,17 @@
|
|
|
886
918
|
},
|
|
887
919
|
"replSet": {
|
|
888
920
|
"type": "string",
|
|
889
|
-
"description": "
|
|
921
|
+
"description": "If the database is set up to use replica sets, define it here so it can be added to the database connection. Not used when using mongodb+srv:// protocol",
|
|
890
922
|
"default": "",
|
|
891
923
|
"examples": [
|
|
892
924
|
"my_repolica_set"
|
|
893
925
|
]
|
|
894
926
|
},
|
|
927
|
+
"addSrv": {
|
|
928
|
+
"type": "boolean",
|
|
929
|
+
"description": "Whether the connection requires the mongodb+srv:// protocol. If true, uses mongodb+srv:// protocol. Note: mongodb+srv:// can also be used for non-Atlas deployments that support DNS SRV records",
|
|
930
|
+
"default": false
|
|
931
|
+
},
|
|
895
932
|
"db_ssl": {
|
|
896
933
|
"type": "object",
|
|
897
934
|
"description": "SSL for mongo database connection",
|
|
@@ -932,6 +969,38 @@
|
|
|
932
969
|
}
|
|
933
970
|
}
|
|
934
971
|
}
|
|
972
|
+
},
|
|
973
|
+
"dependencies": {
|
|
974
|
+
"dbAuth": {
|
|
975
|
+
"oneOf": [
|
|
976
|
+
{
|
|
977
|
+
"properties": {
|
|
978
|
+
"dbAuth": {
|
|
979
|
+
"const": false
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
"properties": {
|
|
985
|
+
"dbAuth": {
|
|
986
|
+
"const": true
|
|
987
|
+
},
|
|
988
|
+
"username": {
|
|
989
|
+
"type": "string",
|
|
990
|
+
"minLength": 1
|
|
991
|
+
},
|
|
992
|
+
"password": {
|
|
993
|
+
"type": "string",
|
|
994
|
+
"minLength": 1
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"required": [
|
|
998
|
+
"username",
|
|
999
|
+
"password"
|
|
1000
|
+
]
|
|
1001
|
+
}
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
935
1004
|
}
|
|
936
1005
|
},
|
|
937
1006
|
"devicebroker": {
|
package/report/adapterInfo.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.1.
|
|
3
|
-
"configLines":
|
|
4
|
-
"scriptLines":
|
|
5
|
-
"codeLines":
|
|
6
|
-
"testLines":
|
|
7
|
-
"testCases":
|
|
8
|
-
"totalCodeLines":
|
|
2
|
+
"version": "0.1.6",
|
|
3
|
+
"configLines": 26093,
|
|
4
|
+
"scriptLines": 2498,
|
|
5
|
+
"codeLines": 6053,
|
|
6
|
+
"testLines": 6779,
|
|
7
|
+
"testCases": 322,
|
|
8
|
+
"totalCodeLines": 15330,
|
|
9
9
|
"wfTasks": 70
|
|
10
10
|
}
|