@itentialopensource/adapter-f5_bigiq 0.3.0 → 0.3.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/CHANGELOG.md +16 -0
- package/adapter.js +100 -1991
- package/entities/Device/action.json +21 -0
- package/entities/Device/schema.json +1 -0
- package/entities/Qkview/action.json +1 -1
- package/entities/Qkview/schema.json +1 -1
- package/package.json +1 -1
- package/pronghorn.json +46 -717
- package/refs?service=git-upload-pack +0 -0
- package/test/integration/adapterTestIntegration.js +29 -631
- package/test/unit/adapterTestUnit.js +51 -446
- package/entities/Configuration/action.json +0 -24
- package/entities/Configuration/schema.json +0 -19
- package/entities/DeviceInfo/action.json +0 -45
- package/entities/DeviceInfo/schema.json +0 -20
- package/entities/Licensing/action.json +0 -66
- package/entities/Licensing/schema.json +0 -21
- package/entities/SSLManagement/action.json +0 -330
- package/entities/SSLManagement/schema.json +0 -34
- package/entities/SoftwareManagement/action.json +0 -46
- package/entities/SoftwareManagement/schema.json +0 -20
|
Binary file
|
|
@@ -3825,6 +3825,32 @@ describe('[integration] F5BigIQ Adapter Test', () => {
|
|
|
3825
3825
|
}).timeout(attemptTimeout);
|
|
3826
3826
|
});
|
|
3827
3827
|
|
|
3828
|
+
const performDeviceDiscoveryTaskBodyParam = {};
|
|
3829
|
+
describe('#performDeviceDiscoveryTask - errors', () => {
|
|
3830
|
+
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3831
|
+
try {
|
|
3832
|
+
a.performDeviceDiscoveryTask(deviceObjectId, performDeviceDiscoveryTaskBodyParam, (data, error) => {
|
|
3833
|
+
try {
|
|
3834
|
+
if (stub) {
|
|
3835
|
+
const displayE = 'Error 400 received on request';
|
|
3836
|
+
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
3837
|
+
} else {
|
|
3838
|
+
runCommonAsserts(data, error);
|
|
3839
|
+
}
|
|
3840
|
+
saveMockData('Device', 'performDeviceDiscoveryTask', 'default', data);
|
|
3841
|
+
done();
|
|
3842
|
+
} catch (err) {
|
|
3843
|
+
log.error(`Test Failure: ${err}`);
|
|
3844
|
+
done(err);
|
|
3845
|
+
}
|
|
3846
|
+
});
|
|
3847
|
+
} catch (error) {
|
|
3848
|
+
log.error(`Adapter Exception: ${error}`);
|
|
3849
|
+
done(error);
|
|
3850
|
+
}
|
|
3851
|
+
}).timeout(attemptTimeout);
|
|
3852
|
+
});
|
|
3853
|
+
|
|
3828
3854
|
describe('#getAllDeviceTrustTasks - errors', () => {
|
|
3829
3855
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
3830
3856
|
try {
|
|
@@ -7665,10 +7691,10 @@ describe('[integration] F5BigIQ Adapter Test', () => {
|
|
|
7665
7691
|
}).timeout(attemptTimeout);
|
|
7666
7692
|
});
|
|
7667
7693
|
|
|
7668
|
-
describe('#
|
|
7694
|
+
describe('#deleteaBIGIQQkview - errors', () => {
|
|
7669
7695
|
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
7670
7696
|
try {
|
|
7671
|
-
a.
|
|
7697
|
+
a.deleteaBIGIQQkview('fakedata', (data, error) => {
|
|
7672
7698
|
try {
|
|
7673
7699
|
if (stub) {
|
|
7674
7700
|
const displayE = 'Error 400 received on request';
|
|
@@ -7676,7 +7702,7 @@ describe('[integration] F5BigIQ Adapter Test', () => {
|
|
|
7676
7702
|
} else {
|
|
7677
7703
|
runCommonAsserts(data, error);
|
|
7678
7704
|
}
|
|
7679
|
-
saveMockData('Qkview', '
|
|
7705
|
+
saveMockData('Qkview', 'deleteaBIGIQQkview', 'default', data);
|
|
7680
7706
|
done();
|
|
7681
7707
|
} catch (err) {
|
|
7682
7708
|
log.error(`Test Failure: ${err}`);
|
|
@@ -8887,633 +8913,5 @@ describe('[integration] F5BigIQ Adapter Test', () => {
|
|
|
8887
8913
|
}
|
|
8888
8914
|
}).timeout(attemptTimeout);
|
|
8889
8915
|
});
|
|
8890
|
-
|
|
8891
|
-
describe('#retrieveLicenseInformation - errors', () => {
|
|
8892
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
8893
|
-
try {
|
|
8894
|
-
a.retrieveLicenseInformation((data, error) => {
|
|
8895
|
-
try {
|
|
8896
|
-
if (stub) {
|
|
8897
|
-
const displayE = 'Error 400 received on request';
|
|
8898
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
8899
|
-
} else {
|
|
8900
|
-
runCommonAsserts(data, error);
|
|
8901
|
-
}
|
|
8902
|
-
saveMockData('Licensing', 'retrieveLicenseInformation', 'default', data);
|
|
8903
|
-
done();
|
|
8904
|
-
} catch (err) {
|
|
8905
|
-
log.error(`Test Failure: ${err}`);
|
|
8906
|
-
done(err);
|
|
8907
|
-
}
|
|
8908
|
-
});
|
|
8909
|
-
} catch (error) {
|
|
8910
|
-
log.error(`Adapter Exception: ${error}`);
|
|
8911
|
-
done(error);
|
|
8912
|
-
}
|
|
8913
|
-
}).timeout(attemptTimeout);
|
|
8914
|
-
});
|
|
8915
|
-
|
|
8916
|
-
const licensingActivateReactiveLicenseBodyParam = {};
|
|
8917
|
-
describe('#activateReactiveLicense - errors', () => {
|
|
8918
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
8919
|
-
try {
|
|
8920
|
-
a.activateReactiveLicense(licensingActivateReactiveLicenseBodyParam, (data, error) => {
|
|
8921
|
-
try {
|
|
8922
|
-
if (stub) {
|
|
8923
|
-
const displayE = 'Error 400 received on request';
|
|
8924
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
8925
|
-
} else {
|
|
8926
|
-
runCommonAsserts(data, error);
|
|
8927
|
-
}
|
|
8928
|
-
saveMockData('Licensing', 'activateReactiveLicense', 'default', data);
|
|
8929
|
-
done();
|
|
8930
|
-
} catch (err) {
|
|
8931
|
-
log.error(`Test Failure: ${err}`);
|
|
8932
|
-
done(err);
|
|
8933
|
-
}
|
|
8934
|
-
});
|
|
8935
|
-
} catch (error) {
|
|
8936
|
-
log.error(`Adapter Exception: ${error}`);
|
|
8937
|
-
done(error);
|
|
8938
|
-
}
|
|
8939
|
-
}).timeout(attemptTimeout);
|
|
8940
|
-
});
|
|
8941
|
-
|
|
8942
|
-
describe('#showBIGIPLicenseExample - errors', () => {
|
|
8943
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
8944
|
-
try {
|
|
8945
|
-
a.showBIGIPLicenseExample((data, error) => {
|
|
8946
|
-
try {
|
|
8947
|
-
if (stub) {
|
|
8948
|
-
const displayE = 'Error 400 received on request';
|
|
8949
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
8950
|
-
} else {
|
|
8951
|
-
runCommonAsserts(data, error);
|
|
8952
|
-
}
|
|
8953
|
-
saveMockData('Licensing', 'showBIGIPLicenseExample', 'default', data);
|
|
8954
|
-
done();
|
|
8955
|
-
} catch (err) {
|
|
8956
|
-
log.error(`Test Failure: ${err}`);
|
|
8957
|
-
done(err);
|
|
8958
|
-
}
|
|
8959
|
-
});
|
|
8960
|
-
} catch (error) {
|
|
8961
|
-
log.error(`Adapter Exception: ${error}`);
|
|
8962
|
-
done(error);
|
|
8963
|
-
}
|
|
8964
|
-
}).timeout(attemptTimeout);
|
|
8965
|
-
});
|
|
8966
|
-
|
|
8967
|
-
describe('#retrievesoftwareprovisioningFeatures - errors', () => {
|
|
8968
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
8969
|
-
try {
|
|
8970
|
-
a.retrievesoftwareprovisioningFeatures((data, error) => {
|
|
8971
|
-
try {
|
|
8972
|
-
if (stub) {
|
|
8973
|
-
const displayE = 'Error 400 received on request';
|
|
8974
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
8975
|
-
} else {
|
|
8976
|
-
runCommonAsserts(data, error);
|
|
8977
|
-
}
|
|
8978
|
-
saveMockData('DeviceInfo', 'retrievesoftwareprovisioningFeatures', 'default', data);
|
|
8979
|
-
done();
|
|
8980
|
-
} catch (err) {
|
|
8981
|
-
log.error(`Test Failure: ${err}`);
|
|
8982
|
-
done(err);
|
|
8983
|
-
}
|
|
8984
|
-
});
|
|
8985
|
-
} catch (error) {
|
|
8986
|
-
log.error(`Adapter Exception: ${error}`);
|
|
8987
|
-
done(error);
|
|
8988
|
-
}
|
|
8989
|
-
}).timeout(attemptTimeout);
|
|
8990
|
-
});
|
|
8991
|
-
|
|
8992
|
-
const deviceInfoRunCommandAsRootUserBodyParam = {
|
|
8993
|
-
command: 'run',
|
|
8994
|
-
utilCmdArgs: '-c \'f5mku -K\''
|
|
8995
|
-
};
|
|
8996
|
-
describe('#runCommandAsRootUser - errors', () => {
|
|
8997
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
8998
|
-
try {
|
|
8999
|
-
a.runCommandAsRootUser(deviceInfoRunCommandAsRootUserBodyParam, (data, error) => {
|
|
9000
|
-
try {
|
|
9001
|
-
if (stub) {
|
|
9002
|
-
const displayE = 'Error 400 received on request';
|
|
9003
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9004
|
-
} else {
|
|
9005
|
-
runCommonAsserts(data, error);
|
|
9006
|
-
}
|
|
9007
|
-
saveMockData('DeviceInfo', 'runCommandAsRootUser', 'default', data);
|
|
9008
|
-
done();
|
|
9009
|
-
} catch (err) {
|
|
9010
|
-
log.error(`Test Failure: ${err}`);
|
|
9011
|
-
done(err);
|
|
9012
|
-
}
|
|
9013
|
-
});
|
|
9014
|
-
} catch (error) {
|
|
9015
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9016
|
-
done(error);
|
|
9017
|
-
}
|
|
9018
|
-
}).timeout(attemptTimeout);
|
|
9019
|
-
});
|
|
9020
|
-
|
|
9021
|
-
describe('#retrieveallsoftwareimages - errors', () => {
|
|
9022
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9023
|
-
try {
|
|
9024
|
-
a.retrieveallsoftwareimages((data, error) => {
|
|
9025
|
-
try {
|
|
9026
|
-
if (stub) {
|
|
9027
|
-
const displayE = 'Error 400 received on request';
|
|
9028
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9029
|
-
} else {
|
|
9030
|
-
runCommonAsserts(data, error);
|
|
9031
|
-
}
|
|
9032
|
-
saveMockData('SoftwareManagement', 'retrieveallsoftwareimages', 'default', data);
|
|
9033
|
-
done();
|
|
9034
|
-
} catch (err) {
|
|
9035
|
-
log.error(`Test Failure: ${err}`);
|
|
9036
|
-
done(err);
|
|
9037
|
-
}
|
|
9038
|
-
});
|
|
9039
|
-
} catch (error) {
|
|
9040
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9041
|
-
done(error);
|
|
9042
|
-
}
|
|
9043
|
-
}).timeout(attemptTimeout);
|
|
9044
|
-
});
|
|
9045
|
-
|
|
9046
|
-
describe('#retrieveallhotfiximages - errors', () => {
|
|
9047
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9048
|
-
try {
|
|
9049
|
-
a.retrieveallhotfiximages((data, error) => {
|
|
9050
|
-
try {
|
|
9051
|
-
if (stub) {
|
|
9052
|
-
const displayE = 'Error 400 received on request';
|
|
9053
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9054
|
-
} else {
|
|
9055
|
-
runCommonAsserts(data, error);
|
|
9056
|
-
}
|
|
9057
|
-
saveMockData('SoftwareManagement', 'retrieveallhotfiximages', 'default', data);
|
|
9058
|
-
done();
|
|
9059
|
-
} catch (err) {
|
|
9060
|
-
log.error(`Test Failure: ${err}`);
|
|
9061
|
-
done(err);
|
|
9062
|
-
}
|
|
9063
|
-
});
|
|
9064
|
-
} catch (error) {
|
|
9065
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9066
|
-
done(error);
|
|
9067
|
-
}
|
|
9068
|
-
}).timeout(attemptTimeout);
|
|
9069
|
-
});
|
|
9070
|
-
|
|
9071
|
-
describe('#retrieveallLTMcertificateobjects - errors', () => {
|
|
9072
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9073
|
-
try {
|
|
9074
|
-
a.retrieveallLTMcertificateobjects((data, error) => {
|
|
9075
|
-
try {
|
|
9076
|
-
if (stub) {
|
|
9077
|
-
const displayE = 'Error 400 received on request';
|
|
9078
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9079
|
-
} else {
|
|
9080
|
-
runCommonAsserts(data, error);
|
|
9081
|
-
}
|
|
9082
|
-
saveMockData('SSLManagement', 'retrieveallLTMcertificateobjects', 'default', data);
|
|
9083
|
-
done();
|
|
9084
|
-
} catch (err) {
|
|
9085
|
-
log.error(`Test Failure: ${err}`);
|
|
9086
|
-
done(err);
|
|
9087
|
-
}
|
|
9088
|
-
});
|
|
9089
|
-
} catch (error) {
|
|
9090
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9091
|
-
done(error);
|
|
9092
|
-
}
|
|
9093
|
-
}).timeout(attemptTimeout);
|
|
9094
|
-
});
|
|
9095
|
-
|
|
9096
|
-
const sSLManagementCreateOverwriteSSLCertificatefromUploadBodyParam = {
|
|
9097
|
-
command: 'install',
|
|
9098
|
-
name: 'mysslcertificate',
|
|
9099
|
-
'from-local-file': '/var/config/rest/downloads/mysslcertificate.crt'
|
|
9100
|
-
};
|
|
9101
|
-
describe('#createOverwriteSSLCertificatefromUpload - errors', () => {
|
|
9102
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9103
|
-
try {
|
|
9104
|
-
a.createOverwriteSSLCertificatefromUpload(sSLManagementCreateOverwriteSSLCertificatefromUploadBodyParam, (data, error) => {
|
|
9105
|
-
try {
|
|
9106
|
-
if (stub) {
|
|
9107
|
-
const displayE = 'Error 400 received on request';
|
|
9108
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9109
|
-
} else {
|
|
9110
|
-
runCommonAsserts(data, error);
|
|
9111
|
-
}
|
|
9112
|
-
saveMockData('SSLManagement', 'createOverwriteSSLCertificatefromUpload', 'default', data);
|
|
9113
|
-
done();
|
|
9114
|
-
} catch (err) {
|
|
9115
|
-
log.error(`Test Failure: ${err}`);
|
|
9116
|
-
done(err);
|
|
9117
|
-
}
|
|
9118
|
-
});
|
|
9119
|
-
} catch (error) {
|
|
9120
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9121
|
-
done(error);
|
|
9122
|
-
}
|
|
9123
|
-
}).timeout(attemptTimeout);
|
|
9124
|
-
});
|
|
9125
|
-
|
|
9126
|
-
describe('#retrieveallLTMprivatekeyobjects - errors', () => {
|
|
9127
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9128
|
-
try {
|
|
9129
|
-
a.retrieveallLTMprivatekeyobjects((data, error) => {
|
|
9130
|
-
try {
|
|
9131
|
-
if (stub) {
|
|
9132
|
-
const displayE = 'Error 400 received on request';
|
|
9133
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9134
|
-
} else {
|
|
9135
|
-
runCommonAsserts(data, error);
|
|
9136
|
-
}
|
|
9137
|
-
saveMockData('SSLManagement', 'retrieveallLTMprivatekeyobjects', 'default', data);
|
|
9138
|
-
done();
|
|
9139
|
-
} catch (err) {
|
|
9140
|
-
log.error(`Test Failure: ${err}`);
|
|
9141
|
-
done(err);
|
|
9142
|
-
}
|
|
9143
|
-
});
|
|
9144
|
-
} catch (error) {
|
|
9145
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9146
|
-
done(error);
|
|
9147
|
-
}
|
|
9148
|
-
}).timeout(attemptTimeout);
|
|
9149
|
-
});
|
|
9150
|
-
|
|
9151
|
-
const sSLManagementCreateOverwriteSSLKeyfromUploadBodyParam = {
|
|
9152
|
-
command: 'install',
|
|
9153
|
-
name: 'mysslcertificate',
|
|
9154
|
-
'from-local-file': '/var/config/rest/downloads/mysslcertificate.key'
|
|
9155
|
-
};
|
|
9156
|
-
describe('#createOverwriteSSLKeyfromUpload - errors', () => {
|
|
9157
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9158
|
-
try {
|
|
9159
|
-
a.createOverwriteSSLKeyfromUpload(sSLManagementCreateOverwriteSSLKeyfromUploadBodyParam, (data, error) => {
|
|
9160
|
-
try {
|
|
9161
|
-
if (stub) {
|
|
9162
|
-
const displayE = 'Error 400 received on request';
|
|
9163
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9164
|
-
} else {
|
|
9165
|
-
runCommonAsserts(data, error);
|
|
9166
|
-
}
|
|
9167
|
-
saveMockData('SSLManagement', 'createOverwriteSSLKeyfromUpload', 'default', data);
|
|
9168
|
-
done();
|
|
9169
|
-
} catch (err) {
|
|
9170
|
-
log.error(`Test Failure: ${err}`);
|
|
9171
|
-
done(err);
|
|
9172
|
-
}
|
|
9173
|
-
});
|
|
9174
|
-
} catch (error) {
|
|
9175
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9176
|
-
done(error);
|
|
9177
|
-
}
|
|
9178
|
-
}).timeout(attemptTimeout);
|
|
9179
|
-
});
|
|
9180
|
-
|
|
9181
|
-
describe('#retrieveallcertificatefiles - errors', () => {
|
|
9182
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9183
|
-
try {
|
|
9184
|
-
a.retrieveallcertificatefiles((data, error) => {
|
|
9185
|
-
try {
|
|
9186
|
-
if (stub) {
|
|
9187
|
-
const displayE = 'Error 400 received on request';
|
|
9188
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9189
|
-
} else {
|
|
9190
|
-
runCommonAsserts(data, error);
|
|
9191
|
-
}
|
|
9192
|
-
saveMockData('SSLManagement', 'retrieveallcertificatefiles', 'default', data);
|
|
9193
|
-
done();
|
|
9194
|
-
} catch (err) {
|
|
9195
|
-
log.error(`Test Failure: ${err}`);
|
|
9196
|
-
done(err);
|
|
9197
|
-
}
|
|
9198
|
-
});
|
|
9199
|
-
} catch (error) {
|
|
9200
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9201
|
-
done(error);
|
|
9202
|
-
}
|
|
9203
|
-
}).timeout(attemptTimeout);
|
|
9204
|
-
});
|
|
9205
|
-
|
|
9206
|
-
describe('#retrieveallkeyfiles - errors', () => {
|
|
9207
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9208
|
-
try {
|
|
9209
|
-
a.retrieveallkeyfiles((data, error) => {
|
|
9210
|
-
try {
|
|
9211
|
-
if (stub) {
|
|
9212
|
-
const displayE = 'Error 400 received on request';
|
|
9213
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9214
|
-
} else {
|
|
9215
|
-
runCommonAsserts(data, error);
|
|
9216
|
-
}
|
|
9217
|
-
saveMockData('SSLManagement', 'retrieveallkeyfiles', 'default', data);
|
|
9218
|
-
done();
|
|
9219
|
-
} catch (err) {
|
|
9220
|
-
log.error(`Test Failure: ${err}`);
|
|
9221
|
-
done(err);
|
|
9222
|
-
}
|
|
9223
|
-
});
|
|
9224
|
-
} catch (error) {
|
|
9225
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9226
|
-
done(error);
|
|
9227
|
-
}
|
|
9228
|
-
}).timeout(attemptTimeout);
|
|
9229
|
-
});
|
|
9230
|
-
|
|
9231
|
-
describe('#retrieveallclientSSLprofiles - errors', () => {
|
|
9232
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9233
|
-
try {
|
|
9234
|
-
a.retrieveallclientSSLprofiles((data, error) => {
|
|
9235
|
-
try {
|
|
9236
|
-
if (stub) {
|
|
9237
|
-
const displayE = 'Error 400 received on request';
|
|
9238
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9239
|
-
} else {
|
|
9240
|
-
runCommonAsserts(data, error);
|
|
9241
|
-
}
|
|
9242
|
-
saveMockData('SSLManagement', 'retrieveallclientSSLprofiles', 'default', data);
|
|
9243
|
-
done();
|
|
9244
|
-
} catch (err) {
|
|
9245
|
-
log.error(`Test Failure: ${err}`);
|
|
9246
|
-
done(err);
|
|
9247
|
-
}
|
|
9248
|
-
});
|
|
9249
|
-
} catch (error) {
|
|
9250
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9251
|
-
done(error);
|
|
9252
|
-
}
|
|
9253
|
-
}).timeout(attemptTimeout);
|
|
9254
|
-
});
|
|
9255
|
-
|
|
9256
|
-
const sSLManagementCreateClientSSLProfileBodyParam = {
|
|
9257
|
-
name: 'myclientsslprofile',
|
|
9258
|
-
defaultsFrom: '/Common/clientssl',
|
|
9259
|
-
cert: '/Common/mysslcertificate',
|
|
9260
|
-
key: '/Common/mysslcertificate',
|
|
9261
|
-
usage: 'Server'
|
|
9262
|
-
};
|
|
9263
|
-
describe('#createClientSSLProfile - errors', () => {
|
|
9264
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9265
|
-
try {
|
|
9266
|
-
a.createClientSSLProfile(sSLManagementCreateClientSSLProfileBodyParam, (data, error) => {
|
|
9267
|
-
try {
|
|
9268
|
-
if (stub) {
|
|
9269
|
-
const displayE = 'Error 400 received on request';
|
|
9270
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9271
|
-
} else {
|
|
9272
|
-
runCommonAsserts(data, error);
|
|
9273
|
-
}
|
|
9274
|
-
saveMockData('SSLManagement', 'createClientSSLProfile', 'default', data);
|
|
9275
|
-
done();
|
|
9276
|
-
} catch (err) {
|
|
9277
|
-
log.error(`Test Failure: ${err}`);
|
|
9278
|
-
done(err);
|
|
9279
|
-
}
|
|
9280
|
-
});
|
|
9281
|
-
} catch (error) {
|
|
9282
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9283
|
-
done(error);
|
|
9284
|
-
}
|
|
9285
|
-
}).timeout(attemptTimeout);
|
|
9286
|
-
});
|
|
9287
|
-
|
|
9288
|
-
describe('#getClientSSLProfileAPIExample - errors', () => {
|
|
9289
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9290
|
-
try {
|
|
9291
|
-
a.getClientSSLProfileAPIExample((data, error) => {
|
|
9292
|
-
try {
|
|
9293
|
-
if (stub) {
|
|
9294
|
-
const displayE = 'Error 400 received on request';
|
|
9295
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9296
|
-
} else {
|
|
9297
|
-
runCommonAsserts(data, error);
|
|
9298
|
-
}
|
|
9299
|
-
saveMockData('SSLManagement', 'getClientSSLProfileAPIExample', 'default', data);
|
|
9300
|
-
done();
|
|
9301
|
-
} catch (err) {
|
|
9302
|
-
log.error(`Test Failure: ${err}`);
|
|
9303
|
-
done(err);
|
|
9304
|
-
}
|
|
9305
|
-
});
|
|
9306
|
-
} catch (error) {
|
|
9307
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9308
|
-
done(error);
|
|
9309
|
-
}
|
|
9310
|
-
}).timeout(attemptTimeout);
|
|
9311
|
-
});
|
|
9312
|
-
|
|
9313
|
-
describe('#uploadSSLCertificate - errors', () => {
|
|
9314
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9315
|
-
try {
|
|
9316
|
-
a.uploadSSLCertificate('fakedata', (data, error) => {
|
|
9317
|
-
try {
|
|
9318
|
-
if (stub) {
|
|
9319
|
-
const displayE = 'Error 400 received on request';
|
|
9320
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9321
|
-
} else {
|
|
9322
|
-
runCommonAsserts(data, error);
|
|
9323
|
-
}
|
|
9324
|
-
saveMockData('SSLManagement', 'uploadSSLCertificate', 'default', data);
|
|
9325
|
-
done();
|
|
9326
|
-
} catch (err) {
|
|
9327
|
-
log.error(`Test Failure: ${err}`);
|
|
9328
|
-
done(err);
|
|
9329
|
-
}
|
|
9330
|
-
});
|
|
9331
|
-
} catch (error) {
|
|
9332
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9333
|
-
done(error);
|
|
9334
|
-
}
|
|
9335
|
-
}).timeout(attemptTimeout);
|
|
9336
|
-
});
|
|
9337
|
-
|
|
9338
|
-
describe('#uploadSSLKey - errors', () => {
|
|
9339
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9340
|
-
try {
|
|
9341
|
-
a.uploadSSLKey('fakedata', (data, error) => {
|
|
9342
|
-
try {
|
|
9343
|
-
if (stub) {
|
|
9344
|
-
const displayE = 'Error 400 received on request';
|
|
9345
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9346
|
-
} else {
|
|
9347
|
-
runCommonAsserts(data, error);
|
|
9348
|
-
}
|
|
9349
|
-
saveMockData('SSLManagement', 'uploadSSLKey', 'default', data);
|
|
9350
|
-
done();
|
|
9351
|
-
} catch (err) {
|
|
9352
|
-
log.error(`Test Failure: ${err}`);
|
|
9353
|
-
done(err);
|
|
9354
|
-
}
|
|
9355
|
-
});
|
|
9356
|
-
} catch (error) {
|
|
9357
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9358
|
-
done(error);
|
|
9359
|
-
}
|
|
9360
|
-
}).timeout(attemptTimeout);
|
|
9361
|
-
});
|
|
9362
|
-
|
|
9363
|
-
const sSLManagementAttachClientSSLProfiletoVirtualServerBodyParam = {
|
|
9364
|
-
name: 'myclientsslprofile'
|
|
9365
|
-
};
|
|
9366
|
-
describe('#attachClientSSLProfiletoVirtualServer - errors', () => {
|
|
9367
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9368
|
-
try {
|
|
9369
|
-
a.attachClientSSLProfiletoVirtualServer(sSLManagementAttachClientSSLProfiletoVirtualServerBodyParam, (data, error) => {
|
|
9370
|
-
try {
|
|
9371
|
-
if (stub) {
|
|
9372
|
-
const displayE = 'Error 400 received on request';
|
|
9373
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9374
|
-
} else {
|
|
9375
|
-
runCommonAsserts(data, error);
|
|
9376
|
-
}
|
|
9377
|
-
saveMockData('SSLManagement', 'attachClientSSLProfiletoVirtualServer', 'default', data);
|
|
9378
|
-
done();
|
|
9379
|
-
} catch (err) {
|
|
9380
|
-
log.error(`Test Failure: ${err}`);
|
|
9381
|
-
done(err);
|
|
9382
|
-
}
|
|
9383
|
-
});
|
|
9384
|
-
} catch (error) {
|
|
9385
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9386
|
-
done(error);
|
|
9387
|
-
}
|
|
9388
|
-
}).timeout(attemptTimeout);
|
|
9389
|
-
});
|
|
9390
|
-
|
|
9391
|
-
describe('#detachClientSSLProfilefromVirtualServer - errors', () => {
|
|
9392
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9393
|
-
try {
|
|
9394
|
-
a.detachClientSSLProfilefromVirtualServer((data, error) => {
|
|
9395
|
-
try {
|
|
9396
|
-
if (stub) {
|
|
9397
|
-
const displayE = 'Error 400 received on request';
|
|
9398
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9399
|
-
} else {
|
|
9400
|
-
runCommonAsserts(data, error);
|
|
9401
|
-
}
|
|
9402
|
-
saveMockData('SSLManagement', 'detachClientSSLProfilefromVirtualServer', 'default', data);
|
|
9403
|
-
done();
|
|
9404
|
-
} catch (err) {
|
|
9405
|
-
log.error(`Test Failure: ${err}`);
|
|
9406
|
-
done(err);
|
|
9407
|
-
}
|
|
9408
|
-
});
|
|
9409
|
-
} catch (error) {
|
|
9410
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9411
|
-
done(error);
|
|
9412
|
-
}
|
|
9413
|
-
}).timeout(attemptTimeout);
|
|
9414
|
-
});
|
|
9415
|
-
|
|
9416
|
-
describe('#deleteClientSSLProfile - errors', () => {
|
|
9417
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9418
|
-
try {
|
|
9419
|
-
a.deleteClientSSLProfile((data, error) => {
|
|
9420
|
-
try {
|
|
9421
|
-
if (stub) {
|
|
9422
|
-
const displayE = 'Error 400 received on request';
|
|
9423
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9424
|
-
} else {
|
|
9425
|
-
runCommonAsserts(data, error);
|
|
9426
|
-
}
|
|
9427
|
-
saveMockData('SSLManagement', 'deleteClientSSLProfile', 'default', data);
|
|
9428
|
-
done();
|
|
9429
|
-
} catch (err) {
|
|
9430
|
-
log.error(`Test Failure: ${err}`);
|
|
9431
|
-
done(err);
|
|
9432
|
-
}
|
|
9433
|
-
});
|
|
9434
|
-
} catch (error) {
|
|
9435
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9436
|
-
done(error);
|
|
9437
|
-
}
|
|
9438
|
-
}).timeout(attemptTimeout);
|
|
9439
|
-
});
|
|
9440
|
-
|
|
9441
|
-
describe('#deleteSSLCertificate - errors', () => {
|
|
9442
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9443
|
-
try {
|
|
9444
|
-
a.deleteSSLCertificate((data, error) => {
|
|
9445
|
-
try {
|
|
9446
|
-
if (stub) {
|
|
9447
|
-
const displayE = 'Error 400 received on request';
|
|
9448
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9449
|
-
} else {
|
|
9450
|
-
runCommonAsserts(data, error);
|
|
9451
|
-
}
|
|
9452
|
-
saveMockData('SSLManagement', 'deleteSSLCertificate', 'default', data);
|
|
9453
|
-
done();
|
|
9454
|
-
} catch (err) {
|
|
9455
|
-
log.error(`Test Failure: ${err}`);
|
|
9456
|
-
done(err);
|
|
9457
|
-
}
|
|
9458
|
-
});
|
|
9459
|
-
} catch (error) {
|
|
9460
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9461
|
-
done(error);
|
|
9462
|
-
}
|
|
9463
|
-
}).timeout(attemptTimeout);
|
|
9464
|
-
});
|
|
9465
|
-
|
|
9466
|
-
describe('#deleteCryptoSSLKey - errors', () => {
|
|
9467
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9468
|
-
try {
|
|
9469
|
-
a.deleteCryptoSSLKey((data, error) => {
|
|
9470
|
-
try {
|
|
9471
|
-
if (stub) {
|
|
9472
|
-
const displayE = 'Error 400 received on request';
|
|
9473
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9474
|
-
} else {
|
|
9475
|
-
runCommonAsserts(data, error);
|
|
9476
|
-
}
|
|
9477
|
-
saveMockData('SSLManagement', 'deleteCryptoSSLKey', 'default', data);
|
|
9478
|
-
done();
|
|
9479
|
-
} catch (err) {
|
|
9480
|
-
log.error(`Test Failure: ${err}`);
|
|
9481
|
-
done(err);
|
|
9482
|
-
}
|
|
9483
|
-
});
|
|
9484
|
-
} catch (error) {
|
|
9485
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9486
|
-
done(error);
|
|
9487
|
-
}
|
|
9488
|
-
}).timeout(attemptTimeout);
|
|
9489
|
-
});
|
|
9490
|
-
|
|
9491
|
-
const configurationSaveConfigurationBodyParam = {
|
|
9492
|
-
command: 'save'
|
|
9493
|
-
};
|
|
9494
|
-
describe('#saveConfiguration - errors', () => {
|
|
9495
|
-
it('should work if integrated but since no mockdata should error when run standalone', (done) => {
|
|
9496
|
-
try {
|
|
9497
|
-
a.saveConfiguration(configurationSaveConfigurationBodyParam, (data, error) => {
|
|
9498
|
-
try {
|
|
9499
|
-
if (stub) {
|
|
9500
|
-
const displayE = 'Error 400 received on request';
|
|
9501
|
-
runErrorAsserts(data, error, 'AD.500', 'Test-f5_bigiq-connectorRest-handleEndResponse', displayE);
|
|
9502
|
-
} else {
|
|
9503
|
-
runCommonAsserts(data, error);
|
|
9504
|
-
}
|
|
9505
|
-
saveMockData('Configuration', 'saveConfiguration', 'default', data);
|
|
9506
|
-
done();
|
|
9507
|
-
} catch (err) {
|
|
9508
|
-
log.error(`Test Failure: ${err}`);
|
|
9509
|
-
done(err);
|
|
9510
|
-
}
|
|
9511
|
-
});
|
|
9512
|
-
} catch (error) {
|
|
9513
|
-
log.error(`Adapter Exception: ${error}`);
|
|
9514
|
-
done(error);
|
|
9515
|
-
}
|
|
9516
|
-
}).timeout(attemptTimeout);
|
|
9517
|
-
});
|
|
9518
8916
|
});
|
|
9519
8917
|
});
|