@itentialopensource/adapter-openstack_cinder 0.1.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.
Files changed (130) hide show
  1. package/.eslintignore +5 -0
  2. package/.eslintrc.js +18 -0
  3. package/.jshintrc +3 -0
  4. package/AUTH.md +43 -0
  5. package/BROKER.md +199 -0
  6. package/CALLS.md +1118 -0
  7. package/CHANGELOG.md +9 -0
  8. package/CODE_OF_CONDUCT.md +43 -0
  9. package/CONTRIBUTING.md +172 -0
  10. package/ENHANCE.md +69 -0
  11. package/LICENSE +201 -0
  12. package/PROPERTIES.md +641 -0
  13. package/README.md +337 -0
  14. package/SUMMARY.md +9 -0
  15. package/SYSTEMINFO.md +11 -0
  16. package/TROUBLESHOOT.md +47 -0
  17. package/adapter.js +20288 -0
  18. package/adapterBase.js +1788 -0
  19. package/entities/.generic/action.json +214 -0
  20. package/entities/.generic/schema.json +28 -0
  21. package/entities/.system/action.json +50 -0
  22. package/entities/.system/mockdatafiles/getToken-default.json +242 -0
  23. package/entities/.system/mockdatafiles/healthcheck-default.json +3 -0
  24. package/entities/.system/schema.json +19 -0
  25. package/entities/.system/schemaTokenReq.json +53 -0
  26. package/entities/.system/schemaTokenResp.json +49 -0
  27. package/entities/APIExtensionsExtensions/action.json +25 -0
  28. package/entities/APIExtensionsExtensions/schema.json +30 -0
  29. package/entities/APIVersionDetails/action.json +25 -0
  30. package/entities/APIVersionDetails/schema.json +19 -0
  31. package/entities/APIVersions/action.json +25 -0
  32. package/entities/APIVersions/schema.json +19 -0
  33. package/entities/AttachmentsAttachments/action.json +147 -0
  34. package/entities/AttachmentsAttachments/schema.json +58 -0
  35. package/entities/BackEndStoragePools/action.json +25 -0
  36. package/entities/BackEndStoragePools/schema.json +30 -0
  37. package/entities/BackupActionsBackupsAction/action.json +24 -0
  38. package/entities/BackupActionsBackupsAction/schema.json +41 -0
  39. package/entities/BackupsBackups/action.json +188 -0
  40. package/entities/BackupsBackups/schema.json +71 -0
  41. package/entities/CapabilitiesForStorageBackEndsCapabilities/action.json +25 -0
  42. package/entities/CapabilitiesForStorageBackEndsCapabilities/schema.json +30 -0
  43. package/entities/ConsistencyGroupSnapshotsDEPRECATED/action.json +107 -0
  44. package/entities/ConsistencyGroupSnapshotsDEPRECATED/schema.json +56 -0
  45. package/entities/ConsistencyGroupsDEPRECATED/action.json +147 -0
  46. package/entities/ConsistencyGroupsDEPRECATED/schema.json +58 -0
  47. package/entities/DefaultVolumeTypesDefaultTypes/action.json +86 -0
  48. package/entities/DefaultVolumeTypesDefaultTypes/schema.json +33 -0
  49. package/entities/GenericVolumeGroupsGroups/action.json +147 -0
  50. package/entities/GenericVolumeGroupsGroups/schema.json +69 -0
  51. package/entities/GroupSnapshotsGroupSnapshots/action.json +127 -0
  52. package/entities/GroupSnapshotsGroupSnapshots/schema.json +79 -0
  53. package/entities/GroupTypeSpecsGroupTypesGroupSpecs/action.json +106 -0
  54. package/entities/GroupTypeSpecsGroupTypesGroupSpecs/schema.json +56 -0
  55. package/entities/GroupTypesGroupTypes/action.json +127 -0
  56. package/entities/GroupTypesGroupTypes/schema.json +46 -0
  57. package/entities/HostsExtensionOsHosts/action.json +46 -0
  58. package/entities/HostsExtensionOsHosts/schema.json +42 -0
  59. package/entities/LimitsLimits/action.json +25 -0
  60. package/entities/LimitsLimits/schema.json +30 -0
  61. package/entities/MessagesMessages/action.json +66 -0
  62. package/entities/MessagesMessages/schema.json +43 -0
  63. package/entities/QualityOfServiceQoSSpecificationsQosSpecs/action.json +210 -0
  64. package/entities/QualityOfServiceQoSSpecificationsQosSpecs/schema.json +61 -0
  65. package/entities/QuotaClassSetExtensionOsQuotaClassSets/action.json +45 -0
  66. package/entities/QuotaClassSetExtensionOsQuotaClassSets/schema.json +42 -0
  67. package/entities/QuotaSetsExtensionOsQuotaSets/action.json +86 -0
  68. package/entities/QuotaSetsExtensionOsQuotaSets/schema.json +44 -0
  69. package/entities/ResourceFiltersResourceFilters/action.json +25 -0
  70. package/entities/ResourceFiltersResourceFilters/schema.json +30 -0
  71. package/entities/ServicesOsServices/action.json +185 -0
  72. package/entities/ServicesOsServices/schema.json +38 -0
  73. package/entities/SnapshotActionsSnapshotsAction/action.json +24 -0
  74. package/entities/SnapshotActionsSnapshotsAction/schema.json +41 -0
  75. package/entities/SnapshotManageExtensionManageableSnapshots/action.json +66 -0
  76. package/entities/SnapshotManageExtensionManageableSnapshots/schema.json +32 -0
  77. package/entities/VolumeActionsVolumesAction/action.json +24 -0
  78. package/entities/VolumeActionsVolumesAction/schema.json +41 -0
  79. package/entities/VolumeManageExtensionManageableVolumes/action.json +66 -0
  80. package/entities/VolumeManageExtensionManageableVolumes/schema.json +32 -0
  81. package/entities/VolumeSnapshotsSnapshots/action.json +249 -0
  82. package/entities/VolumeSnapshotsSnapshots/schema.json +85 -0
  83. package/entities/VolumeTransfer/action.json +127 -0
  84. package/entities/VolumeTransfer/schema.json +57 -0
  85. package/entities/VolumeTransfersVolumeTransfers355OrLater/action.json +127 -0
  86. package/entities/VolumeTransfersVolumeTransfers355OrLater/schema.json +79 -0
  87. package/entities/VolumeTypeAccessTypesActionTypesOsVolumeTypeAccess/action.json +45 -0
  88. package/entities/VolumeTypeAccessTypesActionTypesOsVolumeTypeAccess/schema.json +42 -0
  89. package/entities/VolumeTypesTypes/action.json +331 -0
  90. package/entities/VolumeTypesTypes/schema.json +78 -0
  91. package/entities/VolumesVolumes/action.json +270 -0
  92. package/entities/VolumesVolumes/schema.json +108 -0
  93. package/entities/WorkersWorkers/action.json +24 -0
  94. package/entities/WorkersWorkers/schema.json +30 -0
  95. package/error.json +190 -0
  96. package/package.json +87 -0
  97. package/pronghorn.json +10093 -0
  98. package/propertiesDecorators.json +14 -0
  99. package/propertiesSchema.json +1284 -0
  100. package/refs?service=git-upload-pack +0 -0
  101. package/report/adapterInfo.json +10 -0
  102. package/report/cinder-openapi.json +8589 -0
  103. package/report/creationReport.json +1495 -0
  104. package/sampleProperties.json +198 -0
  105. package/swagger/openstack_API_docs/BlockStorageAPIV3-cinder-documentation.html +32674 -0
  106. package/swagger/openstack_api_cinder.js +602 -0
  107. package/test/integration/adapterTestBasicGet.js +85 -0
  108. package/test/integration/adapterTestConnectivity.js +93 -0
  109. package/test/integration/adapterTestIntegration.js +4799 -0
  110. package/test/unit/adapterBaseTestUnit.js +952 -0
  111. package/test/unit/adapterTestUnit.js +7633 -0
  112. package/utils/adapterInfo.js +206 -0
  113. package/utils/addAuth.js +94 -0
  114. package/utils/artifactize.js +146 -0
  115. package/utils/basicGet.js +50 -0
  116. package/utils/checkMigrate.js +63 -0
  117. package/utils/entitiesToDB.js +179 -0
  118. package/utils/findPath.js +74 -0
  119. package/utils/methodDocumentor.js +225 -0
  120. package/utils/modify.js +154 -0
  121. package/utils/packModificationScript.js +35 -0
  122. package/utils/patches2bundledDeps.js +90 -0
  123. package/utils/pre-commit.sh +32 -0
  124. package/utils/removeHooks.js +20 -0
  125. package/utils/setup.js +33 -0
  126. package/utils/tbScript.js +184 -0
  127. package/utils/tbUtils.js +469 -0
  128. package/utils/testRunner.js +298 -0
  129. package/utils/troubleshootingAdapter.js +190 -0
  130. package/workflows/README.md +3 -0
@@ -0,0 +1,4799 @@
1
+ /* @copyright Itential, LLC 2019 (pre-modifications) */
2
+
3
+ // Set globals
4
+ /* global describe it log pronghornProps */
5
+ /* eslint no-unused-vars: warn */
6
+ /* eslint no-underscore-dangle: warn */
7
+ /* eslint import/no-dynamic-require:warn */
8
+
9
+ // include required items for testing & logging
10
+ const assert = require('assert');
11
+ const fs = require('fs');
12
+ const mocha = require('mocha');
13
+ const path = require('path');
14
+ const winston = require('winston');
15
+ const { expect } = require('chai');
16
+ const { use } = require('chai');
17
+ const td = require('testdouble');
18
+ const util = require('util');
19
+
20
+ const anything = td.matchers.anything();
21
+
22
+ // stub and attemptTimeout are used throughout the code so set them here
23
+ let logLevel = 'none';
24
+ const isRapidFail = false;
25
+ const isSaveMockData = false;
26
+
27
+ // read in the properties from the sampleProperties files
28
+ let adaptdir = __dirname;
29
+ if (adaptdir.endsWith('/test/integration')) {
30
+ adaptdir = adaptdir.substring(0, adaptdir.length - 17);
31
+ } else if (adaptdir.endsWith('/test/unit')) {
32
+ adaptdir = adaptdir.substring(0, adaptdir.length - 10);
33
+ }
34
+ const samProps = require(`${adaptdir}/sampleProperties.json`).properties;
35
+
36
+ // these variables can be changed to run in integrated mode so easier to set them here
37
+ // always check these in with bogus data!!!
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;
46
+ if (samProps.request.attempt_timeout < 30000) {
47
+ samProps.request.attempt_timeout = 30000;
48
+ }
49
+ const attemptTimeout = samProps.request.attempt_timeout;
50
+ const { stub } = samProps;
51
+
52
+ // these are the adapter properties. You generally should not need to alter
53
+ // any of these after they are initially set up
54
+ global.pronghornProps = {
55
+ pathProps: {
56
+ encrypted: false
57
+ },
58
+ adapterProps: {
59
+ adapters: [{
60
+ id: 'Test-openstack_cinder',
61
+ type: 'OpenstackCinder',
62
+ properties: samProps
63
+ }]
64
+ }
65
+ };
66
+
67
+ global.$HOME = `${__dirname}/../..`;
68
+
69
+ // set the log levels that Pronghorn uses, spam and trace are not defaulted in so without
70
+ // this you may error on log.trace calls.
71
+ const myCustomLevels = {
72
+ levels: {
73
+ spam: 6,
74
+ trace: 5,
75
+ debug: 4,
76
+ info: 3,
77
+ warn: 2,
78
+ error: 1,
79
+ none: 0
80
+ }
81
+ };
82
+
83
+ // need to see if there is a log level passed in
84
+ process.argv.forEach((val) => {
85
+ // is there a log level defined to be passed in?
86
+ if (val.indexOf('--LOG') === 0) {
87
+ // get the desired log level
88
+ const inputVal = val.split('=')[1];
89
+
90
+ // validate the log level is supported, if so set it
91
+ if (Object.hasOwnProperty.call(myCustomLevels.levels, inputVal)) {
92
+ logLevel = inputVal;
93
+ }
94
+ }
95
+ });
96
+
97
+ // need to set global logging
98
+ global.log = winston.createLogger({
99
+ level: logLevel,
100
+ levels: myCustomLevels.levels,
101
+ transports: [
102
+ new winston.transports.Console()
103
+ ]
104
+ });
105
+
106
+ /**
107
+ * Runs the common asserts for test
108
+ */
109
+ function runCommonAsserts(data, error) {
110
+ assert.equal(undefined, error);
111
+ assert.notEqual(undefined, data);
112
+ assert.notEqual(null, data);
113
+ assert.notEqual(undefined, data.response);
114
+ assert.notEqual(null, data.response);
115
+ }
116
+
117
+ /**
118
+ * Runs the error asserts for the test
119
+ */
120
+ function runErrorAsserts(data, error, code, origin, displayStr) {
121
+ assert.equal(null, data);
122
+ assert.notEqual(undefined, error);
123
+ assert.notEqual(null, error);
124
+ assert.notEqual(undefined, error.IAPerror);
125
+ assert.notEqual(null, error.IAPerror);
126
+ assert.notEqual(undefined, error.IAPerror.displayString);
127
+ assert.notEqual(null, error.IAPerror.displayString);
128
+ assert.equal(code, error.icode);
129
+ assert.equal(origin, error.IAPerror.origin);
130
+ assert.equal(displayStr, error.IAPerror.displayString);
131
+ }
132
+
133
+ /**
134
+ * @function saveMockData
135
+ * Attempts to take data from responses and place them in MockDataFiles to help create Mockdata.
136
+ * Note, this was built based on entity file structure for Adapter-Engine 1.6.x
137
+ * @param {string} entityName - Name of the entity saving mock data for
138
+ * @param {string} actionName - Name of the action saving mock data for
139
+ * @param {string} descriptor - Something to describe this test (used as a type)
140
+ * @param {string or object} responseData - The data to put in the mock file.
141
+ */
142
+ function saveMockData(entityName, actionName, descriptor, responseData) {
143
+ // do not need to save mockdata if we are running in stub mode (already has mock data) or if told not to save
144
+ if (stub || !isSaveMockData) {
145
+ return false;
146
+ }
147
+
148
+ // must have a response in order to store the response
149
+ if (responseData && responseData.response) {
150
+ let data = responseData.response;
151
+
152
+ // if there was a raw response that one is better as it is untranslated
153
+ if (responseData.raw) {
154
+ data = responseData.raw;
155
+
156
+ try {
157
+ const temp = JSON.parse(data);
158
+ data = temp;
159
+ } catch (pex) {
160
+ // do not care if it did not parse as we will just use data
161
+ }
162
+ }
163
+
164
+ try {
165
+ const base = path.join(__dirname, `../../entities/${entityName}/`);
166
+ const mockdatafolder = 'mockdatafiles';
167
+ const filename = `mockdatafiles/${actionName}-${descriptor}.json`;
168
+
169
+ if (!fs.existsSync(base + mockdatafolder)) {
170
+ fs.mkdirSync(base + mockdatafolder);
171
+ }
172
+
173
+ // write the data we retrieved
174
+ fs.writeFile(base + filename, JSON.stringify(data, null, 2), 'utf8', (errWritingMock) => {
175
+ if (errWritingMock) throw errWritingMock;
176
+
177
+ // update the action file to reflect the changes. Note: We're replacing the default object for now!
178
+ fs.readFile(`${base}action.json`, (errRead, content) => {
179
+ if (errRead) throw errRead;
180
+
181
+ // parse the action file into JSON
182
+ const parsedJson = JSON.parse(content);
183
+
184
+ // The object update we'll write in.
185
+ const responseObj = {
186
+ type: descriptor,
187
+ key: '',
188
+ mockFile: filename
189
+ };
190
+
191
+ // get the object for method we're trying to change.
192
+ const currentMethodAction = parsedJson.actions.find((obj) => obj.name === actionName);
193
+
194
+ // if the method was not found - should never happen but...
195
+ if (!currentMethodAction) {
196
+ throw Error('Can\'t find an action for this method in the provided entity.');
197
+ }
198
+
199
+ // if there is a response object, we want to replace the Response object. Otherwise we'll create one.
200
+ const actionResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === descriptor);
201
+
202
+ // Add the action responseObj back into the array of response objects.
203
+ if (!actionResponseObj) {
204
+ // if there is a default response object, we want to get the key.
205
+ const defaultResponseObj = currentMethodAction.responseObjects.find((obj) => obj.type === 'default');
206
+
207
+ // save the default key into the new response object
208
+ if (defaultResponseObj) {
209
+ responseObj.key = defaultResponseObj.key;
210
+ }
211
+
212
+ // save the new response object
213
+ currentMethodAction.responseObjects = [responseObj];
214
+ } else {
215
+ // update the location of the mock data file
216
+ actionResponseObj.mockFile = responseObj.mockFile;
217
+ }
218
+
219
+ // Save results
220
+ fs.writeFile(`${base}action.json`, JSON.stringify(parsedJson, null, 2), (err) => {
221
+ if (err) throw err;
222
+ });
223
+ });
224
+ });
225
+ } catch (e) {
226
+ log.debug(`Failed to save mock data for ${actionName}. ${e.message}`);
227
+ return false;
228
+ }
229
+ }
230
+
231
+ // no response to save
232
+ log.debug(`No data passed to save into mockdata for ${actionName}`);
233
+ return false;
234
+ }
235
+
236
+ // require the adapter that we are going to be using
237
+ const OpenstackCinder = require('../../adapter');
238
+
239
+ // begin the testing - these should be pretty well defined between the describe and the it!
240
+ describe('[integration] Openstack_cinder Adapter Test', () => {
241
+ describe('OpenstackCinder Class Tests', () => {
242
+ const a = new OpenstackCinder(
243
+ pronghornProps.adapterProps.adapters[0].id,
244
+ pronghornProps.adapterProps.adapters[0].properties
245
+ );
246
+
247
+ if (isRapidFail) {
248
+ const state = {};
249
+ state.passed = true;
250
+
251
+ mocha.afterEach(function x() {
252
+ state.passed = state.passed
253
+ && (this.currentTest.state === 'passed');
254
+ });
255
+ mocha.beforeEach(function x() {
256
+ if (!state.passed) {
257
+ return this.currentTest.skip();
258
+ }
259
+ return true;
260
+ });
261
+ }
262
+
263
+ describe('#class instance created', () => {
264
+ it('should be a class with properties', (done) => {
265
+ try {
266
+ assert.notEqual(null, a);
267
+ assert.notEqual(undefined, a);
268
+ const checkId = global.pronghornProps.adapterProps.adapters[0].id;
269
+ assert.equal(checkId, a.id);
270
+ assert.notEqual(null, a.allProps);
271
+ const check = global.pronghornProps.adapterProps.adapters[0].properties.healthcheck.type;
272
+ assert.equal(check, a.healthcheckType);
273
+ done();
274
+ } catch (error) {
275
+ log.error(`Test Failure: ${error}`);
276
+ done(error);
277
+ }
278
+ }).timeout(attemptTimeout);
279
+ });
280
+
281
+ describe('#connect', () => {
282
+ it('should get connected - no healthcheck', (done) => {
283
+ try {
284
+ a.healthcheckType = 'none';
285
+ a.connect();
286
+
287
+ try {
288
+ assert.equal(true, a.alive);
289
+ done();
290
+ } catch (error) {
291
+ log.error(`Test Failure: ${error}`);
292
+ done(error);
293
+ }
294
+ } catch (error) {
295
+ log.error(`Adapter Exception: ${error}`);
296
+ done(error);
297
+ }
298
+ });
299
+ it('should get connected - startup healthcheck', (done) => {
300
+ try {
301
+ a.healthcheckType = 'startup';
302
+ a.connect();
303
+
304
+ try {
305
+ assert.equal(true, a.alive);
306
+ done();
307
+ } catch (error) {
308
+ log.error(`Test Failure: ${error}`);
309
+ done(error);
310
+ }
311
+ } catch (error) {
312
+ log.error(`Adapter Exception: ${error}`);
313
+ done(error);
314
+ }
315
+ });
316
+ });
317
+
318
+ describe('#healthCheck', () => {
319
+ it('should be healthy', (done) => {
320
+ try {
321
+ a.healthCheck(null, (data) => {
322
+ try {
323
+ assert.equal(true, a.healthy);
324
+ saveMockData('system', 'healthcheck', 'default', data);
325
+ done();
326
+ } catch (err) {
327
+ log.error(`Test Failure: ${err}`);
328
+ done(err);
329
+ }
330
+ });
331
+ } catch (error) {
332
+ log.error(`Adapter Exception: ${error}`);
333
+ done(error);
334
+ }
335
+ }).timeout(attemptTimeout);
336
+ });
337
+
338
+ /*
339
+ -----------------------------------------------------------------------
340
+ -----------------------------------------------------------------------
341
+ *** All code above this comment will be replaced during a migration ***
342
+ ******************* DO NOT REMOVE THIS COMMENT BLOCK ******************
343
+ -----------------------------------------------------------------------
344
+ -----------------------------------------------------------------------
345
+ */
346
+
347
+ describe('#listAllApiVersions - errors', () => {
348
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
349
+ try {
350
+ a.listAllApiVersions((data, error) => {
351
+ try {
352
+ if (stub) {
353
+ const displayE = 'Error 400 received on request';
354
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
355
+ } else {
356
+ runCommonAsserts(data, error);
357
+ }
358
+ saveMockData('APIVersions', 'listAllApiVersions', 'default', data);
359
+ done();
360
+ } catch (err) {
361
+ log.error(`Test Failure: ${err}`);
362
+ done(err);
363
+ }
364
+ });
365
+ } catch (error) {
366
+ log.error(`Adapter Exception: ${error}`);
367
+ done(error);
368
+ }
369
+ }).timeout(attemptTimeout);
370
+ });
371
+
372
+ describe('#showAPIV3Details - errors', () => {
373
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
374
+ try {
375
+ a.showAPIV3Details((data, error) => {
376
+ try {
377
+ if (stub) {
378
+ const displayE = 'Error 400 received on request';
379
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
380
+ } else {
381
+ runCommonAsserts(data, error);
382
+ }
383
+ saveMockData('APIVersionDetails', 'showAPIV3Details', 'default', data);
384
+ done();
385
+ } catch (err) {
386
+ log.error(`Test Failure: ${err}`);
387
+ done(err);
388
+ }
389
+ });
390
+ } catch (error) {
391
+ log.error(`Adapter Exception: ${error}`);
392
+ done(error);
393
+ }
394
+ }).timeout(attemptTimeout);
395
+ });
396
+
397
+ const aPIExtensionsExtensionsProjectId = 'fakedata';
398
+ describe('#listKnownAPIExtensions - errors', () => {
399
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
400
+ try {
401
+ a.listKnownAPIExtensions(aPIExtensionsExtensionsProjectId, (data, error) => {
402
+ try {
403
+ if (stub) {
404
+ const displayE = 'Error 400 received on request';
405
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
406
+ } else {
407
+ runCommonAsserts(data, error);
408
+ }
409
+ saveMockData('APIExtensionsExtensions', 'listKnownAPIExtensions', 'default', data);
410
+ done();
411
+ } catch (err) {
412
+ log.error(`Test Failure: ${err}`);
413
+ done(err);
414
+ }
415
+ });
416
+ } catch (error) {
417
+ log.error(`Adapter Exception: ${error}`);
418
+ done(error);
419
+ }
420
+ }).timeout(attemptTimeout);
421
+ });
422
+
423
+ const volumeTypesTypesProjectId = 'fakedata';
424
+ const volumeTypesTypesCreateAVolumeTypeBodyParam = {
425
+ volume_type: {
426
+ name: 'string',
427
+ description: 'string',
428
+ 'os-volume-type-access:is_public': true,
429
+ extra_specs: {
430
+ capabilities: 'string'
431
+ }
432
+ }
433
+ };
434
+ describe('#createAVolumeType - errors', () => {
435
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
436
+ try {
437
+ a.createAVolumeType(volumeTypesTypesProjectId, volumeTypesTypesCreateAVolumeTypeBodyParam, (data, error) => {
438
+ try {
439
+ if (stub) {
440
+ const displayE = 'Error 400 received on request';
441
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
442
+ } else {
443
+ runCommonAsserts(data, error);
444
+ }
445
+ saveMockData('VolumeTypesTypes', 'createAVolumeType', 'default', data);
446
+ done();
447
+ } catch (err) {
448
+ log.error(`Test Failure: ${err}`);
449
+ done(err);
450
+ }
451
+ });
452
+ } catch (error) {
453
+ log.error(`Adapter Exception: ${error}`);
454
+ done(error);
455
+ }
456
+ }).timeout(attemptTimeout);
457
+ });
458
+
459
+ const volumeTypesTypesVolumeTypeId = 'fakedata';
460
+ const volumeTypesTypesCreateAnEncryptionTypeBodyParam = {
461
+ encryption: {
462
+ key_size: 2,
463
+ provider: 'string',
464
+ control_location: 'string',
465
+ cipher: 'string'
466
+ }
467
+ };
468
+ describe('#createAnEncryptionType - errors', () => {
469
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
470
+ try {
471
+ a.createAnEncryptionType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesCreateAnEncryptionTypeBodyParam, (data, error) => {
472
+ try {
473
+ if (stub) {
474
+ const displayE = 'Error 400 received on request';
475
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
476
+ } else {
477
+ runCommonAsserts(data, error);
478
+ }
479
+ saveMockData('VolumeTypesTypes', 'createAnEncryptionType', 'default', data);
480
+ done();
481
+ } catch (err) {
482
+ log.error(`Test Failure: ${err}`);
483
+ done(err);
484
+ }
485
+ });
486
+ } catch (error) {
487
+ log.error(`Adapter Exception: ${error}`);
488
+ done(error);
489
+ }
490
+ }).timeout(attemptTimeout);
491
+ });
492
+
493
+ const volumeTypesTypesCreateOrUpdateExtraSpecsForVolumeTypeBodyParam = {
494
+ extra_specs: {
495
+ key1: 'string',
496
+ key2: 'string'
497
+ }
498
+ };
499
+ describe('#createOrUpdateExtraSpecsForVolumeType - errors', () => {
500
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
501
+ try {
502
+ a.createOrUpdateExtraSpecsForVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesCreateOrUpdateExtraSpecsForVolumeTypeBodyParam, (data, error) => {
503
+ try {
504
+ if (stub) {
505
+ const displayE = 'Error 400 received on request';
506
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
507
+ } else {
508
+ runCommonAsserts(data, error);
509
+ }
510
+ saveMockData('VolumeTypesTypes', 'createOrUpdateExtraSpecsForVolumeType', 'default', data);
511
+ done();
512
+ } catch (err) {
513
+ log.error(`Test Failure: ${err}`);
514
+ done(err);
515
+ }
516
+ });
517
+ } catch (error) {
518
+ log.error(`Adapter Exception: ${error}`);
519
+ done(error);
520
+ }
521
+ }).timeout(attemptTimeout);
522
+ });
523
+
524
+ describe('#listAllVolumeTypes - errors', () => {
525
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
526
+ try {
527
+ a.listAllVolumeTypes(null, null, null, null, null, volumeTypesTypesProjectId, (data, error) => {
528
+ try {
529
+ if (stub) {
530
+ const displayE = 'Error 400 received on request';
531
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
532
+ } else {
533
+ runCommonAsserts(data, error);
534
+ }
535
+ saveMockData('VolumeTypesTypes', 'listAllVolumeTypes', 'default', data);
536
+ done();
537
+ } catch (err) {
538
+ log.error(`Test Failure: ${err}`);
539
+ done(err);
540
+ }
541
+ });
542
+ } catch (error) {
543
+ log.error(`Adapter Exception: ${error}`);
544
+ done(error);
545
+ }
546
+ }).timeout(attemptTimeout);
547
+ });
548
+
549
+ describe('#showDefaultVolumeType - errors', () => {
550
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
551
+ try {
552
+ a.showDefaultVolumeType(volumeTypesTypesProjectId, (data, error) => {
553
+ try {
554
+ if (stub) {
555
+ const displayE = 'Error 400 received on request';
556
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
557
+ } else {
558
+ runCommonAsserts(data, error);
559
+ }
560
+ saveMockData('VolumeTypesTypes', 'showDefaultVolumeType', 'default', data);
561
+ done();
562
+ } catch (err) {
563
+ log.error(`Test Failure: ${err}`);
564
+ done(err);
565
+ }
566
+ });
567
+ } catch (error) {
568
+ log.error(`Adapter Exception: ${error}`);
569
+ done(error);
570
+ }
571
+ }).timeout(attemptTimeout);
572
+ });
573
+
574
+ const volumeTypesTypesUpdateAVolumeTypeBodyParam = {
575
+ volume_type: {
576
+ name: 'string',
577
+ description: 'string',
578
+ is_public: true
579
+ }
580
+ };
581
+ describe('#updateAVolumeType - errors', () => {
582
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
583
+ try {
584
+ a.updateAVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesUpdateAVolumeTypeBodyParam, (data, error) => {
585
+ try {
586
+ if (stub) {
587
+ const displayE = 'Error 400 received on request';
588
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
589
+ } else {
590
+ runCommonAsserts(data, error);
591
+ }
592
+ saveMockData('VolumeTypesTypes', 'updateAVolumeType', 'default', data);
593
+ done();
594
+ } catch (err) {
595
+ log.error(`Test Failure: ${err}`);
596
+ done(err);
597
+ }
598
+ });
599
+ } catch (error) {
600
+ log.error(`Adapter Exception: ${error}`);
601
+ done(error);
602
+ }
603
+ }).timeout(attemptTimeout);
604
+ });
605
+
606
+ describe('#showVolumeTypeDetail - errors', () => {
607
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
608
+ try {
609
+ a.showVolumeTypeDetail(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, (data, error) => {
610
+ try {
611
+ if (stub) {
612
+ const displayE = 'Error 400 received on request';
613
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
614
+ } else {
615
+ runCommonAsserts(data, error);
616
+ }
617
+ saveMockData('VolumeTypesTypes', 'showVolumeTypeDetail', 'default', data);
618
+ done();
619
+ } catch (err) {
620
+ log.error(`Test Failure: ${err}`);
621
+ done(err);
622
+ }
623
+ });
624
+ } catch (error) {
625
+ log.error(`Adapter Exception: ${error}`);
626
+ done(error);
627
+ }
628
+ }).timeout(attemptTimeout);
629
+ });
630
+
631
+ describe('#showAnEncryptionType - errors', () => {
632
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
633
+ try {
634
+ a.showAnEncryptionType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, (data, error) => {
635
+ try {
636
+ if (stub) {
637
+ const displayE = 'Error 400 received on request';
638
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
639
+ } else {
640
+ runCommonAsserts(data, error);
641
+ }
642
+ saveMockData('VolumeTypesTypes', 'showAnEncryptionType', 'default', data);
643
+ done();
644
+ } catch (err) {
645
+ log.error(`Test Failure: ${err}`);
646
+ done(err);
647
+ }
648
+ });
649
+ } catch (error) {
650
+ log.error(`Adapter Exception: ${error}`);
651
+ done(error);
652
+ }
653
+ }).timeout(attemptTimeout);
654
+ });
655
+
656
+ const volumeTypesTypesEncryptionId = 'fakedata';
657
+ const volumeTypesTypesUpdateAnEncryptionTypeBodyParam = {
658
+ encryption: {
659
+ key_size: 10,
660
+ provider: 'string',
661
+ control_location: 'string',
662
+ cipher: 'string'
663
+ }
664
+ };
665
+ describe('#updateAnEncryptionType - errors', () => {
666
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
667
+ try {
668
+ a.updateAnEncryptionType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesEncryptionId, volumeTypesTypesUpdateAnEncryptionTypeBodyParam, (data, error) => {
669
+ try {
670
+ if (stub) {
671
+ const displayE = 'Error 400 received on request';
672
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
673
+ } else {
674
+ runCommonAsserts(data, error);
675
+ }
676
+ saveMockData('VolumeTypesTypes', 'updateAnEncryptionType', 'default', data);
677
+ done();
678
+ } catch (err) {
679
+ log.error(`Test Failure: ${err}`);
680
+ done(err);
681
+ }
682
+ });
683
+ } catch (error) {
684
+ log.error(`Adapter Exception: ${error}`);
685
+ done(error);
686
+ }
687
+ }).timeout(attemptTimeout);
688
+ });
689
+
690
+ const volumeTypesTypesKey = 'fakedata';
691
+ describe('#showEncryptionSpecsItem - errors', () => {
692
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
693
+ try {
694
+ a.showEncryptionSpecsItem(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesKey, (data, error) => {
695
+ try {
696
+ if (stub) {
697
+ const displayE = 'Error 400 received on request';
698
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
699
+ } else {
700
+ runCommonAsserts(data, error);
701
+ }
702
+ saveMockData('VolumeTypesTypes', 'showEncryptionSpecsItem', 'default', data);
703
+ done();
704
+ } catch (err) {
705
+ log.error(`Test Failure: ${err}`);
706
+ done(err);
707
+ }
708
+ });
709
+ } catch (error) {
710
+ log.error(`Adapter Exception: ${error}`);
711
+ done(error);
712
+ }
713
+ }).timeout(attemptTimeout);
714
+ });
715
+
716
+ describe('#showAllExtraSpecificationsForVolumeType - errors', () => {
717
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
718
+ try {
719
+ a.showAllExtraSpecificationsForVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, (data, error) => {
720
+ try {
721
+ if (stub) {
722
+ const displayE = 'Error 400 received on request';
723
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
724
+ } else {
725
+ runCommonAsserts(data, error);
726
+ }
727
+ saveMockData('VolumeTypesTypes', 'showAllExtraSpecificationsForVolumeType', 'default', data);
728
+ done();
729
+ } catch (err) {
730
+ log.error(`Test Failure: ${err}`);
731
+ done(err);
732
+ }
733
+ });
734
+ } catch (error) {
735
+ log.error(`Adapter Exception: ${error}`);
736
+ done(error);
737
+ }
738
+ }).timeout(attemptTimeout);
739
+ });
740
+
741
+ const volumeTypesTypesUpdateExtraSpecificationForVolumeTypeBodyParam = {
742
+ key1: 'string'
743
+ };
744
+ describe('#updateExtraSpecificationForVolumeType - errors', () => {
745
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
746
+ try {
747
+ a.updateExtraSpecificationForVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesKey, volumeTypesTypesUpdateExtraSpecificationForVolumeTypeBodyParam, (data, error) => {
748
+ try {
749
+ if (stub) {
750
+ const displayE = 'Error 400 received on request';
751
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
752
+ } else {
753
+ runCommonAsserts(data, error);
754
+ }
755
+ saveMockData('VolumeTypesTypes', 'updateExtraSpecificationForVolumeType', 'default', data);
756
+ done();
757
+ } catch (err) {
758
+ log.error(`Test Failure: ${err}`);
759
+ done(err);
760
+ }
761
+ });
762
+ } catch (error) {
763
+ log.error(`Adapter Exception: ${error}`);
764
+ done(error);
765
+ }
766
+ }).timeout(attemptTimeout);
767
+ });
768
+
769
+ describe('#showExtraSpecificationForVolumeType - errors', () => {
770
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
771
+ try {
772
+ a.showExtraSpecificationForVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesKey, (data, error) => {
773
+ try {
774
+ if (stub) {
775
+ const displayE = 'Error 400 received on request';
776
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
777
+ } else {
778
+ runCommonAsserts(data, error);
779
+ }
780
+ saveMockData('VolumeTypesTypes', 'showExtraSpecificationForVolumeType', 'default', data);
781
+ done();
782
+ } catch (err) {
783
+ log.error(`Test Failure: ${err}`);
784
+ done(err);
785
+ }
786
+ });
787
+ } catch (error) {
788
+ log.error(`Adapter Exception: ${error}`);
789
+ done(error);
790
+ }
791
+ }).timeout(attemptTimeout);
792
+ });
793
+
794
+ const volumeTypeAccessTypesActionTypesOsVolumeTypeAccessProjectId = 'fakedata';
795
+ const volumeTypeAccessTypesActionTypesOsVolumeTypeAccessVolumeType = 'fakedata';
796
+ const volumeTypeAccessTypesActionTypesOsVolumeTypeAccessAddPrivateVolumeTypeAccessToProjectBodyParam = {
797
+ addProjectAccess: {
798
+ project: 'string'
799
+ }
800
+ };
801
+ describe('#addPrivateVolumeTypeAccessToProject - errors', () => {
802
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
803
+ try {
804
+ a.addPrivateVolumeTypeAccessToProject(volumeTypeAccessTypesActionTypesOsVolumeTypeAccessProjectId, volumeTypeAccessTypesActionTypesOsVolumeTypeAccessVolumeType, volumeTypeAccessTypesActionTypesOsVolumeTypeAccessAddPrivateVolumeTypeAccessToProjectBodyParam, (data, error) => {
805
+ try {
806
+ if (stub) {
807
+ const displayE = 'Error 400 received on request';
808
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
809
+ } else {
810
+ runCommonAsserts(data, error);
811
+ }
812
+ saveMockData('VolumeTypeAccessTypesActionTypesOsVolumeTypeAccess', 'addPrivateVolumeTypeAccessToProject', 'default', data);
813
+ done();
814
+ } catch (err) {
815
+ log.error(`Test Failure: ${err}`);
816
+ done(err);
817
+ }
818
+ });
819
+ } catch (error) {
820
+ log.error(`Adapter Exception: ${error}`);
821
+ done(error);
822
+ }
823
+ }).timeout(attemptTimeout);
824
+ });
825
+
826
+ describe('#listPrivateVolumeTypeAccessDetail - errors', () => {
827
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
828
+ try {
829
+ a.listPrivateVolumeTypeAccessDetail(volumeTypeAccessTypesActionTypesOsVolumeTypeAccessProjectId, volumeTypeAccessTypesActionTypesOsVolumeTypeAccessVolumeType, (data, error) => {
830
+ try {
831
+ if (stub) {
832
+ const displayE = 'Error 400 received on request';
833
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
834
+ } else {
835
+ runCommonAsserts(data, error);
836
+ }
837
+ saveMockData('VolumeTypeAccessTypesActionTypesOsVolumeTypeAccess', 'listPrivateVolumeTypeAccessDetail', 'default', data);
838
+ done();
839
+ } catch (err) {
840
+ log.error(`Test Failure: ${err}`);
841
+ done(err);
842
+ }
843
+ });
844
+ } catch (error) {
845
+ log.error(`Adapter Exception: ${error}`);
846
+ done(error);
847
+ }
848
+ }).timeout(attemptTimeout);
849
+ });
850
+
851
+ describe('#listDefaultVolumeTypes - errors', () => {
852
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
853
+ try {
854
+ a.listDefaultVolumeTypes((data, error) => {
855
+ try {
856
+ if (stub) {
857
+ const displayE = 'Error 400 received on request';
858
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
859
+ } else {
860
+ runCommonAsserts(data, error);
861
+ }
862
+ saveMockData('DefaultVolumeTypesDefaultTypes', 'listDefaultVolumeTypes', 'default', data);
863
+ done();
864
+ } catch (err) {
865
+ log.error(`Test Failure: ${err}`);
866
+ done(err);
867
+ }
868
+ });
869
+ } catch (error) {
870
+ log.error(`Adapter Exception: ${error}`);
871
+ done(error);
872
+ }
873
+ }).timeout(attemptTimeout);
874
+ });
875
+
876
+ const defaultVolumeTypesDefaultTypesProjectId = 'fakedata';
877
+ const defaultVolumeTypesDefaultTypesCreateOrUpdateADefaultVolumeTypeBodyParam = {
878
+ default_type: {
879
+ volume_type: 'string'
880
+ }
881
+ };
882
+ describe('#createOrUpdateADefaultVolumeType - errors', () => {
883
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
884
+ try {
885
+ a.createOrUpdateADefaultVolumeType(defaultVolumeTypesDefaultTypesProjectId, defaultVolumeTypesDefaultTypesCreateOrUpdateADefaultVolumeTypeBodyParam, (data, error) => {
886
+ try {
887
+ if (stub) {
888
+ const displayE = 'Error 400 received on request';
889
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
890
+ } else {
891
+ runCommonAsserts(data, error);
892
+ }
893
+ saveMockData('DefaultVolumeTypesDefaultTypes', 'createOrUpdateADefaultVolumeType', 'default', data);
894
+ done();
895
+ } catch (err) {
896
+ log.error(`Test Failure: ${err}`);
897
+ done(err);
898
+ }
899
+ });
900
+ } catch (error) {
901
+ log.error(`Adapter Exception: ${error}`);
902
+ done(error);
903
+ }
904
+ }).timeout(attemptTimeout);
905
+ });
906
+
907
+ describe('#showADefaultVolumeType - errors', () => {
908
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
909
+ try {
910
+ a.showADefaultVolumeType(defaultVolumeTypesDefaultTypesProjectId, (data, error) => {
911
+ try {
912
+ if (stub) {
913
+ const displayE = 'Error 400 received on request';
914
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
915
+ } else {
916
+ runCommonAsserts(data, error);
917
+ }
918
+ saveMockData('DefaultVolumeTypesDefaultTypes', 'showADefaultVolumeType', 'default', data);
919
+ done();
920
+ } catch (err) {
921
+ log.error(`Test Failure: ${err}`);
922
+ done(err);
923
+ }
924
+ });
925
+ } catch (error) {
926
+ log.error(`Adapter Exception: ${error}`);
927
+ done(error);
928
+ }
929
+ }).timeout(attemptTimeout);
930
+ });
931
+
932
+ const volumesVolumesProjectId = 'fakedata';
933
+ const volumesVolumesCreateAVolumeBodyParam = {
934
+ volume: {
935
+ size: 1,
936
+ availability_zone: 'string',
937
+ source_volid: 'string',
938
+ description: 'string',
939
+ multiattach: true,
940
+ snapshot_id: 'string',
941
+ backup_id: 'string',
942
+ name: 'string',
943
+ imageRef: 'string',
944
+ volume_type: 'string',
945
+ metadata: {},
946
+ consistencygroup_id: 'string'
947
+ },
948
+ 'OS-SCH-HNT:scheduler_hints': {
949
+ same_host: [
950
+ 'string'
951
+ ]
952
+ }
953
+ };
954
+ describe('#createAVolume - errors', () => {
955
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
956
+ try {
957
+ a.createAVolume(volumesVolumesProjectId, volumesVolumesCreateAVolumeBodyParam, (data, error) => {
958
+ try {
959
+ if (stub) {
960
+ const displayE = 'Error 400 received on request';
961
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
962
+ } else {
963
+ runCommonAsserts(data, error);
964
+ }
965
+ saveMockData('VolumesVolumes', 'createAVolume', 'default', data);
966
+ done();
967
+ } catch (err) {
968
+ log.error(`Test Failure: ${err}`);
969
+ done(err);
970
+ }
971
+ });
972
+ } catch (error) {
973
+ log.error(`Adapter Exception: ${error}`);
974
+ done(error);
975
+ }
976
+ }).timeout(attemptTimeout);
977
+ });
978
+
979
+ const volumesVolumesVolumeId = 'fakedata';
980
+ const volumesVolumesCreateMetadataForVolumeBodyParam = {
981
+ metadata: {
982
+ name: 'string'
983
+ }
984
+ };
985
+ describe('#createMetadataForVolume - errors', () => {
986
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
987
+ try {
988
+ a.createMetadataForVolume(volumesVolumesProjectId, volumesVolumesVolumeId, volumesVolumesCreateMetadataForVolumeBodyParam, (data, error) => {
989
+ try {
990
+ if (stub) {
991
+ const displayE = 'Error 400 received on request';
992
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
993
+ } else {
994
+ runCommonAsserts(data, error);
995
+ }
996
+ saveMockData('VolumesVolumes', 'createMetadataForVolume', 'default', data);
997
+ done();
998
+ } catch (err) {
999
+ log.error(`Test Failure: ${err}`);
1000
+ done(err);
1001
+ }
1002
+ });
1003
+ } catch (error) {
1004
+ log.error(`Adapter Exception: ${error}`);
1005
+ done(error);
1006
+ }
1007
+ }).timeout(attemptTimeout);
1008
+ });
1009
+
1010
+ describe('#listAccessibleVolumes - errors', () => {
1011
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1012
+ try {
1013
+ a.listAccessibleVolumes(null, null, null, null, null, null, null, null, null, volumesVolumesProjectId, (data, error) => {
1014
+ try {
1015
+ if (stub) {
1016
+ const displayE = 'Error 400 received on request';
1017
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1018
+ } else {
1019
+ runCommonAsserts(data, error);
1020
+ }
1021
+ saveMockData('VolumesVolumes', 'listAccessibleVolumes', 'default', data);
1022
+ done();
1023
+ } catch (err) {
1024
+ log.error(`Test Failure: ${err}`);
1025
+ done(err);
1026
+ }
1027
+ });
1028
+ } catch (error) {
1029
+ log.error(`Adapter Exception: ${error}`);
1030
+ done(error);
1031
+ }
1032
+ }).timeout(attemptTimeout);
1033
+ });
1034
+
1035
+ describe('#listAccessibleVolumesWithDetails - errors', () => {
1036
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1037
+ try {
1038
+ a.listAccessibleVolumesWithDetails(null, null, null, null, null, null, null, null, null, volumesVolumesProjectId, (data, error) => {
1039
+ try {
1040
+ if (stub) {
1041
+ const displayE = 'Error 400 received on request';
1042
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1043
+ } else {
1044
+ runCommonAsserts(data, error);
1045
+ }
1046
+ saveMockData('VolumesVolumes', 'listAccessibleVolumesWithDetails', 'default', data);
1047
+ done();
1048
+ } catch (err) {
1049
+ log.error(`Test Failure: ${err}`);
1050
+ done(err);
1051
+ }
1052
+ });
1053
+ } catch (error) {
1054
+ log.error(`Adapter Exception: ${error}`);
1055
+ done(error);
1056
+ }
1057
+ }).timeout(attemptTimeout);
1058
+ });
1059
+
1060
+ describe('#getVolumesSummary - errors', () => {
1061
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1062
+ try {
1063
+ a.getVolumesSummary(null, volumesVolumesProjectId, (data, error) => {
1064
+ try {
1065
+ if (stub) {
1066
+ const displayE = 'Error 400 received on request';
1067
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1068
+ } else {
1069
+ runCommonAsserts(data, error);
1070
+ }
1071
+ saveMockData('VolumesVolumes', 'getVolumesSummary', 'default', data);
1072
+ done();
1073
+ } catch (err) {
1074
+ log.error(`Test Failure: ${err}`);
1075
+ done(err);
1076
+ }
1077
+ });
1078
+ } catch (error) {
1079
+ log.error(`Adapter Exception: ${error}`);
1080
+ done(error);
1081
+ }
1082
+ }).timeout(attemptTimeout);
1083
+ });
1084
+
1085
+ const volumesVolumesUpdateAVolumeBodyParam = {
1086
+ volume: {
1087
+ name: 'string',
1088
+ description: 'string',
1089
+ metadata: {
1090
+ name: 'string'
1091
+ }
1092
+ }
1093
+ };
1094
+ describe('#updateAVolume - errors', () => {
1095
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1096
+ try {
1097
+ a.updateAVolume(volumesVolumesProjectId, volumesVolumesVolumeId, volumesVolumesUpdateAVolumeBodyParam, (data, error) => {
1098
+ try {
1099
+ if (stub) {
1100
+ const displayE = 'Error 400 received on request';
1101
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1102
+ } else {
1103
+ runCommonAsserts(data, error);
1104
+ }
1105
+ saveMockData('VolumesVolumes', 'updateAVolume', 'default', data);
1106
+ done();
1107
+ } catch (err) {
1108
+ log.error(`Test Failure: ${err}`);
1109
+ done(err);
1110
+ }
1111
+ });
1112
+ } catch (error) {
1113
+ log.error(`Adapter Exception: ${error}`);
1114
+ done(error);
1115
+ }
1116
+ }).timeout(attemptTimeout);
1117
+ });
1118
+
1119
+ describe('#showAVolumeSDetails - errors', () => {
1120
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1121
+ try {
1122
+ a.showAVolumeSDetails(volumesVolumesProjectId, volumesVolumesVolumeId, (data, error) => {
1123
+ try {
1124
+ if (stub) {
1125
+ const displayE = 'Error 400 received on request';
1126
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1127
+ } else {
1128
+ runCommonAsserts(data, error);
1129
+ }
1130
+ saveMockData('VolumesVolumes', 'showAVolumeSDetails', 'default', data);
1131
+ done();
1132
+ } catch (err) {
1133
+ log.error(`Test Failure: ${err}`);
1134
+ done(err);
1135
+ }
1136
+ });
1137
+ } catch (error) {
1138
+ log.error(`Adapter Exception: ${error}`);
1139
+ done(error);
1140
+ }
1141
+ }).timeout(attemptTimeout);
1142
+ });
1143
+
1144
+ const volumesVolumesUpdateAVolumeSMetadataBodyParam = {
1145
+ metadata: {
1146
+ name: 'string'
1147
+ }
1148
+ };
1149
+ describe('#updateAVolumeSMetadata - errors', () => {
1150
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1151
+ try {
1152
+ a.updateAVolumeSMetadata(volumesVolumesProjectId, volumesVolumesVolumeId, volumesVolumesUpdateAVolumeSMetadataBodyParam, (data, error) => {
1153
+ try {
1154
+ if (stub) {
1155
+ const displayE = 'Error 400 received on request';
1156
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1157
+ } else {
1158
+ runCommonAsserts(data, error);
1159
+ }
1160
+ saveMockData('VolumesVolumes', 'updateAVolumeSMetadata', 'default', data);
1161
+ done();
1162
+ } catch (err) {
1163
+ log.error(`Test Failure: ${err}`);
1164
+ done(err);
1165
+ }
1166
+ });
1167
+ } catch (error) {
1168
+ log.error(`Adapter Exception: ${error}`);
1169
+ done(error);
1170
+ }
1171
+ }).timeout(attemptTimeout);
1172
+ });
1173
+
1174
+ describe('#showAVolumeSMetadata - errors', () => {
1175
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1176
+ try {
1177
+ a.showAVolumeSMetadata(volumesVolumesProjectId, volumesVolumesVolumeId, (data, error) => {
1178
+ try {
1179
+ if (stub) {
1180
+ const displayE = 'Error 400 received on request';
1181
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1182
+ } else {
1183
+ runCommonAsserts(data, error);
1184
+ }
1185
+ saveMockData('VolumesVolumes', 'showAVolumeSMetadata', 'default', data);
1186
+ done();
1187
+ } catch (err) {
1188
+ log.error(`Test Failure: ${err}`);
1189
+ done(err);
1190
+ }
1191
+ });
1192
+ } catch (error) {
1193
+ log.error(`Adapter Exception: ${error}`);
1194
+ done(error);
1195
+ }
1196
+ }).timeout(attemptTimeout);
1197
+ });
1198
+
1199
+ const volumesVolumesKey = 'fakedata';
1200
+ const volumesVolumesUpdateAVolumeSMetadataForASpecificKeyBodyParam = {
1201
+ meta: {
1202
+ name: 'string'
1203
+ }
1204
+ };
1205
+ describe('#updateAVolumeSMetadataForASpecificKey - errors', () => {
1206
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1207
+ try {
1208
+ a.updateAVolumeSMetadataForASpecificKey(volumesVolumesProjectId, volumesVolumesVolumeId, volumesVolumesKey, volumesVolumesUpdateAVolumeSMetadataForASpecificKeyBodyParam, (data, error) => {
1209
+ try {
1210
+ if (stub) {
1211
+ const displayE = 'Error 400 received on request';
1212
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1213
+ } else {
1214
+ runCommonAsserts(data, error);
1215
+ }
1216
+ saveMockData('VolumesVolumes', 'updateAVolumeSMetadataForASpecificKey', 'default', data);
1217
+ done();
1218
+ } catch (err) {
1219
+ log.error(`Test Failure: ${err}`);
1220
+ done(err);
1221
+ }
1222
+ });
1223
+ } catch (error) {
1224
+ log.error(`Adapter Exception: ${error}`);
1225
+ done(error);
1226
+ }
1227
+ }).timeout(attemptTimeout);
1228
+ });
1229
+
1230
+ describe('#showAVolumeSMetadataForASpecificKey - errors', () => {
1231
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1232
+ try {
1233
+ a.showAVolumeSMetadataForASpecificKey(volumesVolumesProjectId, volumesVolumesVolumeId, volumesVolumesKey, (data, error) => {
1234
+ try {
1235
+ if (stub) {
1236
+ const displayE = 'Error 400 received on request';
1237
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1238
+ } else {
1239
+ runCommonAsserts(data, error);
1240
+ }
1241
+ saveMockData('VolumesVolumes', 'showAVolumeSMetadataForASpecificKey', 'default', data);
1242
+ done();
1243
+ } catch (err) {
1244
+ log.error(`Test Failure: ${err}`);
1245
+ done(err);
1246
+ }
1247
+ });
1248
+ } catch (error) {
1249
+ log.error(`Adapter Exception: ${error}`);
1250
+ done(error);
1251
+ }
1252
+ }).timeout(attemptTimeout);
1253
+ });
1254
+
1255
+ const volumeActionsVolumesActionProjectId = 'fakedata';
1256
+ const volumeActionsVolumesActionVolumeId = 'fakedata';
1257
+ const volumeActionsVolumesActionExtendAVolumeSizeBodyParam = {
1258
+ 'os-extend': {
1259
+ new_size: 8
1260
+ }
1261
+ };
1262
+ describe('#extendAVolumeSize - errors', () => {
1263
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1264
+ try {
1265
+ a.extendAVolumeSize(volumeActionsVolumesActionProjectId, volumeActionsVolumesActionVolumeId, volumeActionsVolumesActionExtendAVolumeSizeBodyParam, (data, error) => {
1266
+ try {
1267
+ if (stub) {
1268
+ const displayE = 'Error 400 received on request';
1269
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1270
+ } else {
1271
+ runCommonAsserts(data, error);
1272
+ }
1273
+ saveMockData('VolumeActionsVolumesAction', 'extendAVolumeSize', 'default', data);
1274
+ done();
1275
+ } catch (err) {
1276
+ log.error(`Test Failure: ${err}`);
1277
+ done(err);
1278
+ }
1279
+ });
1280
+ } catch (error) {
1281
+ log.error(`Adapter Exception: ${error}`);
1282
+ done(error);
1283
+ }
1284
+ }).timeout(attemptTimeout);
1285
+ });
1286
+
1287
+ const volumeManageExtensionManageableVolumesProjectId = 'fakedata';
1288
+ const volumeManageExtensionManageableVolumesManageAnExistingVolumeBodyParam = {
1289
+ volume: {
1290
+ host: 'string',
1291
+ ref: {
1292
+ 'source-name': 'string',
1293
+ 'source-id': 'string'
1294
+ },
1295
+ name: 'string',
1296
+ availability_zone: 'string',
1297
+ description: 'string',
1298
+ volume_type: 'string',
1299
+ bootable: false,
1300
+ metadata: {
1301
+ key1: 'string',
1302
+ key2: 'string'
1303
+ }
1304
+ }
1305
+ };
1306
+ describe('#manageAnExistingVolume - errors', () => {
1307
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1308
+ try {
1309
+ a.manageAnExistingVolume(volumeManageExtensionManageableVolumesProjectId, volumeManageExtensionManageableVolumesManageAnExistingVolumeBodyParam, (data, error) => {
1310
+ try {
1311
+ if (stub) {
1312
+ const displayE = 'Error 400 received on request';
1313
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1314
+ } else {
1315
+ runCommonAsserts(data, error);
1316
+ }
1317
+ saveMockData('VolumeManageExtensionManageableVolumes', 'manageAnExistingVolume', 'default', data);
1318
+ done();
1319
+ } catch (err) {
1320
+ log.error(`Test Failure: ${err}`);
1321
+ done(err);
1322
+ }
1323
+ });
1324
+ } catch (error) {
1325
+ log.error(`Adapter Exception: ${error}`);
1326
+ done(error);
1327
+ }
1328
+ }).timeout(attemptTimeout);
1329
+ });
1330
+
1331
+ describe('#listSummaryOfVolumesAvailableToManage - errors', () => {
1332
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1333
+ try {
1334
+ a.listSummaryOfVolumesAvailableToManage(null, null, null, null, volumeManageExtensionManageableVolumesProjectId, null, (data, error) => {
1335
+ try {
1336
+ if (stub) {
1337
+ const displayE = 'Error 400 received on request';
1338
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1339
+ } else {
1340
+ runCommonAsserts(data, error);
1341
+ }
1342
+ saveMockData('VolumeManageExtensionManageableVolumes', 'listSummaryOfVolumesAvailableToManage', 'default', data);
1343
+ done();
1344
+ } catch (err) {
1345
+ log.error(`Test Failure: ${err}`);
1346
+ done(err);
1347
+ }
1348
+ });
1349
+ } catch (error) {
1350
+ log.error(`Adapter Exception: ${error}`);
1351
+ done(error);
1352
+ }
1353
+ }).timeout(attemptTimeout);
1354
+ });
1355
+
1356
+ describe('#listDetailOfVolumesAvailableToManage - errors', () => {
1357
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1358
+ try {
1359
+ a.listDetailOfVolumesAvailableToManage(null, null, null, null, null, volumeManageExtensionManageableVolumesProjectId, (data, error) => {
1360
+ try {
1361
+ if (stub) {
1362
+ const displayE = 'Error 400 received on request';
1363
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1364
+ } else {
1365
+ runCommonAsserts(data, error);
1366
+ }
1367
+ saveMockData('VolumeManageExtensionManageableVolumes', 'listDetailOfVolumesAvailableToManage', 'default', data);
1368
+ done();
1369
+ } catch (err) {
1370
+ log.error(`Test Failure: ${err}`);
1371
+ done(err);
1372
+ }
1373
+ });
1374
+ } catch (error) {
1375
+ log.error(`Adapter Exception: ${error}`);
1376
+ done(error);
1377
+ }
1378
+ }).timeout(attemptTimeout);
1379
+ });
1380
+
1381
+ const volumeSnapshotsSnapshotsProjectId = 'fakedata';
1382
+ const volumeSnapshotsSnapshotsCreateASnapshotBodyParam = {
1383
+ snapshot: {
1384
+ name: 'string',
1385
+ description: 'string',
1386
+ volume_id: 'string',
1387
+ force: true,
1388
+ metadata: {
1389
+ key: 'string'
1390
+ }
1391
+ }
1392
+ };
1393
+ describe('#createASnapshot - errors', () => {
1394
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1395
+ try {
1396
+ a.createASnapshot(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsCreateASnapshotBodyParam, (data, error) => {
1397
+ try {
1398
+ if (stub) {
1399
+ const displayE = 'Error 400 received on request';
1400
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1401
+ } else {
1402
+ runCommonAsserts(data, error);
1403
+ }
1404
+ saveMockData('VolumeSnapshotsSnapshots', 'createASnapshot', 'default', data);
1405
+ done();
1406
+ } catch (err) {
1407
+ log.error(`Test Failure: ${err}`);
1408
+ done(err);
1409
+ }
1410
+ });
1411
+ } catch (error) {
1412
+ log.error(`Adapter Exception: ${error}`);
1413
+ done(error);
1414
+ }
1415
+ }).timeout(attemptTimeout);
1416
+ });
1417
+
1418
+ const volumeSnapshotsSnapshotsSnapshotId = 'fakedata';
1419
+ const volumeSnapshotsSnapshotsCreateASnapshotSMetadataBodyParam = {
1420
+ metadata: {
1421
+ key: 'string'
1422
+ }
1423
+ };
1424
+ describe('#createASnapshotSMetadata - errors', () => {
1425
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1426
+ try {
1427
+ a.createASnapshotSMetadata(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, volumeSnapshotsSnapshotsCreateASnapshotSMetadataBodyParam, (data, error) => {
1428
+ try {
1429
+ if (stub) {
1430
+ const displayE = 'Error 400 received on request';
1431
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1432
+ } else {
1433
+ runCommonAsserts(data, error);
1434
+ }
1435
+ saveMockData('VolumeSnapshotsSnapshots', 'createASnapshotSMetadata', 'default', data);
1436
+ done();
1437
+ } catch (err) {
1438
+ log.error(`Test Failure: ${err}`);
1439
+ done(err);
1440
+ }
1441
+ });
1442
+ } catch (error) {
1443
+ log.error(`Adapter Exception: ${error}`);
1444
+ done(error);
1445
+ }
1446
+ }).timeout(attemptTimeout);
1447
+ });
1448
+
1449
+ const volumeSnapshotsSnapshotsKey = 'fakedata';
1450
+ describe('#showASnapshotSMetadataForASpecificKey - errors', () => {
1451
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1452
+ try {
1453
+ a.showASnapshotSMetadataForASpecificKey(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, volumeSnapshotsSnapshotsKey, (data, error) => {
1454
+ try {
1455
+ if (stub) {
1456
+ const displayE = 'Error 400 received on request';
1457
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1458
+ } else {
1459
+ runCommonAsserts(data, error);
1460
+ }
1461
+ saveMockData('VolumeSnapshotsSnapshots', 'showASnapshotSMetadataForASpecificKey', 'default', data);
1462
+ done();
1463
+ } catch (err) {
1464
+ log.error(`Test Failure: ${err}`);
1465
+ done(err);
1466
+ }
1467
+ });
1468
+ } catch (error) {
1469
+ log.error(`Adapter Exception: ${error}`);
1470
+ done(error);
1471
+ }
1472
+ }).timeout(attemptTimeout);
1473
+ });
1474
+
1475
+ describe('#listAccessibleSnapshots - errors', () => {
1476
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1477
+ try {
1478
+ a.listAccessibleSnapshots(null, null, null, null, null, null, null, volumeSnapshotsSnapshotsProjectId, (data, error) => {
1479
+ try {
1480
+ if (stub) {
1481
+ const displayE = 'Error 400 received on request';
1482
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1483
+ } else {
1484
+ runCommonAsserts(data, error);
1485
+ }
1486
+ saveMockData('VolumeSnapshotsSnapshots', 'listAccessibleSnapshots', 'default', data);
1487
+ done();
1488
+ } catch (err) {
1489
+ log.error(`Test Failure: ${err}`);
1490
+ done(err);
1491
+ }
1492
+ });
1493
+ } catch (error) {
1494
+ log.error(`Adapter Exception: ${error}`);
1495
+ done(error);
1496
+ }
1497
+ }).timeout(attemptTimeout);
1498
+ });
1499
+
1500
+ describe('#listSnapshotsAndDetails - errors', () => {
1501
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1502
+ try {
1503
+ a.listSnapshotsAndDetails(null, null, null, null, null, null, null, volumeSnapshotsSnapshotsProjectId, (data, error) => {
1504
+ try {
1505
+ if (stub) {
1506
+ const displayE = 'Error 400 received on request';
1507
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1508
+ } else {
1509
+ runCommonAsserts(data, error);
1510
+ }
1511
+ saveMockData('VolumeSnapshotsSnapshots', 'listSnapshotsAndDetails', 'default', data);
1512
+ done();
1513
+ } catch (err) {
1514
+ log.error(`Test Failure: ${err}`);
1515
+ done(err);
1516
+ }
1517
+ });
1518
+ } catch (error) {
1519
+ log.error(`Adapter Exception: ${error}`);
1520
+ done(error);
1521
+ }
1522
+ }).timeout(attemptTimeout);
1523
+ });
1524
+
1525
+ const volumeSnapshotsSnapshotsUpdateASnapshotBodyParam = {
1526
+ snapshot: {
1527
+ name: 'string',
1528
+ description: 'string'
1529
+ }
1530
+ };
1531
+ describe('#updateASnapshot - errors', () => {
1532
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1533
+ try {
1534
+ a.updateASnapshot(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, volumeSnapshotsSnapshotsUpdateASnapshotBodyParam, (data, error) => {
1535
+ try {
1536
+ if (stub) {
1537
+ const displayE = 'Error 400 received on request';
1538
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1539
+ } else {
1540
+ runCommonAsserts(data, error);
1541
+ }
1542
+ saveMockData('VolumeSnapshotsSnapshots', 'updateASnapshot', 'default', data);
1543
+ done();
1544
+ } catch (err) {
1545
+ log.error(`Test Failure: ${err}`);
1546
+ done(err);
1547
+ }
1548
+ });
1549
+ } catch (error) {
1550
+ log.error(`Adapter Exception: ${error}`);
1551
+ done(error);
1552
+ }
1553
+ }).timeout(attemptTimeout);
1554
+ });
1555
+
1556
+ describe('#showASnapshotSDetails - errors', () => {
1557
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1558
+ try {
1559
+ a.showASnapshotSDetails(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, (data, error) => {
1560
+ try {
1561
+ if (stub) {
1562
+ const displayE = 'Error 400 received on request';
1563
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1564
+ } else {
1565
+ runCommonAsserts(data, error);
1566
+ }
1567
+ saveMockData('VolumeSnapshotsSnapshots', 'showASnapshotSDetails', 'default', data);
1568
+ done();
1569
+ } catch (err) {
1570
+ log.error(`Test Failure: ${err}`);
1571
+ done(err);
1572
+ }
1573
+ });
1574
+ } catch (error) {
1575
+ log.error(`Adapter Exception: ${error}`);
1576
+ done(error);
1577
+ }
1578
+ }).timeout(attemptTimeout);
1579
+ });
1580
+
1581
+ const volumeSnapshotsSnapshotsUpdateASnapshotSMetadataBodyParam = {
1582
+ metadata: {
1583
+ new_key: 'string'
1584
+ }
1585
+ };
1586
+ describe('#updateASnapshotSMetadata - errors', () => {
1587
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1588
+ try {
1589
+ a.updateASnapshotSMetadata(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, volumeSnapshotsSnapshotsUpdateASnapshotSMetadataBodyParam, (data, error) => {
1590
+ try {
1591
+ if (stub) {
1592
+ const displayE = 'Error 400 received on request';
1593
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1594
+ } else {
1595
+ runCommonAsserts(data, error);
1596
+ }
1597
+ saveMockData('VolumeSnapshotsSnapshots', 'updateASnapshotSMetadata', 'default', data);
1598
+ done();
1599
+ } catch (err) {
1600
+ log.error(`Test Failure: ${err}`);
1601
+ done(err);
1602
+ }
1603
+ });
1604
+ } catch (error) {
1605
+ log.error(`Adapter Exception: ${error}`);
1606
+ done(error);
1607
+ }
1608
+ }).timeout(attemptTimeout);
1609
+ });
1610
+
1611
+ describe('#showASnapshotSMetadata - errors', () => {
1612
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1613
+ try {
1614
+ a.showASnapshotSMetadata(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, (data, error) => {
1615
+ try {
1616
+ if (stub) {
1617
+ const displayE = 'Error 400 received on request';
1618
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1619
+ } else {
1620
+ runCommonAsserts(data, error);
1621
+ }
1622
+ saveMockData('VolumeSnapshotsSnapshots', 'showASnapshotSMetadata', 'default', data);
1623
+ done();
1624
+ } catch (err) {
1625
+ log.error(`Test Failure: ${err}`);
1626
+ done(err);
1627
+ }
1628
+ });
1629
+ } catch (error) {
1630
+ log.error(`Adapter Exception: ${error}`);
1631
+ done(error);
1632
+ }
1633
+ }).timeout(attemptTimeout);
1634
+ });
1635
+
1636
+ const volumeSnapshotsSnapshotsUpdateASnapshotSMetadataForASpecificKeyBodyParam = {
1637
+ meta: {
1638
+ key: 'string'
1639
+ }
1640
+ };
1641
+ describe('#updateASnapshotSMetadataForASpecificKey - errors', () => {
1642
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1643
+ try {
1644
+ a.updateASnapshotSMetadataForASpecificKey(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, volumeSnapshotsSnapshotsKey, volumeSnapshotsSnapshotsUpdateASnapshotSMetadataForASpecificKeyBodyParam, (data, error) => {
1645
+ try {
1646
+ if (stub) {
1647
+ const displayE = 'Error 400 received on request';
1648
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1649
+ } else {
1650
+ runCommonAsserts(data, error);
1651
+ }
1652
+ saveMockData('VolumeSnapshotsSnapshots', 'updateASnapshotSMetadataForASpecificKey', 'default', data);
1653
+ done();
1654
+ } catch (err) {
1655
+ log.error(`Test Failure: ${err}`);
1656
+ done(err);
1657
+ }
1658
+ });
1659
+ } catch (error) {
1660
+ log.error(`Adapter Exception: ${error}`);
1661
+ done(error);
1662
+ }
1663
+ }).timeout(attemptTimeout);
1664
+ });
1665
+
1666
+ const snapshotActionsSnapshotsActionProjectId = 'fakedata';
1667
+ const snapshotActionsSnapshotsActionSnapshotId = 'fakedata';
1668
+ const snapshotActionsSnapshotsActionResetASnapshotSStatusBodyParam = {
1669
+ 'os-reset_status': {
1670
+ status: 'string'
1671
+ }
1672
+ };
1673
+ describe('#resetASnapshotSStatus - errors', () => {
1674
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1675
+ try {
1676
+ a.resetASnapshotSStatus(snapshotActionsSnapshotsActionProjectId, snapshotActionsSnapshotsActionSnapshotId, snapshotActionsSnapshotsActionResetASnapshotSStatusBodyParam, (data, error) => {
1677
+ try {
1678
+ if (stub) {
1679
+ const displayE = 'Error 400 received on request';
1680
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1681
+ } else {
1682
+ runCommonAsserts(data, error);
1683
+ }
1684
+ saveMockData('SnapshotActionsSnapshotsAction', 'resetASnapshotSStatus', 'default', data);
1685
+ done();
1686
+ } catch (err) {
1687
+ log.error(`Test Failure: ${err}`);
1688
+ done(err);
1689
+ }
1690
+ });
1691
+ } catch (error) {
1692
+ log.error(`Adapter Exception: ${error}`);
1693
+ done(error);
1694
+ }
1695
+ }).timeout(attemptTimeout);
1696
+ });
1697
+
1698
+ const snapshotManageExtensionManageableSnapshotsProjectId = 'fakedata';
1699
+ const snapshotManageExtensionManageableSnapshotsManageAnExistingSnapshotBodyParam = {
1700
+ snapshot: {
1701
+ description: 'string',
1702
+ metadata: {},
1703
+ ref: {
1704
+ 'source-name': 'string'
1705
+ },
1706
+ name: 'string',
1707
+ volume_id: 'string'
1708
+ }
1709
+ };
1710
+ describe('#manageAnExistingSnapshot - errors', () => {
1711
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1712
+ try {
1713
+ a.manageAnExistingSnapshot(snapshotManageExtensionManageableSnapshotsProjectId, snapshotManageExtensionManageableSnapshotsManageAnExistingSnapshotBodyParam, (data, error) => {
1714
+ try {
1715
+ if (stub) {
1716
+ const displayE = 'Error 400 received on request';
1717
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1718
+ } else {
1719
+ runCommonAsserts(data, error);
1720
+ }
1721
+ saveMockData('SnapshotManageExtensionManageableSnapshots', 'manageAnExistingSnapshot', 'default', data);
1722
+ done();
1723
+ } catch (err) {
1724
+ log.error(`Test Failure: ${err}`);
1725
+ done(err);
1726
+ }
1727
+ });
1728
+ } catch (error) {
1729
+ log.error(`Adapter Exception: ${error}`);
1730
+ done(error);
1731
+ }
1732
+ }).timeout(attemptTimeout);
1733
+ });
1734
+
1735
+ describe('#listSummaryOfSnapshotsAvailableToManage - errors', () => {
1736
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1737
+ try {
1738
+ a.listSummaryOfSnapshotsAvailableToManage(null, null, null, null, null, snapshotManageExtensionManageableSnapshotsProjectId, (data, error) => {
1739
+ try {
1740
+ if (stub) {
1741
+ const displayE = 'Error 400 received on request';
1742
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1743
+ } else {
1744
+ runCommonAsserts(data, error);
1745
+ }
1746
+ saveMockData('SnapshotManageExtensionManageableSnapshots', 'listSummaryOfSnapshotsAvailableToManage', 'default', data);
1747
+ done();
1748
+ } catch (err) {
1749
+ log.error(`Test Failure: ${err}`);
1750
+ done(err);
1751
+ }
1752
+ });
1753
+ } catch (error) {
1754
+ log.error(`Adapter Exception: ${error}`);
1755
+ done(error);
1756
+ }
1757
+ }).timeout(attemptTimeout);
1758
+ });
1759
+
1760
+ describe('#listDetailOfSnapshotsAvailableToManage - errors', () => {
1761
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1762
+ try {
1763
+ a.listDetailOfSnapshotsAvailableToManage(null, null, null, null, null, snapshotManageExtensionManageableSnapshotsProjectId, (data, error) => {
1764
+ try {
1765
+ if (stub) {
1766
+ const displayE = 'Error 400 received on request';
1767
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1768
+ } else {
1769
+ runCommonAsserts(data, error);
1770
+ }
1771
+ saveMockData('SnapshotManageExtensionManageableSnapshots', 'listDetailOfSnapshotsAvailableToManage', 'default', data);
1772
+ done();
1773
+ } catch (err) {
1774
+ log.error(`Test Failure: ${err}`);
1775
+ done(err);
1776
+ }
1777
+ });
1778
+ } catch (error) {
1779
+ log.error(`Adapter Exception: ${error}`);
1780
+ done(error);
1781
+ }
1782
+ }).timeout(attemptTimeout);
1783
+ });
1784
+
1785
+ const volumeTransferProjectId = 'fakedata';
1786
+ const volumeTransferCreateAVolumeTransferNewBodyParam = {
1787
+ transfer: {
1788
+ volume_id: 'string',
1789
+ name: 'string'
1790
+ }
1791
+ };
1792
+ describe('#createAVolumeTransferNew - errors', () => {
1793
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1794
+ try {
1795
+ a.createAVolumeTransferNew(volumeTransferProjectId, volumeTransferCreateAVolumeTransferNewBodyParam, (data, error) => {
1796
+ try {
1797
+ if (stub) {
1798
+ const displayE = 'Error 400 received on request';
1799
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1800
+ } else {
1801
+ runCommonAsserts(data, error);
1802
+ }
1803
+ saveMockData('VolumeTransfer', 'createAVolumeTransferNew', 'default', data);
1804
+ done();
1805
+ } catch (err) {
1806
+ log.error(`Test Failure: ${err}`);
1807
+ done(err);
1808
+ }
1809
+ });
1810
+ } catch (error) {
1811
+ log.error(`Adapter Exception: ${error}`);
1812
+ done(error);
1813
+ }
1814
+ }).timeout(attemptTimeout);
1815
+ });
1816
+
1817
+ const volumeTransferTransferId = 'fakedata';
1818
+ const volumeTransferAcceptAVolumeTransferNewBodyParam = {
1819
+ accept: {
1820
+ auth_key: 'string'
1821
+ }
1822
+ };
1823
+ describe('#acceptAVolumeTransferNew - errors', () => {
1824
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1825
+ try {
1826
+ a.acceptAVolumeTransferNew(volumeTransferProjectId, volumeTransferTransferId, volumeTransferAcceptAVolumeTransferNewBodyParam, (data, error) => {
1827
+ try {
1828
+ if (stub) {
1829
+ const displayE = 'Error 400 received on request';
1830
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1831
+ } else {
1832
+ runCommonAsserts(data, error);
1833
+ }
1834
+ saveMockData('VolumeTransfer', 'acceptAVolumeTransferNew', 'default', data);
1835
+ done();
1836
+ } catch (err) {
1837
+ log.error(`Test Failure: ${err}`);
1838
+ done(err);
1839
+ }
1840
+ });
1841
+ } catch (error) {
1842
+ log.error(`Adapter Exception: ${error}`);
1843
+ done(error);
1844
+ }
1845
+ }).timeout(attemptTimeout);
1846
+ });
1847
+
1848
+ describe('#listVolumeTransfersForAProjectNew - errors', () => {
1849
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1850
+ try {
1851
+ a.listVolumeTransfersForAProjectNew(null, volumeTransferProjectId, (data, error) => {
1852
+ try {
1853
+ if (stub) {
1854
+ const displayE = 'Error 400 received on request';
1855
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1856
+ } else {
1857
+ runCommonAsserts(data, error);
1858
+ }
1859
+ saveMockData('VolumeTransfer', 'listVolumeTransfersForAProjectNew', 'default', data);
1860
+ done();
1861
+ } catch (err) {
1862
+ log.error(`Test Failure: ${err}`);
1863
+ done(err);
1864
+ }
1865
+ });
1866
+ } catch (error) {
1867
+ log.error(`Adapter Exception: ${error}`);
1868
+ done(error);
1869
+ }
1870
+ }).timeout(attemptTimeout);
1871
+ });
1872
+
1873
+ describe('#listVolumeTransfersAndDetailsNew - errors', () => {
1874
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1875
+ try {
1876
+ a.listVolumeTransfersAndDetailsNew(null, volumeTransferProjectId, (data, error) => {
1877
+ try {
1878
+ if (stub) {
1879
+ const displayE = 'Error 400 received on request';
1880
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1881
+ } else {
1882
+ runCommonAsserts(data, error);
1883
+ }
1884
+ saveMockData('VolumeTransfer', 'listVolumeTransfersAndDetailsNew', 'default', data);
1885
+ done();
1886
+ } catch (err) {
1887
+ log.error(`Test Failure: ${err}`);
1888
+ done(err);
1889
+ }
1890
+ });
1891
+ } catch (error) {
1892
+ log.error(`Adapter Exception: ${error}`);
1893
+ done(error);
1894
+ }
1895
+ }).timeout(attemptTimeout);
1896
+ });
1897
+
1898
+ describe('#showVolumeTransferDetailNew - errors', () => {
1899
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1900
+ try {
1901
+ a.showVolumeTransferDetailNew(volumeTransferProjectId, volumeTransferTransferId, (data, error) => {
1902
+ try {
1903
+ if (stub) {
1904
+ const displayE = 'Error 400 received on request';
1905
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1906
+ } else {
1907
+ runCommonAsserts(data, error);
1908
+ }
1909
+ saveMockData('VolumeTransfer', 'showVolumeTransferDetailNew', 'default', data);
1910
+ done();
1911
+ } catch (err) {
1912
+ log.error(`Test Failure: ${err}`);
1913
+ done(err);
1914
+ }
1915
+ });
1916
+ } catch (error) {
1917
+ log.error(`Adapter Exception: ${error}`);
1918
+ done(error);
1919
+ }
1920
+ }).timeout(attemptTimeout);
1921
+ });
1922
+
1923
+ const volumeTransfersVolumeTransfers355OrLaterProjectId = 'fakedata';
1924
+ const volumeTransfersVolumeTransfers355OrLaterCreateAVolumeTransferBodyParam = {
1925
+ transfer: {
1926
+ volume_id: 'string',
1927
+ name: 'string'
1928
+ }
1929
+ };
1930
+ describe('#createAVolumeTransfer - errors', () => {
1931
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1932
+ try {
1933
+ a.createAVolumeTransfer(volumeTransfersVolumeTransfers355OrLaterProjectId, volumeTransfersVolumeTransfers355OrLaterCreateAVolumeTransferBodyParam, (data, error) => {
1934
+ try {
1935
+ if (stub) {
1936
+ const displayE = 'Error 400 received on request';
1937
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1938
+ } else {
1939
+ runCommonAsserts(data, error);
1940
+ }
1941
+ saveMockData('VolumeTransfersVolumeTransfers355OrLater', 'createAVolumeTransfer', 'default', data);
1942
+ done();
1943
+ } catch (err) {
1944
+ log.error(`Test Failure: ${err}`);
1945
+ done(err);
1946
+ }
1947
+ });
1948
+ } catch (error) {
1949
+ log.error(`Adapter Exception: ${error}`);
1950
+ done(error);
1951
+ }
1952
+ }).timeout(attemptTimeout);
1953
+ });
1954
+
1955
+ const volumeTransfersVolumeTransfers355OrLaterTransferId = 'fakedata';
1956
+ const volumeTransfersVolumeTransfers355OrLaterAcceptAVolumeTransferBodyParam = {
1957
+ accept: {
1958
+ auth_key: 'string'
1959
+ }
1960
+ };
1961
+ describe('#acceptAVolumeTransfer - errors', () => {
1962
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1963
+ try {
1964
+ a.acceptAVolumeTransfer(volumeTransfersVolumeTransfers355OrLaterProjectId, volumeTransfersVolumeTransfers355OrLaterTransferId, volumeTransfersVolumeTransfers355OrLaterAcceptAVolumeTransferBodyParam, (data, error) => {
1965
+ try {
1966
+ if (stub) {
1967
+ const displayE = 'Error 400 received on request';
1968
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1969
+ } else {
1970
+ runCommonAsserts(data, error);
1971
+ }
1972
+ saveMockData('VolumeTransfersVolumeTransfers355OrLater', 'acceptAVolumeTransfer', 'default', data);
1973
+ done();
1974
+ } catch (err) {
1975
+ log.error(`Test Failure: ${err}`);
1976
+ done(err);
1977
+ }
1978
+ });
1979
+ } catch (error) {
1980
+ log.error(`Adapter Exception: ${error}`);
1981
+ done(error);
1982
+ }
1983
+ }).timeout(attemptTimeout);
1984
+ });
1985
+
1986
+ describe('#listVolumeTransfersForAProject - errors', () => {
1987
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
1988
+ try {
1989
+ a.listVolumeTransfersForAProject(null, null, null, null, null, null, volumeTransfersVolumeTransfers355OrLaterProjectId, (data, error) => {
1990
+ try {
1991
+ if (stub) {
1992
+ const displayE = 'Error 400 received on request';
1993
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
1994
+ } else {
1995
+ runCommonAsserts(data, error);
1996
+ }
1997
+ saveMockData('VolumeTransfersVolumeTransfers355OrLater', 'listVolumeTransfersForAProject', 'default', data);
1998
+ done();
1999
+ } catch (err) {
2000
+ log.error(`Test Failure: ${err}`);
2001
+ done(err);
2002
+ }
2003
+ });
2004
+ } catch (error) {
2005
+ log.error(`Adapter Exception: ${error}`);
2006
+ done(error);
2007
+ }
2008
+ }).timeout(attemptTimeout);
2009
+ });
2010
+
2011
+ describe('#listVolumeTransfersAndDetails - errors', () => {
2012
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2013
+ try {
2014
+ a.listVolumeTransfersAndDetails(null, volumeTransfersVolumeTransfers355OrLaterProjectId, (data, error) => {
2015
+ try {
2016
+ if (stub) {
2017
+ const displayE = 'Error 400 received on request';
2018
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2019
+ } else {
2020
+ runCommonAsserts(data, error);
2021
+ }
2022
+ saveMockData('VolumeTransfersVolumeTransfers355OrLater', 'listVolumeTransfersAndDetails', 'default', data);
2023
+ done();
2024
+ } catch (err) {
2025
+ log.error(`Test Failure: ${err}`);
2026
+ done(err);
2027
+ }
2028
+ });
2029
+ } catch (error) {
2030
+ log.error(`Adapter Exception: ${error}`);
2031
+ done(error);
2032
+ }
2033
+ }).timeout(attemptTimeout);
2034
+ });
2035
+
2036
+ describe('#showVolumeTransferDetail - errors', () => {
2037
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2038
+ try {
2039
+ a.showVolumeTransferDetail(volumeTransfersVolumeTransfers355OrLaterProjectId, volumeTransfersVolumeTransfers355OrLaterTransferId, (data, error) => {
2040
+ try {
2041
+ if (stub) {
2042
+ const displayE = 'Error 400 received on request';
2043
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2044
+ } else {
2045
+ runCommonAsserts(data, error);
2046
+ }
2047
+ saveMockData('VolumeTransfersVolumeTransfers355OrLater', 'showVolumeTransferDetail', 'default', data);
2048
+ done();
2049
+ } catch (err) {
2050
+ log.error(`Test Failure: ${err}`);
2051
+ done(err);
2052
+ }
2053
+ });
2054
+ } catch (error) {
2055
+ log.error(`Adapter Exception: ${error}`);
2056
+ done(error);
2057
+ }
2058
+ }).timeout(attemptTimeout);
2059
+ });
2060
+
2061
+ const attachmentsAttachmentsProjectId = 'fakedata';
2062
+ const attachmentsAttachmentsCreateAttachmentBodyParam = {
2063
+ attachment: {
2064
+ instance_uuid: 'string',
2065
+ connector: {
2066
+ initiator: 'string',
2067
+ ip: 'string',
2068
+ platform: 'string',
2069
+ host: 'string',
2070
+ os_type: 'string',
2071
+ multipath: true,
2072
+ mountpoint: 'string',
2073
+ mode: 'string'
2074
+ },
2075
+ volume_uuid: 'string'
2076
+ }
2077
+ };
2078
+ describe('#createAttachment - errors', () => {
2079
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2080
+ try {
2081
+ a.createAttachment(attachmentsAttachmentsProjectId, attachmentsAttachmentsCreateAttachmentBodyParam, (data, error) => {
2082
+ try {
2083
+ if (stub) {
2084
+ const displayE = 'Error 400 received on request';
2085
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2086
+ } else {
2087
+ runCommonAsserts(data, error);
2088
+ }
2089
+ saveMockData('AttachmentsAttachments', 'createAttachment', 'default', data);
2090
+ done();
2091
+ } catch (err) {
2092
+ log.error(`Test Failure: ${err}`);
2093
+ done(err);
2094
+ }
2095
+ });
2096
+ } catch (error) {
2097
+ log.error(`Adapter Exception: ${error}`);
2098
+ done(error);
2099
+ }
2100
+ }).timeout(attemptTimeout);
2101
+ });
2102
+
2103
+ const attachmentsAttachmentsAttachmentId = 'fakedata';
2104
+ const attachmentsAttachmentsCompleteAttachmentBodyParam = {
2105
+ 'os-complete': {}
2106
+ };
2107
+ describe('#completeAttachment - errors', () => {
2108
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2109
+ try {
2110
+ a.completeAttachment(attachmentsAttachmentsProjectId, attachmentsAttachmentsAttachmentId, attachmentsAttachmentsCompleteAttachmentBodyParam, (data, error) => {
2111
+ try {
2112
+ if (stub) {
2113
+ const displayE = 'Error 400 received on request';
2114
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2115
+ } else {
2116
+ runCommonAsserts(data, error);
2117
+ }
2118
+ saveMockData('AttachmentsAttachments', 'completeAttachment', 'default', data);
2119
+ done();
2120
+ } catch (err) {
2121
+ log.error(`Test Failure: ${err}`);
2122
+ done(err);
2123
+ }
2124
+ });
2125
+ } catch (error) {
2126
+ log.error(`Adapter Exception: ${error}`);
2127
+ done(error);
2128
+ }
2129
+ }).timeout(attemptTimeout);
2130
+ });
2131
+
2132
+ describe('#listAttachments - errors', () => {
2133
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2134
+ try {
2135
+ a.listAttachments(null, null, null, null, null, attachmentsAttachmentsProjectId, (data, error) => {
2136
+ try {
2137
+ if (stub) {
2138
+ const displayE = 'Error 400 received on request';
2139
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2140
+ } else {
2141
+ runCommonAsserts(data, error);
2142
+ }
2143
+ saveMockData('AttachmentsAttachments', 'listAttachments', 'default', data);
2144
+ done();
2145
+ } catch (err) {
2146
+ log.error(`Test Failure: ${err}`);
2147
+ done(err);
2148
+ }
2149
+ });
2150
+ } catch (error) {
2151
+ log.error(`Adapter Exception: ${error}`);
2152
+ done(error);
2153
+ }
2154
+ }).timeout(attemptTimeout);
2155
+ });
2156
+
2157
+ describe('#listAttachmentsWithDetails - errors', () => {
2158
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2159
+ try {
2160
+ a.listAttachmentsWithDetails(null, null, null, null, null, attachmentsAttachmentsProjectId, (data, error) => {
2161
+ try {
2162
+ if (stub) {
2163
+ const displayE = 'Error 400 received on request';
2164
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2165
+ } else {
2166
+ runCommonAsserts(data, error);
2167
+ }
2168
+ saveMockData('AttachmentsAttachments', 'listAttachmentsWithDetails', 'default', data);
2169
+ done();
2170
+ } catch (err) {
2171
+ log.error(`Test Failure: ${err}`);
2172
+ done(err);
2173
+ }
2174
+ });
2175
+ } catch (error) {
2176
+ log.error(`Adapter Exception: ${error}`);
2177
+ done(error);
2178
+ }
2179
+ }).timeout(attemptTimeout);
2180
+ });
2181
+
2182
+ const attachmentsAttachmentsUpdateAnAttachmentBodyParam = {
2183
+ attachment: {
2184
+ connector: {
2185
+ initiator: 'string',
2186
+ ip: 'string',
2187
+ platform: 'string',
2188
+ host: 'string',
2189
+ os_type: 'string',
2190
+ multipath: false,
2191
+ mountpoint: 'string',
2192
+ mode: 'string'
2193
+ }
2194
+ }
2195
+ };
2196
+ describe('#updateAnAttachment - errors', () => {
2197
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2198
+ try {
2199
+ a.updateAnAttachment(attachmentsAttachmentsProjectId, attachmentsAttachmentsAttachmentId, attachmentsAttachmentsUpdateAnAttachmentBodyParam, (data, error) => {
2200
+ try {
2201
+ if (stub) {
2202
+ const displayE = 'Error 400 received on request';
2203
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2204
+ } else {
2205
+ runCommonAsserts(data, error);
2206
+ }
2207
+ saveMockData('AttachmentsAttachments', 'updateAnAttachment', 'default', data);
2208
+ done();
2209
+ } catch (err) {
2210
+ log.error(`Test Failure: ${err}`);
2211
+ done(err);
2212
+ }
2213
+ });
2214
+ } catch (error) {
2215
+ log.error(`Adapter Exception: ${error}`);
2216
+ done(error);
2217
+ }
2218
+ }).timeout(attemptTimeout);
2219
+ });
2220
+
2221
+ describe('#showAttachmentDetails - errors', () => {
2222
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2223
+ try {
2224
+ a.showAttachmentDetails(attachmentsAttachmentsProjectId, attachmentsAttachmentsAttachmentId, (data, error) => {
2225
+ try {
2226
+ if (stub) {
2227
+ const displayE = 'Error 400 received on request';
2228
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2229
+ } else {
2230
+ runCommonAsserts(data, error);
2231
+ }
2232
+ saveMockData('AttachmentsAttachments', 'showAttachmentDetails', 'default', data);
2233
+ done();
2234
+ } catch (err) {
2235
+ log.error(`Test Failure: ${err}`);
2236
+ done(err);
2237
+ }
2238
+ });
2239
+ } catch (error) {
2240
+ log.error(`Adapter Exception: ${error}`);
2241
+ done(error);
2242
+ }
2243
+ }).timeout(attemptTimeout);
2244
+ });
2245
+
2246
+ const backEndStoragePoolsProjectId = 'fakedata';
2247
+ describe('#listAllBackEndStoragePools - errors', () => {
2248
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2249
+ try {
2250
+ a.listAllBackEndStoragePools(null, backEndStoragePoolsProjectId, (data, error) => {
2251
+ try {
2252
+ if (stub) {
2253
+ const displayE = 'Error 400 received on request';
2254
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2255
+ } else {
2256
+ runCommonAsserts(data, error);
2257
+ }
2258
+ saveMockData('BackEndStoragePools', 'listAllBackEndStoragePools', 'default', data);
2259
+ done();
2260
+ } catch (err) {
2261
+ log.error(`Test Failure: ${err}`);
2262
+ done(err);
2263
+ }
2264
+ });
2265
+ } catch (error) {
2266
+ log.error(`Adapter Exception: ${error}`);
2267
+ done(error);
2268
+ }
2269
+ }).timeout(attemptTimeout);
2270
+ });
2271
+
2272
+ const backupsBackupsProjectId = 'fakedata';
2273
+ const backupsBackupsCreateABackupBodyParam = {
2274
+ backup: {
2275
+ container: 'string',
2276
+ description: 'string',
2277
+ name: 'string',
2278
+ volume_id: 'string',
2279
+ incremental: true,
2280
+ availability_zone: 'string',
2281
+ metadata: {}
2282
+ }
2283
+ };
2284
+ describe('#createABackup - errors', () => {
2285
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2286
+ try {
2287
+ a.createABackup(backupsBackupsProjectId, backupsBackupsCreateABackupBodyParam, (data, error) => {
2288
+ try {
2289
+ if (stub) {
2290
+ const displayE = 'Error 400 received on request';
2291
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2292
+ } else {
2293
+ runCommonAsserts(data, error);
2294
+ }
2295
+ saveMockData('BackupsBackups', 'createABackup', 'default', data);
2296
+ done();
2297
+ } catch (err) {
2298
+ log.error(`Test Failure: ${err}`);
2299
+ done(err);
2300
+ }
2301
+ });
2302
+ } catch (error) {
2303
+ log.error(`Adapter Exception: ${error}`);
2304
+ done(error);
2305
+ }
2306
+ }).timeout(attemptTimeout);
2307
+ });
2308
+
2309
+ const backupsBackupsImportABackupBodyParam = {
2310
+ 'backup-record': {
2311
+ backup_service: 'string',
2312
+ backup_url: 'string'
2313
+ }
2314
+ };
2315
+ describe('#importABackup - errors', () => {
2316
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2317
+ try {
2318
+ a.importABackup(backupsBackupsProjectId, backupsBackupsImportABackupBodyParam, (data, error) => {
2319
+ try {
2320
+ if (stub) {
2321
+ const displayE = 'Error 400 received on request';
2322
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2323
+ } else {
2324
+ runCommonAsserts(data, error);
2325
+ }
2326
+ saveMockData('BackupsBackups', 'importABackup', 'default', data);
2327
+ done();
2328
+ } catch (err) {
2329
+ log.error(`Test Failure: ${err}`);
2330
+ done(err);
2331
+ }
2332
+ });
2333
+ } catch (error) {
2334
+ log.error(`Adapter Exception: ${error}`);
2335
+ done(error);
2336
+ }
2337
+ }).timeout(attemptTimeout);
2338
+ });
2339
+
2340
+ const backupsBackupsBackupId = 'fakedata';
2341
+ const backupsBackupsRestoreABackupBodyParam = {
2342
+ restore: {
2343
+ name: 'string',
2344
+ volume_id: 'string'
2345
+ }
2346
+ };
2347
+ describe('#restoreABackup - errors', () => {
2348
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2349
+ try {
2350
+ a.restoreABackup(backupsBackupsProjectId, backupsBackupsBackupId, backupsBackupsRestoreABackupBodyParam, (data, error) => {
2351
+ try {
2352
+ if (stub) {
2353
+ const displayE = 'Error 400 received on request';
2354
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2355
+ } else {
2356
+ runCommonAsserts(data, error);
2357
+ }
2358
+ saveMockData('BackupsBackups', 'restoreABackup', 'default', data);
2359
+ done();
2360
+ } catch (err) {
2361
+ log.error(`Test Failure: ${err}`);
2362
+ done(err);
2363
+ }
2364
+ });
2365
+ } catch (error) {
2366
+ log.error(`Adapter Exception: ${error}`);
2367
+ done(error);
2368
+ }
2369
+ }).timeout(attemptTimeout);
2370
+ });
2371
+
2372
+ describe('#listBackupsForProject - errors', () => {
2373
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2374
+ try {
2375
+ a.listBackupsForProject(null, null, null, null, null, backupsBackupsProjectId, (data, error) => {
2376
+ try {
2377
+ if (stub) {
2378
+ const displayE = 'Error 400 received on request';
2379
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2380
+ } else {
2381
+ runCommonAsserts(data, error);
2382
+ }
2383
+ saveMockData('BackupsBackups', 'listBackupsForProject', 'default', data);
2384
+ done();
2385
+ } catch (err) {
2386
+ log.error(`Test Failure: ${err}`);
2387
+ done(err);
2388
+ }
2389
+ });
2390
+ } catch (error) {
2391
+ log.error(`Adapter Exception: ${error}`);
2392
+ done(error);
2393
+ }
2394
+ }).timeout(attemptTimeout);
2395
+ });
2396
+
2397
+ describe('#listBackupsWithDetail - errors', () => {
2398
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2399
+ try {
2400
+ a.listBackupsWithDetail(null, null, null, null, null, null, backupsBackupsProjectId, (data, error) => {
2401
+ try {
2402
+ if (stub) {
2403
+ const displayE = 'Error 400 received on request';
2404
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2405
+ } else {
2406
+ runCommonAsserts(data, error);
2407
+ }
2408
+ saveMockData('BackupsBackups', 'listBackupsWithDetail', 'default', data);
2409
+ done();
2410
+ } catch (err) {
2411
+ log.error(`Test Failure: ${err}`);
2412
+ done(err);
2413
+ }
2414
+ });
2415
+ } catch (error) {
2416
+ log.error(`Adapter Exception: ${error}`);
2417
+ done(error);
2418
+ }
2419
+ }).timeout(attemptTimeout);
2420
+ });
2421
+
2422
+ const backupsBackupsUpdateABackupBodyParam = {
2423
+ backup: {
2424
+ name: 'string',
2425
+ metadata: {
2426
+ key: 'string'
2427
+ },
2428
+ description: 'string'
2429
+ }
2430
+ };
2431
+ describe('#updateABackup - errors', () => {
2432
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2433
+ try {
2434
+ a.updateABackup(backupsBackupsProjectId, backupsBackupsBackupId, backupsBackupsUpdateABackupBodyParam, (data, error) => {
2435
+ try {
2436
+ if (stub) {
2437
+ const displayE = 'Error 400 received on request';
2438
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2439
+ } else {
2440
+ runCommonAsserts(data, error);
2441
+ }
2442
+ saveMockData('BackupsBackups', 'updateABackup', 'default', data);
2443
+ done();
2444
+ } catch (err) {
2445
+ log.error(`Test Failure: ${err}`);
2446
+ done(err);
2447
+ }
2448
+ });
2449
+ } catch (error) {
2450
+ log.error(`Adapter Exception: ${error}`);
2451
+ done(error);
2452
+ }
2453
+ }).timeout(attemptTimeout);
2454
+ });
2455
+
2456
+ describe('#showBackupDetail - errors', () => {
2457
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2458
+ try {
2459
+ a.showBackupDetail(backupsBackupsProjectId, backupsBackupsBackupId, (data, error) => {
2460
+ try {
2461
+ if (stub) {
2462
+ const displayE = 'Error 400 received on request';
2463
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2464
+ } else {
2465
+ runCommonAsserts(data, error);
2466
+ }
2467
+ saveMockData('BackupsBackups', 'showBackupDetail', 'default', data);
2468
+ done();
2469
+ } catch (err) {
2470
+ log.error(`Test Failure: ${err}`);
2471
+ done(err);
2472
+ }
2473
+ });
2474
+ } catch (error) {
2475
+ log.error(`Adapter Exception: ${error}`);
2476
+ done(error);
2477
+ }
2478
+ }).timeout(attemptTimeout);
2479
+ });
2480
+
2481
+ describe('#exportABackup - errors', () => {
2482
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2483
+ try {
2484
+ a.exportABackup(backupsBackupsProjectId, backupsBackupsBackupId, (data, error) => {
2485
+ try {
2486
+ if (stub) {
2487
+ const displayE = 'Error 400 received on request';
2488
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2489
+ } else {
2490
+ runCommonAsserts(data, error);
2491
+ }
2492
+ saveMockData('BackupsBackups', 'exportABackup', 'default', data);
2493
+ done();
2494
+ } catch (err) {
2495
+ log.error(`Test Failure: ${err}`);
2496
+ done(err);
2497
+ }
2498
+ });
2499
+ } catch (error) {
2500
+ log.error(`Adapter Exception: ${error}`);
2501
+ done(error);
2502
+ }
2503
+ }).timeout(attemptTimeout);
2504
+ });
2505
+
2506
+ const backupActionsBackupsActionProjectId = 'fakedata';
2507
+ const backupActionsBackupsActionBackupId = 'fakedata';
2508
+ const backupActionsBackupsActionForceDeleteABackupBodyParam = {
2509
+ 'os-force_delete': {}
2510
+ };
2511
+ describe('#forceDeleteABackup - errors', () => {
2512
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2513
+ try {
2514
+ a.forceDeleteABackup(backupActionsBackupsActionProjectId, backupActionsBackupsActionBackupId, backupActionsBackupsActionForceDeleteABackupBodyParam, (data, error) => {
2515
+ try {
2516
+ if (stub) {
2517
+ const displayE = 'Error 400 received on request';
2518
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2519
+ } else {
2520
+ runCommonAsserts(data, error);
2521
+ }
2522
+ saveMockData('BackupActionsBackupsAction', 'forceDeleteABackup', 'default', data);
2523
+ done();
2524
+ } catch (err) {
2525
+ log.error(`Test Failure: ${err}`);
2526
+ done(err);
2527
+ }
2528
+ });
2529
+ } catch (error) {
2530
+ log.error(`Adapter Exception: ${error}`);
2531
+ done(error);
2532
+ }
2533
+ }).timeout(attemptTimeout);
2534
+ });
2535
+
2536
+ const capabilitiesForStorageBackEndsCapabilitiesProjectId = 'fakedata';
2537
+ const capabilitiesForStorageBackEndsCapabilitiesHostname = 'fakedata';
2538
+ describe('#showAllBackEndCapabilities - errors', () => {
2539
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2540
+ try {
2541
+ a.showAllBackEndCapabilities(capabilitiesForStorageBackEndsCapabilitiesProjectId, capabilitiesForStorageBackEndsCapabilitiesHostname, (data, error) => {
2542
+ try {
2543
+ if (stub) {
2544
+ const displayE = 'Error 400 received on request';
2545
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2546
+ } else {
2547
+ runCommonAsserts(data, error);
2548
+ }
2549
+ saveMockData('CapabilitiesForStorageBackEndsCapabilities', 'showAllBackEndCapabilities', 'default', data);
2550
+ done();
2551
+ } catch (err) {
2552
+ log.error(`Test Failure: ${err}`);
2553
+ done(err);
2554
+ }
2555
+ });
2556
+ } catch (error) {
2557
+ log.error(`Adapter Exception: ${error}`);
2558
+ done(error);
2559
+ }
2560
+ }).timeout(attemptTimeout);
2561
+ });
2562
+
2563
+ const consistencyGroupsDEPRECATEDProjectId = 'fakedata';
2564
+ const consistencyGroupsDEPRECATEDCreateAConsistencyGroupBodyParam = {
2565
+ consistencygroup: {
2566
+ name: 'string',
2567
+ description: 'string',
2568
+ volume_types: 'string',
2569
+ availability_zone: 'string'
2570
+ }
2571
+ };
2572
+ describe('#createAConsistencyGroup - errors', () => {
2573
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2574
+ try {
2575
+ a.createAConsistencyGroup(consistencyGroupsDEPRECATEDProjectId, consistencyGroupsDEPRECATEDCreateAConsistencyGroupBodyParam, (data, error) => {
2576
+ try {
2577
+ if (stub) {
2578
+ const displayE = 'Error 400 received on request';
2579
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2580
+ } else {
2581
+ runCommonAsserts(data, error);
2582
+ }
2583
+ saveMockData('ConsistencyGroupsDEPRECATED', 'createAConsistencyGroup', 'default', data);
2584
+ done();
2585
+ } catch (err) {
2586
+ log.error(`Test Failure: ${err}`);
2587
+ done(err);
2588
+ }
2589
+ });
2590
+ } catch (error) {
2591
+ log.error(`Adapter Exception: ${error}`);
2592
+ done(error);
2593
+ }
2594
+ }).timeout(attemptTimeout);
2595
+ });
2596
+
2597
+ const consistencyGroupsDEPRECATEDCreateAConsistencyGroupFromSourceBodyParam = {
2598
+ 'consistencygroup-from-src': {
2599
+ name: 'string',
2600
+ description: 'string',
2601
+ cgsnapshot_id: 'string',
2602
+ source_cgid: 'string',
2603
+ user_id: 'string',
2604
+ project_id: 'string',
2605
+ status: 'string'
2606
+ }
2607
+ };
2608
+ describe('#createAConsistencyGroupFromSource - errors', () => {
2609
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2610
+ try {
2611
+ a.createAConsistencyGroupFromSource(consistencyGroupsDEPRECATEDProjectId, consistencyGroupsDEPRECATEDCreateAConsistencyGroupFromSourceBodyParam, (data, error) => {
2612
+ try {
2613
+ if (stub) {
2614
+ const displayE = 'Error 400 received on request';
2615
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2616
+ } else {
2617
+ runCommonAsserts(data, error);
2618
+ }
2619
+ saveMockData('ConsistencyGroupsDEPRECATED', 'createAConsistencyGroupFromSource', 'default', data);
2620
+ done();
2621
+ } catch (err) {
2622
+ log.error(`Test Failure: ${err}`);
2623
+ done(err);
2624
+ }
2625
+ });
2626
+ } catch (error) {
2627
+ log.error(`Adapter Exception: ${error}`);
2628
+ done(error);
2629
+ }
2630
+ }).timeout(attemptTimeout);
2631
+ });
2632
+
2633
+ const consistencyGroupsDEPRECATEDConsistencygroupId = 'fakedata';
2634
+ const consistencyGroupsDEPRECATEDDeleteAConsistencyGroupBodyParam = {
2635
+ consistencygroup: {
2636
+ force: false
2637
+ }
2638
+ };
2639
+ describe('#deleteAConsistencyGroup - errors', () => {
2640
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2641
+ try {
2642
+ a.deleteAConsistencyGroup(consistencyGroupsDEPRECATEDProjectId, consistencyGroupsDEPRECATEDConsistencygroupId, consistencyGroupsDEPRECATEDDeleteAConsistencyGroupBodyParam, (data, error) => {
2643
+ try {
2644
+ if (stub) {
2645
+ const displayE = 'Error 400 received on request';
2646
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2647
+ } else {
2648
+ runCommonAsserts(data, error);
2649
+ }
2650
+ saveMockData('ConsistencyGroupsDEPRECATED', 'deleteAConsistencyGroup', 'default', data);
2651
+ done();
2652
+ } catch (err) {
2653
+ log.error(`Test Failure: ${err}`);
2654
+ done(err);
2655
+ }
2656
+ });
2657
+ } catch (error) {
2658
+ log.error(`Adapter Exception: ${error}`);
2659
+ done(error);
2660
+ }
2661
+ }).timeout(attemptTimeout);
2662
+ });
2663
+
2664
+ describe('#listProjectSConsistencyGroups - errors', () => {
2665
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2666
+ try {
2667
+ a.listProjectSConsistencyGroups(null, null, null, null, consistencyGroupsDEPRECATEDProjectId, (data, error) => {
2668
+ try {
2669
+ if (stub) {
2670
+ const displayE = 'Error 400 received on request';
2671
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2672
+ } else {
2673
+ runCommonAsserts(data, error);
2674
+ }
2675
+ saveMockData('ConsistencyGroupsDEPRECATED', 'listProjectSConsistencyGroups', 'default', data);
2676
+ done();
2677
+ } catch (err) {
2678
+ log.error(`Test Failure: ${err}`);
2679
+ done(err);
2680
+ }
2681
+ });
2682
+ } catch (error) {
2683
+ log.error(`Adapter Exception: ${error}`);
2684
+ done(error);
2685
+ }
2686
+ }).timeout(attemptTimeout);
2687
+ });
2688
+
2689
+ describe('#listConsistencyGroupsAndDetails - errors', () => {
2690
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2691
+ try {
2692
+ a.listConsistencyGroupsAndDetails(null, null, null, null, consistencyGroupsDEPRECATEDProjectId, (data, error) => {
2693
+ try {
2694
+ if (stub) {
2695
+ const displayE = 'Error 400 received on request';
2696
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2697
+ } else {
2698
+ runCommonAsserts(data, error);
2699
+ }
2700
+ saveMockData('ConsistencyGroupsDEPRECATED', 'listConsistencyGroupsAndDetails', 'default', data);
2701
+ done();
2702
+ } catch (err) {
2703
+ log.error(`Test Failure: ${err}`);
2704
+ done(err);
2705
+ }
2706
+ });
2707
+ } catch (error) {
2708
+ log.error(`Adapter Exception: ${error}`);
2709
+ done(error);
2710
+ }
2711
+ }).timeout(attemptTimeout);
2712
+ });
2713
+
2714
+ describe('#showAConsistencyGroupSDetails - errors', () => {
2715
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2716
+ try {
2717
+ a.showAConsistencyGroupSDetails(consistencyGroupsDEPRECATEDProjectId, consistencyGroupsDEPRECATEDConsistencygroupId, (data, error) => {
2718
+ try {
2719
+ if (stub) {
2720
+ const displayE = 'Error 400 received on request';
2721
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2722
+ } else {
2723
+ runCommonAsserts(data, error);
2724
+ }
2725
+ saveMockData('ConsistencyGroupsDEPRECATED', 'showAConsistencyGroupSDetails', 'default', data);
2726
+ done();
2727
+ } catch (err) {
2728
+ log.error(`Test Failure: ${err}`);
2729
+ done(err);
2730
+ }
2731
+ });
2732
+ } catch (error) {
2733
+ log.error(`Adapter Exception: ${error}`);
2734
+ done(error);
2735
+ }
2736
+ }).timeout(attemptTimeout);
2737
+ });
2738
+
2739
+ const consistencyGroupsDEPRECATEDUpdateAConsistencyGroupBodyParam = {
2740
+ consistencygroup: {
2741
+ name: 'string',
2742
+ description: 'string',
2743
+ add_volumes: 'string',
2744
+ remove_volumes: 'string'
2745
+ }
2746
+ };
2747
+ describe('#updateAConsistencyGroup - errors', () => {
2748
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2749
+ try {
2750
+ a.updateAConsistencyGroup(consistencyGroupsDEPRECATEDProjectId, consistencyGroupsDEPRECATEDConsistencygroupId, consistencyGroupsDEPRECATEDUpdateAConsistencyGroupBodyParam, (data, error) => {
2751
+ try {
2752
+ if (stub) {
2753
+ const displayE = 'Error 400 received on request';
2754
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2755
+ } else {
2756
+ runCommonAsserts(data, error);
2757
+ }
2758
+ saveMockData('ConsistencyGroupsDEPRECATED', 'updateAConsistencyGroup', 'default', data);
2759
+ done();
2760
+ } catch (err) {
2761
+ log.error(`Test Failure: ${err}`);
2762
+ done(err);
2763
+ }
2764
+ });
2765
+ } catch (error) {
2766
+ log.error(`Adapter Exception: ${error}`);
2767
+ done(error);
2768
+ }
2769
+ }).timeout(attemptTimeout);
2770
+ });
2771
+
2772
+ const consistencyGroupSnapshotsDEPRECATEDProjectId = 'fakedata';
2773
+ const consistencyGroupSnapshotsDEPRECATEDCreateAConsistencyGroupSnapshotBodyParam = {
2774
+ cgsnapshot: {
2775
+ consistencygroup_id: 'string',
2776
+ name: 'string',
2777
+ description: 'string',
2778
+ status: 'string'
2779
+ }
2780
+ };
2781
+ describe('#createAConsistencyGroupSnapshot - errors', () => {
2782
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2783
+ try {
2784
+ a.createAConsistencyGroupSnapshot(consistencyGroupSnapshotsDEPRECATEDProjectId, consistencyGroupSnapshotsDEPRECATEDCreateAConsistencyGroupSnapshotBodyParam, (data, error) => {
2785
+ try {
2786
+ if (stub) {
2787
+ const displayE = 'Error 400 received on request';
2788
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2789
+ } else {
2790
+ runCommonAsserts(data, error);
2791
+ }
2792
+ saveMockData('ConsistencyGroupSnapshotsDEPRECATED', 'createAConsistencyGroupSnapshot', 'default', data);
2793
+ done();
2794
+ } catch (err) {
2795
+ log.error(`Test Failure: ${err}`);
2796
+ done(err);
2797
+ }
2798
+ });
2799
+ } catch (error) {
2800
+ log.error(`Adapter Exception: ${error}`);
2801
+ done(error);
2802
+ }
2803
+ }).timeout(attemptTimeout);
2804
+ });
2805
+
2806
+ describe('#listAllConsistencyGroupSnapshots - errors', () => {
2807
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2808
+ try {
2809
+ a.listAllConsistencyGroupSnapshots(null, consistencyGroupSnapshotsDEPRECATEDProjectId, (data, error) => {
2810
+ try {
2811
+ if (stub) {
2812
+ const displayE = 'Error 400 received on request';
2813
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2814
+ } else {
2815
+ runCommonAsserts(data, error);
2816
+ }
2817
+ saveMockData('ConsistencyGroupSnapshotsDEPRECATED', 'listAllConsistencyGroupSnapshots', 'default', data);
2818
+ done();
2819
+ } catch (err) {
2820
+ log.error(`Test Failure: ${err}`);
2821
+ done(err);
2822
+ }
2823
+ });
2824
+ } catch (error) {
2825
+ log.error(`Adapter Exception: ${error}`);
2826
+ done(error);
2827
+ }
2828
+ }).timeout(attemptTimeout);
2829
+ });
2830
+
2831
+ describe('#listAllConsistencyGroupSnapshotsWithDetails - errors', () => {
2832
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2833
+ try {
2834
+ a.listAllConsistencyGroupSnapshotsWithDetails(null, consistencyGroupSnapshotsDEPRECATEDProjectId, (data, error) => {
2835
+ try {
2836
+ if (stub) {
2837
+ const displayE = 'Error 400 received on request';
2838
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2839
+ } else {
2840
+ runCommonAsserts(data, error);
2841
+ }
2842
+ saveMockData('ConsistencyGroupSnapshotsDEPRECATED', 'listAllConsistencyGroupSnapshotsWithDetails', 'default', data);
2843
+ done();
2844
+ } catch (err) {
2845
+ log.error(`Test Failure: ${err}`);
2846
+ done(err);
2847
+ }
2848
+ });
2849
+ } catch (error) {
2850
+ log.error(`Adapter Exception: ${error}`);
2851
+ done(error);
2852
+ }
2853
+ }).timeout(attemptTimeout);
2854
+ });
2855
+
2856
+ const consistencyGroupSnapshotsDEPRECATEDCgsnapshotId = 'fakedata';
2857
+ describe('#showConsistencyGroupSnapshotDetail - errors', () => {
2858
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2859
+ try {
2860
+ a.showConsistencyGroupSnapshotDetail(consistencyGroupSnapshotsDEPRECATEDProjectId, consistencyGroupSnapshotsDEPRECATEDCgsnapshotId, (data, error) => {
2861
+ try {
2862
+ if (stub) {
2863
+ const displayE = 'Error 400 received on request';
2864
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2865
+ } else {
2866
+ runCommonAsserts(data, error);
2867
+ }
2868
+ saveMockData('ConsistencyGroupSnapshotsDEPRECATED', 'showConsistencyGroupSnapshotDetail', 'default', data);
2869
+ done();
2870
+ } catch (err) {
2871
+ log.error(`Test Failure: ${err}`);
2872
+ done(err);
2873
+ }
2874
+ });
2875
+ } catch (error) {
2876
+ log.error(`Adapter Exception: ${error}`);
2877
+ done(error);
2878
+ }
2879
+ }).timeout(attemptTimeout);
2880
+ });
2881
+
2882
+ const servicesOsServicesProjectId = 'fakedata';
2883
+ describe('#listAllCinderServices - errors', () => {
2884
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2885
+ try {
2886
+ a.listAllCinderServices(null, null, servicesOsServicesProjectId, (data, error) => {
2887
+ try {
2888
+ if (stub) {
2889
+ const displayE = 'Error 400 received on request';
2890
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2891
+ } else {
2892
+ runCommonAsserts(data, error);
2893
+ }
2894
+ saveMockData('ServicesOsServices', 'listAllCinderServices', 'default', data);
2895
+ done();
2896
+ } catch (err) {
2897
+ log.error(`Test Failure: ${err}`);
2898
+ done(err);
2899
+ }
2900
+ });
2901
+ } catch (error) {
2902
+ log.error(`Adapter Exception: ${error}`);
2903
+ done(error);
2904
+ }
2905
+ }).timeout(attemptTimeout);
2906
+ });
2907
+
2908
+ const servicesOsServicesDisableACinderServiceBodyParam = {
2909
+ binary: 'string',
2910
+ host: 'string'
2911
+ };
2912
+ describe('#disableACinderService - errors', () => {
2913
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2914
+ try {
2915
+ a.disableACinderService(servicesOsServicesProjectId, servicesOsServicesDisableACinderServiceBodyParam, (data, error) => {
2916
+ try {
2917
+ if (stub) {
2918
+ const displayE = 'Error 400 received on request';
2919
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2920
+ } else {
2921
+ runCommonAsserts(data, error);
2922
+ }
2923
+ saveMockData('ServicesOsServices', 'disableACinderService', 'default', data);
2924
+ done();
2925
+ } catch (err) {
2926
+ log.error(`Test Failure: ${err}`);
2927
+ done(err);
2928
+ }
2929
+ });
2930
+ } catch (error) {
2931
+ log.error(`Adapter Exception: ${error}`);
2932
+ done(error);
2933
+ }
2934
+ }).timeout(attemptTimeout);
2935
+ });
2936
+
2937
+ const servicesOsServicesLogDisabledCinderServiceInformationBodyParam = {
2938
+ binary: 'string',
2939
+ host: 'string',
2940
+ disabled_reason: 'string'
2941
+ };
2942
+ describe('#logDisabledCinderServiceInformation - errors', () => {
2943
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2944
+ try {
2945
+ a.logDisabledCinderServiceInformation(servicesOsServicesProjectId, servicesOsServicesLogDisabledCinderServiceInformationBodyParam, (data, error) => {
2946
+ try {
2947
+ if (stub) {
2948
+ const displayE = 'Error 400 received on request';
2949
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2950
+ } else {
2951
+ runCommonAsserts(data, error);
2952
+ }
2953
+ saveMockData('ServicesOsServices', 'logDisabledCinderServiceInformation', 'default', data);
2954
+ done();
2955
+ } catch (err) {
2956
+ log.error(`Test Failure: ${err}`);
2957
+ done(err);
2958
+ }
2959
+ });
2960
+ } catch (error) {
2961
+ log.error(`Adapter Exception: ${error}`);
2962
+ done(error);
2963
+ }
2964
+ }).timeout(attemptTimeout);
2965
+ });
2966
+
2967
+ const servicesOsServicesEnableACinderServiceBodyParam = {
2968
+ binary: 'string',
2969
+ host: 'string'
2970
+ };
2971
+ describe('#enableACinderService - errors', () => {
2972
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
2973
+ try {
2974
+ a.enableACinderService(servicesOsServicesProjectId, servicesOsServicesEnableACinderServiceBodyParam, (data, error) => {
2975
+ try {
2976
+ if (stub) {
2977
+ const displayE = 'Error 400 received on request';
2978
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
2979
+ } else {
2980
+ runCommonAsserts(data, error);
2981
+ }
2982
+ saveMockData('ServicesOsServices', 'enableACinderService', 'default', data);
2983
+ done();
2984
+ } catch (err) {
2985
+ log.error(`Test Failure: ${err}`);
2986
+ done(err);
2987
+ }
2988
+ });
2989
+ } catch (error) {
2990
+ log.error(`Adapter Exception: ${error}`);
2991
+ done(error);
2992
+ }
2993
+ }).timeout(attemptTimeout);
2994
+ });
2995
+
2996
+ const servicesOsServicesFailoverACinderBackendHostBodyParam = {
2997
+ host: 'string',
2998
+ backend_id: 'string'
2999
+ };
3000
+ describe('#failoverACinderBackendHost - errors', () => {
3001
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3002
+ try {
3003
+ a.failoverACinderBackendHost(servicesOsServicesProjectId, servicesOsServicesFailoverACinderBackendHostBodyParam, (data, error) => {
3004
+ try {
3005
+ if (stub) {
3006
+ const displayE = 'Error 400 received on request';
3007
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3008
+ } else {
3009
+ runCommonAsserts(data, error);
3010
+ }
3011
+ saveMockData('ServicesOsServices', 'failoverACinderBackendHost', 'default', data);
3012
+ done();
3013
+ } catch (err) {
3014
+ log.error(`Test Failure: ${err}`);
3015
+ done(err);
3016
+ }
3017
+ });
3018
+ } catch (error) {
3019
+ log.error(`Adapter Exception: ${error}`);
3020
+ done(error);
3021
+ }
3022
+ }).timeout(attemptTimeout);
3023
+ });
3024
+
3025
+ const servicesOsServicesFreezeACinderBackendHostBodyParam = {
3026
+ host: 'string'
3027
+ };
3028
+ describe('#freezeACinderBackendHost - errors', () => {
3029
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3030
+ try {
3031
+ a.freezeACinderBackendHost(servicesOsServicesProjectId, servicesOsServicesFreezeACinderBackendHostBodyParam, (data, error) => {
3032
+ try {
3033
+ if (stub) {
3034
+ const displayE = 'Error 400 received on request';
3035
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3036
+ } else {
3037
+ runCommonAsserts(data, error);
3038
+ }
3039
+ saveMockData('ServicesOsServices', 'freezeACinderBackendHost', 'default', data);
3040
+ done();
3041
+ } catch (err) {
3042
+ log.error(`Test Failure: ${err}`);
3043
+ done(err);
3044
+ }
3045
+ });
3046
+ } catch (error) {
3047
+ log.error(`Adapter Exception: ${error}`);
3048
+ done(error);
3049
+ }
3050
+ }).timeout(attemptTimeout);
3051
+ });
3052
+
3053
+ const servicesOsServicesGetCurrentLogLevelsForCinderServicesBodyParam = {
3054
+ binary: 'string',
3055
+ server: 'string',
3056
+ prefix: 'string'
3057
+ };
3058
+ describe('#getCurrentLogLevelsForCinderServices - errors', () => {
3059
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3060
+ try {
3061
+ a.getCurrentLogLevelsForCinderServices(servicesOsServicesProjectId, servicesOsServicesGetCurrentLogLevelsForCinderServicesBodyParam, (data, error) => {
3062
+ try {
3063
+ if (stub) {
3064
+ const displayE = 'Error 400 received on request';
3065
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3066
+ } else {
3067
+ runCommonAsserts(data, error);
3068
+ }
3069
+ saveMockData('ServicesOsServices', 'getCurrentLogLevelsForCinderServices', 'default', data);
3070
+ done();
3071
+ } catch (err) {
3072
+ log.error(`Test Failure: ${err}`);
3073
+ done(err);
3074
+ }
3075
+ });
3076
+ } catch (error) {
3077
+ log.error(`Adapter Exception: ${error}`);
3078
+ done(error);
3079
+ }
3080
+ }).timeout(attemptTimeout);
3081
+ });
3082
+
3083
+ const servicesOsServicesSetLogLevelsOfCinderServicesDynamicallyBodyParam = {
3084
+ binary: 'string',
3085
+ server: 'string',
3086
+ prefix: 'string',
3087
+ level: 'string'
3088
+ };
3089
+ describe('#setLogLevelsOfCinderServicesDynamically - errors', () => {
3090
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3091
+ try {
3092
+ a.setLogLevelsOfCinderServicesDynamically(servicesOsServicesProjectId, servicesOsServicesSetLogLevelsOfCinderServicesDynamicallyBodyParam, (data, error) => {
3093
+ try {
3094
+ if (stub) {
3095
+ const displayE = 'Error 400 received on request';
3096
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3097
+ } else {
3098
+ runCommonAsserts(data, error);
3099
+ }
3100
+ saveMockData('ServicesOsServices', 'setLogLevelsOfCinderServicesDynamically', 'default', data);
3101
+ done();
3102
+ } catch (err) {
3103
+ log.error(`Test Failure: ${err}`);
3104
+ done(err);
3105
+ }
3106
+ });
3107
+ } catch (error) {
3108
+ log.error(`Adapter Exception: ${error}`);
3109
+ done(error);
3110
+ }
3111
+ }).timeout(attemptTimeout);
3112
+ });
3113
+
3114
+ const servicesOsServicesThawACinderBackendHostBodyParam = {
3115
+ host: 'string'
3116
+ };
3117
+ describe('#thawACinderBackendHost - errors', () => {
3118
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3119
+ try {
3120
+ a.thawACinderBackendHost(servicesOsServicesProjectId, servicesOsServicesThawACinderBackendHostBodyParam, (data, error) => {
3121
+ try {
3122
+ if (stub) {
3123
+ const displayE = 'Error 400 received on request';
3124
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3125
+ } else {
3126
+ runCommonAsserts(data, error);
3127
+ }
3128
+ saveMockData('ServicesOsServices', 'thawACinderBackendHost', 'default', data);
3129
+ done();
3130
+ } catch (err) {
3131
+ log.error(`Test Failure: ${err}`);
3132
+ done(err);
3133
+ }
3134
+ });
3135
+ } catch (error) {
3136
+ log.error(`Adapter Exception: ${error}`);
3137
+ done(error);
3138
+ }
3139
+ }).timeout(attemptTimeout);
3140
+ });
3141
+
3142
+ const genericVolumeGroupsGroupsProjectId = 'fakedata';
3143
+ const genericVolumeGroupsGroupsCreateGroupBodyParam = {
3144
+ group: {
3145
+ name: 'string',
3146
+ description: 'string',
3147
+ group_type: 'string',
3148
+ volume_types: [
3149
+ 'string'
3150
+ ],
3151
+ availability_zone: 'string'
3152
+ }
3153
+ };
3154
+ describe('#createGroup - errors', () => {
3155
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3156
+ try {
3157
+ a.createGroup(genericVolumeGroupsGroupsProjectId, genericVolumeGroupsGroupsCreateGroupBodyParam, (data, error) => {
3158
+ try {
3159
+ if (stub) {
3160
+ const displayE = 'Error 400 received on request';
3161
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3162
+ } else {
3163
+ runCommonAsserts(data, error);
3164
+ }
3165
+ saveMockData('GenericVolumeGroupsGroups', 'createGroup', 'default', data);
3166
+ done();
3167
+ } catch (err) {
3168
+ log.error(`Test Failure: ${err}`);
3169
+ done(err);
3170
+ }
3171
+ });
3172
+ } catch (error) {
3173
+ log.error(`Adapter Exception: ${error}`);
3174
+ done(error);
3175
+ }
3176
+ }).timeout(attemptTimeout);
3177
+ });
3178
+
3179
+ const genericVolumeGroupsGroupsCreateGroupFromSourceBodyParam = {
3180
+ 'create-from-src': {
3181
+ name: 'string',
3182
+ description: 'string',
3183
+ group_snapshot_id: 'string',
3184
+ source_group_id: 'string'
3185
+ }
3186
+ };
3187
+ describe('#createGroupFromSource - errors', () => {
3188
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3189
+ try {
3190
+ a.createGroupFromSource(genericVolumeGroupsGroupsProjectId, genericVolumeGroupsGroupsCreateGroupFromSourceBodyParam, (data, error) => {
3191
+ try {
3192
+ if (stub) {
3193
+ const displayE = 'Error 400 received on request';
3194
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3195
+ } else {
3196
+ runCommonAsserts(data, error);
3197
+ }
3198
+ saveMockData('GenericVolumeGroupsGroups', 'createGroupFromSource', 'default', data);
3199
+ done();
3200
+ } catch (err) {
3201
+ log.error(`Test Failure: ${err}`);
3202
+ done(err);
3203
+ }
3204
+ });
3205
+ } catch (error) {
3206
+ log.error(`Adapter Exception: ${error}`);
3207
+ done(error);
3208
+ }
3209
+ }).timeout(attemptTimeout);
3210
+ });
3211
+
3212
+ const genericVolumeGroupsGroupsGroupId = 'fakedata';
3213
+ const genericVolumeGroupsGroupsDeleteGroupBodyParam = {
3214
+ delete: {
3215
+ 'delete-volumes': false
3216
+ }
3217
+ };
3218
+ describe('#deleteGroup - errors', () => {
3219
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3220
+ try {
3221
+ a.deleteGroup(genericVolumeGroupsGroupsProjectId, genericVolumeGroupsGroupsGroupId, genericVolumeGroupsGroupsDeleteGroupBodyParam, (data, error) => {
3222
+ try {
3223
+ if (stub) {
3224
+ const displayE = 'Error 400 received on request';
3225
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3226
+ } else {
3227
+ runCommonAsserts(data, error);
3228
+ }
3229
+ saveMockData('GenericVolumeGroupsGroups', 'deleteGroup', 'default', data);
3230
+ done();
3231
+ } catch (err) {
3232
+ log.error(`Test Failure: ${err}`);
3233
+ done(err);
3234
+ }
3235
+ });
3236
+ } catch (error) {
3237
+ log.error(`Adapter Exception: ${error}`);
3238
+ done(error);
3239
+ }
3240
+ }).timeout(attemptTimeout);
3241
+ });
3242
+
3243
+ describe('#listGroups - errors', () => {
3244
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3245
+ try {
3246
+ a.listGroups(null, null, null, null, null, genericVolumeGroupsGroupsProjectId, (data, error) => {
3247
+ try {
3248
+ if (stub) {
3249
+ const displayE = 'Error 400 received on request';
3250
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3251
+ } else {
3252
+ runCommonAsserts(data, error);
3253
+ }
3254
+ saveMockData('GenericVolumeGroupsGroups', 'listGroups', 'default', data);
3255
+ done();
3256
+ } catch (err) {
3257
+ log.error(`Test Failure: ${err}`);
3258
+ done(err);
3259
+ }
3260
+ });
3261
+ } catch (error) {
3262
+ log.error(`Adapter Exception: ${error}`);
3263
+ done(error);
3264
+ }
3265
+ }).timeout(attemptTimeout);
3266
+ });
3267
+
3268
+ describe('#listGroupsWithDetails - errors', () => {
3269
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3270
+ try {
3271
+ a.listGroupsWithDetails(null, null, null, null, null, genericVolumeGroupsGroupsProjectId, null, (data, error) => {
3272
+ try {
3273
+ if (stub) {
3274
+ const displayE = 'Error 400 received on request';
3275
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3276
+ } else {
3277
+ runCommonAsserts(data, error);
3278
+ }
3279
+ saveMockData('GenericVolumeGroupsGroups', 'listGroupsWithDetails', 'default', data);
3280
+ done();
3281
+ } catch (err) {
3282
+ log.error(`Test Failure: ${err}`);
3283
+ done(err);
3284
+ }
3285
+ });
3286
+ } catch (error) {
3287
+ log.error(`Adapter Exception: ${error}`);
3288
+ done(error);
3289
+ }
3290
+ }).timeout(attemptTimeout);
3291
+ });
3292
+
3293
+ const genericVolumeGroupsGroupsUpdateGroupBodyParam = {
3294
+ group: {
3295
+ name: 'string',
3296
+ description: 'string',
3297
+ add_volumes: 'string',
3298
+ remove_volumes: 'string'
3299
+ }
3300
+ };
3301
+ describe('#updateGroup - errors', () => {
3302
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3303
+ try {
3304
+ a.updateGroup(genericVolumeGroupsGroupsProjectId, genericVolumeGroupsGroupsGroupId, genericVolumeGroupsGroupsUpdateGroupBodyParam, (data, error) => {
3305
+ try {
3306
+ if (stub) {
3307
+ const displayE = 'Error 400 received on request';
3308
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3309
+ } else {
3310
+ runCommonAsserts(data, error);
3311
+ }
3312
+ saveMockData('GenericVolumeGroupsGroups', 'updateGroup', 'default', data);
3313
+ done();
3314
+ } catch (err) {
3315
+ log.error(`Test Failure: ${err}`);
3316
+ done(err);
3317
+ }
3318
+ });
3319
+ } catch (error) {
3320
+ log.error(`Adapter Exception: ${error}`);
3321
+ done(error);
3322
+ }
3323
+ }).timeout(attemptTimeout);
3324
+ });
3325
+
3326
+ describe('#showGroupDetails - errors', () => {
3327
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3328
+ try {
3329
+ a.showGroupDetails(genericVolumeGroupsGroupsProjectId, genericVolumeGroupsGroupsGroupId, null, (data, error) => {
3330
+ try {
3331
+ if (stub) {
3332
+ const displayE = 'Error 400 received on request';
3333
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3334
+ } else {
3335
+ runCommonAsserts(data, error);
3336
+ }
3337
+ saveMockData('GenericVolumeGroupsGroups', 'showGroupDetails', 'default', data);
3338
+ done();
3339
+ } catch (err) {
3340
+ log.error(`Test Failure: ${err}`);
3341
+ done(err);
3342
+ }
3343
+ });
3344
+ } catch (error) {
3345
+ log.error(`Adapter Exception: ${error}`);
3346
+ done(error);
3347
+ }
3348
+ }).timeout(attemptTimeout);
3349
+ });
3350
+
3351
+ const groupSnapshotsGroupSnapshotsProjectId = 'fakedata';
3352
+ const groupSnapshotsGroupSnapshotsCreateGroupSnapshotBodyParam = {
3353
+ group_snapshot: {
3354
+ group_id: 'string',
3355
+ name: 'string',
3356
+ description: 'string'
3357
+ }
3358
+ };
3359
+ describe('#createGroupSnapshot - errors', () => {
3360
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3361
+ try {
3362
+ a.createGroupSnapshot(groupSnapshotsGroupSnapshotsProjectId, groupSnapshotsGroupSnapshotsCreateGroupSnapshotBodyParam, (data, error) => {
3363
+ try {
3364
+ if (stub) {
3365
+ const displayE = 'Error 400 received on request';
3366
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3367
+ } else {
3368
+ runCommonAsserts(data, error);
3369
+ }
3370
+ saveMockData('GroupSnapshotsGroupSnapshots', 'createGroupSnapshot', 'default', data);
3371
+ done();
3372
+ } catch (err) {
3373
+ log.error(`Test Failure: ${err}`);
3374
+ done(err);
3375
+ }
3376
+ });
3377
+ } catch (error) {
3378
+ log.error(`Adapter Exception: ${error}`);
3379
+ done(error);
3380
+ }
3381
+ }).timeout(attemptTimeout);
3382
+ });
3383
+
3384
+ const groupSnapshotsGroupSnapshotsGroupSnapshotId = 'fakedata';
3385
+ const groupSnapshotsGroupSnapshotsResetGroupSnapshotStatusBodyParam = {
3386
+ reset_status: {
3387
+ status: 'string'
3388
+ }
3389
+ };
3390
+ describe('#resetGroupSnapshotStatus - errors', () => {
3391
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3392
+ try {
3393
+ a.resetGroupSnapshotStatus(groupSnapshotsGroupSnapshotsProjectId, groupSnapshotsGroupSnapshotsGroupSnapshotId, groupSnapshotsGroupSnapshotsResetGroupSnapshotStatusBodyParam, (data, error) => {
3394
+ try {
3395
+ if (stub) {
3396
+ const displayE = 'Error 400 received on request';
3397
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3398
+ } else {
3399
+ runCommonAsserts(data, error);
3400
+ }
3401
+ saveMockData('GroupSnapshotsGroupSnapshots', 'resetGroupSnapshotStatus', 'default', data);
3402
+ done();
3403
+ } catch (err) {
3404
+ log.error(`Test Failure: ${err}`);
3405
+ done(err);
3406
+ }
3407
+ });
3408
+ } catch (error) {
3409
+ log.error(`Adapter Exception: ${error}`);
3410
+ done(error);
3411
+ }
3412
+ }).timeout(attemptTimeout);
3413
+ });
3414
+
3415
+ describe('#listGroupSnapshots - errors', () => {
3416
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3417
+ try {
3418
+ a.listGroupSnapshots(null, null, null, null, null, null, groupSnapshotsGroupSnapshotsProjectId, (data, error) => {
3419
+ try {
3420
+ if (stub) {
3421
+ const displayE = 'Error 400 received on request';
3422
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3423
+ } else {
3424
+ runCommonAsserts(data, error);
3425
+ }
3426
+ saveMockData('GroupSnapshotsGroupSnapshots', 'listGroupSnapshots', 'default', data);
3427
+ done();
3428
+ } catch (err) {
3429
+ log.error(`Test Failure: ${err}`);
3430
+ done(err);
3431
+ }
3432
+ });
3433
+ } catch (error) {
3434
+ log.error(`Adapter Exception: ${error}`);
3435
+ done(error);
3436
+ }
3437
+ }).timeout(attemptTimeout);
3438
+ });
3439
+
3440
+ describe('#listGroupSnapshotsWithDetails - errors', () => {
3441
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3442
+ try {
3443
+ a.listGroupSnapshotsWithDetails(null, null, null, null, null, null, groupSnapshotsGroupSnapshotsProjectId, (data, error) => {
3444
+ try {
3445
+ if (stub) {
3446
+ const displayE = 'Error 400 received on request';
3447
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3448
+ } else {
3449
+ runCommonAsserts(data, error);
3450
+ }
3451
+ saveMockData('GroupSnapshotsGroupSnapshots', 'listGroupSnapshotsWithDetails', 'default', data);
3452
+ done();
3453
+ } catch (err) {
3454
+ log.error(`Test Failure: ${err}`);
3455
+ done(err);
3456
+ }
3457
+ });
3458
+ } catch (error) {
3459
+ log.error(`Adapter Exception: ${error}`);
3460
+ done(error);
3461
+ }
3462
+ }).timeout(attemptTimeout);
3463
+ });
3464
+
3465
+ describe('#showGroupSnapshotDetails - errors', () => {
3466
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3467
+ try {
3468
+ a.showGroupSnapshotDetails(groupSnapshotsGroupSnapshotsProjectId, groupSnapshotsGroupSnapshotsGroupSnapshotId, (data, error) => {
3469
+ try {
3470
+ if (stub) {
3471
+ const displayE = 'Error 400 received on request';
3472
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3473
+ } else {
3474
+ runCommonAsserts(data, error);
3475
+ }
3476
+ saveMockData('GroupSnapshotsGroupSnapshots', 'showGroupSnapshotDetails', 'default', data);
3477
+ done();
3478
+ } catch (err) {
3479
+ log.error(`Test Failure: ${err}`);
3480
+ done(err);
3481
+ }
3482
+ });
3483
+ } catch (error) {
3484
+ log.error(`Adapter Exception: ${error}`);
3485
+ done(error);
3486
+ }
3487
+ }).timeout(attemptTimeout);
3488
+ });
3489
+
3490
+ const groupTypesGroupTypesProjectId = 'fakedata';
3491
+ const groupTypesGroupTypesCreateGroupTypeBodyParam = {
3492
+ group_type: {
3493
+ name: 'string',
3494
+ description: 'string',
3495
+ is_public: false,
3496
+ group_specs: {
3497
+ consistent_group_snapshot_enabled: 'string'
3498
+ }
3499
+ }
3500
+ };
3501
+ describe('#createGroupType - errors', () => {
3502
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3503
+ try {
3504
+ a.createGroupType(groupTypesGroupTypesProjectId, groupTypesGroupTypesCreateGroupTypeBodyParam, (data, error) => {
3505
+ try {
3506
+ if (stub) {
3507
+ const displayE = 'Error 400 received on request';
3508
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3509
+ } else {
3510
+ runCommonAsserts(data, error);
3511
+ }
3512
+ saveMockData('GroupTypesGroupTypes', 'createGroupType', 'default', data);
3513
+ done();
3514
+ } catch (err) {
3515
+ log.error(`Test Failure: ${err}`);
3516
+ done(err);
3517
+ }
3518
+ });
3519
+ } catch (error) {
3520
+ log.error(`Adapter Exception: ${error}`);
3521
+ done(error);
3522
+ }
3523
+ }).timeout(attemptTimeout);
3524
+ });
3525
+
3526
+ describe('#listGroupTypes - errors', () => {
3527
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3528
+ try {
3529
+ a.listGroupTypes(null, null, null, null, groupTypesGroupTypesProjectId, (data, error) => {
3530
+ try {
3531
+ if (stub) {
3532
+ const displayE = 'Error 400 received on request';
3533
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3534
+ } else {
3535
+ runCommonAsserts(data, error);
3536
+ }
3537
+ saveMockData('GroupTypesGroupTypes', 'listGroupTypes', 'default', data);
3538
+ done();
3539
+ } catch (err) {
3540
+ log.error(`Test Failure: ${err}`);
3541
+ done(err);
3542
+ }
3543
+ });
3544
+ } catch (error) {
3545
+ log.error(`Adapter Exception: ${error}`);
3546
+ done(error);
3547
+ }
3548
+ }).timeout(attemptTimeout);
3549
+ });
3550
+
3551
+ describe('#showDefaultGroupTypeDetails - errors', () => {
3552
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3553
+ try {
3554
+ a.showDefaultGroupTypeDetails(groupTypesGroupTypesProjectId, (data, error) => {
3555
+ try {
3556
+ if (stub) {
3557
+ const displayE = 'Error 400 received on request';
3558
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3559
+ } else {
3560
+ runCommonAsserts(data, error);
3561
+ }
3562
+ saveMockData('GroupTypesGroupTypes', 'showDefaultGroupTypeDetails', 'default', data);
3563
+ done();
3564
+ } catch (err) {
3565
+ log.error(`Test Failure: ${err}`);
3566
+ done(err);
3567
+ }
3568
+ });
3569
+ } catch (error) {
3570
+ log.error(`Adapter Exception: ${error}`);
3571
+ done(error);
3572
+ }
3573
+ }).timeout(attemptTimeout);
3574
+ });
3575
+
3576
+ const groupTypesGroupTypesGroupTypeId = 'fakedata';
3577
+ const groupTypesGroupTypesUpdateGroupTypeBodyParam = {
3578
+ group_type: {
3579
+ name: 'string',
3580
+ description: 'string',
3581
+ is_public: false
3582
+ }
3583
+ };
3584
+ describe('#updateGroupType - errors', () => {
3585
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3586
+ try {
3587
+ a.updateGroupType(groupTypesGroupTypesProjectId, groupTypesGroupTypesGroupTypeId, groupTypesGroupTypesUpdateGroupTypeBodyParam, (data, error) => {
3588
+ try {
3589
+ if (stub) {
3590
+ const displayE = 'Error 400 received on request';
3591
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3592
+ } else {
3593
+ runCommonAsserts(data, error);
3594
+ }
3595
+ saveMockData('GroupTypesGroupTypes', 'updateGroupType', 'default', data);
3596
+ done();
3597
+ } catch (err) {
3598
+ log.error(`Test Failure: ${err}`);
3599
+ done(err);
3600
+ }
3601
+ });
3602
+ } catch (error) {
3603
+ log.error(`Adapter Exception: ${error}`);
3604
+ done(error);
3605
+ }
3606
+ }).timeout(attemptTimeout);
3607
+ });
3608
+
3609
+ describe('#showGroupTypeDetails - errors', () => {
3610
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3611
+ try {
3612
+ a.showGroupTypeDetails(groupTypesGroupTypesProjectId, groupTypesGroupTypesGroupTypeId, (data, error) => {
3613
+ try {
3614
+ if (stub) {
3615
+ const displayE = 'Error 400 received on request';
3616
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3617
+ } else {
3618
+ runCommonAsserts(data, error);
3619
+ }
3620
+ saveMockData('GroupTypesGroupTypes', 'showGroupTypeDetails', 'default', data);
3621
+ done();
3622
+ } catch (err) {
3623
+ log.error(`Test Failure: ${err}`);
3624
+ done(err);
3625
+ }
3626
+ });
3627
+ } catch (error) {
3628
+ log.error(`Adapter Exception: ${error}`);
3629
+ done(error);
3630
+ }
3631
+ }).timeout(attemptTimeout);
3632
+ });
3633
+
3634
+ const groupTypeSpecsGroupTypesGroupSpecsProjectId = 'fakedata';
3635
+ const groupTypeSpecsGroupTypesGroupSpecsGroupTypeId = 'fakedata';
3636
+ const groupTypeSpecsGroupTypesGroupSpecsCreateOrUpdateGroupSpecsForAGroupTypeBodyParam = {
3637
+ group_specs: {
3638
+ key1: 'string',
3639
+ key2: 'string'
3640
+ }
3641
+ };
3642
+ describe('#createOrUpdateGroupSpecsForAGroupType - errors', () => {
3643
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3644
+ try {
3645
+ a.createOrUpdateGroupSpecsForAGroupType(groupTypeSpecsGroupTypesGroupSpecsProjectId, groupTypeSpecsGroupTypesGroupSpecsGroupTypeId, groupTypeSpecsGroupTypesGroupSpecsCreateOrUpdateGroupSpecsForAGroupTypeBodyParam, (data, error) => {
3646
+ try {
3647
+ if (stub) {
3648
+ const displayE = 'Error 400 received on request';
3649
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3650
+ } else {
3651
+ runCommonAsserts(data, error);
3652
+ }
3653
+ saveMockData('GroupTypeSpecsGroupTypesGroupSpecs', 'createOrUpdateGroupSpecsForAGroupType', 'default', data);
3654
+ done();
3655
+ } catch (err) {
3656
+ log.error(`Test Failure: ${err}`);
3657
+ done(err);
3658
+ }
3659
+ });
3660
+ } catch (error) {
3661
+ log.error(`Adapter Exception: ${error}`);
3662
+ done(error);
3663
+ }
3664
+ }).timeout(attemptTimeout);
3665
+ });
3666
+
3667
+ describe('#listGroupSpecsForAGroupType - errors', () => {
3668
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3669
+ try {
3670
+ a.listGroupSpecsForAGroupType(groupTypeSpecsGroupTypesGroupSpecsProjectId, groupTypeSpecsGroupTypesGroupSpecsGroupTypeId, (data, error) => {
3671
+ try {
3672
+ if (stub) {
3673
+ const displayE = 'Error 400 received on request';
3674
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3675
+ } else {
3676
+ runCommonAsserts(data, error);
3677
+ }
3678
+ saveMockData('GroupTypeSpecsGroupTypesGroupSpecs', 'listGroupSpecsForAGroupType', 'default', data);
3679
+ done();
3680
+ } catch (err) {
3681
+ log.error(`Test Failure: ${err}`);
3682
+ done(err);
3683
+ }
3684
+ });
3685
+ } catch (error) {
3686
+ log.error(`Adapter Exception: ${error}`);
3687
+ done(error);
3688
+ }
3689
+ }).timeout(attemptTimeout);
3690
+ });
3691
+
3692
+ const groupTypeSpecsGroupTypesGroupSpecsSpecId = 'fakedata';
3693
+ const groupTypeSpecsGroupTypesGroupSpecsUpdateOneSpecificGroupSpecForAGroupTypeBodyParam = {
3694
+ key1: 'string'
3695
+ };
3696
+ describe('#updateOneSpecificGroupSpecForAGroupType - errors', () => {
3697
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3698
+ try {
3699
+ a.updateOneSpecificGroupSpecForAGroupType(groupTypeSpecsGroupTypesGroupSpecsProjectId, groupTypeSpecsGroupTypesGroupSpecsGroupTypeId, groupTypeSpecsGroupTypesGroupSpecsSpecId, groupTypeSpecsGroupTypesGroupSpecsUpdateOneSpecificGroupSpecForAGroupTypeBodyParam, (data, error) => {
3700
+ try {
3701
+ if (stub) {
3702
+ const displayE = 'Error 400 received on request';
3703
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3704
+ } else {
3705
+ runCommonAsserts(data, error);
3706
+ }
3707
+ saveMockData('GroupTypeSpecsGroupTypesGroupSpecs', 'updateOneSpecificGroupSpecForAGroupType', 'default', data);
3708
+ done();
3709
+ } catch (err) {
3710
+ log.error(`Test Failure: ${err}`);
3711
+ done(err);
3712
+ }
3713
+ });
3714
+ } catch (error) {
3715
+ log.error(`Adapter Exception: ${error}`);
3716
+ done(error);
3717
+ }
3718
+ }).timeout(attemptTimeout);
3719
+ });
3720
+
3721
+ describe('#showOneSpecificGroupSpecForAGroupType - errors', () => {
3722
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3723
+ try {
3724
+ a.showOneSpecificGroupSpecForAGroupType(groupTypeSpecsGroupTypesGroupSpecsProjectId, groupTypeSpecsGroupTypesGroupSpecsGroupTypeId, groupTypeSpecsGroupTypesGroupSpecsSpecId, (data, error) => {
3725
+ try {
3726
+ if (stub) {
3727
+ const displayE = 'Error 400 received on request';
3728
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3729
+ } else {
3730
+ runCommonAsserts(data, error);
3731
+ }
3732
+ saveMockData('GroupTypeSpecsGroupTypesGroupSpecs', 'showOneSpecificGroupSpecForAGroupType', 'default', data);
3733
+ done();
3734
+ } catch (err) {
3735
+ log.error(`Test Failure: ${err}`);
3736
+ done(err);
3737
+ }
3738
+ });
3739
+ } catch (error) {
3740
+ log.error(`Adapter Exception: ${error}`);
3741
+ done(error);
3742
+ }
3743
+ }).timeout(attemptTimeout);
3744
+ });
3745
+
3746
+ const hostsExtensionOsHostsAdminProjectId = 'fakedata';
3747
+ describe('#listAllHostsForAProject - errors', () => {
3748
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3749
+ try {
3750
+ a.listAllHostsForAProject(hostsExtensionOsHostsAdminProjectId, (data, error) => {
3751
+ try {
3752
+ if (stub) {
3753
+ const displayE = 'Error 400 received on request';
3754
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3755
+ } else {
3756
+ runCommonAsserts(data, error);
3757
+ }
3758
+ saveMockData('HostsExtensionOsHosts', 'listAllHostsForAProject', 'default', data);
3759
+ done();
3760
+ } catch (err) {
3761
+ log.error(`Test Failure: ${err}`);
3762
+ done(err);
3763
+ }
3764
+ });
3765
+ } catch (error) {
3766
+ log.error(`Adapter Exception: ${error}`);
3767
+ done(error);
3768
+ }
3769
+ }).timeout(attemptTimeout);
3770
+ });
3771
+
3772
+ const hostsExtensionOsHostsHostName = 'fakedata';
3773
+ describe('#showHostDetailsForAProject - errors', () => {
3774
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3775
+ try {
3776
+ a.showHostDetailsForAProject(hostsExtensionOsHostsAdminProjectId, hostsExtensionOsHostsHostName, (data, error) => {
3777
+ try {
3778
+ if (stub) {
3779
+ const displayE = 'Error 400 received on request';
3780
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3781
+ } else {
3782
+ runCommonAsserts(data, error);
3783
+ }
3784
+ saveMockData('HostsExtensionOsHosts', 'showHostDetailsForAProject', 'default', data);
3785
+ done();
3786
+ } catch (err) {
3787
+ log.error(`Test Failure: ${err}`);
3788
+ done(err);
3789
+ }
3790
+ });
3791
+ } catch (error) {
3792
+ log.error(`Adapter Exception: ${error}`);
3793
+ done(error);
3794
+ }
3795
+ }).timeout(attemptTimeout);
3796
+ });
3797
+
3798
+ const limitsLimitsProjectId = 'fakedata';
3799
+ describe('#showAbsoluteLimitsForProject - errors', () => {
3800
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3801
+ try {
3802
+ a.showAbsoluteLimitsForProject(limitsLimitsProjectId, (data, error) => {
3803
+ try {
3804
+ if (stub) {
3805
+ const displayE = 'Error 400 received on request';
3806
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3807
+ } else {
3808
+ runCommonAsserts(data, error);
3809
+ }
3810
+ saveMockData('LimitsLimits', 'showAbsoluteLimitsForProject', 'default', data);
3811
+ done();
3812
+ } catch (err) {
3813
+ log.error(`Test Failure: ${err}`);
3814
+ done(err);
3815
+ }
3816
+ });
3817
+ } catch (error) {
3818
+ log.error(`Adapter Exception: ${error}`);
3819
+ done(error);
3820
+ }
3821
+ }).timeout(attemptTimeout);
3822
+ });
3823
+
3824
+ const messagesMessagesProjectId = 'fakedata';
3825
+ describe('#listMessages - errors', () => {
3826
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3827
+ try {
3828
+ a.listMessages(null, null, null, null, messagesMessagesProjectId, (data, error) => {
3829
+ try {
3830
+ if (stub) {
3831
+ const displayE = 'Error 400 received on request';
3832
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3833
+ } else {
3834
+ runCommonAsserts(data, error);
3835
+ }
3836
+ saveMockData('MessagesMessages', 'listMessages', 'default', data);
3837
+ done();
3838
+ } catch (err) {
3839
+ log.error(`Test Failure: ${err}`);
3840
+ done(err);
3841
+ }
3842
+ });
3843
+ } catch (error) {
3844
+ log.error(`Adapter Exception: ${error}`);
3845
+ done(error);
3846
+ }
3847
+ }).timeout(attemptTimeout);
3848
+ });
3849
+
3850
+ const messagesMessagesMessageId = 'fakedata';
3851
+ describe('#showMessageDetails - errors', () => {
3852
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3853
+ try {
3854
+ a.showMessageDetails(messagesMessagesProjectId, messagesMessagesMessageId, (data, error) => {
3855
+ try {
3856
+ if (stub) {
3857
+ const displayE = 'Error 400 received on request';
3858
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3859
+ } else {
3860
+ runCommonAsserts(data, error);
3861
+ }
3862
+ saveMockData('MessagesMessages', 'showMessageDetails', 'default', data);
3863
+ done();
3864
+ } catch (err) {
3865
+ log.error(`Test Failure: ${err}`);
3866
+ done(err);
3867
+ }
3868
+ });
3869
+ } catch (error) {
3870
+ log.error(`Adapter Exception: ${error}`);
3871
+ done(error);
3872
+ }
3873
+ }).timeout(attemptTimeout);
3874
+ });
3875
+
3876
+ const resourceFiltersResourceFiltersProjectId = 'fakedata';
3877
+ describe('#listResourceFilters - errors', () => {
3878
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3879
+ try {
3880
+ a.listResourceFilters(null, resourceFiltersResourceFiltersProjectId, (data, error) => {
3881
+ try {
3882
+ if (stub) {
3883
+ const displayE = 'Error 400 received on request';
3884
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3885
+ } else {
3886
+ runCommonAsserts(data, error);
3887
+ }
3888
+ saveMockData('ResourceFiltersResourceFilters', 'listResourceFilters', 'default', data);
3889
+ done();
3890
+ } catch (err) {
3891
+ log.error(`Test Failure: ${err}`);
3892
+ done(err);
3893
+ }
3894
+ });
3895
+ } catch (error) {
3896
+ log.error(`Adapter Exception: ${error}`);
3897
+ done(error);
3898
+ }
3899
+ }).timeout(attemptTimeout);
3900
+ });
3901
+
3902
+ const qualityOfServiceQoSSpecificationsQosSpecsProjectId = 'fakedata';
3903
+ const qualityOfServiceQoSSpecificationsQosSpecsCreateAQoSSpecificationBodyParam = {
3904
+ qos_specs: {
3905
+ name: 'string'
3906
+ }
3907
+ };
3908
+ describe('#createAQoSSpecification - errors', () => {
3909
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3910
+ try {
3911
+ a.createAQoSSpecification(qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsCreateAQoSSpecificationBodyParam, (data, error) => {
3912
+ try {
3913
+ if (stub) {
3914
+ const displayE = 'Error 400 received on request';
3915
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3916
+ } else {
3917
+ runCommonAsserts(data, error);
3918
+ }
3919
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'createAQoSSpecification', 'default', data);
3920
+ done();
3921
+ } catch (err) {
3922
+ log.error(`Test Failure: ${err}`);
3923
+ done(err);
3924
+ }
3925
+ });
3926
+ } catch (error) {
3927
+ log.error(`Adapter Exception: ${error}`);
3928
+ done(error);
3929
+ }
3930
+ }).timeout(attemptTimeout);
3931
+ });
3932
+
3933
+ describe('#listQoSSpecifications - errors', () => {
3934
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3935
+ try {
3936
+ a.listQoSSpecifications(null, null, null, qualityOfServiceQoSSpecificationsQosSpecsProjectId, (data, error) => {
3937
+ try {
3938
+ if (stub) {
3939
+ const displayE = 'Error 400 received on request';
3940
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3941
+ } else {
3942
+ runCommonAsserts(data, error);
3943
+ }
3944
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'listQoSSpecifications', 'default', data);
3945
+ done();
3946
+ } catch (err) {
3947
+ log.error(`Test Failure: ${err}`);
3948
+ done(err);
3949
+ }
3950
+ });
3951
+ } catch (error) {
3952
+ log.error(`Adapter Exception: ${error}`);
3953
+ done(error);
3954
+ }
3955
+ }).timeout(attemptTimeout);
3956
+ });
3957
+
3958
+ const qualityOfServiceQoSSpecificationsQosSpecsQosId = 'fakedata';
3959
+ const qualityOfServiceQoSSpecificationsQosSpecsSetKeysInAQoSSpecificationBodyParam = {
3960
+ qos_specs: {
3961
+ delay: 'string'
3962
+ }
3963
+ };
3964
+ describe('#setKeysInAQoSSpecification - errors', () => {
3965
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3966
+ try {
3967
+ a.setKeysInAQoSSpecification(qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, qualityOfServiceQoSSpecificationsQosSpecsSetKeysInAQoSSpecificationBodyParam, (data, error) => {
3968
+ try {
3969
+ if (stub) {
3970
+ const displayE = 'Error 400 received on request';
3971
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3972
+ } else {
3973
+ runCommonAsserts(data, error);
3974
+ }
3975
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'setKeysInAQoSSpecification', 'default', data);
3976
+ done();
3977
+ } catch (err) {
3978
+ log.error(`Test Failure: ${err}`);
3979
+ done(err);
3980
+ }
3981
+ });
3982
+ } catch (error) {
3983
+ log.error(`Adapter Exception: ${error}`);
3984
+ done(error);
3985
+ }
3986
+ }).timeout(attemptTimeout);
3987
+ });
3988
+
3989
+ describe('#showAQoSSpecificationDetails - errors', () => {
3990
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
3991
+ try {
3992
+ a.showAQoSSpecificationDetails(qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, (data, error) => {
3993
+ try {
3994
+ if (stub) {
3995
+ const displayE = 'Error 400 received on request';
3996
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
3997
+ } else {
3998
+ runCommonAsserts(data, error);
3999
+ }
4000
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'showAQoSSpecificationDetails', 'default', data);
4001
+ done();
4002
+ } catch (err) {
4003
+ log.error(`Test Failure: ${err}`);
4004
+ done(err);
4005
+ }
4006
+ });
4007
+ } catch (error) {
4008
+ log.error(`Adapter Exception: ${error}`);
4009
+ done(error);
4010
+ }
4011
+ }).timeout(attemptTimeout);
4012
+ });
4013
+
4014
+ const qualityOfServiceQoSSpecificationsQosSpecsVolTypeId = 'fakedata';
4015
+ describe('#associateQoSSpecificationWithAVolumeType - errors', () => {
4016
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4017
+ try {
4018
+ a.associateQoSSpecificationWithAVolumeType(qualityOfServiceQoSSpecificationsQosSpecsVolTypeId, qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, (data, error) => {
4019
+ try {
4020
+ if (stub) {
4021
+ const displayE = 'Error 400 received on request';
4022
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4023
+ } else {
4024
+ runCommonAsserts(data, error);
4025
+ }
4026
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'associateQoSSpecificationWithAVolumeType', 'default', data);
4027
+ done();
4028
+ } catch (err) {
4029
+ log.error(`Test Failure: ${err}`);
4030
+ done(err);
4031
+ }
4032
+ });
4033
+ } catch (error) {
4034
+ log.error(`Adapter Exception: ${error}`);
4035
+ done(error);
4036
+ }
4037
+ }).timeout(attemptTimeout);
4038
+ });
4039
+
4040
+ describe('#getAllAssociationsForAQoSSpecification - errors', () => {
4041
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4042
+ try {
4043
+ a.getAllAssociationsForAQoSSpecification(qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, (data, error) => {
4044
+ try {
4045
+ if (stub) {
4046
+ const displayE = 'Error 400 received on request';
4047
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4048
+ } else {
4049
+ runCommonAsserts(data, error);
4050
+ }
4051
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'getAllAssociationsForAQoSSpecification', 'default', data);
4052
+ done();
4053
+ } catch (err) {
4054
+ log.error(`Test Failure: ${err}`);
4055
+ done(err);
4056
+ }
4057
+ });
4058
+ } catch (error) {
4059
+ log.error(`Adapter Exception: ${error}`);
4060
+ done(error);
4061
+ }
4062
+ }).timeout(attemptTimeout);
4063
+ });
4064
+
4065
+ const qualityOfServiceQoSSpecificationsQosSpecsUnsetKeysInAQoSSpecificationBodyParam = {
4066
+ keys: [
4067
+ 'string'
4068
+ ]
4069
+ };
4070
+ describe('#unsetKeysInAQoSSpecification - errors', () => {
4071
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4072
+ try {
4073
+ a.unsetKeysInAQoSSpecification(qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, qualityOfServiceQoSSpecificationsQosSpecsUnsetKeysInAQoSSpecificationBodyParam, (data, error) => {
4074
+ try {
4075
+ if (stub) {
4076
+ const displayE = 'Error 400 received on request';
4077
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4078
+ } else {
4079
+ runCommonAsserts(data, error);
4080
+ }
4081
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'unsetKeysInAQoSSpecification', 'default', data);
4082
+ done();
4083
+ } catch (err) {
4084
+ log.error(`Test Failure: ${err}`);
4085
+ done(err);
4086
+ }
4087
+ });
4088
+ } catch (error) {
4089
+ log.error(`Adapter Exception: ${error}`);
4090
+ done(error);
4091
+ }
4092
+ }).timeout(attemptTimeout);
4093
+ });
4094
+
4095
+ describe('#disassociateQoSSpecificationFromAVolumeType - errors', () => {
4096
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4097
+ try {
4098
+ a.disassociateQoSSpecificationFromAVolumeType(qualityOfServiceQoSSpecificationsQosSpecsVolTypeId, qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, (data, error) => {
4099
+ try {
4100
+ if (stub) {
4101
+ const displayE = 'Error 400 received on request';
4102
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4103
+ } else {
4104
+ runCommonAsserts(data, error);
4105
+ }
4106
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'disassociateQoSSpecificationFromAVolumeType', 'default', data);
4107
+ done();
4108
+ } catch (err) {
4109
+ log.error(`Test Failure: ${err}`);
4110
+ done(err);
4111
+ }
4112
+ });
4113
+ } catch (error) {
4114
+ log.error(`Adapter Exception: ${error}`);
4115
+ done(error);
4116
+ }
4117
+ }).timeout(attemptTimeout);
4118
+ });
4119
+
4120
+ describe('#disassociateAQoSSpecificationFromAllAssociations - errors', () => {
4121
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4122
+ try {
4123
+ a.disassociateAQoSSpecificationFromAllAssociations(qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, (data, error) => {
4124
+ try {
4125
+ if (stub) {
4126
+ const displayE = 'Error 400 received on request';
4127
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4128
+ } else {
4129
+ runCommonAsserts(data, error);
4130
+ }
4131
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'disassociateAQoSSpecificationFromAllAssociations', 'default', data);
4132
+ done();
4133
+ } catch (err) {
4134
+ log.error(`Test Failure: ${err}`);
4135
+ done(err);
4136
+ }
4137
+ });
4138
+ } catch (error) {
4139
+ log.error(`Adapter Exception: ${error}`);
4140
+ done(error);
4141
+ }
4142
+ }).timeout(attemptTimeout);
4143
+ });
4144
+
4145
+ const quotaClassSetExtensionOsQuotaClassSetsAdminProjectId = 'fakedata';
4146
+ const quotaClassSetExtensionOsQuotaClassSetsQuotaClassName = 'fakedata';
4147
+ const quotaClassSetExtensionOsQuotaClassSetsUpdateQuotaClassesForAProjectBodyParam = {
4148
+ quota_class_set: {
4149
+ volumes: 2,
4150
+ gigabytes: 10,
4151
+ snapshots: 1
4152
+ }
4153
+ };
4154
+ describe('#updateQuotaClassesForAProject - errors', () => {
4155
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4156
+ try {
4157
+ a.updateQuotaClassesForAProject(quotaClassSetExtensionOsQuotaClassSetsAdminProjectId, quotaClassSetExtensionOsQuotaClassSetsQuotaClassName, quotaClassSetExtensionOsQuotaClassSetsUpdateQuotaClassesForAProjectBodyParam, (data, error) => {
4158
+ try {
4159
+ if (stub) {
4160
+ const displayE = 'Error 400 received on request';
4161
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4162
+ } else {
4163
+ runCommonAsserts(data, error);
4164
+ }
4165
+ saveMockData('QuotaClassSetExtensionOsQuotaClassSets', 'updateQuotaClassesForAProject', 'default', data);
4166
+ done();
4167
+ } catch (err) {
4168
+ log.error(`Test Failure: ${err}`);
4169
+ done(err);
4170
+ }
4171
+ });
4172
+ } catch (error) {
4173
+ log.error(`Adapter Exception: ${error}`);
4174
+ done(error);
4175
+ }
4176
+ }).timeout(attemptTimeout);
4177
+ });
4178
+
4179
+ describe('#showQuotaClassesForAProject - errors', () => {
4180
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4181
+ try {
4182
+ a.showQuotaClassesForAProject(quotaClassSetExtensionOsQuotaClassSetsQuotaClassName, quotaClassSetExtensionOsQuotaClassSetsAdminProjectId, (data, error) => {
4183
+ try {
4184
+ if (stub) {
4185
+ const displayE = 'Error 400 received on request';
4186
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4187
+ } else {
4188
+ runCommonAsserts(data, error);
4189
+ }
4190
+ saveMockData('QuotaClassSetExtensionOsQuotaClassSets', 'showQuotaClassesForAProject', 'default', data);
4191
+ done();
4192
+ } catch (err) {
4193
+ log.error(`Test Failure: ${err}`);
4194
+ done(err);
4195
+ }
4196
+ });
4197
+ } catch (error) {
4198
+ log.error(`Adapter Exception: ${error}`);
4199
+ done(error);
4200
+ }
4201
+ }).timeout(attemptTimeout);
4202
+ });
4203
+
4204
+ const quotaSetsExtensionOsQuotaSetsAdminProjectId = 'fakedata';
4205
+ const quotaSetsExtensionOsQuotaSetsProjectId = 'fakedata';
4206
+ const quotaSetsExtensionOsQuotaSetsUpdateQuotasForAProjectBodyParam = {
4207
+ quota_set: {
4208
+ groups: 2,
4209
+ volumes: 4,
4210
+ backups: 6
4211
+ }
4212
+ };
4213
+ describe('#updateQuotasForAProject - errors', () => {
4214
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4215
+ try {
4216
+ a.updateQuotasForAProject(quotaSetsExtensionOsQuotaSetsAdminProjectId, quotaSetsExtensionOsQuotaSetsProjectId, quotaSetsExtensionOsQuotaSetsUpdateQuotasForAProjectBodyParam, (data, error) => {
4217
+ try {
4218
+ if (stub) {
4219
+ const displayE = 'Error 400 received on request';
4220
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4221
+ } else {
4222
+ runCommonAsserts(data, error);
4223
+ }
4224
+ saveMockData('QuotaSetsExtensionOsQuotaSets', 'updateQuotasForAProject', 'default', data);
4225
+ done();
4226
+ } catch (err) {
4227
+ log.error(`Test Failure: ${err}`);
4228
+ done(err);
4229
+ }
4230
+ });
4231
+ } catch (error) {
4232
+ log.error(`Adapter Exception: ${error}`);
4233
+ done(error);
4234
+ }
4235
+ }).timeout(attemptTimeout);
4236
+ });
4237
+
4238
+ describe('#showQuotasForAProject - errors', () => {
4239
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4240
+ try {
4241
+ a.showQuotasForAProject(null, quotaSetsExtensionOsQuotaSetsAdminProjectId, quotaSetsExtensionOsQuotaSetsProjectId, (data, error) => {
4242
+ try {
4243
+ if (stub) {
4244
+ const displayE = 'Error 400 received on request';
4245
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4246
+ } else {
4247
+ runCommonAsserts(data, error);
4248
+ }
4249
+ saveMockData('QuotaSetsExtensionOsQuotaSets', 'showQuotasForAProject', 'default', data);
4250
+ done();
4251
+ } catch (err) {
4252
+ log.error(`Test Failure: ${err}`);
4253
+ done(err);
4254
+ }
4255
+ });
4256
+ } catch (error) {
4257
+ log.error(`Adapter Exception: ${error}`);
4258
+ done(error);
4259
+ }
4260
+ }).timeout(attemptTimeout);
4261
+ });
4262
+
4263
+ describe('#getDefaultQuotasForAProject - errors', () => {
4264
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4265
+ try {
4266
+ a.getDefaultQuotasForAProject(quotaSetsExtensionOsQuotaSetsProjectId, quotaSetsExtensionOsQuotaSetsAdminProjectId, (data, error) => {
4267
+ try {
4268
+ if (stub) {
4269
+ const displayE = 'Error 400 received on request';
4270
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4271
+ } else {
4272
+ runCommonAsserts(data, error);
4273
+ }
4274
+ saveMockData('QuotaSetsExtensionOsQuotaSets', 'getDefaultQuotasForAProject', 'default', data);
4275
+ done();
4276
+ } catch (err) {
4277
+ log.error(`Test Failure: ${err}`);
4278
+ done(err);
4279
+ }
4280
+ });
4281
+ } catch (error) {
4282
+ log.error(`Adapter Exception: ${error}`);
4283
+ done(error);
4284
+ }
4285
+ }).timeout(attemptTimeout);
4286
+ });
4287
+
4288
+ const workersWorkersProjectId = 'fakedata';
4289
+ const workersWorkersCleanupServicesBodyParam = {
4290
+ cluster_name: 'string',
4291
+ disabled: false,
4292
+ host: 'string',
4293
+ service_id: 2,
4294
+ is_up: true,
4295
+ binary: 'string',
4296
+ resource_id: 'string',
4297
+ resource_type: 'string'
4298
+ };
4299
+ describe('#cleanupServices - errors', () => {
4300
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4301
+ try {
4302
+ a.cleanupServices(workersWorkersProjectId, workersWorkersCleanupServicesBodyParam, (data, error) => {
4303
+ try {
4304
+ if (stub) {
4305
+ const displayE = 'Error 400 received on request';
4306
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4307
+ } else {
4308
+ runCommonAsserts(data, error);
4309
+ }
4310
+ saveMockData('WorkersWorkers', 'cleanupServices', 'default', data);
4311
+ done();
4312
+ } catch (err) {
4313
+ log.error(`Test Failure: ${err}`);
4314
+ done(err);
4315
+ }
4316
+ });
4317
+ } catch (error) {
4318
+ log.error(`Adapter Exception: ${error}`);
4319
+ done(error);
4320
+ }
4321
+ }).timeout(attemptTimeout);
4322
+ });
4323
+
4324
+ describe('#deleteAVolumeType - errors', () => {
4325
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4326
+ try {
4327
+ a.deleteAVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, (data, error) => {
4328
+ try {
4329
+ if (stub) {
4330
+ const displayE = 'Error 400 received on request';
4331
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4332
+ } else {
4333
+ runCommonAsserts(data, error);
4334
+ }
4335
+ saveMockData('VolumeTypesTypes', 'deleteAVolumeType', 'default', data);
4336
+ done();
4337
+ } catch (err) {
4338
+ log.error(`Test Failure: ${err}`);
4339
+ done(err);
4340
+ }
4341
+ });
4342
+ } catch (error) {
4343
+ log.error(`Adapter Exception: ${error}`);
4344
+ done(error);
4345
+ }
4346
+ }).timeout(attemptTimeout);
4347
+ });
4348
+
4349
+ describe('#deleteAnEncryptionType - errors', () => {
4350
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4351
+ try {
4352
+ a.deleteAnEncryptionType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesEncryptionId, (data, error) => {
4353
+ try {
4354
+ if (stub) {
4355
+ const displayE = 'Error 400 received on request';
4356
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4357
+ } else {
4358
+ runCommonAsserts(data, error);
4359
+ }
4360
+ saveMockData('VolumeTypesTypes', 'deleteAnEncryptionType', 'default', data);
4361
+ done();
4362
+ } catch (err) {
4363
+ log.error(`Test Failure: ${err}`);
4364
+ done(err);
4365
+ }
4366
+ });
4367
+ } catch (error) {
4368
+ log.error(`Adapter Exception: ${error}`);
4369
+ done(error);
4370
+ }
4371
+ }).timeout(attemptTimeout);
4372
+ });
4373
+
4374
+ describe('#deleteExtraSpecificationForVolumeType - errors', () => {
4375
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4376
+ try {
4377
+ a.deleteExtraSpecificationForVolumeType(volumeTypesTypesProjectId, volumeTypesTypesVolumeTypeId, volumeTypesTypesKey, (data, error) => {
4378
+ try {
4379
+ if (stub) {
4380
+ const displayE = 'Error 400 received on request';
4381
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4382
+ } else {
4383
+ runCommonAsserts(data, error);
4384
+ }
4385
+ saveMockData('VolumeTypesTypes', 'deleteExtraSpecificationForVolumeType', 'default', data);
4386
+ done();
4387
+ } catch (err) {
4388
+ log.error(`Test Failure: ${err}`);
4389
+ done(err);
4390
+ }
4391
+ });
4392
+ } catch (error) {
4393
+ log.error(`Adapter Exception: ${error}`);
4394
+ done(error);
4395
+ }
4396
+ }).timeout(attemptTimeout);
4397
+ });
4398
+
4399
+ describe('#deleteADefaultVolumeType - errors', () => {
4400
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4401
+ try {
4402
+ a.deleteADefaultVolumeType(defaultVolumeTypesDefaultTypesProjectId, (data, error) => {
4403
+ try {
4404
+ if (stub) {
4405
+ const displayE = 'Error 400 received on request';
4406
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4407
+ } else {
4408
+ runCommonAsserts(data, error);
4409
+ }
4410
+ saveMockData('DefaultVolumeTypesDefaultTypes', 'deleteADefaultVolumeType', 'default', data);
4411
+ done();
4412
+ } catch (err) {
4413
+ log.error(`Test Failure: ${err}`);
4414
+ done(err);
4415
+ }
4416
+ });
4417
+ } catch (error) {
4418
+ log.error(`Adapter Exception: ${error}`);
4419
+ done(error);
4420
+ }
4421
+ }).timeout(attemptTimeout);
4422
+ });
4423
+
4424
+ describe('#deleteAVolume - errors', () => {
4425
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4426
+ try {
4427
+ a.deleteAVolume(null, null, volumesVolumesProjectId, volumesVolumesVolumeId, (data, error) => {
4428
+ try {
4429
+ if (stub) {
4430
+ const displayE = 'Error 400 received on request';
4431
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4432
+ } else {
4433
+ runCommonAsserts(data, error);
4434
+ }
4435
+ saveMockData('VolumesVolumes', 'deleteAVolume', 'default', data);
4436
+ done();
4437
+ } catch (err) {
4438
+ log.error(`Test Failure: ${err}`);
4439
+ done(err);
4440
+ }
4441
+ });
4442
+ } catch (error) {
4443
+ log.error(`Adapter Exception: ${error}`);
4444
+ done(error);
4445
+ }
4446
+ }).timeout(attemptTimeout);
4447
+ });
4448
+
4449
+ describe('#deleteAVolumeSMetadata - errors', () => {
4450
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4451
+ try {
4452
+ a.deleteAVolumeSMetadata(volumesVolumesProjectId, volumesVolumesVolumeId, volumesVolumesKey, (data, error) => {
4453
+ try {
4454
+ if (stub) {
4455
+ const displayE = 'Error 400 received on request';
4456
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4457
+ } else {
4458
+ runCommonAsserts(data, error);
4459
+ }
4460
+ saveMockData('VolumesVolumes', 'deleteAVolumeSMetadata', 'default', data);
4461
+ done();
4462
+ } catch (err) {
4463
+ log.error(`Test Failure: ${err}`);
4464
+ done(err);
4465
+ }
4466
+ });
4467
+ } catch (error) {
4468
+ log.error(`Adapter Exception: ${error}`);
4469
+ done(error);
4470
+ }
4471
+ }).timeout(attemptTimeout);
4472
+ });
4473
+
4474
+ describe('#deleteASnapshot - errors', () => {
4475
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4476
+ try {
4477
+ a.deleteASnapshot(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, (data, error) => {
4478
+ try {
4479
+ if (stub) {
4480
+ const displayE = 'Error 400 received on request';
4481
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4482
+ } else {
4483
+ runCommonAsserts(data, error);
4484
+ }
4485
+ saveMockData('VolumeSnapshotsSnapshots', 'deleteASnapshot', 'default', data);
4486
+ done();
4487
+ } catch (err) {
4488
+ log.error(`Test Failure: ${err}`);
4489
+ done(err);
4490
+ }
4491
+ });
4492
+ } catch (error) {
4493
+ log.error(`Adapter Exception: ${error}`);
4494
+ done(error);
4495
+ }
4496
+ }).timeout(attemptTimeout);
4497
+ });
4498
+
4499
+ describe('#deleteASnapshotSMetadata - errors', () => {
4500
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4501
+ try {
4502
+ a.deleteASnapshotSMetadata(volumeSnapshotsSnapshotsProjectId, volumeSnapshotsSnapshotsSnapshotId, volumeSnapshotsSnapshotsKey, (data, error) => {
4503
+ try {
4504
+ if (stub) {
4505
+ const displayE = 'Error 400 received on request';
4506
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4507
+ } else {
4508
+ runCommonAsserts(data, error);
4509
+ }
4510
+ saveMockData('VolumeSnapshotsSnapshots', 'deleteASnapshotSMetadata', 'default', data);
4511
+ done();
4512
+ } catch (err) {
4513
+ log.error(`Test Failure: ${err}`);
4514
+ done(err);
4515
+ }
4516
+ });
4517
+ } catch (error) {
4518
+ log.error(`Adapter Exception: ${error}`);
4519
+ done(error);
4520
+ }
4521
+ }).timeout(attemptTimeout);
4522
+ });
4523
+
4524
+ describe('#deleteAVolumeTransferNew - errors', () => {
4525
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4526
+ try {
4527
+ a.deleteAVolumeTransferNew(volumeTransferProjectId, volumeTransferTransferId, (data, error) => {
4528
+ try {
4529
+ if (stub) {
4530
+ const displayE = 'Error 400 received on request';
4531
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4532
+ } else {
4533
+ runCommonAsserts(data, error);
4534
+ }
4535
+ saveMockData('VolumeTransfer', 'deleteAVolumeTransferNew', 'default', data);
4536
+ done();
4537
+ } catch (err) {
4538
+ log.error(`Test Failure: ${err}`);
4539
+ done(err);
4540
+ }
4541
+ });
4542
+ } catch (error) {
4543
+ log.error(`Adapter Exception: ${error}`);
4544
+ done(error);
4545
+ }
4546
+ }).timeout(attemptTimeout);
4547
+ });
4548
+
4549
+ describe('#deleteAVolumeTransfer - errors', () => {
4550
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4551
+ try {
4552
+ a.deleteAVolumeTransfer(volumeTransfersVolumeTransfers355OrLaterProjectId, volumeTransfersVolumeTransfers355OrLaterTransferId, (data, error) => {
4553
+ try {
4554
+ if (stub) {
4555
+ const displayE = 'Error 400 received on request';
4556
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4557
+ } else {
4558
+ runCommonAsserts(data, error);
4559
+ }
4560
+ saveMockData('VolumeTransfersVolumeTransfers355OrLater', 'deleteAVolumeTransfer', 'default', data);
4561
+ done();
4562
+ } catch (err) {
4563
+ log.error(`Test Failure: ${err}`);
4564
+ done(err);
4565
+ }
4566
+ });
4567
+ } catch (error) {
4568
+ log.error(`Adapter Exception: ${error}`);
4569
+ done(error);
4570
+ }
4571
+ }).timeout(attemptTimeout);
4572
+ });
4573
+
4574
+ describe('#deleteAttachment - errors', () => {
4575
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4576
+ try {
4577
+ a.deleteAttachment(attachmentsAttachmentsProjectId, attachmentsAttachmentsAttachmentId, (data, error) => {
4578
+ try {
4579
+ if (stub) {
4580
+ const displayE = 'Error 400 received on request';
4581
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4582
+ } else {
4583
+ runCommonAsserts(data, error);
4584
+ }
4585
+ saveMockData('AttachmentsAttachments', 'deleteAttachment', 'default', data);
4586
+ done();
4587
+ } catch (err) {
4588
+ log.error(`Test Failure: ${err}`);
4589
+ done(err);
4590
+ }
4591
+ });
4592
+ } catch (error) {
4593
+ log.error(`Adapter Exception: ${error}`);
4594
+ done(error);
4595
+ }
4596
+ }).timeout(attemptTimeout);
4597
+ });
4598
+
4599
+ describe('#deleteABackup - errors', () => {
4600
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4601
+ try {
4602
+ a.deleteABackup(backupsBackupsProjectId, backupsBackupsBackupId, (data, error) => {
4603
+ try {
4604
+ if (stub) {
4605
+ const displayE = 'Error 400 received on request';
4606
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4607
+ } else {
4608
+ runCommonAsserts(data, error);
4609
+ }
4610
+ saveMockData('BackupsBackups', 'deleteABackup', 'default', data);
4611
+ done();
4612
+ } catch (err) {
4613
+ log.error(`Test Failure: ${err}`);
4614
+ done(err);
4615
+ }
4616
+ });
4617
+ } catch (error) {
4618
+ log.error(`Adapter Exception: ${error}`);
4619
+ done(error);
4620
+ }
4621
+ }).timeout(attemptTimeout);
4622
+ });
4623
+
4624
+ describe('#deleteAConsistencyGroupSnapshot - errors', () => {
4625
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4626
+ try {
4627
+ a.deleteAConsistencyGroupSnapshot(consistencyGroupSnapshotsDEPRECATEDProjectId, consistencyGroupSnapshotsDEPRECATEDCgsnapshotId, (data, error) => {
4628
+ try {
4629
+ if (stub) {
4630
+ const displayE = 'Error 400 received on request';
4631
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4632
+ } else {
4633
+ runCommonAsserts(data, error);
4634
+ }
4635
+ saveMockData('ConsistencyGroupSnapshotsDEPRECATED', 'deleteAConsistencyGroupSnapshot', 'default', data);
4636
+ done();
4637
+ } catch (err) {
4638
+ log.error(`Test Failure: ${err}`);
4639
+ done(err);
4640
+ }
4641
+ });
4642
+ } catch (error) {
4643
+ log.error(`Adapter Exception: ${error}`);
4644
+ done(error);
4645
+ }
4646
+ }).timeout(attemptTimeout);
4647
+ });
4648
+
4649
+ describe('#deleteGroupSnapshot - errors', () => {
4650
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4651
+ try {
4652
+ a.deleteGroupSnapshot(groupSnapshotsGroupSnapshotsProjectId, groupSnapshotsGroupSnapshotsGroupSnapshotId, (data, error) => {
4653
+ try {
4654
+ if (stub) {
4655
+ const displayE = 'Error 400 received on request';
4656
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4657
+ } else {
4658
+ runCommonAsserts(data, error);
4659
+ }
4660
+ saveMockData('GroupSnapshotsGroupSnapshots', 'deleteGroupSnapshot', 'default', data);
4661
+ done();
4662
+ } catch (err) {
4663
+ log.error(`Test Failure: ${err}`);
4664
+ done(err);
4665
+ }
4666
+ });
4667
+ } catch (error) {
4668
+ log.error(`Adapter Exception: ${error}`);
4669
+ done(error);
4670
+ }
4671
+ }).timeout(attemptTimeout);
4672
+ });
4673
+
4674
+ describe('#deleteGroupType - errors', () => {
4675
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4676
+ try {
4677
+ a.deleteGroupType(groupTypesGroupTypesGroupTypeId, groupTypesGroupTypesProjectId, (data, error) => {
4678
+ try {
4679
+ if (stub) {
4680
+ const displayE = 'Error 400 received on request';
4681
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4682
+ } else {
4683
+ runCommonAsserts(data, error);
4684
+ }
4685
+ saveMockData('GroupTypesGroupTypes', 'deleteGroupType', 'default', data);
4686
+ done();
4687
+ } catch (err) {
4688
+ log.error(`Test Failure: ${err}`);
4689
+ done(err);
4690
+ }
4691
+ });
4692
+ } catch (error) {
4693
+ log.error(`Adapter Exception: ${error}`);
4694
+ done(error);
4695
+ }
4696
+ }).timeout(attemptTimeout);
4697
+ });
4698
+
4699
+ describe('#deleteOneSpecificGroupSpecForAGroupType - errors', () => {
4700
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4701
+ try {
4702
+ a.deleteOneSpecificGroupSpecForAGroupType(groupTypeSpecsGroupTypesGroupSpecsProjectId, groupTypeSpecsGroupTypesGroupSpecsGroupTypeId, groupTypeSpecsGroupTypesGroupSpecsSpecId, (data, error) => {
4703
+ try {
4704
+ if (stub) {
4705
+ const displayE = 'Error 400 received on request';
4706
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4707
+ } else {
4708
+ runCommonAsserts(data, error);
4709
+ }
4710
+ saveMockData('GroupTypeSpecsGroupTypesGroupSpecs', 'deleteOneSpecificGroupSpecForAGroupType', 'default', data);
4711
+ done();
4712
+ } catch (err) {
4713
+ log.error(`Test Failure: ${err}`);
4714
+ done(err);
4715
+ }
4716
+ });
4717
+ } catch (error) {
4718
+ log.error(`Adapter Exception: ${error}`);
4719
+ done(error);
4720
+ }
4721
+ }).timeout(attemptTimeout);
4722
+ });
4723
+
4724
+ describe('#deleteMessage - errors', () => {
4725
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4726
+ try {
4727
+ a.deleteMessage(messagesMessagesProjectId, messagesMessagesMessageId, (data, error) => {
4728
+ try {
4729
+ if (stub) {
4730
+ const displayE = 'Error 400 received on request';
4731
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4732
+ } else {
4733
+ runCommonAsserts(data, error);
4734
+ }
4735
+ saveMockData('MessagesMessages', 'deleteMessage', 'default', data);
4736
+ done();
4737
+ } catch (err) {
4738
+ log.error(`Test Failure: ${err}`);
4739
+ done(err);
4740
+ }
4741
+ });
4742
+ } catch (error) {
4743
+ log.error(`Adapter Exception: ${error}`);
4744
+ done(error);
4745
+ }
4746
+ }).timeout(attemptTimeout);
4747
+ });
4748
+
4749
+ describe('#deleteAQoSSpecification - errors', () => {
4750
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4751
+ try {
4752
+ a.deleteAQoSSpecification(null, qualityOfServiceQoSSpecificationsQosSpecsProjectId, qualityOfServiceQoSSpecificationsQosSpecsQosId, (data, error) => {
4753
+ try {
4754
+ if (stub) {
4755
+ const displayE = 'Error 400 received on request';
4756
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4757
+ } else {
4758
+ runCommonAsserts(data, error);
4759
+ }
4760
+ saveMockData('QualityOfServiceQoSSpecificationsQosSpecs', 'deleteAQoSSpecification', 'default', data);
4761
+ done();
4762
+ } catch (err) {
4763
+ log.error(`Test Failure: ${err}`);
4764
+ done(err);
4765
+ }
4766
+ });
4767
+ } catch (error) {
4768
+ log.error(`Adapter Exception: ${error}`);
4769
+ done(error);
4770
+ }
4771
+ }).timeout(attemptTimeout);
4772
+ });
4773
+
4774
+ describe('#deleteQuotasForAProject - errors', () => {
4775
+ it('should work if integrated but since no mockdata should error when run standalone', (done) => {
4776
+ try {
4777
+ a.deleteQuotasForAProject(quotaSetsExtensionOsQuotaSetsProjectId, quotaSetsExtensionOsQuotaSetsAdminProjectId, (data, error) => {
4778
+ try {
4779
+ if (stub) {
4780
+ const displayE = 'Error 400 received on request';
4781
+ runErrorAsserts(data, error, 'AD.500', 'Test-openstack_cinder-connectorRest-handleEndResponse', displayE);
4782
+ } else {
4783
+ runCommonAsserts(data, error);
4784
+ }
4785
+ saveMockData('QuotaSetsExtensionOsQuotaSets', 'deleteQuotasForAProject', 'default', data);
4786
+ done();
4787
+ } catch (err) {
4788
+ log.error(`Test Failure: ${err}`);
4789
+ done(err);
4790
+ }
4791
+ });
4792
+ } catch (error) {
4793
+ log.error(`Adapter Exception: ${error}`);
4794
+ done(error);
4795
+ }
4796
+ }).timeout(attemptTimeout);
4797
+ });
4798
+ });
4799
+ });