@opscompass/opscompass-cli 1.0.20 → 1.0.22

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.
@@ -1,4 +1,3 @@
1
-
2
1
  const { setArgumentArrays } = require("../lib/cliHelpers.js");
3
2
  const { getOpsCompassClient } = require("../opscompass.js");
4
3
 
@@ -8,23 +7,24 @@ async function listMonitoringConfigurations(args) {
8
7
  case "--company":
9
8
  company = args[++i];
10
9
  break;
11
- }
10
+ }
12
11
  }
13
12
 
14
13
  const client = await getOpsCompassClient();
15
- const monitoringConfigs = await client.licenseManager.listMonitoringConfigurations(company);
14
+ const monitoringConfigs =
15
+ await client.licenseManager.listMonitoringConfigurations(company);
16
16
 
17
17
  console.log(JSON.stringify(monitoringConfigs, null, 2));
18
18
  }
19
19
 
20
- async function deleteVCenterConfiguration(args){
20
+ async function deleteVCenterConfiguration(args) {
21
21
  let id = undefined;
22
22
  for (let i = 0; i < args.length - 1; i++) {
23
23
  switch (args[i].toLowerCase()) {
24
24
  case "--id":
25
25
  id = args[++i];
26
26
  break;
27
- }
27
+ }
28
28
  }
29
29
 
30
30
  const client = await getOpsCompassClient();
@@ -33,14 +33,14 @@ async function deleteVCenterConfiguration(args){
33
33
  console.log(JSON.stringify(response, null, 2));
34
34
  }
35
35
 
36
- async function deleteMsqlConfiguration(args){
36
+ async function deleteMsqlConfiguration(args) {
37
37
  let id = undefined;
38
38
  for (let i = 0; i < args.length - 1; i++) {
39
39
  switch (args[i].toLowerCase()) {
40
40
  case "--id":
41
41
  id = args[++i];
42
42
  break;
43
- }
43
+ }
44
44
  }
45
45
 
46
46
  const client = await getOpsCompassClient();
@@ -49,39 +49,42 @@ async function deleteMsqlConfiguration(args){
49
49
  console.log(JSON.stringify(response, null, 2));
50
50
  }
51
51
 
52
- async function deleteMonitoringConfiguration(args){
52
+ async function deleteMonitoringConfiguration(args) {
53
53
  let id = undefined;
54
54
  for (let i = 0; i < args.length - 1; i++) {
55
55
  switch (args[i].toLowerCase()) {
56
56
  case "--id":
57
57
  id = args[++i];
58
58
  break;
59
- }
59
+ }
60
60
  }
61
61
 
62
62
  const client = await getOpsCompassClient();
63
- const response = await client.licenseManager.deleteMonitoringConfiguration(id);
63
+ const response = await client.licenseManager.deleteMonitoringConfiguration(
64
+ id
65
+ );
64
66
 
65
67
  console.log(JSON.stringify(response, null, 2));
66
68
  }
67
69
 
68
- async function deleteOracleDatabaseConfiguration(args){
70
+ async function deleteOracleDatabaseConfiguration(args) {
69
71
  let id = undefined;
70
72
  for (let i = 0; i < args.length - 1; i++) {
71
73
  switch (args[i].toLowerCase()) {
72
74
  case "--id":
73
75
  id = args[++i];
74
76
  break;
75
- }
77
+ }
76
78
  }
77
79
 
78
80
  const client = await getOpsCompassClient();
79
- const response = await client.licenseManager.deleteOracleDatabaseConfiguration(id);
81
+ const response =
82
+ await client.licenseManager.deleteOracleDatabaseConfiguration(id);
80
83
 
81
84
  console.log(JSON.stringify(response, null, 2));
82
85
  }
83
86
 
84
- async function deleteMssqlEntitlements(args){
87
+ async function deleteMssqlEntitlements(args) {
85
88
  args = setArgumentArrays(["--id"], args);
86
89
 
87
90
  let recordIds = undefined;
@@ -94,11 +97,14 @@ async function deleteMssqlEntitlements(args){
94
97
  case "--id":
95
98
  recordIds = args[++i];
96
99
  break;
97
- }
100
+ }
98
101
  }
99
102
 
100
103
  const client = await getOpsCompassClient();
101
- const response = await client.licenseManager.deleteMssqlEntitlements(company, recordIds);
104
+ const response = await client.licenseManager.deleteMssqlEntitlements(
105
+ company,
106
+ recordIds
107
+ );
102
108
 
103
109
  console.log(JSON.stringify(response, null, 2));
104
110
  }
@@ -108,13 +114,16 @@ async function listOracleDatabaseConfigurations(args) {
108
114
  switch (args[i].toLowerCase()) {
109
115
  case "--monitoringconfigurationid":
110
116
  case "--monitoring-configuration-id":
111
- monitoringConfigurationId = args[++i];
117
+ monitoringConfig = args[++i];
112
118
  break;
113
- }
119
+ }
114
120
  }
115
121
 
116
122
  const client = await getOpsCompassClient();
117
- const monitoringConfigs = await client.licenseManager.listOracleDatabaseConfigurations(monitoringConfigurationId);
123
+ const monitoringConfigs =
124
+ await client.licenseManager.listOracleDatabaseConfigurations(
125
+ monitoringConfig
126
+ );
118
127
 
119
128
  console.log(JSON.stringify(monitoringConfigs, null, 2));
120
129
  }
@@ -126,31 +135,33 @@ async function getOracleDatabaseConfiguration(args) {
126
135
  case "--id":
127
136
  id = args[++i];
128
137
  break;
129
- }
138
+ }
130
139
  }
131
140
 
132
141
  const client = await getOpsCompassClient();
133
- const monitoringConfigs = await client.licenseManager.getOracleDatabaseConfiguration(id);
142
+ const monitoringConfigs =
143
+ await client.licenseManager.getOracleDatabaseConfiguration(id);
134
144
 
135
145
  console.log(JSON.stringify(monitoringConfigs, null, 2));
136
146
  }
137
147
 
138
- async function getSecretForConfiguration(args){
139
- let id = undefined;
148
+ async function getSecretForConfiguration(args) {
149
+ let id = undefined;
140
150
  let recordType = undefined;
141
151
  for (let i = 0; i < args.length - 1; i++) {
142
152
  switch (args[i].toLowerCase()) {
143
153
  case "--id":
144
154
  id = args[++i];
145
155
  break;
146
- case "--recordtype":
156
+ case "--recordtype":
147
157
  recordType = args[++i];
148
158
  break;
149
- }
159
+ }
150
160
  }
151
161
 
152
162
  const client = await getOpsCompassClient();
153
- const monitoringConfig = await client.licenseManager.getSecretForConfiguration(id, recordType);
163
+ const monitoringConfig =
164
+ await client.licenseManager.getSecretForConfiguration(id, recordType);
154
165
 
155
166
  console.log(JSON.stringify(monitoringConfig, null, 2));
156
167
  }
@@ -159,70 +170,75 @@ async function getNetworkDiscoveryConfiguration(args) {
159
170
  let id = undefined;
160
171
  for (let i = 0; i < args.length - 1; i++) {
161
172
  switch (args[i].toLowerCase()) {
162
- case "--id":
173
+ case "--id":
163
174
  id = args[++i];
164
175
  break;
165
- }
176
+ }
166
177
  }
167
178
 
168
179
  const client = await getOpsCompassClient();
169
- const networkConfig = await client.licenseManager.getNetworkDiscoveryConfiguration(id);
180
+ const networkConfig =
181
+ await client.licenseManager.getNetworkDiscoveryConfiguration(id);
170
182
 
171
183
  console.log(JSON.stringify(networkConfig, null, 2));
172
184
  }
173
185
 
174
186
  async function getMonitoringConfiguration(args) {
175
- let id = undefined;
176
- let optionalParams = { asFile: undefined }
187
+ let optionalParams = { asFile: undefined };
177
188
  for (let i = 0; i < args.length - 1; i++) {
178
189
  switch (args[i].toLowerCase()) {
179
- case "--id":
180
- id = args[++i];
190
+ case "--id":
191
+ monitoringConfig = args[++i];
181
192
  break;
182
193
  case "--asfile":
183
194
  optionalParams.asFile = args[++i];
184
195
  break;
185
- }
196
+ }
186
197
  }
187
198
 
188
199
  const client = await getOpsCompassClient();
189
- const monitoringConfig = await client.licenseManager.getMonitoringConfiguration(id, optionalParams);
200
+ const monitoringConfiguration =
201
+ await client.licenseManager.getMonitoringConfiguration(
202
+ monitoringConfig,
203
+ optionalParams
204
+ );
190
205
 
191
- console.log(JSON.stringify(monitoringConfig, null, 2));
206
+ console.log(JSON.stringify(monitoringConfiguration, null, 2));
192
207
  }
193
208
 
194
209
  async function createMonitoringConfiguration(args) {
195
210
  let name = undefined;
196
211
  for (let i = 0; i < args.length - 1; i++) {
197
212
  switch (args[i].toLowerCase()) {
198
- case "--company":
213
+ case "--company":
199
214
  company = args[++i];
200
215
  break;
201
216
  case "--configurationname":
202
217
  name = args[++i];
203
218
  break;
204
- }
219
+ }
205
220
  }
206
221
 
207
222
  const client = await getOpsCompassClient();
208
- const monitoringConfig = await client.licenseManager.createMonitoringConfiguration(company, name);
223
+ const monitoringConfiguration =
224
+ await client.licenseManager.createMonitoringConfiguration(company, name);
209
225
 
210
- console.log(JSON.stringify(monitoringConfig, null, 2));
226
+ console.log(JSON.stringify(monitoringConfiguration, null, 2));
211
227
  }
212
228
 
213
229
  async function listVCenterConfigurations(args) {
214
- let id = undefined;
215
230
  for (let i = 0; i < args.length - 1; i++) {
216
231
  switch (args[i].toLowerCase()) {
217
232
  case "--monitoringconfigurationid":
218
233
  case "--monitoring-configuration-id":
219
- id = args[++i];
234
+ monitoringConfig = args[++i];
220
235
  break;
221
- }
236
+ }
222
237
  }
223
238
 
224
239
  const client = await getOpsCompassClient();
225
- const listVCenterConfigs = await client.licenseManager.listVCenterConfigurations(id);
240
+ const listVCenterConfigs =
241
+ await client.licenseManager.listVCenterConfigurations(monitoringConfig);
226
242
 
227
243
  console.log(JSON.stringify(listVCenterConfigs, null, 2));
228
244
  }
@@ -234,24 +250,30 @@ async function getVCenterConfiguration(args) {
234
250
  case "--id":
235
251
  id = args[++i];
236
252
  break;
237
- }
253
+ }
238
254
  }
239
255
 
240
256
  const client = await getOpsCompassClient();
241
- const getVCenterConfig = await client.licenseManager.getVCenterConfiguration(id);
257
+ const getVCenterConfig = await client.licenseManager.getVCenterConfiguration(
258
+ id
259
+ );
242
260
 
243
261
  console.log(JSON.stringify(getVCenterConfig, null, 2));
244
262
  }
245
263
 
246
264
  async function createVCenterConfiguration(args) {
247
- let id = undefined;
248
- let name = undefined;
249
- let optionalParams = { actions: undefined, connection: undefined, user: undefined, password: undefined };
265
+ let name = undefined;
266
+ let optionalParams = {
267
+ actions: undefined,
268
+ connection: undefined,
269
+ user: undefined,
270
+ password: undefined,
271
+ };
250
272
  for (let i = 0; i < args.length - 1; i++) {
251
273
  switch (args[i].toLowerCase()) {
252
- case "--monitoringconfigurationid":
274
+ case "--monitoringconfigurationid":
253
275
  case "--monitoring-configuration-id":
254
- id = args[++i];
276
+ monitoringConfig = args[++i];
255
277
  break;
256
278
  case "--name":
257
279
  name = args[++i];
@@ -261,7 +283,7 @@ async function createVCenterConfiguration(args) {
261
283
  optionalParams.actions.push(args[++i]);
262
284
  break;
263
285
  case "--connection":
264
- optionalParams.connection = args[++i];;
286
+ optionalParams.connection = args[++i];
265
287
  break;
266
288
  case "--user":
267
289
  optionalParams.user = args[++i];
@@ -269,41 +291,52 @@ async function createVCenterConfiguration(args) {
269
291
  case "--password":
270
292
  optionalParams.password = args[++i];
271
293
  break;
272
- }
294
+ }
273
295
  }
274
296
 
275
297
  const client = await getOpsCompassClient();
276
- const monitoringConfig = await client.licenseManager.createVCenterConfiguration(id, name, optionalParams);
277
-
278
- console.log(JSON.stringify(monitoringConfig, null, 2));
298
+ const monitoringConfiguration =
299
+ await client.licenseManager.createVCenterConfiguration(
300
+ monitoringConfig,
301
+ name,
302
+ optionalParams
303
+ );
304
+
305
+ console.log(JSON.stringify(monitoringConfiguration, null, 2));
279
306
  }
280
307
 
281
308
  async function listMsqlConfigurations(args) {
282
- let id = undefined;
283
309
  for (let i = 0; i < args.length - 1; i++) {
284
310
  switch (args[i].toLowerCase()) {
285
311
  case "--monitoringconfigurationid":
286
312
  case "--monitoring-configuration-id":
287
- id = args[++i];
313
+ monitoringConfig = args[++i];
288
314
  break;
289
- }
315
+ }
290
316
  }
291
317
 
292
318
  const client = await getOpsCompassClient();
293
- const listMsqlConfigs = await client.licenseManager.listMsqlConfigurations(id);
319
+ const listMsqlConfigs = await client.licenseManager.listMsqlConfigurations(
320
+ monitoringConfig
321
+ );
294
322
 
295
323
  console.log(JSON.stringify(listMsqlConfigs, null, 2));
296
324
  }
297
325
 
298
326
  async function createMsqlConfiguration(args) {
299
- let id = undefined;
300
- let configurationName = undefined;
301
- let optionalParams = { actions: undefined, server: undefined, user: undefined, password: undefined };
327
+ let configurationName = undefined;
328
+ let optionalParams = {
329
+ actions: undefined,
330
+ server: undefined,
331
+ user: undefined,
332
+ password: undefined,
333
+ directory_auth: undefined,
334
+ };
302
335
  for (let i = 0; i < args.length - 1; i++) {
303
336
  switch (args[i].toLowerCase()) {
304
337
  case "--monitoringconfigurationid":
305
338
  case "--monitoring-configuration-id":
306
- id = args[++i];
339
+ monitoringConfig = args[++i];
307
340
  break;
308
341
  case "--configuration-name":
309
342
  case "--configurationname":
@@ -314,7 +347,7 @@ async function createMsqlConfiguration(args) {
314
347
  optionalParams.actions.push(args[++i]);
315
348
  break;
316
349
  case "--server":
317
- optionalParams.server = args[++i];;
350
+ optionalParams.server = args[++i];
318
351
  break;
319
352
  case "--user":
320
353
  optionalParams.user = args[++i];
@@ -322,12 +355,24 @@ async function createMsqlConfiguration(args) {
322
355
  case "--password":
323
356
  optionalParams.password = args[++i];
324
357
  break;
325
- }
358
+ case "--directory-auth":
359
+ authArg = args[++i];
360
+ if (authArg.toLowerCase === "null") {
361
+ optionalParams.directory_auth = null;
362
+ } else {
363
+ optionalParams.directory_auth = "SESSION";
364
+ }
365
+ break;
366
+ }
326
367
  }
327
368
 
328
369
  const client = await getOpsCompassClient();
329
370
 
330
- const msqlConfiguration = await client.licenseManager.createMsqlConfiguration(id, configurationName, optionalParams);
371
+ const msqlConfiguration = await client.licenseManager.createMsqlConfiguration(
372
+ monitoringConfig,
373
+ configurationName,
374
+ optionalParams
375
+ );
331
376
 
332
377
  console.log(JSON.stringify(msqlConfiguration, null, 2));
333
378
  }
@@ -339,7 +384,7 @@ async function getMsqlConfiguration(args) {
339
384
  case "--id":
340
385
  id = args[++i];
341
386
  break;
342
- }
387
+ }
343
388
  }
344
389
 
345
390
  const client = await getOpsCompassClient();
@@ -355,24 +400,25 @@ async function getMssqlEntitlements(args) {
355
400
  case "--company":
356
401
  company = args[++i];
357
402
  break;
358
- }
403
+ }
359
404
  }
360
405
 
361
406
  const client = await getOpsCompassClient();
362
- const mssqlEntitlements = await client.licenseManager.getMssqlEntitlements(company);
407
+ const mssqlEntitlements = await client.licenseManager.getMssqlEntitlements(
408
+ company
409
+ );
363
410
 
364
411
  console.log(JSON.stringify(mssqlEntitlements, null, 2));
365
412
  }
366
413
 
367
414
  async function createOracleDatabaseConfiguration(args) {
368
- let id = undefined;
369
- let name = undefined;
415
+ let name = undefined;
370
416
  let optionalParams = { actions: undefined, connection: undefined };
371
417
  for (let i = 0; i < args.length - 1; i++) {
372
418
  switch (args[i].toLowerCase()) {
373
- case "--monitoringconfigurationid":
419
+ case "--monitoringconfigurationid":
374
420
  case "--monitoring-configuration-id":
375
- id = args[++i];
421
+ monitoringConfig = args[++i];
376
422
  break;
377
423
  case "--name":
378
424
  name = args[++i];
@@ -384,22 +430,28 @@ async function createOracleDatabaseConfiguration(args) {
384
430
  case "--connectionstring":
385
431
  optionalParams.connection = args[++i];
386
432
  break;
387
- }
433
+ }
388
434
  }
389
435
 
390
436
  const client = await getOpsCompassClient();
391
- const monitoringConfig = await client.licenseManager.createOracleDatabaseConfiguration(id, name, optionalParams);
392
-
393
- console.log(JSON.stringify(monitoringConfig, null, 2));
437
+ const monitoringConfiguration =
438
+ await client.licenseManager.createOracleDatabaseConfiguration(
439
+ monitoringConfig,
440
+ name,
441
+ optionalParams
442
+ );
443
+
444
+ console.log(JSON.stringify(monitoringConfiguration, null, 2));
394
445
  }
395
446
 
396
447
  async function updateMonitoringConfiguration(args) {
397
448
  // Prep any arguments that are arrays
398
449
  args = setArgumentArrays(["--mailFrom", "--emailTo"], args);
399
450
 
451
+ callParams.id = monitoringConfig;
400
452
  for (let i = 0; i < args.length - 1; i++) {
401
453
  switch (args[i].toLowerCase()) {
402
- case "--id":
454
+ case "--id":
403
455
  callParams.id = args[++i];
404
456
  break;
405
457
  case "--name":
@@ -431,19 +483,23 @@ async function updateMonitoringConfiguration(args) {
431
483
  case "--logfiletag":
432
484
  callParams.logFileTag = args[++i];
433
485
  break;
434
- }
486
+ }
435
487
  }
436
488
 
437
489
  const client = await getOpsCompassClient();
438
- const monitoringConfig = await client.licenseManager.updateMonitoringConfiguration(callParams.id, callParams);
490
+ const monitoringConfiguration =
491
+ await client.licenseManager.updateMonitoringConfiguration(
492
+ callParams.id,
493
+ callParams
494
+ );
439
495
 
440
- console.log(JSON.stringify(monitoringConfig, null, 2));
496
+ console.log(JSON.stringify(monitoringConfiguration, null, 2));
441
497
  }
442
498
 
443
499
  async function updateOracleDatabaseConfiguration(args) {
444
500
  for (let i = 0; i < args.length - 1; i++) {
445
501
  switch (args[i].toLowerCase()) {
446
- case "--id":
502
+ case "--id":
447
503
  callParams.id = args[++i];
448
504
  break;
449
505
  case "--name":
@@ -458,61 +514,69 @@ async function updateOracleDatabaseConfiguration(args) {
458
514
  case "--connectionstring":
459
515
  callParams.connectionString = args[++i];
460
516
  break;
461
- }
517
+ }
462
518
  }
463
519
 
464
520
  const client = await getOpsCompassClient();
465
- const oracleDatabaseConfiguration = await client.licenseManager.updateOracleDatabaseConfiguration(callParams.id, callParams);
521
+ const oracleDatabaseConfiguration =
522
+ await client.licenseManager.updateOracleDatabaseConfiguration(
523
+ callParams.id,
524
+ callParams
525
+ );
466
526
 
467
527
  console.log(JSON.stringify(oracleDatabaseConfiguration, null, 2));
468
528
  }
469
529
 
470
530
  async function updateOracleDatabaseConfigurations(args) {
471
- let callParamsArray = [];
472
- let jsonIndex = args.indexOf('--json-updates')
473
- let idIndex = args.indexOf('--id')
531
+ let callParamsArray = [];
532
+ let jsonIndex = args.indexOf("--json-updates");
533
+ let idIndex = args.indexOf("--id");
474
534
  let callParams = {};
475
535
 
476
- /* Process bulk update with JSON */
477
- if (jsonIndex !== -1) {
536
+ /* Process bulk update with JSON */
537
+ if (jsonIndex !== -1) {
478
538
  const jsonString = args[jsonIndex + 1];
479
539
  callParamsArray = JSON.parse(jsonString);
480
- } else if (idIndex !== -1) {
481
- /* If no '--json-update' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
482
- for(let i = 0; i < args.length - 1; i++) {
483
- if(args[i] === '--id') {
484
- /* Reset callParams object when a second id is encountered */
485
- callParams = {
486
- };
487
- /* Push callParams into the array. */
488
- callParamsArray.push(callParams)
489
- /* Create the object's properties based on the index (e.g. if the index is --id, you'll find the value at the next index */
490
- callParams.id = args[i + 1];
491
- } else if(args[i].toLowerCase() === '--configurationname' || args[i].toLowerCase() === '--configuration-name' || args[i].toLowerCase() === "--name" ){
492
- callParams.configurationName = args[i + 1];
493
- } else if(args[i] === '--connectionstring') {
494
- callParams.connectionString = args[i + 1];
495
- } else if(args[i] === '--action') {
496
- if (callParams.actions === undefined) callParams.actions = [];
497
- callParams.actions.push(args[i + 1]);
498
- }
540
+ } else if (idIndex !== -1) {
541
+ /* If no '--json-update' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
542
+ for (let i = 0; i < args.length - 1; i++) {
543
+ if (args[i] === "--id") {
544
+ /* Reset callParams object when a second id is encountered */
545
+ callParams = {};
546
+ /* Push callParams into the array. */
547
+ callParamsArray.push(callParams);
548
+ /* Create the object's properties based on the index (e.g. if the index is --id, you'll find the value at the next index */
549
+ callParams.id = args[i + 1];
550
+ } else if (
551
+ args[i].toLowerCase() === "--configurationname" ||
552
+ args[i].toLowerCase() === "--configuration-name" ||
553
+ args[i].toLowerCase() === "--name"
554
+ ) {
555
+ callParams.configurationName = args[i + 1];
556
+ } else if (args[i] === "--connectionstring") {
557
+ callParams.connectionString = args[i + 1];
558
+ } else if (args[i] === "--action") {
559
+ if (callParams.actions === undefined) callParams.actions = [];
560
+ callParams.actions.push(args[i + 1]);
499
561
  }
500
- } else {
501
- console.warn("Invalid input, please see help for examples.")
502
- return console.log("")
503
562
  }
504
- /* Call the API and print to console */
563
+ } else {
564
+ console.warn("Invalid input, please see help for examples.");
565
+ return console.log("");
566
+ }
567
+ /* Call the API and print to console */
505
568
  const client = await getOpsCompassClient();
506
- const oracleDatabaseConfigurations = await client.licenseManager.updateOracleDatabaseConfigurations(callParamsArray);
569
+ const oracleDatabaseConfigurations =
570
+ await client.licenseManager.updateOracleDatabaseConfigurations(
571
+ callParamsArray
572
+ );
507
573
  console.log(JSON.stringify(oracleDatabaseConfigurations, null, 2));
508
574
  }
509
575
 
510
-
511
576
  async function updateVCenterConfiguration(args) {
512
-
513
577
  for (let i = 0; i < args.length - 1; i++) {
514
578
  switch (args[i].toLowerCase()) {
515
- case "--id":
579
+ case "--id":
516
580
  callParams.id = args[++i];
517
581
  break;
518
582
  case "--name":
@@ -533,64 +597,71 @@ async function updateVCenterConfiguration(args) {
533
597
  case "--password":
534
598
  callParams.password = args[++i];
535
599
  break;
536
- }
600
+ }
537
601
  }
538
602
 
539
603
  const client = await getOpsCompassClient();
540
- const vCenterConfiguration = await client.licenseManager.updateVCenterConfiguration(callParams.id, callParams);
604
+ const vCenterConfiguration =
605
+ await client.licenseManager.updateVCenterConfiguration(
606
+ callParams.id,
607
+ callParams
608
+ );
541
609
  console.log(JSON.stringify(vCenterConfiguration, null, 2));
542
610
  }
543
611
 
544
612
  async function updateVCenterConfigurations(args) {
545
- let callParamsArray = [];
546
- let jsonIndex = args.indexOf('--json-updates')
547
- let idIndex = args.indexOf('--id')
613
+ let callParamsArray = [];
614
+ let jsonIndex = args.indexOf("--json-updates");
615
+ let idIndex = args.indexOf("--id");
548
616
  let callParams = {};
549
617
 
550
- /* Process bulk update with JSON */
618
+ /* Process bulk update with JSON */
551
619
  if (jsonIndex !== -1) {
552
620
  const jsonString = args[jsonIndex + 1];
553
621
  callParamsArray = JSON.parse(jsonString);
554
622
  } else if (idIndex !== -1) {
555
- /* If no '--json-update' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
556
- for(let i = 0; i < args.length - 1; i++) {
557
- if(args[i] === '--id') {
558
- /* Reset callParams object when a second id is encountered */
559
- callParams = {
560
- };
561
- /* if theres an existing callParams object, toss it into the array and move on. */
562
- callParamsArray.push(callParams)
563
- /* Create the object's properties based on the index (e.g. if the index is --id, you'll find the value at the next index */
623
+ /* If no '--json-update' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
624
+ for (let i = 0; i < args.length - 1; i++) {
625
+ if (args[i] === "--id") {
626
+ /* Reset callParams object when a second id is encountered */
627
+ callParams = {};
628
+ /* if theres an existing callParams object, toss it into the array and move on. */
629
+ callParamsArray.push(callParams);
630
+ /* Create the object's properties based on the index (e.g. if the index is --id, you'll find the value at the next index */
564
631
  callParams.id = args[i + 1];
565
- } else if(args[i].toLowerCase() === '--configurationname' || args[i].toLowerCase() === '--configuration-name' || args[i].toLowerCase() === "--name" ) {
566
- callParams.configurationName = args[i + 1];
567
- } else if(args[i].toLowerCase() === '--action') {
568
- if (callParams.actions === undefined) callParams.actions = [];
569
- callParams.actions.push(args[i + 1]);
570
- } else if(args[i.toLowerCase] === '--connection') {
571
- callParams.connection = args[i + 1];
572
- } else if(args[i.toLowerCase] === '--user') {
573
- callParams.user = args[i + 1];
574
- } else if(args[i.toLowerCase] === '--password') {
575
- callParams.password = args[i + 1];
632
+ } else if (
633
+ args[i].toLowerCase() === "--configurationname" ||
634
+ args[i].toLowerCase() === "--configuration-name" ||
635
+ args[i].toLowerCase() === "--name"
636
+ ) {
637
+ callParams.configurationName = args[i + 1];
638
+ } else if (args[i].toLowerCase() === "--action") {
639
+ if (callParams.actions === undefined) callParams.actions = [];
640
+ callParams.actions.push(args[i + 1]);
641
+ } else if (args[i.toLowerCase] === "--connection") {
642
+ callParams.connection = args[i + 1];
643
+ } else if (args[i.toLowerCase] === "--user") {
644
+ callParams.user = args[i + 1];
645
+ } else if (args[i.toLowerCase] === "--password") {
646
+ callParams.password = args[i + 1];
576
647
  }
577
648
  }
578
649
  } else {
579
- console.warn("Invalid input, please see help for examples.")
580
- return console.log("")
650
+ console.warn("Invalid input, please see help for examples.");
651
+ return console.log("");
581
652
  }
582
-
653
+
583
654
  /* Call the API and print to console */
584
655
  const client = await getOpsCompassClient();
585
- const vCenterConfigurations = await client.licenseManager.updateVCenterConfigurations(callParamsArray);
656
+ const vCenterConfigurations =
657
+ await client.licenseManager.updateVCenterConfigurations(callParamsArray);
586
658
  console.log(JSON.stringify(vCenterConfigurations, null, 2));
587
659
  }
588
660
 
589
661
  async function updateMsqlConfiguration(args) {
590
-
591
662
  for (let i = 0; i < args.length - 1; i++) {
592
663
  switch (args[i].toLowerCase()) {
593
- case "--id":
664
+ case "--id":
594
665
  callParams.id = args[++i];
595
666
  break;
596
667
  case "--name":
@@ -599,8 +670,8 @@ async function updateMsqlConfiguration(args) {
599
670
  callParams.configurationName = args[++i];
600
671
  break;
601
672
  case "--action":
602
- if (callParams.actions === undefined) callParams.actions = [];
603
- callParams.actions.push(args[++i]);
673
+ if (callParams.actions === undefined) callParams.actions = [];
674
+ callParams.actions.push(args[++i]);
604
675
  break;
605
676
  case "--server":
606
677
  callParams.server = args[++i];
@@ -611,61 +682,81 @@ async function updateMsqlConfiguration(args) {
611
682
  case "--password":
612
683
  callParams.password = args[++i];
613
684
  break;
614
- }
685
+ case "--directory-auth":
686
+ authArg = args[++i];
687
+ if (authArg.toLowerCase === "null") {
688
+ callParams.directory_auth = null;
689
+ } else {
690
+ callParams.directory_auth = "SESSION";
691
+ }
692
+ break;
693
+ }
615
694
  }
616
695
  const client = await getOpsCompassClient();
617
- const msqlConfiguration = await client.licenseManager.updateMsqlConfiguration(callParams.id, callParams);
696
+ const msqlConfiguration = await client.licenseManager.updateMsqlConfiguration(
697
+ callParams.id,
698
+ callParams
699
+ );
618
700
  console.log(JSON.stringify(msqlConfiguration, null, 2));
619
701
  }
620
702
 
621
-
622
703
  async function updateMsqlConfigurations(args) {
623
-
624
704
  let callParamsArray = [];
625
- let jsonIndex = args.indexOf('--json-updates')
626
- let idIndex = args.indexOf('--id')
705
+ let jsonIndex = args.indexOf("--json-updates");
706
+ let idIndex = args.indexOf("--id");
627
707
  let callParams = {};
628
708
 
629
- /* Process bulk update with JSON */
709
+ /* Process bulk update with JSON */
630
710
  if (jsonIndex !== -1) {
631
711
  const jsonString = args[jsonIndex + 1];
632
712
  callParamsArray = JSON.parse(jsonString);
633
-
634
- /* If no '--json-updates' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
635
- } else if (idIndex !== -1) {
636
- for(let i = 0; i < args.length - 1; i++) {
637
- if(args[i] === '--id') {
638
- /* Reset callParams object when a second id is encountered */
639
- callParams = {
640
- };
641
- /* if theres an existing callParams object, toss it into the array and move on. */
642
- callParamsArray.push(callParams)
643
- /* Create the object's properties based on the index (e.g. if the index is --id, you'll find the value at the next index */
713
+
714
+ /* If no '--json-updates' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
715
+ } else if (idIndex !== -1) {
716
+ for (let i = 0; i < args.length - 1; i++) {
717
+ if (args[i] === "--id") {
718
+ /* Reset callParams object when a second id is encountered */
719
+ callParams = {};
720
+ /* if theres an existing callParams object, toss it into the array and move on. */
721
+ callParamsArray.push(callParams);
722
+ /* Create the object's properties based on the index (e.g. if the index is --id, you'll find the value at the next index */
644
723
  callParams.id = args[i + 1];
645
- } else if(args[i].toLowerCase() === '--configurationname' || args[i].toLowerCase() === '--configuration-name' || args[i].toLowerCase() === "--name" ) {
646
- callParams.configurationName = args[i + 1];
647
- } else if(args[i].toLowerCase() === '--action') {
648
- if (callParams.actions === undefined) callParams.actions = [];
649
- callParams.actions.push(args[i + 1]);
650
- } else if(args[i].toLowerCase() === '--server') {
651
- callParams.server = args[i + 1];
652
- } else if(args[i].toLowerCase() === '--user') {
653
- callParams.user = args[i + 1];
654
- } else if(args[i].toLowerCase() === '--password') {
655
- callParams.password = args[i + 1];
656
- }
724
+ } else if (
725
+ args[i].toLowerCase() === "--configurationname" ||
726
+ args[i].toLowerCase() === "--configuration-name" ||
727
+ args[i].toLowerCase() === "--name"
728
+ ) {
729
+ callParams.configurationName = args[i + 1];
730
+ } else if (args[i].toLowerCase() === "--action") {
731
+ if (callParams.actions === undefined) callParams.actions = [];
732
+ callParams.actions.push(args[i + 1]);
733
+ } else if (args[i].toLowerCase() === "--server") {
734
+ callParams.server = args[i + 1];
735
+ } else if (args[i].toLowerCase() === "--user") {
736
+ callParams.user = args[i + 1];
737
+ } else if (args[i].toLowerCase() === "--password") {
738
+ callParams.password = args[i + 1];
739
+ } else if (args[i].toLowerCase() === "--directory-auth") {
740
+ authArg = args[i + 1];
741
+ if (authArg.toLowerCase === "null") {
742
+ callParams.directory_auth = null;
743
+ } else {
744
+ callParams.directory_auth = "SESSION";
745
+ }
657
746
  }
658
- } else {
659
- console.warn("Invalid input, please see help for examples.")
660
- return console.log("")
661
747
  }
662
-
663
- /* Call the API and print to console */
664
- const client = await getOpsCompassClient();
665
- const msqlConfigurations = await client.licenseManager.updateMsqlConfigurations(callParamsArray);
666
- console.log(JSON.stringify(msqlConfigurations, null, 2));
748
+ } else {
749
+ console.warn("Invalid input, please see help for examples.");
750
+ return console.log("");
667
751
  }
668
752
 
753
+ /* Call the API and print to console */
754
+ const client = await getOpsCompassClient();
755
+ const msqlConfigurations =
756
+ await client.licenseManager.updateMsqlConfigurations(callParamsArray);
757
+ console.log(JSON.stringify(msqlConfigurations, null, 2));
758
+ }
759
+
669
760
  async function getMssqlEntitlementComponents(args) {
670
761
  let company = undefined;
671
762
  for (let i = 0; i < args.length - 1; i++) {
@@ -673,26 +764,28 @@ async function getMssqlEntitlementComponents(args) {
673
764
  case "--company":
674
765
  company = args[++i];
675
766
  break;
676
- }
767
+ }
677
768
  }
678
769
 
679
770
  const client = await getOpsCompassClient();
680
- const entitlementComponents = await client.licenseManager.getMssqlEntitlementComponents(company);
771
+ const entitlementComponents =
772
+ await client.licenseManager.getMssqlEntitlementComponents(company);
681
773
  console.log(JSON.stringify(entitlementComponents, null, 2));
682
774
  }
683
775
 
684
776
  async function deleteNetworkDiscoveryConfiguration(args) {
685
- let id = undefined;
777
+ let id = undefined;
686
778
  for (let i = 0; i < args.length - 1; i++) {
687
- switch(args[i].toLowerCase()) {
688
- case "--id":
779
+ switch (args[i].toLowerCase()) {
780
+ case "--id":
689
781
  id = args[++i];
690
782
  break;
691
783
  }
692
784
  }
693
785
 
694
- const client = await getOpsCompassClient();
695
- const deleteResponse = await client.licenseManager.deleteNetworkDiscoveryConfiguration(id);
786
+ const client = await getOpsCompassClient();
787
+ const deleteResponse =
788
+ await client.licenseManager.deleteNetworkDiscoveryConfiguration(id);
696
789
  console.log(JSON.stringify(deleteResponse, null, 2));
697
790
  }
698
791
 
@@ -707,11 +800,11 @@ async function updateNetworkDiscoveryConfiguration(args) {
707
800
  case "--id":
708
801
  id = args[++i];
709
802
  break;
710
- case "--oracle-ports":
803
+ case "--oracle-ports":
711
804
  case "--oracleports":
712
805
  ports["oracle_ports"] = args[++i];
713
806
  break;
714
- case "--other-ports":
807
+ case "--other-ports":
715
808
  case "--otherports":
716
809
  ports["other_ports"] = args[++i];
717
810
  break;
@@ -720,10 +813,10 @@ async function updateNetworkDiscoveryConfiguration(args) {
720
813
  ports["mssql_ports"] = args[++i];
721
814
  break;
722
815
  case "--dns-servers":
723
- case "--dnsservers":
816
+ case "--dnsservers":
724
817
  dns_servers.push(args[++i]);
725
818
  break;
726
- case "--subnet":
819
+ case "--subnet":
727
820
  currentSubnet["subnet"] = args[++i];
728
821
  if (currentSubnet["subnet"] && currentSubnet["name"]) {
729
822
  subnets.push(currentSubnet);
@@ -737,13 +830,19 @@ async function updateNetworkDiscoveryConfiguration(args) {
737
830
  subnets.push(currentSubnet);
738
831
  currentSubnet = {};
739
832
  }
740
- break;
741
- }
833
+ break;
834
+ }
742
835
  }
743
836
 
744
837
  const client = await getOpsCompassClient();
745
838
 
746
- const networkDiscoveryConfig = await client.licenseManager.updateNetworkDiscoveryConfiguration(id, subnets || undefined, dns_servers || undefined, ports || undefined);
839
+ const networkDiscoveryConfig =
840
+ await client.licenseManager.updateNetworkDiscoveryConfiguration(
841
+ id,
842
+ subnets || undefined,
843
+ dns_servers || undefined,
844
+ ports || undefined
845
+ );
747
846
 
748
847
  console.log(JSON.stringify(networkDiscoveryConfig, null, 2));
749
848
  }
@@ -760,7 +859,7 @@ async function createNetworkDiscoveryConfiguration(args) {
760
859
  case "--monitoring-configuration-id":
761
860
  id = args[++i];
762
861
  break;
763
- case "--oracle-ports":
862
+ case "--oracle-ports":
764
863
  case "--oracleports":
765
864
  ports["oracle_ports"] = args[++i];
766
865
  break;
@@ -776,7 +875,7 @@ async function createNetworkDiscoveryConfiguration(args) {
776
875
  case "--dnsservers":
777
876
  dns_servers.push(args[++i]);
778
877
  break;
779
- case "--subnet":
878
+ case "--subnet":
780
879
  currentSubnet["subnet"] = args[++i];
781
880
  if (currentSubnet["subnet"] && currentSubnet["name"]) {
782
881
  subnets.push(currentSubnet);
@@ -790,19 +889,25 @@ async function createNetworkDiscoveryConfiguration(args) {
790
889
  subnets.push(currentSubnet);
791
890
  currentSubnet = {};
792
891
  }
793
- break;
794
- }
892
+ break;
893
+ }
795
894
  }
796
895
 
797
896
  const client = await getOpsCompassClient();
798
897
 
799
- const networkDiscoveryConfig = await client.licenseManager.createNetworkDiscoveryConfiguration(id, subnets || undefined, dns_servers || undefined, ports || undefined);
898
+ const networkDiscoveryConfig =
899
+ await client.licenseManager.createNetworkDiscoveryConfiguration(
900
+ id,
901
+ subnets || undefined,
902
+ dns_servers || undefined,
903
+ ports || undefined
904
+ );
800
905
 
801
906
  console.log(JSON.stringify(networkDiscoveryConfig, null, 2));
802
907
  }
803
908
 
804
909
  async function createMssqlEntitlement(args) {
805
- let company = undefined;
910
+ let company = undefined;
806
911
  let newRecord = {
807
912
  purchaseDate: undefined,
808
913
  quantity: undefined,
@@ -811,7 +916,7 @@ async function createMssqlEntitlement(args) {
811
916
  msqlProduct: undefined,
812
917
  msqlEdition: undefined,
813
918
  msqlVersion: undefined,
814
- msqlMetric: undefined
919
+ msqlMetric: undefined,
815
920
  };
816
921
  for (let i = 0; i < args.length - 1; i++) {
817
922
  switch (args[i].toLowerCase()) {
@@ -853,12 +958,15 @@ async function createMssqlEntitlement(args) {
853
958
  }
854
959
 
855
960
  const client = await getOpsCompassClient();
856
- const response = await client.licenseManager.createMssqlEntitlements(company, [newRecord]);
961
+ const response = await client.licenseManager.createMssqlEntitlements(
962
+ company,
963
+ [newRecord]
964
+ );
857
965
  console.log(JSON.stringify(response, null, 2));
858
966
  }
859
967
 
860
968
  async function updateMssqlEntitlement(args) {
861
- let company = undefined;
969
+ let company = undefined;
862
970
  let updateRecord = {
863
971
  id: undefined,
864
972
  purchaseDate: undefined,
@@ -868,7 +976,7 @@ async function updateMssqlEntitlement(args) {
868
976
  msqlProduct: undefined,
869
977
  msqlEdition: undefined,
870
978
  msqlVersion: undefined,
871
- msqlMetric: undefined
979
+ msqlMetric: undefined,
872
980
  };
873
981
  for (let i = 0; i < args.length - 1; i++) {
874
982
  switch (args[i].toLowerCase()) {
@@ -913,18 +1021,21 @@ async function updateMssqlEntitlement(args) {
913
1021
  }
914
1022
 
915
1023
  const client = await getOpsCompassClient();
916
- const response = await client.licenseManager.updateMssqlEntitlements(company, [updateRecord]);
1024
+ const response = await client.licenseManager.updateMssqlEntitlements(
1025
+ company,
1026
+ [updateRecord]
1027
+ );
917
1028
  console.log(JSON.stringify(response, null, 2));
918
1029
  }
919
1030
 
920
- async function listMssqlAssessments(args){
1031
+ async function listMssqlAssessments(args) {
921
1032
  let company = undefined;
922
1033
  for (let i = 0; i < args.length - 1; i++) {
923
1034
  switch (args[i].toLowerCase()) {
924
1035
  case "--company":
925
1036
  company = args[++i];
926
1037
  break;
927
- }
1038
+ }
928
1039
  }
929
1040
 
930
1041
  const client = await getOpsCompassClient();
@@ -942,7 +1053,7 @@ async function getMssqlAssessment(args) {
942
1053
  case "--assessmentid":
943
1054
  assessmentId = args[++i];
944
1055
  break;
945
- }
1056
+ }
946
1057
  }
947
1058
 
948
1059
  const client = await getOpsCompassClient();
@@ -960,11 +1071,13 @@ async function getMssqlAssessmentEntitlements(args) {
960
1071
  case "--assessmentid":
961
1072
  assessmentId = args[++i];
962
1073
  break;
963
- }
1074
+ }
964
1075
  }
965
1076
 
966
1077
  const client = await getOpsCompassClient();
967
- const response = await client.licenseManager.getMssqlAssessmentEntitlements(assessmentId);
1078
+ const response = await client.licenseManager.getMssqlAssessmentEntitlements(
1079
+ assessmentId
1080
+ );
968
1081
 
969
1082
  console.log(JSON.stringify(response, null, 2));
970
1083
  }
@@ -978,11 +1091,14 @@ async function getMssqlAssessmentLicenseUsageMaps(args) {
978
1091
  case "--assessmentid":
979
1092
  assessmentId = args[++i];
980
1093
  break;
981
- }
1094
+ }
982
1095
  }
983
1096
 
984
1097
  const client = await getOpsCompassClient();
985
- const response = await client.licenseManager.getMssqlAssessmentLicenseUsageMaps(assessmentId);
1098
+ const response =
1099
+ await client.licenseManager.getMssqlAssessmentLicenseUsageMaps(
1100
+ assessmentId
1101
+ );
986
1102
 
987
1103
  console.log(JSON.stringify(response, null, 2));
988
1104
  }
@@ -996,11 +1112,13 @@ async function getMssqlAssessmentResources(args) {
996
1112
  case "--assessmentid":
997
1113
  assessmentId = args[++i];
998
1114
  break;
999
- }
1115
+ }
1000
1116
  }
1001
1117
 
1002
1118
  const client = await getOpsCompassClient();
1003
- const response = await client.licenseManager.getMssqlAssessmentResources(assessmentId);
1119
+ const response = await client.licenseManager.getMssqlAssessmentResources(
1120
+ assessmentId
1121
+ );
1004
1122
 
1005
1123
  console.log(JSON.stringify(response, null, 2));
1006
1124
  }
@@ -1008,162 +1126,305 @@ async function getMssqlAssessmentResources(args) {
1008
1126
  async function printHelp() {
1009
1127
  console.log("Actions available for license-manager:");
1010
1128
  console.log();
1011
- console.log("get-secret-for-configuration", "Gets a secret for a single configuration passed.");
1129
+ console.log(
1130
+ "get-secret-for-configuration",
1131
+ "Gets a secret for a single configuration passed."
1132
+ );
1012
1133
  console.log("Parameters:");
1013
- console.log("--id [vcenter_configuration_id | oracle_database_configuration_id | msql_configuration_id]");
1014
- console.log("--recordType ['oracle_database_configuration' | 'vcenter_configuration' | 'msql_configuration'");
1134
+ console.log(
1135
+ "--id [vcenter_configuration_id | oracle_database_configuration_id | msql_configuration_id]"
1136
+ );
1137
+ console.log(
1138
+ "--recordType ['oracle_database_configuration' | 'vcenter_configuration' | 'msql_configuration'"
1139
+ );
1015
1140
  console.log();
1016
- console.log("list-monitoring-configurations", "Lists all of the monitoring configurations associated with the give company.");
1141
+ console.log(
1142
+ "list-monitoring-configurations",
1143
+ "Lists all of the monitoring configurations associated with the given company."
1144
+ );
1017
1145
  console.log("Parameters:");
1018
1146
  console.log("--company [company_slug]");
1019
1147
  console.log();
1020
- console.log("get-monitoring-configuration", "Get a single monitoring configuration associated with the given company.");
1148
+ console.log(
1149
+ "get-monitoring-configuration",
1150
+ "Get a single monitoring configuration associated with the given company."
1151
+ );
1021
1152
  console.log("Parameters:");
1022
1153
  console.log("--id [monitoring_configuration_id]");
1023
1154
  console.log("--asFile (optional) [true | false]");
1024
1155
  console.log();
1025
- console.log("get-network-discovery-configuration", "Get a single network discovery configuration.");
1156
+ console.log(
1157
+ "get-network-discovery-configuration",
1158
+ "Get a single network discovery configuration."
1159
+ );
1026
1160
  console.log("Parameters:");
1027
1161
  console.log("--id [network_discovery_configuration_id]");
1028
1162
  console.log();
1029
- console.log("create-monitoring-configuration", "Create a single monitoring configuration associated with the given company.");
1163
+ console.log(
1164
+ "create-monitoring-configuration",
1165
+ "Create a single monitoring configuration associated with the given company."
1166
+ );
1030
1167
  console.log("Parameters:");
1031
1168
  console.log("--company [company_slug]");
1032
1169
  console.log("--configurationName [configuration name]");
1033
1170
  console.log();
1034
- console.log("create-network-discovery-configuration", "Creates a new networking discovery configuration associated with the given monitoring configuration.")
1171
+ console.log(
1172
+ "create-network-discovery-configuration",
1173
+ "Creates a new networking discovery configuration associated with the given monitoring configuration."
1174
+ );
1035
1175
  console.log("Parameters:");
1036
1176
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1037
- console.log("--oracle-ports (optional) comma seperated list of valid port numbers to look for oracle connections");
1038
- console.log("--mssql-ports (optional) comma seperated list of valid port numbers to look for mssql connections");
1039
- console.log("--other-ports (optional) comma seperated list of valid port numbers to look for misc connections");
1040
- console.log("--dns-servers (optional) comma seperated list of valid IPV4 DNS servers to use for DNS resolution. Can be specified multiple times");
1041
- console.log("--subnet (optional) If supplied --subnet-name is also required. Valid IPV4 CIDR block as an input. Can be supplied multiple times");
1042
- console.log("--subnet-name (optional) If supplied --subnet is also required. Name for the next/last subnet block provided. Can be supplied multiple times.")
1177
+ console.log(
1178
+ "--oracle-ports (optional) comma seperated list of valid port numbers to look for oracle connections"
1179
+ );
1180
+ console.log(
1181
+ "--mssql-ports (optional) comma seperated list of valid port numbers to look for mssql connections"
1182
+ );
1183
+ console.log(
1184
+ "--other-ports (optional) comma seperated list of valid port numbers to look for misc connections"
1185
+ );
1186
+ console.log(
1187
+ "--dns-servers (optional) comma seperated list of valid IPV4 DNS servers to use for DNS resolution. Can be specified multiple times"
1188
+ );
1189
+ console.log(
1190
+ "--subnet (optional) If supplied --subnet-name is also required. Valid IPV4 CIDR block as an input. Can be supplied multiple times"
1191
+ );
1192
+ console.log(
1193
+ "--subnet-name (optional) If supplied --subnet is also required. Name for the next/last subnet block provided. Can be supplied multiple times."
1194
+ );
1043
1195
  console.log();
1044
- console.log("update-network-discovery-configuration", "Updates an existing networking discovery configuration. If an optional parameter is not provided, it is assumed that the field should be set to undefined.")
1196
+ console.log(
1197
+ "update-network-discovery-configuration",
1198
+ "Updates an existing networking discovery configuration. If an optional parameter is not provided, it is assumed that the field should be set to undefined."
1199
+ );
1045
1200
  console.log("Parameters:");
1046
1201
  console.log("--id [network_discovery_configuration_id]");
1047
- console.log("--oracle-ports (optional) comma seperated list of valid port numbers to look for oracle connections");
1048
- console.log("--mssql-ports (optional) comma seperated list of valid port numbers to look for mssql connections");
1049
- console.log("--other-ports (optional) comma seperated list of valid port numbers to look for misc connections");
1050
- console.log("--dns-servers (optional) comma seperated list of valid IPV4 DNS servers to use for DNS resolution. Can be specified multiple times");
1051
- console.log("--subnet (optional) If supplied --subnet-name is also required. Valid IPV4 CIDR block as an input. Can be supplied multiple times");
1052
- console.log("--subnet-name (optional) If supplied --subnet is also required. Name for the next/last subnet block provided. Can be supplied multiple times.")
1202
+ console.log(
1203
+ "--oracle-ports (optional) comma seperated list of valid port numbers to look for oracle connections"
1204
+ );
1205
+ console.log(
1206
+ "--mssql-ports (optional) comma seperated list of valid port numbers to look for mssql connections"
1207
+ );
1208
+ console.log(
1209
+ "--other-ports (optional) comma seperated list of valid port numbers to look for misc connections"
1210
+ );
1211
+ console.log(
1212
+ "--dns-servers (optional) comma seperated list of valid IPV4 DNS servers to use for DNS resolution. Can be specified multiple times"
1213
+ );
1214
+ console.log(
1215
+ "--subnet (optional) If supplied --subnet-name is also required. Valid IPV4 CIDR block as an input. Can be supplied multiple times"
1216
+ );
1217
+ console.log(
1218
+ "--subnet-name (optional) If supplied --subnet is also required. Name for the next/last subnet block provided. Can be supplied multiple times."
1219
+ );
1053
1220
  console.log();
1054
- console.log("list-oracle-database-configurations", "Lists all of the oracle database configurations associated with the given monitoring configuration");
1221
+ console.log(
1222
+ "list-oracle-database-configurations",
1223
+ "Lists all of the oracle database configurations associated with the given monitoring configuration"
1224
+ );
1055
1225
  console.log("Parameters:");
1056
1226
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1057
1227
  console.log();
1058
- console.log("get-oracle-database-configuration", "Get a single oracle database configuration associated with the given monitoring configuration");
1228
+ console.log(
1229
+ "get-oracle-database-configuration",
1230
+ "Get a single oracle database configuration associated with the given monitoring configuration"
1231
+ );
1059
1232
  console.log("Parameters:");
1060
1233
  console.log("--id [oracle_database_configuration_id]");
1061
1234
  console.log();
1062
- console.log("list-vcenter-configurations", "Lists all of the vcenter configurations associated with the given monitoring configuration");
1235
+ console.log(
1236
+ "list-vcenter-configurations",
1237
+ "Lists all of the vcenter configurations associated with the given monitoring configuration"
1238
+ );
1063
1239
  console.log("Parameters:");
1064
1240
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1065
1241
  console.log();
1066
- console.log("get-vcenter-configuration", "Get a single vcenter configuration associated with the given monitoring configuration");
1242
+ console.log(
1243
+ "get-vcenter-configuration",
1244
+ "Get a single vcenter configuration associated with the given monitoring configuration"
1245
+ );
1067
1246
  console.log("Parameters:");
1068
1247
  console.log("--id [vcenter_configuration_id]");
1069
1248
  console.log();
1070
- console.log("create-vcenter-configuration", "Create a single vcenter configuration associated with the given monitoring configuration.");
1249
+ console.log(
1250
+ "create-vcenter-configuration",
1251
+ "Create a single vcenter configuration associated with the given monitoring configuration."
1252
+ );
1071
1253
  console.log("Parameters:");
1072
1254
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1073
1255
  console.log("--name [unique name]");
1074
- console.log(`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "vmotion"`);
1256
+ console.log(
1257
+ `--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "vmotion"`
1258
+ );
1075
1259
  console.log("--connection (optional) [the hostname or ip address]");
1076
1260
  console.log("--user (optional) [connection username]");
1077
1261
  console.log("--password (optional) [connection password]");
1078
1262
  console.log();
1079
- console.log("list-msql-configurations", "Lists all of the msql configurations associated with the given monitoring configuration");
1263
+ console.log(
1264
+ "list-msql-configurations",
1265
+ "Lists all of the msql configurations associated with the given monitoring configuration"
1266
+ );
1080
1267
  console.log("Parameters:");
1081
1268
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1082
1269
  console.log();
1083
- console.log("create-msql-configuration", "Create a single msql configuration associated with the given monitoring configuration.");
1270
+ console.log(
1271
+ "create-msql-configuration",
1272
+ "Create a single msql configuration associated with the given monitoring configuration."
1273
+ );
1084
1274
  console.log("Parameters:");
1085
1275
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1086
1276
  console.log("--configurationName [unique name]");
1087
- console.log(`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "compliance"`);
1277
+ console.log(
1278
+ `--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`
1279
+ );
1088
1280
  console.log("--server (optional) [the hostname or ip address]");
1089
1281
  console.log("--user (optional) [connection username]");
1090
1282
  console.log("--password (optional) [connection password]");
1283
+ console.log("--directory-auth (optional) ['SESSION' or NULL]");
1091
1284
  console.log();
1092
- console.log("get-msql-configuration", "Get a single msql configuration associated with the given monitoring configuration");
1285
+ console.log(
1286
+ "get-msql-configuration",
1287
+ "Get a single msql configuration associated with the given monitoring configuration"
1288
+ );
1093
1289
  console.log("Parameters:");
1094
1290
  console.log("--id [msql_configuration_id]");
1095
1291
  console.log();
1096
- console.log("create-oracle-database-configuration", "Create a single oracle database configuration associated with the given monitoring configuration.");
1292
+ console.log(
1293
+ "create-oracle-database-configuration",
1294
+ "Create a single oracle database configuration associated with the given monitoring configuration."
1295
+ );
1097
1296
  console.log("Parameters:");
1098
1297
  console.log("--monitoring-configuration-id [monitoring_configuration_id]");
1099
1298
  console.log("--name [unique name]");
1100
- console.log(`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`);
1299
+ console.log(
1300
+ `--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`
1301
+ );
1101
1302
  console.log("--connectionString (optional) [the database connection string]");
1102
1303
  console.log();
1103
- console.log("update-monitoring-configuration", "Update a single monitoring configuration.");
1304
+ console.log(
1305
+ "update-monitoring-configuration",
1306
+ "Update a single monitoring configuration."
1307
+ );
1104
1308
  console.log("Parameters:");
1105
1309
  console.log("--id [monitoring_configuration id]");
1106
1310
  console.log("--name or --configuration-name (optional) [unique name]");
1107
- console.log("--dataFileRetainDays (optional) [determines how many days to retain encrypted output files locally]");
1108
- console.log("--dataFileRetainTextDays (optional) [determines how many days to retain individual script output files locally]");
1109
- console.log("--forceFileEncryption (optional) [enforce encryption of datafiles before being sent]");
1110
- console.log("--dataFileTag (optional) [used to help filename generation to prevent duplicate file names]");
1111
- console.log("--mailFrom (optional) [Use parameter multiple times to send multiple email addresses. Identifies sender's email addresses when file delivery is done through email.]");
1112
- console.log("--emailTo (optional) [Use parameter multiple times to send multiple email addresses. Identifies the destination email addresses when file delivery is done through email.]");
1113
- console.log("--logFileRetainDays (optional) [determines how many days to retain log files locally]");
1114
- console.log("--logFileTag (optional) [used to help filename generation to prevent duplicate file names]");
1311
+ console.log(
1312
+ "--dataFileRetainDays (optional) [determines how many days to retain encrypted output files locally]"
1313
+ );
1314
+ console.log(
1315
+ "--dataFileRetainTextDays (optional) [determines how many days to retain individual script output files locally]"
1316
+ );
1317
+ console.log(
1318
+ "--forceFileEncryption (optional) [enforce encryption of datafiles before being sent]"
1319
+ );
1320
+ console.log(
1321
+ "--dataFileTag (optional) [used to help filename generation to prevent duplicate file names]"
1322
+ );
1323
+ console.log(
1324
+ "--mailFrom (optional) [Use parameter multiple times to send multiple email addresses. Identifies sender's email addresses when file delivery is done through email.]"
1325
+ );
1326
+ console.log(
1327
+ "--emailTo (optional) [Use parameter multiple times to send multiple email addresses. Identifies the destination email addresses when file delivery is done through email.]"
1328
+ );
1329
+ console.log(
1330
+ "--logFileRetainDays (optional) [determines how many days to retain log files locally]"
1331
+ );
1332
+ console.log(
1333
+ "--logFileTag (optional) [used to help filename generation to prevent duplicate file names]"
1334
+ );
1115
1335
  console.log();
1116
- console.log("update-oracle-database-configuration", "Update a single oracle database configuration.");
1336
+ console.log(
1337
+ "update-oracle-database-configuration",
1338
+ "Update a single oracle database configuration."
1339
+ );
1117
1340
  console.log("Parameters:");
1118
1341
  console.log("--id [configuration id]");
1119
1342
  console.log("--name or --configuration-name (optional) [unique name]");
1120
- console.log(`--action (optional) pass multiple times to define which actions this connection can take --action "skip" --action "dbcompliance"`);
1343
+ console.log(
1344
+ `--action (optional) pass multiple times to define which actions this connection can take --action "skip" --action "dbcompliance"`
1345
+ );
1121
1346
  console.log("--connectionString (optional) [the database connection string]");
1122
1347
  console.log();
1123
- console.log("update-oracle-database-configurations", "Bulk update oracle database configurations.");
1124
- console.log("Parameters:");
1348
+ console.log(
1349
+ "update-oracle-database-configurations",
1350
+ "Bulk update oracle database configurations."
1351
+ );
1352
+ console.log("Parameters:");
1125
1353
  console.log("--id [configuration id]");
1126
1354
  console.log("--name or --configuration-name (optional) [unique name]");
1127
- console.log(`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`);
1355
+ console.log(
1356
+ `--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`
1357
+ );
1128
1358
  console.log("--connectionString (optional) [the database connection string]");
1129
1359
  console.log("OR --json-updates [stringified json objects with your updates]");
1130
1360
  console.log("For quick updates, you may use the above parameters");
1131
- console.log(`e.g. opscompass license-manager update-oracle-database-configurations --id 57 --name "updatedName" --id 62 --name "otherUpdatedName" --id 77 --name "lastUpdatedName";`);
1132
- console.log("For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag");
1133
- console.log(`e.g. opscompass license-manager update-oracle-database-configurations --json-updates '[{\"id\":\"57\",\"configurationName\":\"updatedName\"},{\"id\":\"77\", \"configurationName\":\"otherUpdatedName\", \"action\":\"null\"},{\"id\":\"79\", \"configurationName\":\"lastUpdatedName\"}]'`);
1361
+ console.log(
1362
+ `e.g. opscompass license-manager update-oracle-database-configurations --id 57 --name "updatedName" --id 62 --name "otherUpdatedName" --id 77 --name "lastUpdatedName";`
1363
+ );
1364
+ console.log(
1365
+ "For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
1366
+ );
1367
+ console.log(
1368
+ `e.g. opscompass license-manager update-oracle-database-configurations --json-updates '[{\"id\":\"57\",\"configurationName\":\"updatedName\"},{\"id\":\"77\", \"configurationName\":\"otherUpdatedName\", \"action\":\"null\"},{\"id\":\"79\", \"configurationName\":\"lastUpdatedName\"}]'`
1369
+ );
1134
1370
  console.log();
1135
- console.log("update-vcenter-configuration", "Update a single vcenter configuration.");
1371
+ console.log(
1372
+ "update-vcenter-configuration",
1373
+ "Update a single vcenter configuration."
1374
+ );
1136
1375
  console.log("Parameters:");
1137
1376
  console.log("--id [configuration id]");
1138
1377
  console.log("--name or --configuration-name (optional) [unique name]");
1139
- console.log("--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'vmotion']");
1378
+ console.log(
1379
+ "--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'vmotion']"
1380
+ );
1140
1381
  console.log("--connection (optional) [the hostname or ip address]");
1141
1382
  console.log("--user (optional) [connection username]");
1142
1383
  console.log("--password (optional) [connection password]");
1143
1384
  console.log();
1144
- console.log("update-vcenter-configurations", "Bulk Update vcenter configurations.");
1145
- console.log("Parameters:");
1385
+ console.log(
1386
+ "update-vcenter-configurations",
1387
+ "Bulk Update vcenter configurations."
1388
+ );
1389
+ console.log("Parameters:");
1146
1390
  console.log("--id [configuration id]");
1147
1391
  console.log("--name or --configuration-name (optional) [unique name]");
1148
- console.log(`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "vmotion"`);
1392
+ console.log(
1393
+ `--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "vmotion"`
1394
+ );
1149
1395
  console.log("--connection (optional) [the hostname or ip address]");
1150
1396
  console.log("--user (optional) [connection username]");
1151
1397
  console.log("--password (optional) [connection password]");
1152
1398
  console.log("OR --json-updates [stringified json objects with your updates]");
1153
1399
  console.log("For quick updates, you may use the above parameters");
1154
- console.log(`e.g. opscompass license-manager update-vcenter-configurations --id 137 --name "updatedName" --id 138 --name "otherUpdatedName" --id 144 --name "lastUpdatedName" --action "skip" --action "vmotion";`);
1155
- console.log("For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag");
1156
- console.log(`e.g. opscompass license-manager update-vcenter-configurations --json-updates '[{\"id\":\"137\",\"configurationName\":\"updatedName\"},{\"id\":\"138\",\"configurationName\":\"otherUpdatedName\"},{\"id\":\"144\",\"configurationName\":\"lastUpdatedName\", \"actions\":[\"skip\", \"vmotion\"]}]'`);
1400
+ console.log(
1401
+ `e.g. opscompass license-manager update-vcenter-configurations --id 137 --name "updatedName" --id 138 --name "otherUpdatedName" --id 144 --name "lastUpdatedName" --action "skip" --action "vmotion";`
1402
+ );
1403
+ console.log(
1404
+ "For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
1405
+ );
1406
+ console.log(
1407
+ `e.g. opscompass license-manager update-vcenter-configurations --json-updates '[{\"id\":\"137\",\"configurationName\":\"updatedName\"},{\"id\":\"138\",\"configurationName\":\"otherUpdatedName\"},{\"id\":\"144\",\"configurationName\":\"lastUpdatedName\", \"actions\":[\"skip\", \"vmotion\"]}]'`
1408
+ );
1157
1409
  console.log();
1158
- console.log("delete-monitoring-configuration", "Delete a monitoring configuration");
1410
+ console.log(
1411
+ "delete-monitoring-configuration",
1412
+ "Delete a monitoring configuration"
1413
+ );
1159
1414
  console.log("Parameters:");
1160
1415
  console.log("--id [monitoring_configuration_id]");
1161
1416
  console.log();
1162
- console.log("delete-network-discovery-configuration", "Delete a network discovery configuration");
1417
+ console.log(
1418
+ "delete-network-discovery-configuration",
1419
+ "Delete a network discovery configuration"
1420
+ );
1163
1421
  console.log("Parameters:");
1164
1422
  console.log("--id [network_discovery_configuration_id]");
1165
1423
  console.log();
1166
- console.log("delete-oracle-database-configuration", "Delete a oracle database configuration");
1424
+ console.log(
1425
+ "delete-oracle-database-configuration",
1426
+ "Delete a oracle database configuration"
1427
+ );
1167
1428
  console.log("Parameters:");
1168
1429
  console.log("--id [oracle_database_configuration_id]");
1169
1430
  console.log();
@@ -1175,87 +1436,157 @@ async function printHelp() {
1175
1436
  console.log("Parameters:");
1176
1437
  console.log("--id [msql_configuration_id]");
1177
1438
  console.log();
1178
- console.log("update-msql-configuration", "Update a single msql configuration.");
1439
+ console.log(
1440
+ "update-msql-configuration",
1441
+ "Update a single msql configuration."
1442
+ );
1179
1443
  console.log("Parameters:");
1180
1444
  console.log("--id [configuration id]");
1181
1445
  console.log("--name or --configuration-name (optional) [unique name]");
1182
- console.log("--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'dblicensing'");
1446
+ console.log(
1447
+ "--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'dblicensing'"
1448
+ );
1183
1449
  console.log("--server (optional) [the server]");
1184
1450
  console.log("--user (optional) [connection username]");
1185
1451
  console.log("--password (optional) [connection password]");
1452
+ console.log("--directory-auth (optional) ['SESSION' or NULL]");
1186
1453
  console.log();
1187
1454
  console.log();
1188
1455
  console.log("update-msql-configurations", "Bulk Update Msql Configurations.");
1189
- console.log("Parameters:");
1456
+ console.log("Parameters:");
1190
1457
  console.log("--id [configuration id]");
1191
1458
  console.log("--name or --configuration-name (optional) [unique name]");
1192
- console.log("--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'dblicensing'");
1193
- console.log("--connection (optional) [the hostname or ip address]");
1459
+ console.log(
1460
+ "--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'dblicensing'"
1461
+ );
1462
+ console.log("--server (optional) [the server]");
1194
1463
  console.log("--user (optional) [connection username]");
1195
1464
  console.log("--password (optional) [connection password]");
1465
+ console.log("--directory-auth (optional) ['SESSION' or NULL]");
1196
1466
  console.log("OR --json-updates [stringified json objects with your updates]");
1197
1467
  console.log("For quick updates, you may use the above parameters");
1198
- console.log(`e.g. opscompass license-manager update-msql-configurations --id 31 --name "newname" --server "233.533.343" --user "joe" --action "skip" --id 25 --name "secondname" --actions"skip" --action "dblicensing"`);
1199
- console.log("For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag");
1200
- console.log(`e.g. opscompass license-manager update-msql-configurations --json-updates '[{\"id\":\"25\",\"configurationName\":\"25\", \"server\":\"100.232.2423\", \"user\":\"tony\", \"actions\":[\"skip\", \"dblicensing\"]}, {\"id\":\"31\",\"configurationName\":\"31\", \"server\":\"100.232.2423\", \"user\":\"tony\", \"actions\":[\"skip\", \"dblicensing\"]}]'`);
1468
+ console.log(
1469
+ `e.g. opscompass license-manager update-msql-configurations --id 31 --name "newname" --server "233.533.343" --user "joe" --action "skip" --id 25 --name "secondname" --action "skip" --action "dblicensing"`
1470
+ );
1471
+ console.log(
1472
+ "For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
1473
+ );
1474
+ console.log(
1475
+ `e.g. opscompass license-manager update-msql-configurations --json-updates '[{\"id\":\"25\",\"configurationName\":\"25\", \"server\":\"100.232.2423\", \"user\":\"tony\", \"actions\":[\"skip\", \"dblicensing\"]}, {\"id\":\"31\",\"configurationName\":\"31\", \"server\":\"100.232.2423\", \"user\":\"tony\", \"actions\":[\"skip\", \"dblicensing\"]}]'`
1476
+ );
1201
1477
  console.log();
1202
- console.log("get-mssql-entitlement-components", "Gets the components that can be used to build MSSql entitlement objects.");
1203
- console.log("Parameters:");
1478
+ console.log(
1479
+ "get-mssql-entitlement-components",
1480
+ "Gets the components that can be used to build MSSql entitlement objects."
1481
+ );
1482
+ console.log("Parameters:");
1204
1483
  console.log("--company [company_slug]");
1205
1484
  console.log();
1206
- console.log("create-mssql-entitlement", "Creates a Mssql Entitlement record.");
1207
- console.log("Parameters:");
1485
+ console.log(
1486
+ "create-mssql-entitlement",
1487
+ "Creates a Mssql Entitlement record."
1488
+ );
1489
+ console.log("Parameters:");
1208
1490
  console.log("--company [company_slug]");
1209
1491
  console.log("--purchase-date [Date] the date of purchase.");
1210
- console.log("Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC.");
1492
+ console.log(
1493
+ "Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
1494
+ );
1211
1495
  console.log("--quantity [number] the number for this entry");
1212
- console.log("--support-start (optional) [Date] the date when support started");
1213
- console.log("Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC.");
1496
+ console.log(
1497
+ "--support-start (optional) [Date] the date when support started"
1498
+ );
1499
+ console.log(
1500
+ "Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
1501
+ );
1214
1502
  console.log("--support-end (optional) [Date] the date when support ended");
1215
- console.log("Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC.");
1216
- console.log("--mssql-product [string] the slug of the associated mssql product");
1217
- console.log("--mssql-edition [string] the slug of the associated mssql edition");
1218
- console.log("--mssql-version [string] the slug of the associated mssql version");
1219
- console.log("--mssql-metric [string] the slug of the associated mssql metric");
1503
+ console.log(
1504
+ "Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
1505
+ );
1506
+ console.log(
1507
+ "--mssql-product [string] the slug of the associated mssql product"
1508
+ );
1509
+ console.log(
1510
+ "--mssql-edition [string] the slug of the associated mssql edition"
1511
+ );
1512
+ console.log(
1513
+ "--mssql-version [string] the slug of the associated mssql version"
1514
+ );
1515
+ console.log(
1516
+ "--mssql-metric [string] the slug of the associated mssql metric"
1517
+ );
1220
1518
  console.log();
1221
- console.log("update-mssql-entitlement", "Creates a Mssql Entitlement record.");
1222
- console.log("Parameters:");
1519
+ console.log(
1520
+ "update-mssql-entitlement",
1521
+ "Creates a Mssql Entitlement record."
1522
+ );
1523
+ console.log("Parameters:");
1223
1524
  console.log("--company [company_slug]");
1224
1525
  console.log("--id [number] the mssql entitlement record id");
1225
1526
  console.log("--purchase-date [Date] the date of purchase.");
1226
- console.log("Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC.");
1527
+ console.log(
1528
+ "Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
1529
+ );
1227
1530
  console.log("--quantity [number] the number for this entry");
1228
- console.log("--support-start (optional) [Date] the date when support started");
1229
- console.log("Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC.");
1531
+ console.log(
1532
+ "--support-start (optional) [Date] the date when support started"
1533
+ );
1534
+ console.log(
1535
+ "Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
1536
+ );
1230
1537
  console.log("--support-end (optional) [Date] the date when support ended");
1231
- console.log("Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC.");
1232
- console.log("--mssql-product [string] the slug of the associated mssql product");
1233
- console.log("--mssql-edition [string] the slug of the associated mssql edition");
1234
- console.log("--mssql-version [string] the slug of the associated mssql version");
1235
- console.log("--mssql-metric [string] the slug of the associated mssql metric");
1538
+ console.log(
1539
+ "Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
1540
+ );
1541
+ console.log(
1542
+ "--mssql-product [string] the slug of the associated mssql product"
1543
+ );
1544
+ console.log(
1545
+ "--mssql-edition [string] the slug of the associated mssql edition"
1546
+ );
1547
+ console.log(
1548
+ "--mssql-version [string] the slug of the associated mssql version"
1549
+ );
1550
+ console.log(
1551
+ "--mssql-metric [string] the slug of the associated mssql metric"
1552
+ );
1236
1553
  console.log();
1237
- console.log("delete-mssql-entitlements", "Deletes Mssql Entitlement records.");
1554
+ console.log(
1555
+ "delete-mssql-entitlements",
1556
+ "Deletes Mssql Entitlement records."
1557
+ );
1238
1558
  console.log("Parameters:");
1239
1559
  console.log("--company [string] The slug of the company.");
1240
- console.log("--id [string] Use parameter multiple times to delete multiple records.");
1560
+ console.log(
1561
+ "--id [string] Use parameter multiple times to delete multiple records."
1562
+ );
1241
1563
  console.log();
1242
- console.log("list-mssql-assessments", "Lists MSSQL Assessments")
1564
+ console.log("list-mssql-assessments", "Lists MSSQL Assessments");
1243
1565
  console.log("Parameters:");
1244
1566
  console.log("--company [string] The slug of the company.");
1245
1567
  console.log();
1246
- console.log("get-mssql-assessment", "Get Full MSSQL Assessment")
1568
+ console.log("get-mssql-assessment", "Get Full MSSQL Assessment");
1247
1569
  console.log("Parameters:");
1248
1570
  console.log("--assessmentId [number] The id of the assessment to retrieve.");
1249
1571
  console.log();
1250
- console.log("get-mssql-assessment-entitlements", "Gets Entitlements for an MSSQL Assessment")
1572
+ console.log(
1573
+ "get-mssql-assessment-entitlements",
1574
+ "Gets Entitlements for an MSSQL Assessment"
1575
+ );
1251
1576
  console.log("Parameters:");
1252
1577
  console.log("--assessmentId [number] The id of the assessment to retrieve.");
1253
1578
  console.log();
1254
- console.log("get-mssql-assessment-license-usage-maps", "Gets LicenseUsageMaps for an MSSQL Assessment")
1579
+ console.log(
1580
+ "get-mssql-assessment-license-usage-maps",
1581
+ "Gets LicenseUsageMaps for an MSSQL Assessment"
1582
+ );
1255
1583
  console.log("Parameters:");
1256
1584
  console.log("--assessmentId [number] The id of the assessment to retrieve.");
1257
1585
  console.log();
1258
- console.log("get-mssql-assessment-resources", "Gets Resources for an MSSQL Assessment")
1586
+ console.log(
1587
+ "get-mssql-assessment-resources",
1588
+ "Gets Resources for an MSSQL Assessment"
1589
+ );
1259
1590
  console.log("Parameters:");
1260
1591
  console.log("--assessmentId [number] The id of the assessment to retrieve.");
1261
1592
  console.log();
@@ -1263,21 +1594,21 @@ async function printHelp() {
1263
1594
 
1264
1595
  const licenseManagerModule = (action, ...args) => {
1265
1596
  switch (action?.toLowerCase() ?? "") {
1266
- case 'create-network-discovery-configuration':
1597
+ case "create-network-discovery-configuration":
1267
1598
  return createNetworkDiscoveryConfiguration(args);
1268
- case 'update-network-discovery-configuration':
1599
+ case "update-network-discovery-configuration":
1269
1600
  return updateNetworkDiscoveryConfiguration(args);
1270
- case 'list-mssql-assessments':
1601
+ case "list-mssql-assessments":
1271
1602
  return listMssqlAssessments(args);
1272
- case 'get-mssql-assessment':
1603
+ case "get-mssql-assessment":
1273
1604
  return getMssqlAssessment(args);
1274
- case 'get-mssql-assessment-entitlements':
1605
+ case "get-mssql-assessment-entitlements":
1275
1606
  return getMssqlAssessmentEntitlements(args);
1276
- case 'get-mssql-assessment-license-usage-maps':
1607
+ case "get-mssql-assessment-license-usage-maps":
1277
1608
  return getMssqlAssessmentLicenseUsageMaps(args);
1278
- case 'get-mssql-assessment-resources':
1609
+ case "get-mssql-assessment-resources":
1279
1610
  return getMssqlAssessmentResources(args);
1280
- case "get-secret-for-configuration":
1611
+ case "get-secret-for-configuration":
1281
1612
  return getSecretForConfiguration(args);
1282
1613
  case "list-monitoring-configurations":
1283
1614
  return listMonitoringConfigurations(args);
@@ -1297,13 +1628,13 @@ const licenseManagerModule = (action, ...args) => {
1297
1628
  return createMsqlConfiguration(args);
1298
1629
  case "get-msql-configuration":
1299
1630
  return getMsqlConfiguration(args);
1300
- case "get-network-discovery-configuration":
1631
+ case "get-network-discovery-configuration":
1301
1632
  return getNetworkDiscoveryConfiguration(args);
1302
1633
  case "get-mssql-entitlements":
1303
1634
  return getMssqlEntitlements(args);
1304
- case "get-oracle-database-configuration":
1635
+ case "get-oracle-database-configuration":
1305
1636
  return getOracleDatabaseConfiguration(args);
1306
- case "list-oracle-database-configurations":
1637
+ case "list-oracle-database-configurations":
1307
1638
  return listOracleDatabaseConfigurations(args);
1308
1639
  case "create-oracle-database-configuration":
1309
1640
  return createOracleDatabaseConfiguration(args);
@@ -1312,12 +1643,12 @@ const licenseManagerModule = (action, ...args) => {
1312
1643
  case "update-oracle-database-configuration":
1313
1644
  return updateOracleDatabaseConfiguration(args);
1314
1645
  case "update-oracle-database-configurations":
1315
- return updateOracleDatabaseConfigurations(args);
1646
+ return updateOracleDatabaseConfigurations(args);
1316
1647
  case "update-vcenter-configuration":
1317
1648
  return updateVCenterConfiguration(args);
1318
1649
  case "update-vcenter-configurations":
1319
1650
  return updateVCenterConfigurations(args);
1320
- case "delete-network-discovery-configuration":
1651
+ case "delete-network-discovery-configuration":
1321
1652
  return deleteNetworkDiscoveryConfiguration(args);
1322
1653
  case "delete-monitoring-configuration":
1323
1654
  return deleteMonitoringConfiguration(args);
@@ -1349,6 +1680,7 @@ const licenseManagerModule = (action, ...args) => {
1349
1680
  };
1350
1681
 
1351
1682
  licenseManagerModule.requiresLogin = true;
1352
- licenseManagerModule.description = "Provides access to details about License Management in OpsCompass.";
1683
+ licenseManagerModule.description =
1684
+ "Provides access to details about License Management in OpsCompass.";
1353
1685
 
1354
1686
  module.exports = licenseManagerModule;