@opscompass/opscompass-cli 1.0.30 → 1.0.32

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.
@@ -1372,6 +1372,55 @@ async function getMssqlAssessmentResources(args) {
1372
1372
  console.log(JSON.stringify(response, null, 2));
1373
1373
  }
1374
1374
 
1375
+ async function checkMssqlConfigMetadata(args) {
1376
+
1377
+ for (let i = 0; i < args.length - 1; i++) {
1378
+ switch (args[i].toLowerCase()) {
1379
+ case "--account-id":
1380
+ case "--accountid":
1381
+ callParams.accountId = args[++i];
1382
+ break;
1383
+ case "--company":
1384
+ callParams.company = args[++i];
1385
+ break;
1386
+ case "--last-collected-before":
1387
+ case "--lastcollectedbefore":
1388
+ callParams.lastCollectedBefore = args[++i];
1389
+ break;
1390
+ }
1391
+ }
1392
+
1393
+ const client = await getOpsCompassClient();
1394
+ const response = await client.licenseManager.checkMssqlConfigMetadata(callParams.accountId, callParams.company, callParams.lastCollectedBefore);
1395
+
1396
+ console.log(JSON.stringify(response, null, 2));
1397
+ }
1398
+
1399
+ async function checkOracleConfigMetadata(args) {
1400
+
1401
+ for (let i = 0; i < args.length - 1; i++) {
1402
+ switch (args[i].toLowerCase()) {
1403
+ case "--account-id":
1404
+ case "--accountid":
1405
+ callParams.accountId = args[++i];
1406
+ break;
1407
+ case "--company":
1408
+ callParams.company = args[++i];
1409
+ break;
1410
+ case "--last-collected-before":
1411
+ case "--lastcollectedbefore":
1412
+ callParams.lastCollectedBefore = args[++i];
1413
+ break;
1414
+ }
1415
+ }
1416
+
1417
+ const client = await getOpsCompassClient();
1418
+ const response = await client.licenseManager.checkOracleConfigMetadata(callParams.accountId, callParams.company, callParams.lastCollectedBefore);
1419
+
1420
+ console.log(JSON.stringify(response, null, 2));
1421
+ }
1422
+
1423
+
1375
1424
  async function printHelp() {
1376
1425
  console.log("Actions available for license-manager:");
1377
1426
  console.log();
@@ -1918,6 +1967,24 @@ async function printHelp() {
1918
1967
  console.log("Parameters:");
1919
1968
  console.log("--assessmentId [number] The id of the assessment to retrieve.");
1920
1969
  console.log();
1970
+ console.log(
1971
+ "check-mssql-config-metadata",
1972
+ "Checks the mssql configuration metadata for a company."
1973
+ );
1974
+ console.log("Parameters:");
1975
+ console.log("--accountId [string] The account id for the company.");
1976
+ console.log("--company [string] The company slug.");
1977
+ console.log("--lastCollectedBefore [string] (optional) Only returns records that have not been collected since the given date. Format: UTC, example: '2022-08-23T17:00:00Z'");
1978
+ console.log();
1979
+ console.log(
1980
+ "check-oracle-config-metadata",
1981
+ "Checks the oracle configuration metadata for a company."
1982
+ );
1983
+ console.log("Parameters:");
1984
+ console.log("--accountId [string] The account id for the company.");
1985
+ console.log("--company [string] The company slug.");
1986
+ console.log("--lastCollectedBefore [string] (optional) Only returns records that have not been collected since the given date. Format: UTC, example: '2022-08-23T17:00:00Z'");
1987
+ console.log();
1921
1988
  }
1922
1989
 
1923
1990
  const licenseManagerModule = (action, ...args) => {
@@ -2014,6 +2081,10 @@ const licenseManagerModule = (action, ...args) => {
2014
2081
  return updateMssqlEntitlement(args);
2015
2082
  case "delete-mssql-entitlements":
2016
2083
  return deleteMssqlEntitlements(args);
2084
+ case "check-mssql-config-metadata":
2085
+ return checkMssqlConfigMetadata(args);
2086
+ case "check-oracle-config-metadata":
2087
+ return checkOracleConfigMetadata(args);
2017
2088
  case "help":
2018
2089
  case "":
2019
2090
  return printHelp();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opscompass/opscompass-cli",
3
- "version": "1.0.30",
3
+ "version": "1.0.32",
4
4
  "description": "Calls OpsCompass's APIs",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -15,7 +15,7 @@
15
15
  "author": "opscompass",
16
16
  "license": "SEE LICENSE IN license.txt",
17
17
  "dependencies": {
18
- "@opscompass/opscompass-api": "^1.0.30",
18
+ "@opscompass/opscompass-api": "^1.0.32",
19
19
  "adm-zip": "^0.5.9",
20
20
  "axios": "^0.21.1",
21
21
  "fs-extra": "^10.1.0",