@opscompass/opscompass-cli 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cliHelpers.js +36 -30
- package/lib/homeInteraction.js +25 -7
- package/modules/data-gathering-scripts.js +43 -2
- package/modules/license-manager.js +988 -343
- package/modules/resources.js +34 -0
- package/package.json +2 -2
|
@@ -1,30 +1,238 @@
|
|
|
1
|
-
|
|
2
1
|
const { setArgumentArrays } = require("../lib/cliHelpers.js");
|
|
3
2
|
const { getOpsCompassClient } = require("../opscompass.js");
|
|
4
3
|
|
|
4
|
+
async function createOracleSharedCredential(args) {
|
|
5
|
+
let optionalParams = {};
|
|
6
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
7
|
+
switch (args[i].toLowerCase()) {
|
|
8
|
+
case "--monitoring-configuration-id":
|
|
9
|
+
case "--monitoringconfigurationid":
|
|
10
|
+
monitoringConfig = args[++i];
|
|
11
|
+
break;
|
|
12
|
+
case "--user":
|
|
13
|
+
optionalParams.user = args[++i];
|
|
14
|
+
break;
|
|
15
|
+
case "--password":
|
|
16
|
+
optionalParams.password = args[++i];
|
|
17
|
+
break;
|
|
18
|
+
case "--credential-name":
|
|
19
|
+
case "--credentialname":
|
|
20
|
+
optionalParams.credentialName = args[++i];
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const client = await getOpsCompassClient();
|
|
26
|
+
try {
|
|
27
|
+
const createResponse =
|
|
28
|
+
await client.licenseManager.createOracleSharedCredential(
|
|
29
|
+
monitoringConfig,
|
|
30
|
+
optionalParams
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
console.log(JSON.stringify(createResponse, null, 2));
|
|
34
|
+
} catch (err) {
|
|
35
|
+
console.error(JSON.stringify(err.message, null, 2));
|
|
36
|
+
console.error("It is likely the default credential already exists\n");
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
async function deleteOracleSharedCredential(args) {
|
|
41
|
+
let id = undefined;
|
|
42
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
43
|
+
switch (args[i].toLowerCase()) {
|
|
44
|
+
case "--id":
|
|
45
|
+
id = args[++i];
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const client = await getOpsCompassClient();
|
|
51
|
+
const deleteResponse =
|
|
52
|
+
await client.licenseManager.deleteOracleSharedCredential(id);
|
|
53
|
+
|
|
54
|
+
console.log(JSON.stringify(deleteResponse, null, 2));
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async function getOracleDefaultCredential(args) {
|
|
58
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
59
|
+
switch (args[i].toLowerCase()) {
|
|
60
|
+
case "--monitoring-configuration-id":
|
|
61
|
+
case "--monitoringconfigurationid":
|
|
62
|
+
monitoringConfig = args[++i];
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const client = await getOpsCompassClient();
|
|
68
|
+
const getResponse = await client.licenseManager.getOracleDefaultCredential(
|
|
69
|
+
monitoringConfig
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
console.log(JSON.stringify(getResponse, null, 2));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
async function updateOracleSharedCredential(args) {
|
|
76
|
+
let id = undefined;
|
|
77
|
+
let optionalParams = {};
|
|
78
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
79
|
+
switch (args[i].toLowerCase()) {
|
|
80
|
+
case "--id":
|
|
81
|
+
id = args[++i];
|
|
82
|
+
break;
|
|
83
|
+
case "--user":
|
|
84
|
+
optionalParams.user = args[++i];
|
|
85
|
+
break;
|
|
86
|
+
case "--password":
|
|
87
|
+
optionalParams.password = args[++i];
|
|
88
|
+
break;
|
|
89
|
+
case "--credential-name":
|
|
90
|
+
case "--credentialname":
|
|
91
|
+
optionalParams.credentialName = args[++i];
|
|
92
|
+
break;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const client = await getOpsCompassClient();
|
|
96
|
+
const updateResponse =
|
|
97
|
+
await client.licenseManager.updateOracleSharedCredential(
|
|
98
|
+
id,
|
|
99
|
+
optionalParams
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
console.log(JSON.stringify(updateResponse, null, 2));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
async function getMsqlDefaultCredential(args) {
|
|
106
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
107
|
+
switch (args[i].toLowerCase()) {
|
|
108
|
+
case "--monitoring-configuration-id":
|
|
109
|
+
case "--monitoringconfigurationid":
|
|
110
|
+
monitoringConfig = args[++i];
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const client = await getOpsCompassClient();
|
|
116
|
+
const getResponse = await client.licenseManager.getMsqlDefaultCredential(
|
|
117
|
+
monitoringConfig
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
console.log(JSON.stringify(getResponse, null, 2));
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
async function createMsqlSharedCredential(args) {
|
|
124
|
+
let optionalParams = {};
|
|
125
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
126
|
+
switch (args[i].toLowerCase()) {
|
|
127
|
+
case "--monitoring-configuration-id":
|
|
128
|
+
case "--monitoringconfigurationid":
|
|
129
|
+
monitoringConfig = args[++i];
|
|
130
|
+
break;
|
|
131
|
+
case "--user":
|
|
132
|
+
optionalParams.user = args[++i];
|
|
133
|
+
break;
|
|
134
|
+
case "--password":
|
|
135
|
+
optionalParams.password = args[++i];
|
|
136
|
+
break;
|
|
137
|
+
case "--credential-name":
|
|
138
|
+
case "--credentialname":
|
|
139
|
+
optionalParams.credentialName = args[++i];
|
|
140
|
+
break;
|
|
141
|
+
case "--directory-auth":
|
|
142
|
+
optionalParams.directory_auth = args[++i];
|
|
143
|
+
break;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
try {
|
|
148
|
+
const client = await getOpsCompassClient();
|
|
149
|
+
const createResponse =
|
|
150
|
+
await client.licenseManager.createMsqlSharedCredential(
|
|
151
|
+
monitoringConfig,
|
|
152
|
+
optionalParams
|
|
153
|
+
);
|
|
154
|
+
|
|
155
|
+
console.log(JSON.stringify(createResponse, null, 2));
|
|
156
|
+
} catch (err) {
|
|
157
|
+
console.error(JSON.stringify(err.message, null, 2));
|
|
158
|
+
console.error("It is likely the default credential already exists\n");
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
async function deleteMsqlSharedCredential(args) {
|
|
163
|
+
let id = undefined;
|
|
164
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
165
|
+
switch (args[i].toLowerCase()) {
|
|
166
|
+
case "--id":
|
|
167
|
+
id = args[++i];
|
|
168
|
+
break;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const client = await getOpsCompassClient();
|
|
173
|
+
const deleteResponse = await client.licenseManager.deleteMsqlSharedCredential(
|
|
174
|
+
id
|
|
175
|
+
);
|
|
176
|
+
|
|
177
|
+
console.log(JSON.stringify(deleteResponse, null, 2));
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
async function updateMsqlSharedCredential(args) {
|
|
181
|
+
let id = undefined;
|
|
182
|
+
let optionalParams = {};
|
|
183
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
184
|
+
switch (args[i].toLowerCase()) {
|
|
185
|
+
case "--id":
|
|
186
|
+
id = args[++i];
|
|
187
|
+
break;
|
|
188
|
+
case "--user":
|
|
189
|
+
optionalParams.user = args[++i];
|
|
190
|
+
break;
|
|
191
|
+
case "--password":
|
|
192
|
+
optionalParams.password = args[++i];
|
|
193
|
+
break;
|
|
194
|
+
case "--credential-name":
|
|
195
|
+
case "--credentialname":
|
|
196
|
+
optionalParams.credentialName = args[++i];
|
|
197
|
+
break;
|
|
198
|
+
case "--directory-auth":
|
|
199
|
+
optionalParams.directory_auth = args[++i];
|
|
200
|
+
break;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
const client = await getOpsCompassClient();
|
|
204
|
+
const updateResponse = await client.licenseManager.updateMsqlSharedCredential(
|
|
205
|
+
id,
|
|
206
|
+
optionalParams
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
console.log(JSON.stringify(updateResponse, null, 2));
|
|
210
|
+
}
|
|
211
|
+
|
|
5
212
|
async function listMonitoringConfigurations(args) {
|
|
6
213
|
for (let i = 0; i < args.length - 1; i++) {
|
|
7
214
|
switch (args[i].toLowerCase()) {
|
|
8
215
|
case "--company":
|
|
9
216
|
company = args[++i];
|
|
10
217
|
break;
|
|
11
|
-
|
|
218
|
+
}
|
|
12
219
|
}
|
|
13
220
|
|
|
14
221
|
const client = await getOpsCompassClient();
|
|
15
|
-
const monitoringConfigs =
|
|
222
|
+
const monitoringConfigs =
|
|
223
|
+
await client.licenseManager.listMonitoringConfigurations(company);
|
|
16
224
|
|
|
17
225
|
console.log(JSON.stringify(monitoringConfigs, null, 2));
|
|
18
226
|
}
|
|
19
227
|
|
|
20
|
-
async function deleteVCenterConfiguration(args){
|
|
228
|
+
async function deleteVCenterConfiguration(args) {
|
|
21
229
|
let id = undefined;
|
|
22
230
|
for (let i = 0; i < args.length - 1; i++) {
|
|
23
231
|
switch (args[i].toLowerCase()) {
|
|
24
232
|
case "--id":
|
|
25
233
|
id = args[++i];
|
|
26
234
|
break;
|
|
27
|
-
|
|
235
|
+
}
|
|
28
236
|
}
|
|
29
237
|
|
|
30
238
|
const client = await getOpsCompassClient();
|
|
@@ -33,14 +241,14 @@ async function deleteVCenterConfiguration(args){
|
|
|
33
241
|
console.log(JSON.stringify(response, null, 2));
|
|
34
242
|
}
|
|
35
243
|
|
|
36
|
-
async function deleteMsqlConfiguration(args){
|
|
244
|
+
async function deleteMsqlConfiguration(args) {
|
|
37
245
|
let id = undefined;
|
|
38
246
|
for (let i = 0; i < args.length - 1; i++) {
|
|
39
247
|
switch (args[i].toLowerCase()) {
|
|
40
248
|
case "--id":
|
|
41
249
|
id = args[++i];
|
|
42
250
|
break;
|
|
43
|
-
|
|
251
|
+
}
|
|
44
252
|
}
|
|
45
253
|
|
|
46
254
|
const client = await getOpsCompassClient();
|
|
@@ -49,39 +257,42 @@ async function deleteMsqlConfiguration(args){
|
|
|
49
257
|
console.log(JSON.stringify(response, null, 2));
|
|
50
258
|
}
|
|
51
259
|
|
|
52
|
-
async function deleteMonitoringConfiguration(args){
|
|
260
|
+
async function deleteMonitoringConfiguration(args) {
|
|
53
261
|
let id = undefined;
|
|
54
262
|
for (let i = 0; i < args.length - 1; i++) {
|
|
55
263
|
switch (args[i].toLowerCase()) {
|
|
56
264
|
case "--id":
|
|
57
265
|
id = args[++i];
|
|
58
266
|
break;
|
|
59
|
-
|
|
267
|
+
}
|
|
60
268
|
}
|
|
61
269
|
|
|
62
270
|
const client = await getOpsCompassClient();
|
|
63
|
-
const response = await client.licenseManager.deleteMonitoringConfiguration(
|
|
271
|
+
const response = await client.licenseManager.deleteMonitoringConfiguration(
|
|
272
|
+
id
|
|
273
|
+
);
|
|
64
274
|
|
|
65
275
|
console.log(JSON.stringify(response, null, 2));
|
|
66
276
|
}
|
|
67
277
|
|
|
68
|
-
async function deleteOracleDatabaseConfiguration(args){
|
|
278
|
+
async function deleteOracleDatabaseConfiguration(args) {
|
|
69
279
|
let id = undefined;
|
|
70
280
|
for (let i = 0; i < args.length - 1; i++) {
|
|
71
281
|
switch (args[i].toLowerCase()) {
|
|
72
282
|
case "--id":
|
|
73
283
|
id = args[++i];
|
|
74
284
|
break;
|
|
75
|
-
|
|
285
|
+
}
|
|
76
286
|
}
|
|
77
287
|
|
|
78
288
|
const client = await getOpsCompassClient();
|
|
79
|
-
const response =
|
|
289
|
+
const response =
|
|
290
|
+
await client.licenseManager.deleteOracleDatabaseConfiguration(id);
|
|
80
291
|
|
|
81
292
|
console.log(JSON.stringify(response, null, 2));
|
|
82
293
|
}
|
|
83
294
|
|
|
84
|
-
async function deleteMssqlEntitlements(args){
|
|
295
|
+
async function deleteMssqlEntitlements(args) {
|
|
85
296
|
args = setArgumentArrays(["--id"], args);
|
|
86
297
|
|
|
87
298
|
let recordIds = undefined;
|
|
@@ -94,11 +305,14 @@ async function deleteMssqlEntitlements(args){
|
|
|
94
305
|
case "--id":
|
|
95
306
|
recordIds = args[++i];
|
|
96
307
|
break;
|
|
97
|
-
|
|
308
|
+
}
|
|
98
309
|
}
|
|
99
310
|
|
|
100
311
|
const client = await getOpsCompassClient();
|
|
101
|
-
const response = await client.licenseManager.deleteMssqlEntitlements(
|
|
312
|
+
const response = await client.licenseManager.deleteMssqlEntitlements(
|
|
313
|
+
company,
|
|
314
|
+
recordIds
|
|
315
|
+
);
|
|
102
316
|
|
|
103
317
|
console.log(JSON.stringify(response, null, 2));
|
|
104
318
|
}
|
|
@@ -108,13 +322,16 @@ async function listOracleDatabaseConfigurations(args) {
|
|
|
108
322
|
switch (args[i].toLowerCase()) {
|
|
109
323
|
case "--monitoringconfigurationid":
|
|
110
324
|
case "--monitoring-configuration-id":
|
|
111
|
-
|
|
325
|
+
monitoringConfig = args[++i];
|
|
112
326
|
break;
|
|
113
|
-
|
|
327
|
+
}
|
|
114
328
|
}
|
|
115
329
|
|
|
116
330
|
const client = await getOpsCompassClient();
|
|
117
|
-
const monitoringConfigs =
|
|
331
|
+
const monitoringConfigs =
|
|
332
|
+
await client.licenseManager.listOracleDatabaseConfigurations(
|
|
333
|
+
monitoringConfig
|
|
334
|
+
);
|
|
118
335
|
|
|
119
336
|
console.log(JSON.stringify(monitoringConfigs, null, 2));
|
|
120
337
|
}
|
|
@@ -126,31 +343,34 @@ async function getOracleDatabaseConfiguration(args) {
|
|
|
126
343
|
case "--id":
|
|
127
344
|
id = args[++i];
|
|
128
345
|
break;
|
|
129
|
-
|
|
346
|
+
}
|
|
130
347
|
}
|
|
131
348
|
|
|
132
349
|
const client = await getOpsCompassClient();
|
|
133
|
-
const monitoringConfigs =
|
|
350
|
+
const monitoringConfigs =
|
|
351
|
+
await client.licenseManager.getOracleDatabaseConfiguration(id);
|
|
134
352
|
|
|
135
353
|
console.log(JSON.stringify(monitoringConfigs, null, 2));
|
|
136
354
|
}
|
|
137
355
|
|
|
138
|
-
async function getSecretForConfiguration(args){
|
|
139
|
-
let id = undefined;
|
|
356
|
+
async function getSecretForConfiguration(args) {
|
|
357
|
+
let id = undefined;
|
|
140
358
|
let recordType = undefined;
|
|
141
359
|
for (let i = 0; i < args.length - 1; i++) {
|
|
142
360
|
switch (args[i].toLowerCase()) {
|
|
143
361
|
case "--id":
|
|
144
362
|
id = args[++i];
|
|
145
363
|
break;
|
|
146
|
-
case "--
|
|
364
|
+
case "--recordType":
|
|
365
|
+
case "--record-type":
|
|
147
366
|
recordType = args[++i];
|
|
148
367
|
break;
|
|
149
|
-
|
|
368
|
+
}
|
|
150
369
|
}
|
|
151
370
|
|
|
152
371
|
const client = await getOpsCompassClient();
|
|
153
|
-
const monitoringConfig =
|
|
372
|
+
const monitoringConfig =
|
|
373
|
+
await client.licenseManager.getSecretForConfiguration(id, recordType);
|
|
154
374
|
|
|
155
375
|
console.log(JSON.stringify(monitoringConfig, null, 2));
|
|
156
376
|
}
|
|
@@ -159,70 +379,75 @@ async function getNetworkDiscoveryConfiguration(args) {
|
|
|
159
379
|
let id = undefined;
|
|
160
380
|
for (let i = 0; i < args.length - 1; i++) {
|
|
161
381
|
switch (args[i].toLowerCase()) {
|
|
162
|
-
case "--id":
|
|
382
|
+
case "--id":
|
|
163
383
|
id = args[++i];
|
|
164
384
|
break;
|
|
165
|
-
|
|
385
|
+
}
|
|
166
386
|
}
|
|
167
387
|
|
|
168
388
|
const client = await getOpsCompassClient();
|
|
169
|
-
const networkConfig =
|
|
389
|
+
const networkConfig =
|
|
390
|
+
await client.licenseManager.getNetworkDiscoveryConfiguration(id);
|
|
170
391
|
|
|
171
392
|
console.log(JSON.stringify(networkConfig, null, 2));
|
|
172
393
|
}
|
|
173
394
|
|
|
174
395
|
async function getMonitoringConfiguration(args) {
|
|
175
|
-
let
|
|
176
|
-
let optionalParams = { asFile: undefined }
|
|
396
|
+
let optionalParams = { asFile: undefined };
|
|
177
397
|
for (let i = 0; i < args.length - 1; i++) {
|
|
178
398
|
switch (args[i].toLowerCase()) {
|
|
179
|
-
case "--id":
|
|
180
|
-
|
|
399
|
+
case "--id":
|
|
400
|
+
monitoringConfig = args[++i];
|
|
181
401
|
break;
|
|
182
402
|
case "--asfile":
|
|
183
403
|
optionalParams.asFile = args[++i];
|
|
184
404
|
break;
|
|
185
|
-
|
|
405
|
+
}
|
|
186
406
|
}
|
|
187
407
|
|
|
188
408
|
const client = await getOpsCompassClient();
|
|
189
|
-
const
|
|
409
|
+
const monitoringConfiguration =
|
|
410
|
+
await client.licenseManager.getMonitoringConfiguration(
|
|
411
|
+
monitoringConfig,
|
|
412
|
+
optionalParams
|
|
413
|
+
);
|
|
190
414
|
|
|
191
|
-
console.log(JSON.stringify(
|
|
415
|
+
console.log(JSON.stringify(monitoringConfiguration, null, 2));
|
|
192
416
|
}
|
|
193
417
|
|
|
194
418
|
async function createMonitoringConfiguration(args) {
|
|
195
419
|
let name = undefined;
|
|
196
420
|
for (let i = 0; i < args.length - 1; i++) {
|
|
197
421
|
switch (args[i].toLowerCase()) {
|
|
198
|
-
case "--company":
|
|
422
|
+
case "--company":
|
|
199
423
|
company = args[++i];
|
|
200
424
|
break;
|
|
201
425
|
case "--configurationname":
|
|
202
426
|
name = args[++i];
|
|
203
427
|
break;
|
|
204
|
-
|
|
428
|
+
}
|
|
205
429
|
}
|
|
206
430
|
|
|
207
431
|
const client = await getOpsCompassClient();
|
|
208
|
-
const
|
|
432
|
+
const monitoringConfiguration =
|
|
433
|
+
await client.licenseManager.createMonitoringConfiguration(company, name);
|
|
209
434
|
|
|
210
|
-
console.log(JSON.stringify(
|
|
435
|
+
console.log(JSON.stringify(monitoringConfiguration, null, 2));
|
|
211
436
|
}
|
|
212
437
|
|
|
213
438
|
async function listVCenterConfigurations(args) {
|
|
214
|
-
let id = undefined;
|
|
215
439
|
for (let i = 0; i < args.length - 1; i++) {
|
|
216
440
|
switch (args[i].toLowerCase()) {
|
|
217
441
|
case "--monitoringconfigurationid":
|
|
218
442
|
case "--monitoring-configuration-id":
|
|
219
|
-
|
|
443
|
+
monitoringConfig = args[++i];
|
|
220
444
|
break;
|
|
221
|
-
|
|
445
|
+
}
|
|
222
446
|
}
|
|
223
447
|
|
|
224
448
|
const client = await getOpsCompassClient();
|
|
225
|
-
const listVCenterConfigs =
|
|
449
|
+
const listVCenterConfigs =
|
|
450
|
+
await client.licenseManager.listVCenterConfigurations(monitoringConfig);
|
|
226
451
|
|
|
227
452
|
console.log(JSON.stringify(listVCenterConfigs, null, 2));
|
|
228
453
|
}
|
|
@@ -234,24 +459,30 @@ async function getVCenterConfiguration(args) {
|
|
|
234
459
|
case "--id":
|
|
235
460
|
id = args[++i];
|
|
236
461
|
break;
|
|
237
|
-
|
|
462
|
+
}
|
|
238
463
|
}
|
|
239
464
|
|
|
240
465
|
const client = await getOpsCompassClient();
|
|
241
|
-
const getVCenterConfig = await client.licenseManager.getVCenterConfiguration(
|
|
466
|
+
const getVCenterConfig = await client.licenseManager.getVCenterConfiguration(
|
|
467
|
+
id
|
|
468
|
+
);
|
|
242
469
|
|
|
243
470
|
console.log(JSON.stringify(getVCenterConfig, null, 2));
|
|
244
471
|
}
|
|
245
472
|
|
|
246
473
|
async function createVCenterConfiguration(args) {
|
|
247
|
-
let
|
|
248
|
-
let
|
|
249
|
-
|
|
474
|
+
let name = undefined;
|
|
475
|
+
let optionalParams = {
|
|
476
|
+
actions: undefined,
|
|
477
|
+
connection: undefined,
|
|
478
|
+
user: undefined,
|
|
479
|
+
password: undefined,
|
|
480
|
+
};
|
|
250
481
|
for (let i = 0; i < args.length - 1; i++) {
|
|
251
482
|
switch (args[i].toLowerCase()) {
|
|
252
|
-
case "--monitoringconfigurationid":
|
|
483
|
+
case "--monitoringconfigurationid":
|
|
253
484
|
case "--monitoring-configuration-id":
|
|
254
|
-
|
|
485
|
+
monitoringConfig = args[++i];
|
|
255
486
|
break;
|
|
256
487
|
case "--name":
|
|
257
488
|
name = args[++i];
|
|
@@ -261,7 +492,7 @@ async function createVCenterConfiguration(args) {
|
|
|
261
492
|
optionalParams.actions.push(args[++i]);
|
|
262
493
|
break;
|
|
263
494
|
case "--connection":
|
|
264
|
-
optionalParams.connection = args[++i]
|
|
495
|
+
optionalParams.connection = args[++i];
|
|
265
496
|
break;
|
|
266
497
|
case "--user":
|
|
267
498
|
optionalParams.user = args[++i];
|
|
@@ -269,41 +500,52 @@ async function createVCenterConfiguration(args) {
|
|
|
269
500
|
case "--password":
|
|
270
501
|
optionalParams.password = args[++i];
|
|
271
502
|
break;
|
|
272
|
-
|
|
503
|
+
}
|
|
273
504
|
}
|
|
274
505
|
|
|
275
506
|
const client = await getOpsCompassClient();
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
|
|
507
|
+
const monitoringConfiguration =
|
|
508
|
+
await client.licenseManager.createVCenterConfiguration(
|
|
509
|
+
monitoringConfig,
|
|
510
|
+
name,
|
|
511
|
+
optionalParams
|
|
512
|
+
);
|
|
513
|
+
|
|
514
|
+
console.log(JSON.stringify(monitoringConfiguration, null, 2));
|
|
279
515
|
}
|
|
280
516
|
|
|
281
517
|
async function listMsqlConfigurations(args) {
|
|
282
|
-
let id = undefined;
|
|
283
518
|
for (let i = 0; i < args.length - 1; i++) {
|
|
284
519
|
switch (args[i].toLowerCase()) {
|
|
285
520
|
case "--monitoringconfigurationid":
|
|
286
521
|
case "--monitoring-configuration-id":
|
|
287
|
-
|
|
522
|
+
monitoringConfig = args[++i];
|
|
288
523
|
break;
|
|
289
|
-
|
|
524
|
+
}
|
|
290
525
|
}
|
|
291
526
|
|
|
292
527
|
const client = await getOpsCompassClient();
|
|
293
|
-
const listMsqlConfigs = await client.licenseManager.listMsqlConfigurations(
|
|
528
|
+
const listMsqlConfigs = await client.licenseManager.listMsqlConfigurations(
|
|
529
|
+
monitoringConfig
|
|
530
|
+
);
|
|
294
531
|
|
|
295
532
|
console.log(JSON.stringify(listMsqlConfigs, null, 2));
|
|
296
533
|
}
|
|
297
534
|
|
|
298
535
|
async function createMsqlConfiguration(args) {
|
|
299
|
-
let
|
|
300
|
-
let
|
|
301
|
-
|
|
536
|
+
let configurationName = undefined;
|
|
537
|
+
let optionalParams = {
|
|
538
|
+
actions: undefined,
|
|
539
|
+
server: undefined,
|
|
540
|
+
user: undefined,
|
|
541
|
+
password: undefined,
|
|
542
|
+
directory_auth: undefined,
|
|
543
|
+
};
|
|
302
544
|
for (let i = 0; i < args.length - 1; i++) {
|
|
303
545
|
switch (args[i].toLowerCase()) {
|
|
304
546
|
case "--monitoringconfigurationid":
|
|
305
547
|
case "--monitoring-configuration-id":
|
|
306
|
-
|
|
548
|
+
monitoringConfig = args[++i];
|
|
307
549
|
break;
|
|
308
550
|
case "--configuration-name":
|
|
309
551
|
case "--configurationname":
|
|
@@ -314,7 +556,7 @@ async function createMsqlConfiguration(args) {
|
|
|
314
556
|
optionalParams.actions.push(args[++i]);
|
|
315
557
|
break;
|
|
316
558
|
case "--server":
|
|
317
|
-
optionalParams.server = args[++i]
|
|
559
|
+
optionalParams.server = args[++i];
|
|
318
560
|
break;
|
|
319
561
|
case "--user":
|
|
320
562
|
optionalParams.user = args[++i];
|
|
@@ -322,12 +564,24 @@ async function createMsqlConfiguration(args) {
|
|
|
322
564
|
case "--password":
|
|
323
565
|
optionalParams.password = args[++i];
|
|
324
566
|
break;
|
|
325
|
-
|
|
567
|
+
case "--directory-auth":
|
|
568
|
+
authArg = args[++i];
|
|
569
|
+
if (authArg.toLowerCase === "null") {
|
|
570
|
+
optionalParams.directory_auth = null;
|
|
571
|
+
} else {
|
|
572
|
+
optionalParams.directory_auth = "SESSION";
|
|
573
|
+
}
|
|
574
|
+
break;
|
|
575
|
+
}
|
|
326
576
|
}
|
|
327
577
|
|
|
328
578
|
const client = await getOpsCompassClient();
|
|
329
579
|
|
|
330
|
-
const msqlConfiguration = await client.licenseManager.createMsqlConfiguration(
|
|
580
|
+
const msqlConfiguration = await client.licenseManager.createMsqlConfiguration(
|
|
581
|
+
monitoringConfig,
|
|
582
|
+
configurationName,
|
|
583
|
+
optionalParams
|
|
584
|
+
);
|
|
331
585
|
|
|
332
586
|
console.log(JSON.stringify(msqlConfiguration, null, 2));
|
|
333
587
|
}
|
|
@@ -339,7 +593,7 @@ async function getMsqlConfiguration(args) {
|
|
|
339
593
|
case "--id":
|
|
340
594
|
id = args[++i];
|
|
341
595
|
break;
|
|
342
|
-
|
|
596
|
+
}
|
|
343
597
|
}
|
|
344
598
|
|
|
345
599
|
const client = await getOpsCompassClient();
|
|
@@ -355,24 +609,25 @@ async function getMssqlEntitlements(args) {
|
|
|
355
609
|
case "--company":
|
|
356
610
|
company = args[++i];
|
|
357
611
|
break;
|
|
358
|
-
|
|
612
|
+
}
|
|
359
613
|
}
|
|
360
614
|
|
|
361
615
|
const client = await getOpsCompassClient();
|
|
362
|
-
const mssqlEntitlements = await client.licenseManager.getMssqlEntitlements(
|
|
616
|
+
const mssqlEntitlements = await client.licenseManager.getMssqlEntitlements(
|
|
617
|
+
company
|
|
618
|
+
);
|
|
363
619
|
|
|
364
620
|
console.log(JSON.stringify(mssqlEntitlements, null, 2));
|
|
365
621
|
}
|
|
366
622
|
|
|
367
623
|
async function createOracleDatabaseConfiguration(args) {
|
|
368
|
-
let
|
|
369
|
-
let
|
|
370
|
-
let optionalParams = { actions: undefined, connection: undefined };
|
|
624
|
+
let name = undefined;
|
|
625
|
+
let optionalParams = { };
|
|
371
626
|
for (let i = 0; i < args.length - 1; i++) {
|
|
372
627
|
switch (args[i].toLowerCase()) {
|
|
373
|
-
case "--monitoringconfigurationid":
|
|
628
|
+
case "--monitoringconfigurationid":
|
|
374
629
|
case "--monitoring-configuration-id":
|
|
375
|
-
|
|
630
|
+
monitoringConfig = args[++i];
|
|
376
631
|
break;
|
|
377
632
|
case "--name":
|
|
378
633
|
name = args[++i];
|
|
@@ -381,25 +636,37 @@ async function createOracleDatabaseConfiguration(args) {
|
|
|
381
636
|
if (optionalParams.actions === undefined) optionalParams.actions = [];
|
|
382
637
|
optionalParams.actions.push(args[++i]);
|
|
383
638
|
break;
|
|
384
|
-
case "--
|
|
385
|
-
optionalParams.
|
|
639
|
+
case "--password":
|
|
640
|
+
optionalParams.password = args[++i];
|
|
386
641
|
break;
|
|
387
|
-
|
|
642
|
+
case "--user":
|
|
643
|
+
optionalParams.user = args[++i];
|
|
644
|
+
break;
|
|
645
|
+
case "--server":
|
|
646
|
+
optionalParams.server = args[++i];
|
|
647
|
+
break;
|
|
648
|
+
}
|
|
388
649
|
}
|
|
389
650
|
|
|
390
651
|
const client = await getOpsCompassClient();
|
|
391
|
-
const
|
|
392
|
-
|
|
393
|
-
|
|
652
|
+
const monitoringConfiguration =
|
|
653
|
+
await client.licenseManager.createOracleDatabaseConfiguration(
|
|
654
|
+
monitoringConfig,
|
|
655
|
+
name,
|
|
656
|
+
optionalParams
|
|
657
|
+
);
|
|
658
|
+
|
|
659
|
+
console.log(JSON.stringify(monitoringConfiguration, null, 2));
|
|
394
660
|
}
|
|
395
661
|
|
|
396
662
|
async function updateMonitoringConfiguration(args) {
|
|
397
663
|
// Prep any arguments that are arrays
|
|
398
664
|
args = setArgumentArrays(["--mailFrom", "--emailTo"], args);
|
|
399
665
|
|
|
666
|
+
callParams.id = monitoringConfig;
|
|
400
667
|
for (let i = 0; i < args.length - 1; i++) {
|
|
401
668
|
switch (args[i].toLowerCase()) {
|
|
402
|
-
case "--id":
|
|
669
|
+
case "--id":
|
|
403
670
|
callParams.id = args[++i];
|
|
404
671
|
break;
|
|
405
672
|
case "--name":
|
|
@@ -431,19 +698,23 @@ async function updateMonitoringConfiguration(args) {
|
|
|
431
698
|
case "--logfiletag":
|
|
432
699
|
callParams.logFileTag = args[++i];
|
|
433
700
|
break;
|
|
434
|
-
|
|
701
|
+
}
|
|
435
702
|
}
|
|
436
703
|
|
|
437
704
|
const client = await getOpsCompassClient();
|
|
438
|
-
const
|
|
705
|
+
const monitoringConfiguration =
|
|
706
|
+
await client.licenseManager.updateMonitoringConfiguration(
|
|
707
|
+
callParams.id,
|
|
708
|
+
callParams
|
|
709
|
+
);
|
|
439
710
|
|
|
440
|
-
console.log(JSON.stringify(
|
|
711
|
+
console.log(JSON.stringify(monitoringConfiguration, null, 2));
|
|
441
712
|
}
|
|
442
713
|
|
|
443
714
|
async function updateOracleDatabaseConfiguration(args) {
|
|
444
715
|
for (let i = 0; i < args.length - 1; i++) {
|
|
445
716
|
switch (args[i].toLowerCase()) {
|
|
446
|
-
case "--id":
|
|
717
|
+
case "--id":
|
|
447
718
|
callParams.id = args[++i];
|
|
448
719
|
break;
|
|
449
720
|
case "--name":
|
|
@@ -455,64 +726,82 @@ async function updateOracleDatabaseConfiguration(args) {
|
|
|
455
726
|
if (callParams.actions === undefined) callParams.actions = [];
|
|
456
727
|
callParams.actions.push(args[++i]);
|
|
457
728
|
break;
|
|
458
|
-
case "--
|
|
459
|
-
callParams.
|
|
729
|
+
case "--password":
|
|
730
|
+
callParams.password = args[++i];
|
|
731
|
+
break;
|
|
732
|
+
case "--user":
|
|
733
|
+
callParams.user = args[++i];
|
|
460
734
|
break;
|
|
461
|
-
|
|
735
|
+
case "--server":
|
|
736
|
+
callParams.server = args[++i];
|
|
737
|
+
break;
|
|
738
|
+
}
|
|
462
739
|
}
|
|
463
740
|
|
|
464
741
|
const client = await getOpsCompassClient();
|
|
465
|
-
const oracleDatabaseConfiguration =
|
|
742
|
+
const oracleDatabaseConfiguration =
|
|
743
|
+
await client.licenseManager.updateOracleDatabaseConfiguration(
|
|
744
|
+
callParams.id,
|
|
745
|
+
callParams
|
|
746
|
+
);
|
|
466
747
|
|
|
467
748
|
console.log(JSON.stringify(oracleDatabaseConfiguration, null, 2));
|
|
468
749
|
}
|
|
469
750
|
|
|
470
751
|
async function updateOracleDatabaseConfigurations(args) {
|
|
471
|
-
|
|
472
|
-
let jsonIndex = args.indexOf(
|
|
473
|
-
let idIndex = args.indexOf(
|
|
752
|
+
let callParamsArray = [];
|
|
753
|
+
let jsonIndex = args.indexOf("--json-updates");
|
|
754
|
+
let idIndex = args.indexOf("--id");
|
|
474
755
|
let callParams = {};
|
|
475
756
|
|
|
476
|
-
/* Process bulk update with JSON */
|
|
477
|
-
if (jsonIndex !== -1) {
|
|
757
|
+
/* Process bulk update with JSON */
|
|
758
|
+
if (jsonIndex !== -1) {
|
|
478
759
|
const jsonString = args[jsonIndex + 1];
|
|
479
760
|
callParamsArray = JSON.parse(jsonString);
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
761
|
+
} else if (idIndex !== -1) {
|
|
762
|
+
/* If no '--json-update' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
|
|
763
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
764
|
+
if (args[i] === "--id") {
|
|
765
|
+
/* Reset callParams object when a second id is encountered */
|
|
766
|
+
callParams = {};
|
|
767
|
+
/* Push callParams into the array. */
|
|
768
|
+
callParamsArray.push(callParams);
|
|
769
|
+
/* 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 */
|
|
770
|
+
callParams.id = args[i + 1];
|
|
771
|
+
} else if (
|
|
772
|
+
args[i].toLowerCase() === "--configurationname" ||
|
|
773
|
+
args[i].toLowerCase() === "--configuration-name" ||
|
|
774
|
+
args[i].toLowerCase() === "--name"
|
|
775
|
+
) {
|
|
776
|
+
callParams.configurationName = args[i + 1];
|
|
777
|
+
} else if (args[i] === "--server") {
|
|
778
|
+
callParams.server = args[i + 1];
|
|
779
|
+
} else if (args[i] === "--user") {
|
|
780
|
+
callParams.user = args[i + 1];
|
|
781
|
+
} else if (args[i] === "--password") {
|
|
782
|
+
callParams.password = args[i + 1];
|
|
783
|
+
} else if (args[i] === "--action") {
|
|
784
|
+
if (callParams.actions === undefined) callParams.actions = [];
|
|
785
|
+
callParams.actions.push(args[i + 1]);
|
|
499
786
|
}
|
|
500
|
-
} else {
|
|
501
|
-
console.warn("Invalid input, please see help for examples.")
|
|
502
|
-
return console.log("")
|
|
503
787
|
}
|
|
504
|
-
|
|
788
|
+
} else {
|
|
789
|
+
console.warn("Invalid input, please see help for examples.");
|
|
790
|
+
return console.log("");
|
|
791
|
+
}
|
|
792
|
+
/* Call the API and print to console */
|
|
505
793
|
const client = await getOpsCompassClient();
|
|
506
|
-
const oracleDatabaseConfigurations =
|
|
794
|
+
const oracleDatabaseConfigurations =
|
|
795
|
+
await client.licenseManager.updateOracleDatabaseConfigurations(
|
|
796
|
+
callParamsArray
|
|
797
|
+
);
|
|
507
798
|
console.log(JSON.stringify(oracleDatabaseConfigurations, null, 2));
|
|
508
799
|
}
|
|
509
800
|
|
|
510
|
-
|
|
511
801
|
async function updateVCenterConfiguration(args) {
|
|
512
|
-
|
|
513
802
|
for (let i = 0; i < args.length - 1; i++) {
|
|
514
803
|
switch (args[i].toLowerCase()) {
|
|
515
|
-
case "--id":
|
|
804
|
+
case "--id":
|
|
516
805
|
callParams.id = args[++i];
|
|
517
806
|
break;
|
|
518
807
|
case "--name":
|
|
@@ -533,64 +822,71 @@ async function updateVCenterConfiguration(args) {
|
|
|
533
822
|
case "--password":
|
|
534
823
|
callParams.password = args[++i];
|
|
535
824
|
break;
|
|
536
|
-
|
|
825
|
+
}
|
|
537
826
|
}
|
|
538
827
|
|
|
539
828
|
const client = await getOpsCompassClient();
|
|
540
|
-
const vCenterConfiguration =
|
|
829
|
+
const vCenterConfiguration =
|
|
830
|
+
await client.licenseManager.updateVCenterConfiguration(
|
|
831
|
+
callParams.id,
|
|
832
|
+
callParams
|
|
833
|
+
);
|
|
541
834
|
console.log(JSON.stringify(vCenterConfiguration, null, 2));
|
|
542
835
|
}
|
|
543
836
|
|
|
544
837
|
async function updateVCenterConfigurations(args) {
|
|
545
|
-
|
|
546
|
-
let jsonIndex = args.indexOf(
|
|
547
|
-
let idIndex = args.indexOf(
|
|
838
|
+
let callParamsArray = [];
|
|
839
|
+
let jsonIndex = args.indexOf("--json-updates");
|
|
840
|
+
let idIndex = args.indexOf("--id");
|
|
548
841
|
let callParams = {};
|
|
549
842
|
|
|
550
|
-
/* Process bulk update with JSON */
|
|
843
|
+
/* Process bulk update with JSON */
|
|
551
844
|
if (jsonIndex !== -1) {
|
|
552
845
|
const jsonString = args[jsonIndex + 1];
|
|
553
846
|
callParamsArray = JSON.parse(jsonString);
|
|
554
847
|
} else if (idIndex !== -1) {
|
|
555
|
-
|
|
556
|
-
for(let i = 0; i < args.length - 1; i++) {
|
|
557
|
-
if(args[i] ===
|
|
558
|
-
|
|
559
|
-
callParams = {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
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 */
|
|
848
|
+
/* If no '--json-update' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
|
|
849
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
850
|
+
if (args[i] === "--id") {
|
|
851
|
+
/* Reset callParams object when a second id is encountered */
|
|
852
|
+
callParams = {};
|
|
853
|
+
/* if theres an existing callParams object, toss it into the array and move on. */
|
|
854
|
+
callParamsArray.push(callParams);
|
|
855
|
+
/* 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
856
|
callParams.id = args[i + 1];
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
857
|
+
} else if (
|
|
858
|
+
args[i].toLowerCase() === "--configurationname" ||
|
|
859
|
+
args[i].toLowerCase() === "--configuration-name" ||
|
|
860
|
+
args[i].toLowerCase() === "--name"
|
|
861
|
+
) {
|
|
862
|
+
callParams.configurationName = args[i + 1];
|
|
863
|
+
} else if (args[i].toLowerCase() === "--action") {
|
|
864
|
+
if (callParams.actions === undefined) callParams.actions = [];
|
|
865
|
+
callParams.actions.push(args[i + 1]);
|
|
866
|
+
} else if (args[i.toLowerCase] === "--connection") {
|
|
867
|
+
callParams.connection = args[i + 1];
|
|
868
|
+
} else if (args[i.toLowerCase] === "--user") {
|
|
869
|
+
callParams.user = args[i + 1];
|
|
870
|
+
} else if (args[i.toLowerCase] === "--password") {
|
|
871
|
+
callParams.password = args[i + 1];
|
|
576
872
|
}
|
|
577
873
|
}
|
|
578
874
|
} else {
|
|
579
|
-
console.warn("Invalid input, please see help for examples.")
|
|
580
|
-
return console.log("")
|
|
875
|
+
console.warn("Invalid input, please see help for examples.");
|
|
876
|
+
return console.log("");
|
|
581
877
|
}
|
|
582
|
-
|
|
878
|
+
|
|
583
879
|
/* Call the API and print to console */
|
|
584
880
|
const client = await getOpsCompassClient();
|
|
585
|
-
const vCenterConfigurations =
|
|
881
|
+
const vCenterConfigurations =
|
|
882
|
+
await client.licenseManager.updateVCenterConfigurations(callParamsArray);
|
|
586
883
|
console.log(JSON.stringify(vCenterConfigurations, null, 2));
|
|
587
884
|
}
|
|
588
885
|
|
|
589
886
|
async function updateMsqlConfiguration(args) {
|
|
590
|
-
|
|
591
887
|
for (let i = 0; i < args.length - 1; i++) {
|
|
592
888
|
switch (args[i].toLowerCase()) {
|
|
593
|
-
case "--id":
|
|
889
|
+
case "--id":
|
|
594
890
|
callParams.id = args[++i];
|
|
595
891
|
break;
|
|
596
892
|
case "--name":
|
|
@@ -599,8 +895,8 @@ async function updateMsqlConfiguration(args) {
|
|
|
599
895
|
callParams.configurationName = args[++i];
|
|
600
896
|
break;
|
|
601
897
|
case "--action":
|
|
602
|
-
|
|
603
|
-
|
|
898
|
+
if (callParams.actions === undefined) callParams.actions = [];
|
|
899
|
+
callParams.actions.push(args[++i]);
|
|
604
900
|
break;
|
|
605
901
|
case "--server":
|
|
606
902
|
callParams.server = args[++i];
|
|
@@ -611,61 +907,81 @@ async function updateMsqlConfiguration(args) {
|
|
|
611
907
|
case "--password":
|
|
612
908
|
callParams.password = args[++i];
|
|
613
909
|
break;
|
|
614
|
-
|
|
910
|
+
case "--directory-auth":
|
|
911
|
+
authArg = args[++i];
|
|
912
|
+
if (authArg.toLowerCase === "null") {
|
|
913
|
+
callParams.directory_auth = null;
|
|
914
|
+
} else {
|
|
915
|
+
callParams.directory_auth = "SESSION";
|
|
916
|
+
}
|
|
917
|
+
break;
|
|
918
|
+
}
|
|
615
919
|
}
|
|
616
920
|
const client = await getOpsCompassClient();
|
|
617
|
-
const msqlConfiguration = await client.licenseManager.updateMsqlConfiguration(
|
|
921
|
+
const msqlConfiguration = await client.licenseManager.updateMsqlConfiguration(
|
|
922
|
+
callParams.id,
|
|
923
|
+
callParams
|
|
924
|
+
);
|
|
618
925
|
console.log(JSON.stringify(msqlConfiguration, null, 2));
|
|
619
926
|
}
|
|
620
927
|
|
|
621
|
-
|
|
622
928
|
async function updateMsqlConfigurations(args) {
|
|
623
|
-
|
|
624
929
|
let callParamsArray = [];
|
|
625
|
-
let jsonIndex = args.indexOf(
|
|
626
|
-
let idIndex = args.indexOf(
|
|
930
|
+
let jsonIndex = args.indexOf("--json-updates");
|
|
931
|
+
let idIndex = args.indexOf("--id");
|
|
627
932
|
let callParams = {};
|
|
628
933
|
|
|
629
|
-
/* Process bulk update with JSON */
|
|
934
|
+
/* Process bulk update with JSON */
|
|
630
935
|
if (jsonIndex !== -1) {
|
|
631
936
|
const jsonString = args[jsonIndex + 1];
|
|
632
937
|
callParamsArray = JSON.parse(jsonString);
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
} else if (idIndex !== -1) {
|
|
636
|
-
|
|
637
|
-
if(args[i] ===
|
|
638
|
-
|
|
639
|
-
callParams = {
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
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 */
|
|
938
|
+
|
|
939
|
+
/* If no '--json-updates' flag, process bulk update with parameter flags (e.g. --id, --name, etc.) */
|
|
940
|
+
} else if (idIndex !== -1) {
|
|
941
|
+
for (let i = 0; i < args.length - 1; i++) {
|
|
942
|
+
if (args[i] === "--id") {
|
|
943
|
+
/* Reset callParams object when a second id is encountered */
|
|
944
|
+
callParams = {};
|
|
945
|
+
/* if theres an existing callParams object, toss it into the array and move on. */
|
|
946
|
+
callParamsArray.push(callParams);
|
|
947
|
+
/* 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
948
|
callParams.id = args[i + 1];
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
}
|
|
949
|
+
} else if (
|
|
950
|
+
args[i].toLowerCase() === "--configurationname" ||
|
|
951
|
+
args[i].toLowerCase() === "--configuration-name" ||
|
|
952
|
+
args[i].toLowerCase() === "--name"
|
|
953
|
+
) {
|
|
954
|
+
callParams.configurationName = args[i + 1];
|
|
955
|
+
} else if (args[i].toLowerCase() === "--action") {
|
|
956
|
+
if (callParams.actions === undefined) callParams.actions = [];
|
|
957
|
+
callParams.actions.push(args[i + 1]);
|
|
958
|
+
} else if (args[i].toLowerCase() === "--server") {
|
|
959
|
+
callParams.server = args[i + 1];
|
|
960
|
+
} else if (args[i].toLowerCase() === "--user") {
|
|
961
|
+
callParams.user = args[i + 1];
|
|
962
|
+
} else if (args[i].toLowerCase() === "--password") {
|
|
963
|
+
callParams.password = args[i + 1];
|
|
964
|
+
} else if (args[i].toLowerCase() === "--directory-auth") {
|
|
965
|
+
authArg = args[i + 1];
|
|
966
|
+
if (authArg.toLowerCase === "null") {
|
|
967
|
+
callParams.directory_auth = null;
|
|
968
|
+
} else {
|
|
969
|
+
callParams.directory_auth = "SESSION";
|
|
970
|
+
}
|
|
657
971
|
}
|
|
658
|
-
} else {
|
|
659
|
-
console.warn("Invalid input, please see help for examples.")
|
|
660
|
-
return console.log("")
|
|
661
972
|
}
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
const msqlConfigurations = await client.licenseManager.updateMsqlConfigurations(callParamsArray);
|
|
666
|
-
console.log(JSON.stringify(msqlConfigurations, null, 2));
|
|
973
|
+
} else {
|
|
974
|
+
console.warn("Invalid input, please see help for examples.");
|
|
975
|
+
return console.log("");
|
|
667
976
|
}
|
|
668
977
|
|
|
978
|
+
/* Call the API and print to console */
|
|
979
|
+
const client = await getOpsCompassClient();
|
|
980
|
+
const msqlConfigurations =
|
|
981
|
+
await client.licenseManager.updateMsqlConfigurations(callParamsArray);
|
|
982
|
+
console.log(JSON.stringify(msqlConfigurations, null, 2));
|
|
983
|
+
}
|
|
984
|
+
|
|
669
985
|
async function getMssqlEntitlementComponents(args) {
|
|
670
986
|
let company = undefined;
|
|
671
987
|
for (let i = 0; i < args.length - 1; i++) {
|
|
@@ -673,26 +989,28 @@ async function getMssqlEntitlementComponents(args) {
|
|
|
673
989
|
case "--company":
|
|
674
990
|
company = args[++i];
|
|
675
991
|
break;
|
|
676
|
-
|
|
992
|
+
}
|
|
677
993
|
}
|
|
678
994
|
|
|
679
995
|
const client = await getOpsCompassClient();
|
|
680
|
-
const entitlementComponents =
|
|
996
|
+
const entitlementComponents =
|
|
997
|
+
await client.licenseManager.getMssqlEntitlementComponents(company);
|
|
681
998
|
console.log(JSON.stringify(entitlementComponents, null, 2));
|
|
682
999
|
}
|
|
683
1000
|
|
|
684
1001
|
async function deleteNetworkDiscoveryConfiguration(args) {
|
|
685
|
-
let id = undefined;
|
|
1002
|
+
let id = undefined;
|
|
686
1003
|
for (let i = 0; i < args.length - 1; i++) {
|
|
687
|
-
switch(args[i].toLowerCase()) {
|
|
688
|
-
case "--id":
|
|
1004
|
+
switch (args[i].toLowerCase()) {
|
|
1005
|
+
case "--id":
|
|
689
1006
|
id = args[++i];
|
|
690
1007
|
break;
|
|
691
1008
|
}
|
|
692
1009
|
}
|
|
693
1010
|
|
|
694
|
-
const client = await getOpsCompassClient();
|
|
695
|
-
const deleteResponse =
|
|
1011
|
+
const client = await getOpsCompassClient();
|
|
1012
|
+
const deleteResponse =
|
|
1013
|
+
await client.licenseManager.deleteNetworkDiscoveryConfiguration(id);
|
|
696
1014
|
console.log(JSON.stringify(deleteResponse, null, 2));
|
|
697
1015
|
}
|
|
698
1016
|
|
|
@@ -707,11 +1025,11 @@ async function updateNetworkDiscoveryConfiguration(args) {
|
|
|
707
1025
|
case "--id":
|
|
708
1026
|
id = args[++i];
|
|
709
1027
|
break;
|
|
710
|
-
case "--oracle-ports":
|
|
1028
|
+
case "--oracle-ports":
|
|
711
1029
|
case "--oracleports":
|
|
712
1030
|
ports["oracle_ports"] = args[++i];
|
|
713
1031
|
break;
|
|
714
|
-
case "--other-ports":
|
|
1032
|
+
case "--other-ports":
|
|
715
1033
|
case "--otherports":
|
|
716
1034
|
ports["other_ports"] = args[++i];
|
|
717
1035
|
break;
|
|
@@ -720,10 +1038,10 @@ async function updateNetworkDiscoveryConfiguration(args) {
|
|
|
720
1038
|
ports["mssql_ports"] = args[++i];
|
|
721
1039
|
break;
|
|
722
1040
|
case "--dns-servers":
|
|
723
|
-
case "--dnsservers":
|
|
1041
|
+
case "--dnsservers":
|
|
724
1042
|
dns_servers.push(args[++i]);
|
|
725
1043
|
break;
|
|
726
|
-
case "--subnet":
|
|
1044
|
+
case "--subnet":
|
|
727
1045
|
currentSubnet["subnet"] = args[++i];
|
|
728
1046
|
if (currentSubnet["subnet"] && currentSubnet["name"]) {
|
|
729
1047
|
subnets.push(currentSubnet);
|
|
@@ -737,13 +1055,19 @@ async function updateNetworkDiscoveryConfiguration(args) {
|
|
|
737
1055
|
subnets.push(currentSubnet);
|
|
738
1056
|
currentSubnet = {};
|
|
739
1057
|
}
|
|
740
|
-
|
|
741
|
-
|
|
1058
|
+
break;
|
|
1059
|
+
}
|
|
742
1060
|
}
|
|
743
1061
|
|
|
744
1062
|
const client = await getOpsCompassClient();
|
|
745
1063
|
|
|
746
|
-
const networkDiscoveryConfig =
|
|
1064
|
+
const networkDiscoveryConfig =
|
|
1065
|
+
await client.licenseManager.updateNetworkDiscoveryConfiguration(
|
|
1066
|
+
id,
|
|
1067
|
+
subnets || undefined,
|
|
1068
|
+
dns_servers || undefined,
|
|
1069
|
+
ports || undefined
|
|
1070
|
+
);
|
|
747
1071
|
|
|
748
1072
|
console.log(JSON.stringify(networkDiscoveryConfig, null, 2));
|
|
749
1073
|
}
|
|
@@ -760,7 +1084,7 @@ async function createNetworkDiscoveryConfiguration(args) {
|
|
|
760
1084
|
case "--monitoring-configuration-id":
|
|
761
1085
|
id = args[++i];
|
|
762
1086
|
break;
|
|
763
|
-
case "--oracle-ports":
|
|
1087
|
+
case "--oracle-ports":
|
|
764
1088
|
case "--oracleports":
|
|
765
1089
|
ports["oracle_ports"] = args[++i];
|
|
766
1090
|
break;
|
|
@@ -776,7 +1100,7 @@ async function createNetworkDiscoveryConfiguration(args) {
|
|
|
776
1100
|
case "--dnsservers":
|
|
777
1101
|
dns_servers.push(args[++i]);
|
|
778
1102
|
break;
|
|
779
|
-
case "--subnet":
|
|
1103
|
+
case "--subnet":
|
|
780
1104
|
currentSubnet["subnet"] = args[++i];
|
|
781
1105
|
if (currentSubnet["subnet"] && currentSubnet["name"]) {
|
|
782
1106
|
subnets.push(currentSubnet);
|
|
@@ -790,19 +1114,25 @@ async function createNetworkDiscoveryConfiguration(args) {
|
|
|
790
1114
|
subnets.push(currentSubnet);
|
|
791
1115
|
currentSubnet = {};
|
|
792
1116
|
}
|
|
793
|
-
|
|
794
|
-
|
|
1117
|
+
break;
|
|
1118
|
+
}
|
|
795
1119
|
}
|
|
796
1120
|
|
|
797
1121
|
const client = await getOpsCompassClient();
|
|
798
1122
|
|
|
799
|
-
const networkDiscoveryConfig =
|
|
1123
|
+
const networkDiscoveryConfig =
|
|
1124
|
+
await client.licenseManager.createNetworkDiscoveryConfiguration(
|
|
1125
|
+
id,
|
|
1126
|
+
subnets || undefined,
|
|
1127
|
+
dns_servers || undefined,
|
|
1128
|
+
ports || undefined
|
|
1129
|
+
);
|
|
800
1130
|
|
|
801
1131
|
console.log(JSON.stringify(networkDiscoveryConfig, null, 2));
|
|
802
1132
|
}
|
|
803
1133
|
|
|
804
1134
|
async function createMssqlEntitlement(args) {
|
|
805
|
-
|
|
1135
|
+
let company = undefined;
|
|
806
1136
|
let newRecord = {
|
|
807
1137
|
purchaseDate: undefined,
|
|
808
1138
|
quantity: undefined,
|
|
@@ -811,7 +1141,7 @@ async function createMssqlEntitlement(args) {
|
|
|
811
1141
|
msqlProduct: undefined,
|
|
812
1142
|
msqlEdition: undefined,
|
|
813
1143
|
msqlVersion: undefined,
|
|
814
|
-
msqlMetric: undefined
|
|
1144
|
+
msqlMetric: undefined,
|
|
815
1145
|
};
|
|
816
1146
|
for (let i = 0; i < args.length - 1; i++) {
|
|
817
1147
|
switch (args[i].toLowerCase()) {
|
|
@@ -853,12 +1183,15 @@ async function createMssqlEntitlement(args) {
|
|
|
853
1183
|
}
|
|
854
1184
|
|
|
855
1185
|
const client = await getOpsCompassClient();
|
|
856
|
-
const response = await client.licenseManager.createMssqlEntitlements(
|
|
1186
|
+
const response = await client.licenseManager.createMssqlEntitlements(
|
|
1187
|
+
company,
|
|
1188
|
+
[newRecord]
|
|
1189
|
+
);
|
|
857
1190
|
console.log(JSON.stringify(response, null, 2));
|
|
858
1191
|
}
|
|
859
1192
|
|
|
860
1193
|
async function updateMssqlEntitlement(args) {
|
|
861
|
-
|
|
1194
|
+
let company = undefined;
|
|
862
1195
|
let updateRecord = {
|
|
863
1196
|
id: undefined,
|
|
864
1197
|
purchaseDate: undefined,
|
|
@@ -868,7 +1201,7 @@ async function updateMssqlEntitlement(args) {
|
|
|
868
1201
|
msqlProduct: undefined,
|
|
869
1202
|
msqlEdition: undefined,
|
|
870
1203
|
msqlVersion: undefined,
|
|
871
|
-
msqlMetric: undefined
|
|
1204
|
+
msqlMetric: undefined,
|
|
872
1205
|
};
|
|
873
1206
|
for (let i = 0; i < args.length - 1; i++) {
|
|
874
1207
|
switch (args[i].toLowerCase()) {
|
|
@@ -913,18 +1246,21 @@ async function updateMssqlEntitlement(args) {
|
|
|
913
1246
|
}
|
|
914
1247
|
|
|
915
1248
|
const client = await getOpsCompassClient();
|
|
916
|
-
const response = await client.licenseManager.updateMssqlEntitlements(
|
|
1249
|
+
const response = await client.licenseManager.updateMssqlEntitlements(
|
|
1250
|
+
company,
|
|
1251
|
+
[updateRecord]
|
|
1252
|
+
);
|
|
917
1253
|
console.log(JSON.stringify(response, null, 2));
|
|
918
1254
|
}
|
|
919
1255
|
|
|
920
|
-
async function listMssqlAssessments(args){
|
|
1256
|
+
async function listMssqlAssessments(args) {
|
|
921
1257
|
let company = undefined;
|
|
922
1258
|
for (let i = 0; i < args.length - 1; i++) {
|
|
923
1259
|
switch (args[i].toLowerCase()) {
|
|
924
1260
|
case "--company":
|
|
925
1261
|
company = args[++i];
|
|
926
1262
|
break;
|
|
927
|
-
|
|
1263
|
+
}
|
|
928
1264
|
}
|
|
929
1265
|
|
|
930
1266
|
const client = await getOpsCompassClient();
|
|
@@ -942,7 +1278,7 @@ async function getMssqlAssessment(args) {
|
|
|
942
1278
|
case "--assessmentid":
|
|
943
1279
|
assessmentId = args[++i];
|
|
944
1280
|
break;
|
|
945
|
-
|
|
1281
|
+
}
|
|
946
1282
|
}
|
|
947
1283
|
|
|
948
1284
|
const client = await getOpsCompassClient();
|
|
@@ -960,11 +1296,13 @@ async function getMssqlAssessmentEntitlements(args) {
|
|
|
960
1296
|
case "--assessmentid":
|
|
961
1297
|
assessmentId = args[++i];
|
|
962
1298
|
break;
|
|
963
|
-
|
|
1299
|
+
}
|
|
964
1300
|
}
|
|
965
1301
|
|
|
966
1302
|
const client = await getOpsCompassClient();
|
|
967
|
-
const response = await client.licenseManager.getMssqlAssessmentEntitlements(
|
|
1303
|
+
const response = await client.licenseManager.getMssqlAssessmentEntitlements(
|
|
1304
|
+
assessmentId
|
|
1305
|
+
);
|
|
968
1306
|
|
|
969
1307
|
console.log(JSON.stringify(response, null, 2));
|
|
970
1308
|
}
|
|
@@ -978,11 +1316,14 @@ async function getMssqlAssessmentLicenseUsageMaps(args) {
|
|
|
978
1316
|
case "--assessmentid":
|
|
979
1317
|
assessmentId = args[++i];
|
|
980
1318
|
break;
|
|
981
|
-
|
|
1319
|
+
}
|
|
982
1320
|
}
|
|
983
1321
|
|
|
984
1322
|
const client = await getOpsCompassClient();
|
|
985
|
-
const response =
|
|
1323
|
+
const response =
|
|
1324
|
+
await client.licenseManager.getMssqlAssessmentLicenseUsageMaps(
|
|
1325
|
+
assessmentId
|
|
1326
|
+
);
|
|
986
1327
|
|
|
987
1328
|
console.log(JSON.stringify(response, null, 2));
|
|
988
1329
|
}
|
|
@@ -996,11 +1337,13 @@ async function getMssqlAssessmentResources(args) {
|
|
|
996
1337
|
case "--assessmentid":
|
|
997
1338
|
assessmentId = args[++i];
|
|
998
1339
|
break;
|
|
999
|
-
|
|
1340
|
+
}
|
|
1000
1341
|
}
|
|
1001
1342
|
|
|
1002
1343
|
const client = await getOpsCompassClient();
|
|
1003
|
-
const response = await client.licenseManager.getMssqlAssessmentResources(
|
|
1344
|
+
const response = await client.licenseManager.getMssqlAssessmentResources(
|
|
1345
|
+
assessmentId
|
|
1346
|
+
);
|
|
1004
1347
|
|
|
1005
1348
|
console.log(JSON.stringify(response, null, 2));
|
|
1006
1349
|
}
|
|
@@ -1008,162 +1351,377 @@ async function getMssqlAssessmentResources(args) {
|
|
|
1008
1351
|
async function printHelp() {
|
|
1009
1352
|
console.log("Actions available for license-manager:");
|
|
1010
1353
|
console.log();
|
|
1011
|
-
console.log(
|
|
1354
|
+
console.log(
|
|
1355
|
+
"get-secret-for-configuration",
|
|
1356
|
+
"Gets a secret for a single configuration passed."
|
|
1357
|
+
);
|
|
1012
1358
|
console.log("Parameters:");
|
|
1013
|
-
console.log(
|
|
1014
|
-
|
|
1359
|
+
console.log(
|
|
1360
|
+
"--id [vcenter_configuration_id | oracle_database_configuration_id | msql_configuration_id | msql_default_credential_id | oracle_default_credential_id]"
|
|
1361
|
+
);
|
|
1362
|
+
console.log(
|
|
1363
|
+
"--record-type ['oracle_database_configuration' | 'vcenter_configuration' | 'msql_configuration' | 'msql_shared_monitoring_credential' | 'oracle_shared_monitoring_credential'"
|
|
1364
|
+
);
|
|
1365
|
+
console.log();
|
|
1366
|
+
console.log(
|
|
1367
|
+
"create-oracle-shared-credential",
|
|
1368
|
+
"Creates Oracle shared credentials"
|
|
1369
|
+
);
|
|
1370
|
+
console.log(
|
|
1371
|
+
"--monitoring-configuration-id monitoring configuration ID to make the shared credentials for"
|
|
1372
|
+
);
|
|
1373
|
+
console.log("--user (optional) [string]");
|
|
1374
|
+
console.log("--password (optional) [string]");
|
|
1375
|
+
console.log();
|
|
1376
|
+
console.log(
|
|
1377
|
+
"delete-oracle-shared-credential",
|
|
1378
|
+
"Delete a Oracle shared credential"
|
|
1379
|
+
);
|
|
1380
|
+
console.log("--id ID of the oracle shared credential to delete");
|
|
1381
|
+
console.log();
|
|
1382
|
+
console.log(
|
|
1383
|
+
"get-oracle-default-credential",
|
|
1384
|
+
"Get Oracle default credential record"
|
|
1385
|
+
);
|
|
1386
|
+
console.log(
|
|
1387
|
+
"--monitoring-configuration-id monitoring configuration ID to get the default credentials for"
|
|
1388
|
+
);
|
|
1389
|
+
console.log();
|
|
1390
|
+
console.log(
|
|
1391
|
+
"update-oracle-shared-credential",
|
|
1392
|
+
"Update Oracle shared credential record"
|
|
1393
|
+
);
|
|
1394
|
+
console.log("--id ID of the oracle shared credential to update");
|
|
1395
|
+
console.log("--user (optional) [string]");
|
|
1396
|
+
console.log("--password (optional) [string]");
|
|
1397
|
+
console.log();
|
|
1398
|
+
console.log(
|
|
1399
|
+
"create-msql-shared-credential",
|
|
1400
|
+
"Creates MSQL shared credentials"
|
|
1401
|
+
);
|
|
1402
|
+
console.log(
|
|
1403
|
+
"--monitoring-configuration-id monitoring configuration ID to make the shared credentials for"
|
|
1404
|
+
);
|
|
1405
|
+
console.log("--user (optional) [string]");
|
|
1406
|
+
console.log("--password (optional) [string]");
|
|
1407
|
+
console.log("--directory-auth (optional) 'SESSION' | null");
|
|
1408
|
+
console.log();
|
|
1409
|
+
console.log(
|
|
1410
|
+
"delete-msql-shared-credential",
|
|
1411
|
+
"Delete a MSQL shared credential"
|
|
1412
|
+
);
|
|
1413
|
+
console.log("--id ID of the msql shared credential to delete");
|
|
1414
|
+
console.log();
|
|
1415
|
+
console.log(
|
|
1416
|
+
"get-msql-default-credential",
|
|
1417
|
+
"Get MSQL default credential record"
|
|
1418
|
+
);
|
|
1419
|
+
console.log(
|
|
1420
|
+
"--monitoring-configuration-id monitoring configuration ID to get the default credentials for"
|
|
1421
|
+
);
|
|
1015
1422
|
console.log();
|
|
1016
|
-
console.log(
|
|
1423
|
+
console.log(
|
|
1424
|
+
"update-msql-shared-credential",
|
|
1425
|
+
"Update MSQL shared credential record"
|
|
1426
|
+
);
|
|
1427
|
+
console.log("--id ID of the msql shared credential to update");
|
|
1428
|
+
console.log("--user (optional) [string]");
|
|
1429
|
+
console.log("--password (optional) [string]");
|
|
1430
|
+
console.log("--directory-auth (optional) 'SESSION' | null");
|
|
1431
|
+
console.log();
|
|
1432
|
+
console.log(
|
|
1433
|
+
"list-monitoring-configurations",
|
|
1434
|
+
"Lists all of the monitoring configurations associated with the given company."
|
|
1435
|
+
);
|
|
1017
1436
|
console.log("Parameters:");
|
|
1018
1437
|
console.log("--company [company_slug]");
|
|
1019
1438
|
console.log();
|
|
1020
|
-
console.log(
|
|
1439
|
+
console.log(
|
|
1440
|
+
"get-monitoring-configuration",
|
|
1441
|
+
"Get a single monitoring configuration associated with the given company."
|
|
1442
|
+
);
|
|
1021
1443
|
console.log("Parameters:");
|
|
1022
1444
|
console.log("--id [monitoring_configuration_id]");
|
|
1023
1445
|
console.log("--asFile (optional) [true | false]");
|
|
1024
1446
|
console.log();
|
|
1025
|
-
console.log(
|
|
1447
|
+
console.log(
|
|
1448
|
+
"get-network-discovery-configuration",
|
|
1449
|
+
"Get a single network discovery configuration."
|
|
1450
|
+
);
|
|
1026
1451
|
console.log("Parameters:");
|
|
1027
1452
|
console.log("--id [network_discovery_configuration_id]");
|
|
1028
1453
|
console.log();
|
|
1029
|
-
console.log(
|
|
1454
|
+
console.log(
|
|
1455
|
+
"create-monitoring-configuration",
|
|
1456
|
+
"Create a single monitoring configuration associated with the given company."
|
|
1457
|
+
);
|
|
1030
1458
|
console.log("Parameters:");
|
|
1031
1459
|
console.log("--company [company_slug]");
|
|
1032
1460
|
console.log("--configurationName [configuration name]");
|
|
1033
1461
|
console.log();
|
|
1034
|
-
console.log(
|
|
1462
|
+
console.log(
|
|
1463
|
+
"create-network-discovery-configuration",
|
|
1464
|
+
"Creates a new networking discovery configuration associated with the given monitoring configuration."
|
|
1465
|
+
);
|
|
1035
1466
|
console.log("Parameters:");
|
|
1036
1467
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1037
|
-
console.log(
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
console.log(
|
|
1041
|
-
|
|
1042
|
-
|
|
1468
|
+
console.log(
|
|
1469
|
+
"--oracle-ports (optional) comma seperated list of valid port numbers to look for oracle connections"
|
|
1470
|
+
);
|
|
1471
|
+
console.log(
|
|
1472
|
+
"--mssql-ports (optional) comma seperated list of valid port numbers to look for mssql connections"
|
|
1473
|
+
);
|
|
1474
|
+
console.log(
|
|
1475
|
+
"--other-ports (optional) comma seperated list of valid port numbers to look for misc connections"
|
|
1476
|
+
);
|
|
1477
|
+
console.log(
|
|
1478
|
+
"--dns-servers (optional) comma seperated list of valid IPV4 DNS servers to use for DNS resolution. Can be specified multiple times"
|
|
1479
|
+
);
|
|
1480
|
+
console.log(
|
|
1481
|
+
"--subnet (optional) If supplied --subnet-name is also required. Valid IPV4 CIDR block as an input. Can be supplied multiple times"
|
|
1482
|
+
);
|
|
1483
|
+
console.log(
|
|
1484
|
+
"--subnet-name (optional) If supplied --subnet is also required. Name for the next/last subnet block provided. Can be supplied multiple times."
|
|
1485
|
+
);
|
|
1043
1486
|
console.log();
|
|
1044
|
-
console.log(
|
|
1487
|
+
console.log(
|
|
1488
|
+
"update-network-discovery-configuration",
|
|
1489
|
+
"Updates an existing networking discovery configuration. If an optional parameter is not provided, it is assumed that the field should be set to undefined."
|
|
1490
|
+
);
|
|
1045
1491
|
console.log("Parameters:");
|
|
1046
1492
|
console.log("--id [network_discovery_configuration_id]");
|
|
1047
|
-
console.log(
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
console.log(
|
|
1051
|
-
|
|
1052
|
-
|
|
1493
|
+
console.log(
|
|
1494
|
+
"--oracle-ports (optional) comma seperated list of valid port numbers to look for oracle connections"
|
|
1495
|
+
);
|
|
1496
|
+
console.log(
|
|
1497
|
+
"--mssql-ports (optional) comma seperated list of valid port numbers to look for mssql connections"
|
|
1498
|
+
);
|
|
1499
|
+
console.log(
|
|
1500
|
+
"--other-ports (optional) comma seperated list of valid port numbers to look for misc connections"
|
|
1501
|
+
);
|
|
1502
|
+
console.log(
|
|
1503
|
+
"--dns-servers (optional) comma seperated list of valid IPV4 DNS servers to use for DNS resolution. Can be specified multiple times"
|
|
1504
|
+
);
|
|
1505
|
+
console.log(
|
|
1506
|
+
"--subnet (optional) If supplied --subnet-name is also required. Valid IPV4 CIDR block as an input. Can be supplied multiple times"
|
|
1507
|
+
);
|
|
1508
|
+
console.log(
|
|
1509
|
+
"--subnet-name (optional) If supplied --subnet is also required. Name for the next/last subnet block provided. Can be supplied multiple times."
|
|
1510
|
+
);
|
|
1053
1511
|
console.log();
|
|
1054
|
-
console.log(
|
|
1512
|
+
console.log(
|
|
1513
|
+
"list-oracle-database-configurations",
|
|
1514
|
+
"Lists all of the oracle database configurations associated with the given monitoring configuration"
|
|
1515
|
+
);
|
|
1055
1516
|
console.log("Parameters:");
|
|
1056
1517
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1057
1518
|
console.log();
|
|
1058
|
-
console.log(
|
|
1519
|
+
console.log(
|
|
1520
|
+
"get-oracle-database-configuration",
|
|
1521
|
+
"Get a single oracle database configuration associated with the given monitoring configuration"
|
|
1522
|
+
);
|
|
1059
1523
|
console.log("Parameters:");
|
|
1060
1524
|
console.log("--id [oracle_database_configuration_id]");
|
|
1061
1525
|
console.log();
|
|
1062
|
-
console.log(
|
|
1526
|
+
console.log(
|
|
1527
|
+
"list-vcenter-configurations",
|
|
1528
|
+
"Lists all of the vcenter configurations associated with the given monitoring configuration"
|
|
1529
|
+
);
|
|
1063
1530
|
console.log("Parameters:");
|
|
1064
1531
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1065
1532
|
console.log();
|
|
1066
|
-
console.log(
|
|
1533
|
+
console.log(
|
|
1534
|
+
"get-vcenter-configuration",
|
|
1535
|
+
"Get a single vcenter configuration associated with the given monitoring configuration"
|
|
1536
|
+
);
|
|
1067
1537
|
console.log("Parameters:");
|
|
1068
1538
|
console.log("--id [vcenter_configuration_id]");
|
|
1069
1539
|
console.log();
|
|
1070
|
-
console.log(
|
|
1540
|
+
console.log(
|
|
1541
|
+
"create-vcenter-configuration",
|
|
1542
|
+
"Create a single vcenter configuration associated with the given monitoring configuration."
|
|
1543
|
+
);
|
|
1071
1544
|
console.log("Parameters:");
|
|
1072
1545
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1073
1546
|
console.log("--name [unique name]");
|
|
1074
|
-
console.log(
|
|
1547
|
+
console.log(
|
|
1548
|
+
`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "vmotion"`
|
|
1549
|
+
);
|
|
1075
1550
|
console.log("--connection (optional) [the hostname or ip address]");
|
|
1076
1551
|
console.log("--user (optional) [connection username]");
|
|
1077
1552
|
console.log("--password (optional) [connection password]");
|
|
1078
1553
|
console.log();
|
|
1079
|
-
console.log(
|
|
1554
|
+
console.log(
|
|
1555
|
+
"list-msql-configurations",
|
|
1556
|
+
"Lists all of the msql configurations associated with the given monitoring configuration"
|
|
1557
|
+
);
|
|
1080
1558
|
console.log("Parameters:");
|
|
1081
1559
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1082
1560
|
console.log();
|
|
1083
|
-
console.log(
|
|
1561
|
+
console.log(
|
|
1562
|
+
"create-msql-configuration",
|
|
1563
|
+
"Create a single msql configuration associated with the given monitoring configuration."
|
|
1564
|
+
);
|
|
1084
1565
|
console.log("Parameters:");
|
|
1085
1566
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1086
1567
|
console.log("--configurationName [unique name]");
|
|
1087
|
-
console.log(
|
|
1568
|
+
console.log(
|
|
1569
|
+
`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`
|
|
1570
|
+
);
|
|
1088
1571
|
console.log("--server (optional) [the hostname or ip address]");
|
|
1089
1572
|
console.log("--user (optional) [connection username]");
|
|
1090
1573
|
console.log("--password (optional) [connection password]");
|
|
1574
|
+
console.log("--directory-auth (optional) ['SESSION' or NULL]");
|
|
1091
1575
|
console.log();
|
|
1092
|
-
console.log(
|
|
1576
|
+
console.log(
|
|
1577
|
+
"get-msql-configuration",
|
|
1578
|
+
"Get a single msql configuration associated with the given monitoring configuration"
|
|
1579
|
+
);
|
|
1093
1580
|
console.log("Parameters:");
|
|
1094
1581
|
console.log("--id [msql_configuration_id]");
|
|
1095
1582
|
console.log();
|
|
1096
|
-
console.log(
|
|
1583
|
+
console.log(
|
|
1584
|
+
"create-oracle-database-configuration",
|
|
1585
|
+
"Create a single oracle database configuration associated with the given monitoring configuration."
|
|
1586
|
+
);
|
|
1097
1587
|
console.log("Parameters:");
|
|
1098
1588
|
console.log("--monitoring-configuration-id [monitoring_configuration_id]");
|
|
1099
1589
|
console.log("--name [unique name]");
|
|
1100
|
-
console.log(
|
|
1101
|
-
|
|
1590
|
+
console.log(
|
|
1591
|
+
`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`
|
|
1592
|
+
);
|
|
1593
|
+
console.log("--user (optional) [user to use for connection]");
|
|
1594
|
+
console.log("--password (optional) [password to use for connection]");
|
|
1595
|
+
console.log("--server (optional) [server to use for connection]");
|
|
1102
1596
|
console.log();
|
|
1103
|
-
console.log(
|
|
1597
|
+
console.log(
|
|
1598
|
+
"update-monitoring-configuration",
|
|
1599
|
+
"Update a single monitoring configuration."
|
|
1600
|
+
);
|
|
1104
1601
|
console.log("Parameters:");
|
|
1105
1602
|
console.log("--id [monitoring_configuration id]");
|
|
1106
1603
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1107
|
-
console.log(
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
console.log(
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
console.log(
|
|
1114
|
-
|
|
1604
|
+
console.log(
|
|
1605
|
+
"--dataFileRetainDays (optional) [determines how many days to retain encrypted output files locally]"
|
|
1606
|
+
);
|
|
1607
|
+
console.log(
|
|
1608
|
+
"--dataFileRetainTextDays (optional) [determines how many days to retain individual script output files locally]"
|
|
1609
|
+
);
|
|
1610
|
+
console.log(
|
|
1611
|
+
"--forceFileEncryption (optional) [enforce encryption of datafiles before being sent]"
|
|
1612
|
+
);
|
|
1613
|
+
console.log(
|
|
1614
|
+
"--dataFileTag (optional) [used to help filename generation to prevent duplicate file names]"
|
|
1615
|
+
);
|
|
1616
|
+
console.log(
|
|
1617
|
+
"--mailFrom (optional) [Use parameter multiple times to send multiple email addresses. Identifies sender's email addresses when file delivery is done through email.]"
|
|
1618
|
+
);
|
|
1619
|
+
console.log(
|
|
1620
|
+
"--emailTo (optional) [Use parameter multiple times to send multiple email addresses. Identifies the destination email addresses when file delivery is done through email.]"
|
|
1621
|
+
);
|
|
1622
|
+
console.log(
|
|
1623
|
+
"--logFileRetainDays (optional) [determines how many days to retain log files locally]"
|
|
1624
|
+
);
|
|
1625
|
+
console.log(
|
|
1626
|
+
"--logFileTag (optional) [used to help filename generation to prevent duplicate file names]"
|
|
1627
|
+
);
|
|
1115
1628
|
console.log();
|
|
1116
|
-
console.log(
|
|
1629
|
+
console.log(
|
|
1630
|
+
"update-oracle-database-configuration",
|
|
1631
|
+
"Update a single oracle database configuration."
|
|
1632
|
+
);
|
|
1117
1633
|
console.log("Parameters:");
|
|
1118
1634
|
console.log("--id [configuration id]");
|
|
1119
1635
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1120
|
-
console.log(
|
|
1121
|
-
|
|
1636
|
+
console.log(
|
|
1637
|
+
`--action (optional) pass multiple times to define which actions this connection can take --action "skip" --action "dbcompliance"`
|
|
1638
|
+
);
|
|
1639
|
+
console.log("--user (optional) [user to use for connection]");
|
|
1640
|
+
console.log("--password (optional) [password to use for connection]");
|
|
1641
|
+
console.log("--server (optional) [server to use for connection]");
|
|
1122
1642
|
console.log();
|
|
1123
|
-
console.log(
|
|
1124
|
-
|
|
1643
|
+
console.log(
|
|
1644
|
+
"update-oracle-database-configurations",
|
|
1645
|
+
"Bulk update oracle database configurations."
|
|
1646
|
+
);
|
|
1647
|
+
console.log("Parameters:");
|
|
1125
1648
|
console.log("--id [configuration id]");
|
|
1126
1649
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1127
|
-
console.log(
|
|
1128
|
-
|
|
1650
|
+
console.log(
|
|
1651
|
+
`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "dbcompliance"`
|
|
1652
|
+
);
|
|
1653
|
+
console.log("--user (optional) [the user to use for the connection]");
|
|
1654
|
+
console.log("--password (optional) [the password to use for the connection]");
|
|
1655
|
+
console.log("--server (optional) [the server to use for the connection]");
|
|
1129
1656
|
console.log("OR --json-updates [stringified json objects with your updates]");
|
|
1130
1657
|
console.log("For quick updates, you may use the above parameters");
|
|
1131
|
-
console.log(
|
|
1132
|
-
|
|
1133
|
-
|
|
1658
|
+
console.log(
|
|
1659
|
+
`e.g. opscompass license-manager update-oracle-database-configurations --id 57 --name "updatedName" --id 62 --name "otherUpdatedName" --id 77 --name "lastUpdatedName";`
|
|
1660
|
+
);
|
|
1661
|
+
console.log(
|
|
1662
|
+
"For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
|
|
1663
|
+
);
|
|
1664
|
+
console.log(
|
|
1665
|
+
`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\"}]'`
|
|
1666
|
+
);
|
|
1134
1667
|
console.log();
|
|
1135
|
-
console.log(
|
|
1668
|
+
console.log(
|
|
1669
|
+
"update-vcenter-configuration",
|
|
1670
|
+
"Update a single vcenter configuration."
|
|
1671
|
+
);
|
|
1136
1672
|
console.log("Parameters:");
|
|
1137
1673
|
console.log("--id [configuration id]");
|
|
1138
1674
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1139
|
-
console.log(
|
|
1675
|
+
console.log(
|
|
1676
|
+
"--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'vmotion']"
|
|
1677
|
+
);
|
|
1140
1678
|
console.log("--connection (optional) [the hostname or ip address]");
|
|
1141
1679
|
console.log("--user (optional) [connection username]");
|
|
1142
1680
|
console.log("--password (optional) [connection password]");
|
|
1143
1681
|
console.log();
|
|
1144
|
-
console.log(
|
|
1145
|
-
|
|
1682
|
+
console.log(
|
|
1683
|
+
"update-vcenter-configurations",
|
|
1684
|
+
"Bulk Update vcenter configurations."
|
|
1685
|
+
);
|
|
1686
|
+
console.log("Parameters:");
|
|
1146
1687
|
console.log("--id [configuration id]");
|
|
1147
1688
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1148
|
-
console.log(
|
|
1689
|
+
console.log(
|
|
1690
|
+
`--action (optional) pass multiple times to define which actions this connection can take e.g. --action "skip" --action "vmotion"`
|
|
1691
|
+
);
|
|
1149
1692
|
console.log("--connection (optional) [the hostname or ip address]");
|
|
1150
1693
|
console.log("--user (optional) [connection username]");
|
|
1151
1694
|
console.log("--password (optional) [connection password]");
|
|
1152
1695
|
console.log("OR --json-updates [stringified json objects with your updates]");
|
|
1153
1696
|
console.log("For quick updates, you may use the above parameters");
|
|
1154
|
-
console.log(
|
|
1155
|
-
|
|
1156
|
-
|
|
1697
|
+
console.log(
|
|
1698
|
+
`e.g. opscompass license-manager update-vcenter-configurations --id 137 --name "updatedName" --id 138 --name "otherUpdatedName" --id 144 --name "lastUpdatedName" --action "skip" --action "vmotion";`
|
|
1699
|
+
);
|
|
1700
|
+
console.log(
|
|
1701
|
+
"For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
|
|
1702
|
+
);
|
|
1703
|
+
console.log(
|
|
1704
|
+
`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\"]}]'`
|
|
1705
|
+
);
|
|
1157
1706
|
console.log();
|
|
1158
|
-
console.log(
|
|
1707
|
+
console.log(
|
|
1708
|
+
"delete-monitoring-configuration",
|
|
1709
|
+
"Delete a monitoring configuration"
|
|
1710
|
+
);
|
|
1159
1711
|
console.log("Parameters:");
|
|
1160
1712
|
console.log("--id [monitoring_configuration_id]");
|
|
1161
1713
|
console.log();
|
|
1162
|
-
console.log(
|
|
1714
|
+
console.log(
|
|
1715
|
+
"delete-network-discovery-configuration",
|
|
1716
|
+
"Delete a network discovery configuration"
|
|
1717
|
+
);
|
|
1163
1718
|
console.log("Parameters:");
|
|
1164
1719
|
console.log("--id [network_discovery_configuration_id]");
|
|
1165
1720
|
console.log();
|
|
1166
|
-
console.log(
|
|
1721
|
+
console.log(
|
|
1722
|
+
"delete-oracle-database-configuration",
|
|
1723
|
+
"Delete a oracle database configuration"
|
|
1724
|
+
);
|
|
1167
1725
|
console.log("Parameters:");
|
|
1168
1726
|
console.log("--id [oracle_database_configuration_id]");
|
|
1169
1727
|
console.log();
|
|
@@ -1175,87 +1733,157 @@ async function printHelp() {
|
|
|
1175
1733
|
console.log("Parameters:");
|
|
1176
1734
|
console.log("--id [msql_configuration_id]");
|
|
1177
1735
|
console.log();
|
|
1178
|
-
console.log(
|
|
1736
|
+
console.log(
|
|
1737
|
+
"update-msql-configuration",
|
|
1738
|
+
"Update a single msql configuration."
|
|
1739
|
+
);
|
|
1179
1740
|
console.log("Parameters:");
|
|
1180
1741
|
console.log("--id [configuration id]");
|
|
1181
1742
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1182
|
-
console.log(
|
|
1743
|
+
console.log(
|
|
1744
|
+
"--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'dblicensing'"
|
|
1745
|
+
);
|
|
1183
1746
|
console.log("--server (optional) [the server]");
|
|
1184
1747
|
console.log("--user (optional) [connection username]");
|
|
1185
1748
|
console.log("--password (optional) [connection password]");
|
|
1749
|
+
console.log("--directory-auth (optional) ['SESSION' or NULL]");
|
|
1186
1750
|
console.log();
|
|
1187
1751
|
console.log();
|
|
1188
1752
|
console.log("update-msql-configurations", "Bulk Update Msql Configurations.");
|
|
1189
|
-
console.log("Parameters:");
|
|
1753
|
+
console.log("Parameters:");
|
|
1190
1754
|
console.log("--id [configuration id]");
|
|
1191
1755
|
console.log("--name or --configuration-name (optional) [unique name]");
|
|
1192
|
-
console.log(
|
|
1193
|
-
|
|
1756
|
+
console.log(
|
|
1757
|
+
"--action (optional) pass multiple times to define which actions this connection can take e.g. --action 'skip' --action 'dblicensing'"
|
|
1758
|
+
);
|
|
1759
|
+
console.log("--server (optional) [the server]");
|
|
1194
1760
|
console.log("--user (optional) [connection username]");
|
|
1195
1761
|
console.log("--password (optional) [connection password]");
|
|
1762
|
+
console.log("--directory-auth (optional) ['SESSION' or NULL]");
|
|
1196
1763
|
console.log("OR --json-updates [stringified json objects with your updates]");
|
|
1197
1764
|
console.log("For quick updates, you may use the above parameters");
|
|
1198
|
-
console.log(
|
|
1199
|
-
|
|
1200
|
-
|
|
1765
|
+
console.log(
|
|
1766
|
+
`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"`
|
|
1767
|
+
);
|
|
1768
|
+
console.log(
|
|
1769
|
+
"For larger updates, JavaScript Object Notation (JSON) may be used with the --json-updates flag"
|
|
1770
|
+
);
|
|
1771
|
+
console.log(
|
|
1772
|
+
`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\"]}]'`
|
|
1773
|
+
);
|
|
1201
1774
|
console.log();
|
|
1202
|
-
console.log(
|
|
1203
|
-
|
|
1775
|
+
console.log(
|
|
1776
|
+
"get-mssql-entitlement-components",
|
|
1777
|
+
"Gets the components that can be used to build MSSql entitlement objects."
|
|
1778
|
+
);
|
|
1779
|
+
console.log("Parameters:");
|
|
1204
1780
|
console.log("--company [company_slug]");
|
|
1205
1781
|
console.log();
|
|
1206
|
-
console.log(
|
|
1207
|
-
|
|
1782
|
+
console.log(
|
|
1783
|
+
"create-mssql-entitlement",
|
|
1784
|
+
"Creates a Mssql Entitlement record."
|
|
1785
|
+
);
|
|
1786
|
+
console.log("Parameters:");
|
|
1208
1787
|
console.log("--company [company_slug]");
|
|
1209
1788
|
console.log("--purchase-date [Date] the date of purchase.");
|
|
1210
|
-
console.log(
|
|
1789
|
+
console.log(
|
|
1790
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
|
|
1791
|
+
);
|
|
1211
1792
|
console.log("--quantity [number] the number for this entry");
|
|
1212
|
-
console.log(
|
|
1213
|
-
|
|
1793
|
+
console.log(
|
|
1794
|
+
"--support-start (optional) [Date] the date when support started"
|
|
1795
|
+
);
|
|
1796
|
+
console.log(
|
|
1797
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
|
|
1798
|
+
);
|
|
1214
1799
|
console.log("--support-end (optional) [Date] the date when support ended");
|
|
1215
|
-
console.log(
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
console.log(
|
|
1219
|
-
|
|
1800
|
+
console.log(
|
|
1801
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
|
|
1802
|
+
);
|
|
1803
|
+
console.log(
|
|
1804
|
+
"--mssql-product [string] the slug of the associated mssql product"
|
|
1805
|
+
);
|
|
1806
|
+
console.log(
|
|
1807
|
+
"--mssql-edition [string] the slug of the associated mssql edition"
|
|
1808
|
+
);
|
|
1809
|
+
console.log(
|
|
1810
|
+
"--mssql-version [string] the slug of the associated mssql version"
|
|
1811
|
+
);
|
|
1812
|
+
console.log(
|
|
1813
|
+
"--mssql-metric [string] the slug of the associated mssql metric"
|
|
1814
|
+
);
|
|
1220
1815
|
console.log();
|
|
1221
|
-
console.log(
|
|
1222
|
-
|
|
1816
|
+
console.log(
|
|
1817
|
+
"update-mssql-entitlement",
|
|
1818
|
+
"Creates a Mssql Entitlement record."
|
|
1819
|
+
);
|
|
1820
|
+
console.log("Parameters:");
|
|
1223
1821
|
console.log("--company [company_slug]");
|
|
1224
1822
|
console.log("--id [number] the mssql entitlement record id");
|
|
1225
1823
|
console.log("--purchase-date [Date] the date of purchase.");
|
|
1226
|
-
console.log(
|
|
1824
|
+
console.log(
|
|
1825
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
|
|
1826
|
+
);
|
|
1227
1827
|
console.log("--quantity [number] the number for this entry");
|
|
1228
|
-
console.log(
|
|
1229
|
-
|
|
1828
|
+
console.log(
|
|
1829
|
+
"--support-start (optional) [Date] the date when support started"
|
|
1830
|
+
);
|
|
1831
|
+
console.log(
|
|
1832
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
|
|
1833
|
+
);
|
|
1230
1834
|
console.log("--support-end (optional) [Date] the date when support ended");
|
|
1231
|
-
console.log(
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
console.log(
|
|
1235
|
-
|
|
1835
|
+
console.log(
|
|
1836
|
+
"Format: UTC, example: '2022-08-23T17:00:00Z' to set August 8th, 2022 at 17:00 UTC."
|
|
1837
|
+
);
|
|
1838
|
+
console.log(
|
|
1839
|
+
"--mssql-product [string] the slug of the associated mssql product"
|
|
1840
|
+
);
|
|
1841
|
+
console.log(
|
|
1842
|
+
"--mssql-edition [string] the slug of the associated mssql edition"
|
|
1843
|
+
);
|
|
1844
|
+
console.log(
|
|
1845
|
+
"--mssql-version [string] the slug of the associated mssql version"
|
|
1846
|
+
);
|
|
1847
|
+
console.log(
|
|
1848
|
+
"--mssql-metric [string] the slug of the associated mssql metric"
|
|
1849
|
+
);
|
|
1236
1850
|
console.log();
|
|
1237
|
-
console.log(
|
|
1851
|
+
console.log(
|
|
1852
|
+
"delete-mssql-entitlements",
|
|
1853
|
+
"Deletes Mssql Entitlement records."
|
|
1854
|
+
);
|
|
1238
1855
|
console.log("Parameters:");
|
|
1239
1856
|
console.log("--company [string] The slug of the company.");
|
|
1240
|
-
console.log(
|
|
1857
|
+
console.log(
|
|
1858
|
+
"--id [string] Use parameter multiple times to delete multiple records."
|
|
1859
|
+
);
|
|
1241
1860
|
console.log();
|
|
1242
|
-
console.log("list-mssql-assessments", "Lists MSSQL Assessments")
|
|
1861
|
+
console.log("list-mssql-assessments", "Lists MSSQL Assessments");
|
|
1243
1862
|
console.log("Parameters:");
|
|
1244
1863
|
console.log("--company [string] The slug of the company.");
|
|
1245
1864
|
console.log();
|
|
1246
|
-
console.log("get-mssql-assessment", "Get Full MSSQL Assessment")
|
|
1865
|
+
console.log("get-mssql-assessment", "Get Full MSSQL Assessment");
|
|
1247
1866
|
console.log("Parameters:");
|
|
1248
1867
|
console.log("--assessmentId [number] The id of the assessment to retrieve.");
|
|
1249
1868
|
console.log();
|
|
1250
|
-
console.log(
|
|
1869
|
+
console.log(
|
|
1870
|
+
"get-mssql-assessment-entitlements",
|
|
1871
|
+
"Gets Entitlements for an MSSQL Assessment"
|
|
1872
|
+
);
|
|
1251
1873
|
console.log("Parameters:");
|
|
1252
1874
|
console.log("--assessmentId [number] The id of the assessment to retrieve.");
|
|
1253
1875
|
console.log();
|
|
1254
|
-
console.log(
|
|
1876
|
+
console.log(
|
|
1877
|
+
"get-mssql-assessment-license-usage-maps",
|
|
1878
|
+
"Gets LicenseUsageMaps for an MSSQL Assessment"
|
|
1879
|
+
);
|
|
1255
1880
|
console.log("Parameters:");
|
|
1256
1881
|
console.log("--assessmentId [number] The id of the assessment to retrieve.");
|
|
1257
1882
|
console.log();
|
|
1258
|
-
console.log(
|
|
1883
|
+
console.log(
|
|
1884
|
+
"get-mssql-assessment-resources",
|
|
1885
|
+
"Gets Resources for an MSSQL Assessment"
|
|
1886
|
+
);
|
|
1259
1887
|
console.log("Parameters:");
|
|
1260
1888
|
console.log("--assessmentId [number] The id of the assessment to retrieve.");
|
|
1261
1889
|
console.log();
|
|
@@ -1263,21 +1891,37 @@ async function printHelp() {
|
|
|
1263
1891
|
|
|
1264
1892
|
const licenseManagerModule = (action, ...args) => {
|
|
1265
1893
|
switch (action?.toLowerCase() ?? "") {
|
|
1266
|
-
case
|
|
1894
|
+
case "create-oracle-shared-credential":
|
|
1895
|
+
return createOracleSharedCredential(args);
|
|
1896
|
+
case "delete-oracle-shared-credential":
|
|
1897
|
+
return deleteOracleSharedCredential(args);
|
|
1898
|
+
case "get-oracle-default-credential":
|
|
1899
|
+
return getOracleDefaultCredential(args);
|
|
1900
|
+
case "update-oracle-shared-credential":
|
|
1901
|
+
return updateOracleSharedCredential(args);
|
|
1902
|
+
case "create-msql-shared-credential":
|
|
1903
|
+
return createMsqlSharedCredential(args);
|
|
1904
|
+
case "delete-msql-shared-credential":
|
|
1905
|
+
return deleteMsqlSharedCredential(args);
|
|
1906
|
+
case "get-msql-default-credential":
|
|
1907
|
+
return getMsqlDefaultCredential(args);
|
|
1908
|
+
case "update-msql-shared-credential":
|
|
1909
|
+
return updateMsqlSharedCredential(args);
|
|
1910
|
+
case "create-network-discovery-configuration":
|
|
1267
1911
|
return createNetworkDiscoveryConfiguration(args);
|
|
1268
|
-
case
|
|
1912
|
+
case "update-network-discovery-configuration":
|
|
1269
1913
|
return updateNetworkDiscoveryConfiguration(args);
|
|
1270
|
-
case
|
|
1914
|
+
case "list-mssql-assessments":
|
|
1271
1915
|
return listMssqlAssessments(args);
|
|
1272
|
-
case
|
|
1916
|
+
case "get-mssql-assessment":
|
|
1273
1917
|
return getMssqlAssessment(args);
|
|
1274
|
-
case
|
|
1918
|
+
case "get-mssql-assessment-entitlements":
|
|
1275
1919
|
return getMssqlAssessmentEntitlements(args);
|
|
1276
|
-
case
|
|
1920
|
+
case "get-mssql-assessment-license-usage-maps":
|
|
1277
1921
|
return getMssqlAssessmentLicenseUsageMaps(args);
|
|
1278
|
-
case
|
|
1922
|
+
case "get-mssql-assessment-resources":
|
|
1279
1923
|
return getMssqlAssessmentResources(args);
|
|
1280
|
-
case "get-secret-for-configuration":
|
|
1924
|
+
case "get-secret-for-configuration":
|
|
1281
1925
|
return getSecretForConfiguration(args);
|
|
1282
1926
|
case "list-monitoring-configurations":
|
|
1283
1927
|
return listMonitoringConfigurations(args);
|
|
@@ -1297,13 +1941,13 @@ const licenseManagerModule = (action, ...args) => {
|
|
|
1297
1941
|
return createMsqlConfiguration(args);
|
|
1298
1942
|
case "get-msql-configuration":
|
|
1299
1943
|
return getMsqlConfiguration(args);
|
|
1300
|
-
case "get-network-discovery-configuration":
|
|
1944
|
+
case "get-network-discovery-configuration":
|
|
1301
1945
|
return getNetworkDiscoveryConfiguration(args);
|
|
1302
1946
|
case "get-mssql-entitlements":
|
|
1303
1947
|
return getMssqlEntitlements(args);
|
|
1304
|
-
case "get-oracle-database-configuration":
|
|
1948
|
+
case "get-oracle-database-configuration":
|
|
1305
1949
|
return getOracleDatabaseConfiguration(args);
|
|
1306
|
-
case "list-oracle-database-configurations":
|
|
1950
|
+
case "list-oracle-database-configurations":
|
|
1307
1951
|
return listOracleDatabaseConfigurations(args);
|
|
1308
1952
|
case "create-oracle-database-configuration":
|
|
1309
1953
|
return createOracleDatabaseConfiguration(args);
|
|
@@ -1312,12 +1956,12 @@ const licenseManagerModule = (action, ...args) => {
|
|
|
1312
1956
|
case "update-oracle-database-configuration":
|
|
1313
1957
|
return updateOracleDatabaseConfiguration(args);
|
|
1314
1958
|
case "update-oracle-database-configurations":
|
|
1315
|
-
|
|
1959
|
+
return updateOracleDatabaseConfigurations(args);
|
|
1316
1960
|
case "update-vcenter-configuration":
|
|
1317
1961
|
return updateVCenterConfiguration(args);
|
|
1318
1962
|
case "update-vcenter-configurations":
|
|
1319
1963
|
return updateVCenterConfigurations(args);
|
|
1320
|
-
case "delete-network-discovery-configuration":
|
|
1964
|
+
case "delete-network-discovery-configuration":
|
|
1321
1965
|
return deleteNetworkDiscoveryConfiguration(args);
|
|
1322
1966
|
case "delete-monitoring-configuration":
|
|
1323
1967
|
return deleteMonitoringConfiguration(args);
|
|
@@ -1349,6 +1993,7 @@ const licenseManagerModule = (action, ...args) => {
|
|
|
1349
1993
|
};
|
|
1350
1994
|
|
|
1351
1995
|
licenseManagerModule.requiresLogin = true;
|
|
1352
|
-
licenseManagerModule.description =
|
|
1996
|
+
licenseManagerModule.description =
|
|
1997
|
+
"Provides access to details about License Management in OpsCompass.";
|
|
1353
1998
|
|
|
1354
1999
|
module.exports = licenseManagerModule;
|