@itentialopensource/adapter-moogsoft 0.4.1 → 0.4.3

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.4.3 [09-01-2024]
3
+
4
+ * update dependencies and metadata
5
+
6
+ See merge request itentialopensource/adapters/adapter-moogsoft!11
7
+
8
+ ---
9
+
10
+ ## 0.4.2 [08-14-2024]
11
+
12
+ * Changes made at 2024.08.14_19:26PM
13
+
14
+ See merge request itentialopensource/adapters/adapter-moogsoft!10
15
+
16
+ ---
17
+
2
18
  ## 0.4.1 [08-07-2024]
3
19
 
4
20
  * Changes made at 2024.08.06_21:08PM
package/TAB2.md CHANGED
@@ -49,7 +49,7 @@ Sample Properties can be used to help you configure the adapter in the Itential
49
49
 
50
50
  ```json
51
51
  "properties": {
52
- "host": "docsdev.moog.cloud",
52
+ "host": "localhost",
53
53
  "port": 443,
54
54
  "choosepath": "",
55
55
  "base_path": "/graze",
package/metadata.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "adapter-moogsoft",
3
3
  "webName": "Adapter for Integration to Moogsoft",
4
+ "supportLevel": "community",
4
5
  "vendor": "Moogsoft",
5
6
  "product": "Moogsoft",
7
+ "techAlliance": false,
6
8
  "osVersion": [],
7
9
  "apiVersions": [],
8
10
  "iapVersions": [
@@ -41,8 +43,8 @@
41
43
  "documentation": {
42
44
  "storeLink": "",
43
45
  "npmLink": "https://www.npmjs.com/package/@itentialopensource/adapter-moogsoft",
44
- "repoLink": "https://gitlab.com/itentialopensource/adapters/telemetry-analytics/adapter-moogsoft",
45
- "docLink": "https://docs.itential.com/opensource/docs/moogsoft",
46
+ "repoLink": "https://gitlab.com/itentialopensource/adapters/adapter-moogsoft",
47
+ "docLink": "https://gitlab.com/itentialopensource/adapters/adapter-moogsoft/-/blob/master/README.md?ref_type=heads",
46
48
  "demoLinks": [],
47
49
  "trainingLinks": [
48
50
  {
@@ -61,7 +63,9 @@
61
63
  "title": "Moogsoft Graze API",
62
64
  "link": "https://docs.moogsoft.com/Enterprise.8.0.0/en/graze-api-endpoint-reference.html"
63
65
  }
64
- ]
66
+ ],
67
+ "workshopLinks": [],
68
+ "workshopHomePage": "https://www.itential.com/get-started/"
65
69
  },
66
70
  "assets": [],
67
71
  "relatedItems": {
@@ -71,6 +75,5 @@
71
75
  "workflowProjects": [],
72
76
  "transformationProjects": [],
73
77
  "exampleProjects": []
74
- },
75
- "supportLevel": "community"
78
+ }
76
79
  }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-moogsoft",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
4
4
  "description": "This adapter integrates with system described as: moogsoft.",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
7
- "engineVersion": "1.67.19",
7
+ "engineVersion": "1.68.2",
8
8
  "adapterType": "http",
9
9
  "scripts": {
10
10
  "artifactize": "npm i && node utils/packModificationScript.js",
@@ -53,22 +53,22 @@
53
53
  "author": "Itential",
54
54
  "homepage": "https://gitlab.com/itentialopensource/adapters/adapter-moogsoft#readme",
55
55
  "dependencies": {
56
- "@itentialopensource/adapter-utils": "^5.6.0",
56
+ "@itentialopensource/adapter-utils": "^5.7.0",
57
57
  "acorn": "^8.12.1",
58
58
  "ajv": "^8.17.1",
59
- "axios": "^1.7.2",
59
+ "axios": "^1.7.4",
60
60
  "commander": "^11.0.0",
61
61
  "dns-lookup-promise": "^1.0.4",
62
62
  "fs-extra": "^11.2.0",
63
63
  "json-query": "^2.2.2",
64
- "mocha": "^10.7.0",
64
+ "mocha": "^10.7.3",
65
65
  "mocha-param": "^2.0.1",
66
66
  "mongodb": "^4.16.0",
67
67
  "ping": "^0.4.4",
68
68
  "prompts": "^2.4.2",
69
69
  "readline-sync": "^1.4.10",
70
70
  "semver": "^7.6.3",
71
- "winston": "^3.13.1"
71
+ "winston": "^3.14.2"
72
72
  },
73
73
  "devDependencies": {
74
74
  "chai": "^4.3.7",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "0.3.3",
2
+ "version": "0.4.2",
3
3
  "configLines": 8375,
4
4
  "scriptLines": 1783,
5
5
  "codeLines": 13406,
6
- "testLines": 10078,
7
- "testCases": 481,
8
- "totalCodeLines": 25267,
6
+ "testLines": 10062,
7
+ "testCases": 480,
8
+ "totalCodeLines": 25251,
9
9
  "wfTasks": 190
10
10
  }
@@ -2,7 +2,7 @@
2
2
  "id": "Adapter-moogsoft",
3
3
  "type": "Moogsoft",
4
4
  "properties": {
5
- "host": "docsdev.moog.cloud",
5
+ "host": "localhost",
6
6
  "port": 443,
7
7
  "choosepath": "",
8
8
  "base_path": "/graze",
@@ -135,7 +135,7 @@
135
135
  "ostypePrefix": "meraki-",
136
136
  "port": "{port}",
137
137
  "ipaddress": "{ip_addr}",
138
- "serial" : "{serial}"
138
+ "serial": "{serial}"
139
139
  }
140
140
  }
141
141
  ],
@@ -161,7 +161,7 @@
161
161
  "ostypePrefix": "meraki-",
162
162
  "port": "{port}",
163
163
  "ipaddress": "{ip_addr}",
164
- "serial" : "{serial}",
164
+ "serial": "{serial}",
165
165
  "id": "{myid}"
166
166
  }
167
167
  }
@@ -245,7 +245,7 @@
245
245
  "ostypePrefix": "meraki-",
246
246
  "port": "{port}",
247
247
  "ipaddress": "{ip_addr}",
248
- "serial" : "{serial}",
248
+ "serial": "{serial}",
249
249
  "id": "{myid}"
250
250
  }
251
251
  }
@@ -4,7 +4,6 @@
4
4
  /* eslint no-unused-vars: warn */
5
5
 
6
6
  const assert = require('assert');
7
- const http = require('http');
8
7
  const https = require('https');
9
8
  const mocha = require('mocha');
10
9
  const ping = require('ping');
@@ -53,29 +52,6 @@ describe('[integration] Adapter Test', () => {
53
52
  });
54
53
  });
55
54
 
56
- it('Support HTTP on port 80', (done) => {
57
- const requestOptions = {
58
- host,
59
- port: 80,
60
- method: 'HEAD'
61
- };
62
-
63
- const req = http.request(requestOptions, (res) => {
64
- try {
65
- assert.ok(res.statusCode >= 200 && res.statusCode < 400);
66
- done();
67
- } catch (error) {
68
- done(error);
69
- }
70
- });
71
-
72
- req.on('error', (err) => {
73
- done(err);
74
- });
75
-
76
- req.end();
77
- });
78
-
79
55
  it('Support HTTPS on port 443', (done) => {
80
56
  const requestOptions = {
81
57
  host,
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
36
36
  // these variables can be changed to run in integrated mode so easier to set them here
37
37
  // always check these in with bogus data!!!
38
38
  samProps.stub = true;
39
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
46
50
  if (samProps.request.attempt_timeout < 30000) {
47
51
  samProps.request.attempt_timeout = 30000;
48
52
  }
@@ -504,7 +508,7 @@ describe('[integration] Moogsoft Adapter Test', () => {
504
508
 
505
509
  const alertsAssignAlertBodyParam = {
506
510
  alert_id: 7,
507
- username: 'string'
511
+ username: samProps.authentication.username
508
512
  };
509
513
  describe('#assignAlert - errors', () => {
510
514
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
@@ -1134,7 +1138,7 @@ describe('[integration] Moogsoft Adapter Test', () => {
1134
1138
 
1135
1139
  const situationsAssignAndAcknowledgeSituationBodyParam = {
1136
1140
  sitn_id: 2,
1137
- username: 'string'
1141
+ username: samProps.authentication.username
1138
1142
  };
1139
1143
  describe('#assignAndAcknowledgeSituation - errors', () => {
1140
1144
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
@@ -4455,13 +4459,13 @@ describe('[integration] Moogsoft Adapter Test', () => {
4455
4459
  });
4456
4460
 
4457
4461
  const usersCreateUserBodyParam = {
4458
- username: 'string',
4462
+ username: samProps.authentication.username,
4459
4463
  roles: [
4460
4464
  {}
4461
4465
  ],
4462
- password: 'string',
4466
+ password: samProps.authentication.password,
4463
4467
  active: true,
4464
- email: 'string',
4468
+ email: samProps.authentication.password,
4465
4469
  fullname: 'string',
4466
4470
  primary_group: 'string',
4467
4471
  department: 'string',
@@ -4500,7 +4504,7 @@ describe('[integration] Moogsoft Adapter Test', () => {
4500
4504
  const usersUpdateUserBodyParam = {
4501
4505
  uid: 4,
4502
4506
  active: false,
4503
- password: 'string',
4507
+ password: samProps.authentication.password,
4504
4508
  roles: [
4505
4509
  {}
4506
4510
  ],
@@ -4512,7 +4516,7 @@ describe('[integration] Moogsoft Adapter Test', () => {
4512
4516
  fullname: 'string',
4513
4517
  department: 'string',
4514
4518
  primary_group: 'string',
4515
- email: 'string'
4519
+ email: samProps.authentication.password
4516
4520
  };
4517
4521
  describe('#updateUser - errors', () => {
4518
4522
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
@@ -4626,7 +4630,7 @@ describe('[integration] Moogsoft Adapter Test', () => {
4626
4630
  });
4627
4631
 
4628
4632
  const usersGetUserRolesBodyParam = {
4629
- username: 'string'
4633
+ username: samProps.authentication.username
4630
4634
  };
4631
4635
  describe('#getUserRoles - errors', () => {
4632
4636
  it('should work if integrated or standalone with mockdata', (done) => {
@@ -4655,7 +4659,7 @@ describe('[integration] Moogsoft Adapter Test', () => {
4655
4659
  });
4656
4660
 
4657
4661
  const usersGetUserTeamsBodyParam = {
4658
- username: 'string'
4662
+ username: samProps.authentication.username
4659
4663
  };
4660
4664
  describe('#getUserTeams - errors', () => {
4661
4665
  it('should work if integrated or standalone with mockdata', (done) => {
@@ -36,13 +36,17 @@ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
36
36
  // these variables can be changed to run in integrated mode so easier to set them here
37
37
  // always check these in with bogus data!!!
38
38
  samProps.stub = true;
39
- samProps.host = 'replace.hostorip.here';
40
- samProps.authentication.username = 'username';
41
- samProps.authentication.password = 'password';
42
- samProps.protocol = 'http';
43
- samProps.port = 80;
44
- samProps.ssl.enabled = false;
45
- samProps.ssl.accept_invalid_cert = false;
39
+
40
+ // uncomment if connecting
41
+ // samProps.host = 'replace.hostorip.here';
42
+ // samProps.authentication.username = 'username';
43
+ // samProps.authentication.password = 'password';
44
+ // samProps.authentication.token = 'password';
45
+ // samProps.protocol = 'http';
46
+ // samProps.port = 80;
47
+ // samProps.ssl.enabled = false;
48
+ // samProps.ssl.accept_invalid_cert = false;
49
+
46
50
  samProps.request.attempt_timeout = 1200000;
47
51
  const attemptTimeout = samProps.request.attempt_timeout;
48
52
  const { stub } = samProps;
@@ -315,15 +319,15 @@ describe('[unit] Moogsoft Adapter Test', () => {
315
319
  assert.notEqual(null, packageDotJson.dependencies);
316
320
  assert.notEqual('', packageDotJson.dependencies);
317
321
  assert.equal('^8.17.1', packageDotJson.dependencies.ajv);
318
- assert.equal('^1.7.2', packageDotJson.dependencies.axios);
322
+ assert.equal('^1.7.4', packageDotJson.dependencies.axios);
319
323
  assert.equal('^11.0.0', packageDotJson.dependencies.commander);
320
324
  assert.equal('^11.2.0', packageDotJson.dependencies['fs-extra']);
321
- assert.equal('^10.7.0', packageDotJson.dependencies.mocha);
325
+ assert.equal('^10.7.3', packageDotJson.dependencies.mocha);
322
326
  assert.equal('^2.0.1', packageDotJson.dependencies['mocha-param']);
323
327
  assert.equal('^0.4.4', packageDotJson.dependencies.ping);
324
328
  assert.equal('^1.4.10', packageDotJson.dependencies['readline-sync']);
325
329
  assert.equal('^7.6.3', packageDotJson.dependencies.semver);
326
- assert.equal('^3.13.1', packageDotJson.dependencies.winston);
330
+ assert.equal('^3.14.2', packageDotJson.dependencies.winston);
327
331
  done();
328
332
  } catch (error) {
329
333
  log.error(`Test Failure: ${error}`);
@@ -561,7 +565,7 @@ describe('[unit] Moogsoft Adapter Test', () => {
561
565
  log.error(`Adapter Exception: ${error}`);
562
566
  done(error);
563
567
  }
564
- });
568
+ }).timeout(attemptTimeout);
565
569
  });
566
570
 
567
571
  describe('propertiesSchema.json', () => {