@itentialopensource/adapter-nokia_nsp_network_management 0.1.1 → 0.1.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.
- package/CALLS.md +726 -0
- package/CHANGELOG.md +8 -1
- package/adapter.js +1069 -0
- package/entities/NetworkInventoryRestconfAPI/action.json +277 -0
- package/entities/NetworkInventoryRestconfAPI/mockdatafiles/getRadio-default.json +3 -0
- package/entities/NetworkInventoryRestconfAPI/schema.json +31 -0
- package/package.json +1 -1
- package/previousVersion.zip +0 -0
- package/pronghorn.json +467 -0
- package/refs?service=git-upload-pack +0 -0
- package/report/adapterInfo.json +10 -0
- package/test/integration/adapterTestIntegration.js +325 -0
- package/test/unit/adapterTestUnit.js +377 -0
|
@@ -5399,5 +5399,382 @@ describe('[unit] nokia_nsp_network_management Adapter Test', () => {
|
|
|
5399
5399
|
}
|
|
5400
5400
|
}).timeout(attemptTimeout);
|
|
5401
5401
|
});
|
|
5402
|
+
|
|
5403
|
+
describe('#getNE - errors', () => {
|
|
5404
|
+
it('should have a getNE function', (done) => {
|
|
5405
|
+
try {
|
|
5406
|
+
assert.equal(true, typeof a.getNE === 'function');
|
|
5407
|
+
done();
|
|
5408
|
+
} catch (error) {
|
|
5409
|
+
log.error(`Test Failure: ${error}`);
|
|
5410
|
+
done(error);
|
|
5411
|
+
}
|
|
5412
|
+
}).timeout(attemptTimeout);
|
|
5413
|
+
});
|
|
5414
|
+
|
|
5415
|
+
describe('#getSpecificNE - errors', () => {
|
|
5416
|
+
it('should have a getSpecificNE function', (done) => {
|
|
5417
|
+
try {
|
|
5418
|
+
assert.equal(true, typeof a.getSpecificNE === 'function');
|
|
5419
|
+
done();
|
|
5420
|
+
} catch (error) {
|
|
5421
|
+
log.error(`Test Failure: ${error}`);
|
|
5422
|
+
done(error);
|
|
5423
|
+
}
|
|
5424
|
+
}).timeout(attemptTimeout);
|
|
5425
|
+
it('should error if - missing networkElement', (done) => {
|
|
5426
|
+
try {
|
|
5427
|
+
a.getSpecificNE(null, null, (data, error) => {
|
|
5428
|
+
try {
|
|
5429
|
+
const displayE = 'networkElement is required';
|
|
5430
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNE', displayE);
|
|
5431
|
+
done();
|
|
5432
|
+
} catch (err) {
|
|
5433
|
+
log.error(`Test Failure: ${err}`);
|
|
5434
|
+
done(err);
|
|
5435
|
+
}
|
|
5436
|
+
});
|
|
5437
|
+
} catch (error) {
|
|
5438
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5439
|
+
done(error);
|
|
5440
|
+
}
|
|
5441
|
+
}).timeout(attemptTimeout);
|
|
5442
|
+
});
|
|
5443
|
+
|
|
5444
|
+
describe('#getShelf - errors', () => {
|
|
5445
|
+
it('should have a getShelf function', (done) => {
|
|
5446
|
+
try {
|
|
5447
|
+
assert.equal(true, typeof a.getShelf === 'function');
|
|
5448
|
+
done();
|
|
5449
|
+
} catch (error) {
|
|
5450
|
+
log.error(`Test Failure: ${error}`);
|
|
5451
|
+
done(error);
|
|
5452
|
+
}
|
|
5453
|
+
}).timeout(attemptTimeout);
|
|
5454
|
+
});
|
|
5455
|
+
|
|
5456
|
+
describe('#getSpecificShelf - errors', () => {
|
|
5457
|
+
it('should have a getSpecificShelf function', (done) => {
|
|
5458
|
+
try {
|
|
5459
|
+
assert.equal(true, typeof a.getSpecificShelf === 'function');
|
|
5460
|
+
done();
|
|
5461
|
+
} catch (error) {
|
|
5462
|
+
log.error(`Test Failure: ${error}`);
|
|
5463
|
+
done(error);
|
|
5464
|
+
}
|
|
5465
|
+
}).timeout(attemptTimeout);
|
|
5466
|
+
it('should error if - missing networkElement', (done) => {
|
|
5467
|
+
try {
|
|
5468
|
+
a.getSpecificShelf(null, null, (data, error) => {
|
|
5469
|
+
try {
|
|
5470
|
+
const displayE = 'networkElement is required';
|
|
5471
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificShelf', displayE);
|
|
5472
|
+
done();
|
|
5473
|
+
} catch (err) {
|
|
5474
|
+
log.error(`Test Failure: ${err}`);
|
|
5475
|
+
done(err);
|
|
5476
|
+
}
|
|
5477
|
+
});
|
|
5478
|
+
} catch (error) {
|
|
5479
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5480
|
+
done(error);
|
|
5481
|
+
}
|
|
5482
|
+
}).timeout(attemptTimeout);
|
|
5483
|
+
it('should error if - missing shelf', (done) => {
|
|
5484
|
+
try {
|
|
5485
|
+
a.getSpecificShelf('fakeparam', null, (data, error) => {
|
|
5486
|
+
try {
|
|
5487
|
+
const displayE = 'shelf is required';
|
|
5488
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificShelf', displayE);
|
|
5489
|
+
done();
|
|
5490
|
+
} catch (err) {
|
|
5491
|
+
log.error(`Test Failure: ${err}`);
|
|
5492
|
+
done(err);
|
|
5493
|
+
}
|
|
5494
|
+
});
|
|
5495
|
+
} catch (error) {
|
|
5496
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5497
|
+
done(error);
|
|
5498
|
+
}
|
|
5499
|
+
}).timeout(attemptTimeout);
|
|
5500
|
+
});
|
|
5501
|
+
|
|
5502
|
+
describe('#getCard - errors', () => {
|
|
5503
|
+
it('should have a getCard function', (done) => {
|
|
5504
|
+
try {
|
|
5505
|
+
assert.equal(true, typeof a.getCard === 'function');
|
|
5506
|
+
done();
|
|
5507
|
+
} catch (error) {
|
|
5508
|
+
log.error(`Test Failure: ${error}`);
|
|
5509
|
+
done(error);
|
|
5510
|
+
}
|
|
5511
|
+
}).timeout(attemptTimeout);
|
|
5512
|
+
});
|
|
5513
|
+
|
|
5514
|
+
describe('#getSpecificNECards - errors', () => {
|
|
5515
|
+
it('should have a getSpecificNECards function', (done) => {
|
|
5516
|
+
try {
|
|
5517
|
+
assert.equal(true, typeof a.getSpecificNECards === 'function');
|
|
5518
|
+
done();
|
|
5519
|
+
} catch (error) {
|
|
5520
|
+
log.error(`Test Failure: ${error}`);
|
|
5521
|
+
done(error);
|
|
5522
|
+
}
|
|
5523
|
+
}).timeout(attemptTimeout);
|
|
5524
|
+
it('should error if - missing networkElement', (done) => {
|
|
5525
|
+
try {
|
|
5526
|
+
a.getSpecificNECards(null, null, (data, error) => {
|
|
5527
|
+
try {
|
|
5528
|
+
const displayE = 'networkElement is required';
|
|
5529
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNECards', displayE);
|
|
5530
|
+
done();
|
|
5531
|
+
} catch (err) {
|
|
5532
|
+
log.error(`Test Failure: ${err}`);
|
|
5533
|
+
done(err);
|
|
5534
|
+
}
|
|
5535
|
+
});
|
|
5536
|
+
} catch (error) {
|
|
5537
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5538
|
+
done(error);
|
|
5539
|
+
}
|
|
5540
|
+
}).timeout(attemptTimeout);
|
|
5541
|
+
it('should error if - missing card', (done) => {
|
|
5542
|
+
try {
|
|
5543
|
+
a.getSpecificNECards('fakeparam', null, (data, error) => {
|
|
5544
|
+
try {
|
|
5545
|
+
const displayE = 'card is required';
|
|
5546
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNECards', displayE);
|
|
5547
|
+
done();
|
|
5548
|
+
} catch (err) {
|
|
5549
|
+
log.error(`Test Failure: ${err}`);
|
|
5550
|
+
done(err);
|
|
5551
|
+
}
|
|
5552
|
+
});
|
|
5553
|
+
} catch (error) {
|
|
5554
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5555
|
+
done(error);
|
|
5556
|
+
}
|
|
5557
|
+
}).timeout(attemptTimeout);
|
|
5558
|
+
});
|
|
5559
|
+
|
|
5560
|
+
describe('#getPort - errors', () => {
|
|
5561
|
+
it('should have a getPort function', (done) => {
|
|
5562
|
+
try {
|
|
5563
|
+
assert.equal(true, typeof a.getPort === 'function');
|
|
5564
|
+
done();
|
|
5565
|
+
} catch (error) {
|
|
5566
|
+
log.error(`Test Failure: ${error}`);
|
|
5567
|
+
done(error);
|
|
5568
|
+
}
|
|
5569
|
+
}).timeout(attemptTimeout);
|
|
5570
|
+
});
|
|
5571
|
+
|
|
5572
|
+
describe('#getPortFromSpecificNE - errors', () => {
|
|
5573
|
+
it('should have a getPortFromSpecificNE function', (done) => {
|
|
5574
|
+
try {
|
|
5575
|
+
assert.equal(true, typeof a.getPortFromSpecificNE === 'function');
|
|
5576
|
+
done();
|
|
5577
|
+
} catch (error) {
|
|
5578
|
+
log.error(`Test Failure: ${error}`);
|
|
5579
|
+
done(error);
|
|
5580
|
+
}
|
|
5581
|
+
}).timeout(attemptTimeout);
|
|
5582
|
+
it('should error if - missing networkElement', (done) => {
|
|
5583
|
+
try {
|
|
5584
|
+
a.getPortFromSpecificNE(null, null, (data, error) => {
|
|
5585
|
+
try {
|
|
5586
|
+
const displayE = 'networkElement is required';
|
|
5587
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getPortFromSpecificNE', displayE);
|
|
5588
|
+
done();
|
|
5589
|
+
} catch (err) {
|
|
5590
|
+
log.error(`Test Failure: ${err}`);
|
|
5591
|
+
done(err);
|
|
5592
|
+
}
|
|
5593
|
+
});
|
|
5594
|
+
} catch (error) {
|
|
5595
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5596
|
+
done(error);
|
|
5597
|
+
}
|
|
5598
|
+
}).timeout(attemptTimeout);
|
|
5599
|
+
it('should error if - missing port', (done) => {
|
|
5600
|
+
try {
|
|
5601
|
+
a.getPortFromSpecificNE('fakeparam', null, (data, error) => {
|
|
5602
|
+
try {
|
|
5603
|
+
const displayE = 'port is required';
|
|
5604
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getPortFromSpecificNE', displayE);
|
|
5605
|
+
done();
|
|
5606
|
+
} catch (err) {
|
|
5607
|
+
log.error(`Test Failure: ${err}`);
|
|
5608
|
+
done(err);
|
|
5609
|
+
}
|
|
5610
|
+
});
|
|
5611
|
+
} catch (error) {
|
|
5612
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5613
|
+
done(error);
|
|
5614
|
+
}
|
|
5615
|
+
}).timeout(attemptTimeout);
|
|
5616
|
+
});
|
|
5617
|
+
|
|
5618
|
+
describe('#getPortFromSpecificNETransceiverDetails - errors', () => {
|
|
5619
|
+
it('should have a getPortFromSpecificNETransceiverDetails function', (done) => {
|
|
5620
|
+
try {
|
|
5621
|
+
assert.equal(true, typeof a.getPortFromSpecificNETransceiverDetails === 'function');
|
|
5622
|
+
done();
|
|
5623
|
+
} catch (error) {
|
|
5624
|
+
log.error(`Test Failure: ${error}`);
|
|
5625
|
+
done(error);
|
|
5626
|
+
}
|
|
5627
|
+
}).timeout(attemptTimeout);
|
|
5628
|
+
it('should error if - missing networkElement', (done) => {
|
|
5629
|
+
try {
|
|
5630
|
+
a.getPortFromSpecificNETransceiverDetails(null, null, (data, error) => {
|
|
5631
|
+
try {
|
|
5632
|
+
const displayE = 'networkElement is required';
|
|
5633
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getPortFromSpecificNETransceiverDetails', displayE);
|
|
5634
|
+
done();
|
|
5635
|
+
} catch (err) {
|
|
5636
|
+
log.error(`Test Failure: ${err}`);
|
|
5637
|
+
done(err);
|
|
5638
|
+
}
|
|
5639
|
+
});
|
|
5640
|
+
} catch (error) {
|
|
5641
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5642
|
+
done(error);
|
|
5643
|
+
}
|
|
5644
|
+
}).timeout(attemptTimeout);
|
|
5645
|
+
it('should error if - missing port', (done) => {
|
|
5646
|
+
try {
|
|
5647
|
+
a.getPortFromSpecificNETransceiverDetails('fakeparam', null, (data, error) => {
|
|
5648
|
+
try {
|
|
5649
|
+
const displayE = 'port is required';
|
|
5650
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getPortFromSpecificNETransceiverDetails', displayE);
|
|
5651
|
+
done();
|
|
5652
|
+
} catch (err) {
|
|
5653
|
+
log.error(`Test Failure: ${err}`);
|
|
5654
|
+
done(err);
|
|
5655
|
+
}
|
|
5656
|
+
});
|
|
5657
|
+
} catch (error) {
|
|
5658
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5659
|
+
done(error);
|
|
5660
|
+
}
|
|
5661
|
+
}).timeout(attemptTimeout);
|
|
5662
|
+
});
|
|
5663
|
+
|
|
5664
|
+
describe('#getLags - errors', () => {
|
|
5665
|
+
it('should have a getLags function', (done) => {
|
|
5666
|
+
try {
|
|
5667
|
+
assert.equal(true, typeof a.getLags === 'function');
|
|
5668
|
+
done();
|
|
5669
|
+
} catch (error) {
|
|
5670
|
+
log.error(`Test Failure: ${error}`);
|
|
5671
|
+
done(error);
|
|
5672
|
+
}
|
|
5673
|
+
}).timeout(attemptTimeout);
|
|
5674
|
+
});
|
|
5675
|
+
|
|
5676
|
+
describe('#getSpecificNELag - errors', () => {
|
|
5677
|
+
it('should have a getSpecificNELag function', (done) => {
|
|
5678
|
+
try {
|
|
5679
|
+
assert.equal(true, typeof a.getSpecificNELag === 'function');
|
|
5680
|
+
done();
|
|
5681
|
+
} catch (error) {
|
|
5682
|
+
log.error(`Test Failure: ${error}`);
|
|
5683
|
+
done(error);
|
|
5684
|
+
}
|
|
5685
|
+
}).timeout(attemptTimeout);
|
|
5686
|
+
it('should error if - missing networkElement', (done) => {
|
|
5687
|
+
try {
|
|
5688
|
+
a.getSpecificNELag(null, (data, error) => {
|
|
5689
|
+
try {
|
|
5690
|
+
const displayE = 'networkElement is required';
|
|
5691
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNELag', displayE);
|
|
5692
|
+
done();
|
|
5693
|
+
} catch (err) {
|
|
5694
|
+
log.error(`Test Failure: ${err}`);
|
|
5695
|
+
done(err);
|
|
5696
|
+
}
|
|
5697
|
+
});
|
|
5698
|
+
} catch (error) {
|
|
5699
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5700
|
+
done(error);
|
|
5701
|
+
}
|
|
5702
|
+
}).timeout(attemptTimeout);
|
|
5703
|
+
});
|
|
5704
|
+
|
|
5705
|
+
describe('#getSpecificNELagWithFields - errors', () => {
|
|
5706
|
+
it('should have a getSpecificNELagWithFields function', (done) => {
|
|
5707
|
+
try {
|
|
5708
|
+
assert.equal(true, typeof a.getSpecificNELagWithFields === 'function');
|
|
5709
|
+
done();
|
|
5710
|
+
} catch (error) {
|
|
5711
|
+
log.error(`Test Failure: ${error}`);
|
|
5712
|
+
done(error);
|
|
5713
|
+
}
|
|
5714
|
+
}).timeout(attemptTimeout);
|
|
5715
|
+
it('should error if - missing fields', (done) => {
|
|
5716
|
+
try {
|
|
5717
|
+
a.getSpecificNELagWithFields(null, null, null, (data, error) => {
|
|
5718
|
+
try {
|
|
5719
|
+
const displayE = 'fields is required';
|
|
5720
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNELagWithFields', displayE);
|
|
5721
|
+
done();
|
|
5722
|
+
} catch (err) {
|
|
5723
|
+
log.error(`Test Failure: ${err}`);
|
|
5724
|
+
done(err);
|
|
5725
|
+
}
|
|
5726
|
+
});
|
|
5727
|
+
} catch (error) {
|
|
5728
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5729
|
+
done(error);
|
|
5730
|
+
}
|
|
5731
|
+
}).timeout(attemptTimeout);
|
|
5732
|
+
it('should error if - missing networkElement', (done) => {
|
|
5733
|
+
try {
|
|
5734
|
+
a.getSpecificNELagWithFields('fakeparam', null, null, (data, error) => {
|
|
5735
|
+
try {
|
|
5736
|
+
const displayE = 'networkElement is required';
|
|
5737
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNELagWithFields', displayE);
|
|
5738
|
+
done();
|
|
5739
|
+
} catch (err) {
|
|
5740
|
+
log.error(`Test Failure: ${err}`);
|
|
5741
|
+
done(err);
|
|
5742
|
+
}
|
|
5743
|
+
});
|
|
5744
|
+
} catch (error) {
|
|
5745
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5746
|
+
done(error);
|
|
5747
|
+
}
|
|
5748
|
+
}).timeout(attemptTimeout);
|
|
5749
|
+
it('should error if - missing lag', (done) => {
|
|
5750
|
+
try {
|
|
5751
|
+
a.getSpecificNELagWithFields('fakeparam', 'fakeparam', null, (data, error) => {
|
|
5752
|
+
try {
|
|
5753
|
+
const displayE = 'lag is required';
|
|
5754
|
+
runErrorAsserts(data, error, 'AD.300', 'Test-nokia_nsp_network_management-adapter-getSpecificNELagWithFields', displayE);
|
|
5755
|
+
done();
|
|
5756
|
+
} catch (err) {
|
|
5757
|
+
log.error(`Test Failure: ${err}`);
|
|
5758
|
+
done(err);
|
|
5759
|
+
}
|
|
5760
|
+
});
|
|
5761
|
+
} catch (error) {
|
|
5762
|
+
log.error(`Adapter Exception: ${error}`);
|
|
5763
|
+
done(error);
|
|
5764
|
+
}
|
|
5765
|
+
}).timeout(attemptTimeout);
|
|
5766
|
+
});
|
|
5767
|
+
|
|
5768
|
+
describe('#getRadio - errors', () => {
|
|
5769
|
+
it('should have a getRadio function', (done) => {
|
|
5770
|
+
try {
|
|
5771
|
+
assert.equal(true, typeof a.getRadio === 'function');
|
|
5772
|
+
done();
|
|
5773
|
+
} catch (error) {
|
|
5774
|
+
log.error(`Test Failure: ${error}`);
|
|
5775
|
+
done(error);
|
|
5776
|
+
}
|
|
5777
|
+
}).timeout(attemptTimeout);
|
|
5778
|
+
});
|
|
5402
5779
|
});
|
|
5403
5780
|
});
|