@itentialopensource/adapter-meraki 0.7.3 → 0.8.2

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.
@@ -61,7 +61,10 @@ global.pronghornProps = {
61
61
  token_cache: 'local',
62
62
  auth_field: 'header.headers.Authorization',
63
63
  auth_field_format: 'Basic {b64}{username}:{password}{/b64}',
64
- auth_logging: false
64
+ auth_logging: false,
65
+ client_id: '',
66
+ client_secret: '',
67
+ grant_type: ''
65
68
  },
66
69
  healthcheck: {
67
70
  type: 'none',
@@ -314,8 +317,8 @@ describe('[unit] Adapter Base Test', () => {
314
317
  });
315
318
  it('should return a list of functions', (done) => {
316
319
  const returnedFunctions = ['addEntityCache', 'capabilityResults', 'checkActionFiles', 'checkProperties', 'connect', 'encryptProperty',
317
- 'entityInList', 'findPath', 'getAllCapabilities', 'getAllFunctions', 'getQueue', 'getWorkflowFunctions', 'healthCheck',
318
- 'refreshProperties', 'runBasicGet', 'runConnectivity', 'runHealthcheck', 'suspend', 'troubleshoot', 'unsuspend', 'updateAdapterConfiguration', 'addListener',
320
+ 'entityInList', 'getAllCapabilities', 'getAllFunctions', 'healthCheck', 'iapFindAdapterPath', 'iapGetAdapterQueue', 'iapGetAdapterWorkflowFunctions', 'iapMakeBrokerCall', 'iapMoveAdapterEntitiesToDB',
321
+ 'iapRunAdapterBasicGet', 'iapRunAdapterConnectivity', 'iapRunAdapterHealthcheck', 'iapSuspendAdapter', 'iapTroubleshootAdapter', 'iapUnsuspendAdapter', 'iapUpdateAdapterConfiguration', 'refreshProperties', 'addListener',
319
322
  'emit', 'eventNames', 'getMaxListeners', 'listenerCount', 'listeners', 'off', 'on', 'once', 'prependListener',
320
323
  'prependOnceListener', 'rawListeners', 'removeAllListeners', 'removeListener', 'setMaxListeners'];
321
324
  try {
@@ -334,10 +337,10 @@ describe('[unit] Adapter Base Test', () => {
334
337
  }).timeout(attemptTimeout);
335
338
  });
336
339
 
337
- describe('#getWorkflowFunctions', () => {
338
- it('should have a getWorkflowFunctions function', (done) => {
340
+ describe('#iapGetAdapterWorkflowFunctions', () => {
341
+ it('should have a iapGetAdapterWorkflowFunctions function', (done) => {
339
342
  try {
340
- assert.equal(true, typeof a.getWorkflowFunctions === 'function');
343
+ assert.equal(true, typeof a.iapGetAdapterWorkflowFunctions === 'function');
341
344
  done();
342
345
  } catch (error) {
343
346
  log.error(`Test Failure: ${error}`);
@@ -346,7 +349,7 @@ describe('[unit] Adapter Base Test', () => {
346
349
  });
347
350
  it('should retrieve workflow functions', (done) => {
348
351
  try {
349
- const expectedFunctions = a.getWorkflowFunctions([]);
352
+ const expectedFunctions = a.iapGetAdapterWorkflowFunctions([]);
350
353
  try {
351
354
  assert.equal(0, expectedFunctions.length);
352
355
  done();
@@ -423,10 +426,10 @@ describe('[unit] Adapter Base Test', () => {
423
426
  }).timeout(attemptTimeout);
424
427
  });
425
428
 
426
- describe('#getQueue', () => {
427
- it('should have a getQueue function', (done) => {
429
+ describe('#iapGetAdapterQueue', () => {
430
+ it('should have a iapGetAdapterQueue function', (done) => {
428
431
  try {
429
- assert.equal(true, typeof a.getQueue === 'function');
432
+ assert.equal(true, typeof a.iapGetAdapterQueue === 'function');
430
433
  done();
431
434
  } catch (error) {
432
435
  log.error(`Test Failure: ${error}`);
@@ -435,7 +438,7 @@ describe('[unit] Adapter Base Test', () => {
435
438
  });
436
439
  it('should get information for all of the requests currently in the queue', (done) => {
437
440
  try {
438
- const expectedFunctions = a.getQueue();
441
+ const expectedFunctions = a.iapGetAdapterQueue();
439
442
  try {
440
443
  assert.equal(0, expectedFunctions.length);
441
444
  done();
@@ -840,12 +843,10 @@ describe('[unit] Adapter Base Test', () => {
840
843
  }).timeout(attemptTimeout);
841
844
  });
842
845
 
843
- // const returnedFunctions = ['updateAdapterConfiguration'];
844
-
845
- describe('#updateAdapterConfiguration', () => {
846
- it('should have a updateAdapterConfiguration function', (done) => {
846
+ describe('#iapUpdateAdapterConfiguration', () => {
847
+ it('should have a iapUpdateAdapterConfiguration function', (done) => {
847
848
  try {
848
- assert.equal(true, typeof a.updateAdapterConfiguration === 'function');
849
+ assert.equal(true, typeof a.iapUpdateAdapterConfiguration === 'function');
849
850
  done();
850
851
  } catch (error) {
851
852
  log.error(`Test Failure: ${error}`);
@@ -854,7 +855,7 @@ describe('[unit] Adapter Base Test', () => {
854
855
  });
855
856
  it('should return no updated if no changes are provided', (done) => {
856
857
  try {
857
- a.updateAdapterConfiguration(null, null, null, null, null, (data, error) => {
858
+ a.iapUpdateAdapterConfiguration(null, null, null, null, null, (data, error) => {
858
859
  try {
859
860
  assert.equal('No configuration updates to make', data.response);
860
861
  done();
@@ -870,10 +871,10 @@ describe('[unit] Adapter Base Test', () => {
870
871
  }).timeout(attemptTimeout);
871
872
  it('should throw an error if missing configuration file', (done) => {
872
873
  try {
873
- a.updateAdapterConfiguration(null, { name: 'fakeChange' }, null, null, null, (data, error) => {
874
+ a.iapUpdateAdapterConfiguration(null, { name: 'fakeChange' }, null, null, null, (data, error) => {
874
875
  try {
875
876
  const displayE = 'configFile is required';
876
- runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-updateAdapterConfiguration', displayE);
877
+ runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
877
878
  done();
878
879
  } catch (err) {
879
880
  log.error(`Test Failure: ${err}`);
@@ -887,10 +888,10 @@ describe('[unit] Adapter Base Test', () => {
887
888
  }).timeout(attemptTimeout);
888
889
  it('if not package.json, entity is required', (done) => {
889
890
  try {
890
- a.updateAdapterConfiguration('notPackage', { name: 'fakeChange' }, null, null, null, (data, error) => {
891
+ a.iapUpdateAdapterConfiguration('notPackage', { name: 'fakeChange' }, null, null, null, (data, error) => {
891
892
  try {
892
893
  const displayE = 'Unsupported Configuration Change or Missing Entity';
893
- runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-updateAdapterConfiguration', displayE);
894
+ runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
894
895
  done();
895
896
  } catch (err) {
896
897
  log.error(`Test Failure: ${err}`);
@@ -904,10 +905,10 @@ describe('[unit] Adapter Base Test', () => {
904
905
  }).timeout(attemptTimeout);
905
906
  it('if not package.json, type is required', (done) => {
906
907
  try {
907
- a.updateAdapterConfiguration('notPackage', { name: 'fakeChange' }, 'entity', null, null, (data, error) => {
908
+ a.iapUpdateAdapterConfiguration('notPackage', { name: 'fakeChange' }, 'entity', null, null, (data, error) => {
908
909
  try {
909
910
  const displayE = 'type is required';
910
- runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-updateAdapterConfiguration', displayE);
911
+ runErrorAsserts(data, error, 'AD.300', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
911
912
  done();
912
913
  } catch (err) {
913
914
  log.error(`Test Failure: ${err}`);
@@ -921,10 +922,10 @@ describe('[unit] Adapter Base Test', () => {
921
922
  }).timeout(attemptTimeout);
922
923
  it('if not package.json, entity must be valid', (done) => {
923
924
  try {
924
- a.updateAdapterConfiguration('notPackage', { name: 'fakeChange' }, 'fakeEntity', 'fakeType', null, (data, error) => {
925
+ a.iapUpdateAdapterConfiguration('notPackage', { name: 'fakeChange' }, 'fakeEntity', 'fakeType', null, (data, error) => {
925
926
  try {
926
927
  const displayE = 'Incomplete Configuration Change: Invalid Entity - fakeEntity';
927
- runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-updateAdapterConfiguration', displayE);
928
+ runErrorAsserts(data, error, 'AD.999', 'Test-Base-adapterBase-iapUpdateAdapterConfiguration', displayE);
928
929
  done();
929
930
  } catch (err) {
930
931
  log.error(`Test Failure: ${err}`);