@broadcom/ops-for-zowe-cli 4.1.2 → 5.0.0-next.202401221923
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/LICENSE +1 -1
- package/README.md +8 -12
- package/lib/api/OpsProfilesConfig.js +10 -6
- package/lib/api/OpsProfilesConfig.js.map +1 -1
- package/lib/api/Show.d.ts +4 -3
- package/lib/api/Show.js +20 -6
- package/lib/api/Show.js.map +1 -1
- package/lib/api/Update.d.ts +2 -2
- package/lib/api/Update.js +40 -14
- package/lib/api/Update.js.map +1 -1
- package/lib/api/constants/Ops.constants.js +7 -5
- package/lib/api/constants/Ops.constants.js.map +1 -1
- package/lib/api/constants/PluginConstants.js +1 -1
- package/lib/api/constants/index.js +7 -3
- package/lib/api/constants/index.js.map +1 -1
- package/lib/api/doc/IShowResourceResponse.js +1 -1
- package/lib/api/doc/IShowRuleResponse.js +1 -1
- package/lib/api/doc/IShowRulesetResponse.d.ts +12 -0
- package/lib/api/doc/IShowRulesetResponse.js +25 -0
- package/lib/api/doc/IShowRulesetResponse.js.map +1 -0
- package/lib/api/index.js +7 -3
- package/lib/api/index.js.map +1 -1
- package/lib/api/utils/IOpsRestResponse.js +1 -1
- package/lib/api/utils/OpsRestClient.js +1 -1
- package/lib/api/utils/OpsRestUtils.d.ts +3 -2
- package/lib/api/utils/OpsRestUtils.js +20 -9
- package/lib/api/utils/OpsRestUtils.js.map +1 -1
- package/lib/api/utils/OpsTextUtils.js +14 -5
- package/lib/api/utils/OpsTextUtils.js.map +1 -1
- package/lib/api/utils/RuleListUtils.d.ts +1 -0
- package/lib/api/utils/RuleListUtils.js +36 -9
- package/lib/api/utils/RuleListUtils.js.map +1 -1
- package/lib/api/utils/RuleUtils.d.ts +4 -4
- package/lib/api/utils/RuleUtils.js +29 -13
- package/lib/api/utils/RuleUtils.js.map +1 -1
- package/lib/api/utils/RulesetListUtils.d.ts +4 -0
- package/lib/api/utils/RulesetListUtils.js +41 -0
- package/lib/api/utils/RulesetListUtils.js.map +1 -0
- package/lib/api/utils/RulesetUtils.d.ts +5 -0
- package/lib/api/utils/RulesetUtils.js +51 -0
- package/lib/api/utils/RulesetUtils.js.map +1 -0
- package/lib/api/utils/SSMResourceListUtils.js +21 -5
- package/lib/api/utils/SSMResourceListUtils.js.map +1 -1
- package/lib/api/utils/SSMUtils.d.ts +5 -4
- package/lib/api/utils/SSMUtils.js +80 -20
- package/lib/api/utils/SSMUtils.js.map +1 -1
- package/lib/api/utils/index.d.ts +4 -2
- package/lib/api/utils/index.js +11 -5
- package/lib/api/utils/index.js.map +1 -1
- package/lib/cli/OpsBaseHandler.js +1 -1
- package/lib/cli/ResourceParameterDefinitions.d.ts +1 -1
- package/lib/cli/ResourceParameterDefinitions.js +12 -7
- package/lib/cli/ResourceParameterDefinitions.js.map +1 -1
- package/lib/cli/RuleParameterDefinitions.js +2 -2
- package/lib/cli/RuleParameterDefinitions.js.map +1 -1
- package/lib/cli/RulesetParameterDefinitions.d.ts +5 -0
- package/lib/cli/RulesetParameterDefinitions.js +37 -0
- package/lib/cli/RulesetParameterDefinitions.js.map +1 -0
- package/lib/cli/disable/Disable.definition.js +3 -3
- package/lib/cli/disable/Disable.definition.js.map +1 -1
- package/lib/cli/disable/rule/Rule.definition.js +2 -2
- package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
- package/lib/cli/disable/rule/Rule.handler.js +3 -3
- package/lib/cli/disable/rule/Rule.handler.js.map +1 -1
- package/lib/cli/enable/Enable.definition.js +3 -4
- package/lib/cli/enable/Enable.definition.js.map +1 -1
- package/lib/cli/enable/rule/Rule.definition.js +2 -2
- package/lib/cli/enable/rule/Rule.definition.js.map +1 -1
- package/lib/cli/enable/rule/Rule.handler.js +2 -2
- package/lib/cli/enable/rule/Rule.handler.js.map +1 -1
- package/lib/cli/show/Show.definition.js +5 -4
- package/lib/cli/show/Show.definition.js.map +1 -1
- package/lib/cli/show/resource/Resource.definition.js +15 -5
- package/lib/cli/show/resource/Resource.definition.js.map +1 -1
- package/lib/cli/show/resource/Resource.handler.js +2 -2
- package/lib/cli/show/resource/Resource.handler.js.map +1 -1
- package/lib/cli/show/rule/Rule.definition.js +12 -2
- package/lib/cli/show/rule/Rule.definition.js.map +1 -1
- package/lib/cli/show/rule/Rule.handler.js +9 -4
- package/lib/cli/show/rule/Rule.handler.js.map +1 -1
- package/lib/cli/show/ruleset/Ruleset.definition.d.ts +17 -0
- package/lib/cli/show/ruleset/Ruleset.definition.js +70 -0
- package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -0
- package/lib/cli/show/ruleset/Ruleset.handler.d.ts +5 -0
- package/lib/cli/show/ruleset/Ruleset.handler.js +50 -0
- package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -0
- package/lib/cli/start/Start.definition.js +3 -3
- package/lib/cli/start/Start.definition.js.map +1 -1
- package/lib/cli/start/resource/Resource.definition.js +9 -9
- package/lib/cli/start/resource/Resource.definition.js.map +1 -1
- package/lib/cli/start/resource/Resource.handler.js +2 -2
- package/lib/cli/start/resource/Resource.handler.js.map +1 -1
- package/lib/cli/stop/Stop.definition.js +3 -3
- package/lib/cli/stop/Stop.definition.js.map +1 -1
- package/lib/cli/stop/resource/Resource.definition.js +9 -9
- package/lib/cli/stop/resource/Resource.definition.js.map +1 -1
- package/lib/cli/stop/resource/Resource.handler.js +2 -2
- package/lib/cli/stop/resource/Resource.handler.js.map +1 -1
- package/lib/healthCheck.handler.js +1 -1
- package/lib/imperative.js +17 -10
- package/lib/imperative.js.map +1 -1
- package/lib/index.d.ts +6 -4
- package/lib/index.js +13 -7
- package/lib/index.js.map +1 -1
- package/package.json +36 -38
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -42,27 +42,23 @@ To install the OPS/MVS® plug-in to the Zowe CLI from source, issue the followin
|
|
|
42
42
|
$ zowe plugins validate @broadcom/ops-for-zowe-cli
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
**Note:** For more information about using the install command,
|
|
46
|
-
see [Manage Plug-ins.](**REMOVED**)
|
|
47
|
-
|
|
48
45
|
## Uninstall the OPS/MVS® Plug-in From Zowe CLI
|
|
49
46
|
To uninstall the plug-in from Zowe CLI, issue the following command:
|
|
50
47
|
```sh
|
|
51
48
|
$ zowe plugins uninstall @broadcom/ops-for-zowe-cli
|
|
52
49
|
```
|
|
53
50
|
|
|
54
|
-
**Note:** For more information about using the uninstall command,
|
|
55
|
-
see [Manage Plug-ins.](**REMOVED**)
|
|
56
|
-
|
|
57
51
|
### Create an OPS/MVS® Profile
|
|
58
52
|
|
|
59
53
|
To create an OPS/MVS® plug-in profile gather the following data:
|
|
60
|
-
- The host name of the LPAR on which OPS/MVS® Web Services is running
|
|
61
|
-
- The OPS/MVS® Web Services port number
|
|
62
|
-
- A user name that has authority to access OPS/MVS® Web Services
|
|
63
|
-
- The password to the account
|
|
54
|
+
- The host name of the LPAR on which OPS/MVS® Web Services or OPS/MVS® REST API server is running
|
|
55
|
+
- The OPS/MVS® Web Services or OPS/MVS® REST API server port number
|
|
56
|
+
- A user name that has authority to access OPS/MVS® Web Services or OPS/MVS® REST API server
|
|
57
|
+
- The password to the account assigned to the user name
|
|
64
58
|
|
|
65
|
-
To create an OPS/MVS® profile,
|
|
59
|
+
To create an OPS/MVS® profile, edit the "global config" located at ~/'.zowe/zowe.config.json' file:
|
|
66
60
|
```sh
|
|
67
|
-
$ zowe
|
|
61
|
+
$ zowe config edit --gc
|
|
68
62
|
```
|
|
63
|
+
NOTE: See the 'zowe.config.example.json' file in this project for examples of
|
|
64
|
+
profiles for both OPS/MVS® Web Services or OPS/MVS® REST API server.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -29,8 +29,8 @@ exports.OpsProfilesConfig = [
|
|
|
29
29
|
type: "ops",
|
|
30
30
|
schema: {
|
|
31
31
|
type: "object",
|
|
32
|
-
title: "OPS Web Services session profile",
|
|
33
|
-
description: "The OPS Web Services session profile schema, where you specify your session information and credentials",
|
|
32
|
+
title: "OPS/MVS Web Services / REST API session profile",
|
|
33
|
+
description: "The OPS/MVS Web Services / REST API session profile schema, where you specify your session information and credentials",
|
|
34
34
|
properties: {
|
|
35
35
|
host: {
|
|
36
36
|
optionDefinition: OpsRestUtils_1.OpsRestUtils.HOST_OPTION,
|
|
@@ -61,21 +61,25 @@ exports.OpsProfilesConfig = [
|
|
|
61
61
|
subsystem: {
|
|
62
62
|
optionDefinition: OpsRestUtils_1.OpsRestUtils.SUBSYSTEM_OPTION,
|
|
63
63
|
type: "string"
|
|
64
|
+
},
|
|
65
|
+
restApi: {
|
|
66
|
+
optionDefinition: OpsRestUtils_1.OpsRestUtils.RESTAPI_OPTION,
|
|
67
|
+
type: "boolean"
|
|
64
68
|
}
|
|
65
69
|
},
|
|
70
|
+
// required: ["host", "port"],
|
|
66
71
|
},
|
|
67
|
-
// validationPlanModule: __dirname + "/OpsProfileValidationPlan",
|
|
68
72
|
createProfileExamples: [
|
|
69
73
|
{
|
|
70
74
|
options: "myLPAR --host lpar123 --port 8080 --user ibmuser --password !@#$^ --prot http --reject-unauthorized false",
|
|
71
|
-
description: "Create an OPS profile called 'myLPAR' to connect to OPS
|
|
75
|
+
description: "Create an OPS profile called 'myLPAR' to connect to OPS/MVS REST API at host lpar123 and port 8080, " +
|
|
72
76
|
"using http protocol, allowing self-signed certificates"
|
|
73
77
|
}
|
|
74
78
|
],
|
|
75
79
|
updateProfileExamples: [
|
|
76
80
|
{
|
|
77
81
|
options: "myLPAR --host lpar456",
|
|
78
|
-
description: "Update an OPS profile called 'myLPAR' to connect to OPS Web Services at host lpar456"
|
|
82
|
+
description: "Update an OPS profile called 'myLPAR' to connect to OPS/MVS Web Services at host lpar456"
|
|
79
83
|
},
|
|
80
84
|
{
|
|
81
85
|
options: "myLPAR --user user101 --password Km5sv78",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,uDAAoD;AAEvC,QAAA,iBAAiB,GAAuC;IACjE;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,uDAAoD;AAEvC,QAAA,iBAAiB,GAAuC;IACjE;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,iDAAiD;YACxD,WAAW,EAAE,wHAAwH;YACrI,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,eAAe;oBAC9C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,eAAe;oBAC9C,IAAI,EAAE,QAAQ;iBACjB;gBACD,kBAAkB,EAAE;oBAChB,gBAAgB,EAAE,2BAAY,CAAC,0BAA0B;oBACzD,IAAI,EAAE,SAAS;iBAClB;gBACD,SAAS,EAAE;oBACP,gBAAgB,EAAE,2BAAY,CAAC,gBAAgB;oBAC/C,IAAI,EAAE,QAAQ;iBACjB;gBACD,OAAO,EAAE;oBACL,gBAAgB,EAAE,2BAAY,CAAC,cAAc;oBAC7C,IAAI,EAAE,SAAS;iBAClB;aACJ;YACD,8BAA8B;SACjC;QACD,qBAAqB,EAAE;YACnB;gBACI,OAAO,EAAE,2GAA2G;gBACpH,WAAW,EAAE,sGAAsG;oBAC/G,wDAAwD;aAC/D;SACJ;QACD,qBAAqB,EAAE;YACnB;gBACI,OAAO,EAAE,uBAAuB;gBAChC,WAAW,EAAE,0FAA0F;aAC1G;YACD;gBACI,OAAO,EAAE,0CAA0C;gBACnD,WAAW,EAAE,sFAAsF;aACtG;SACJ;KACJ;CACJ,CAAC"}
|
package/lib/api/Show.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Session } from "@zowe/imperative";
|
|
1
|
+
import { IHandlerParameters, Session } from "@zowe/imperative";
|
|
2
2
|
import { IShowRuleResponse } from "./doc/IShowRuleResponse";
|
|
3
3
|
import { IShowResourceResponse } from "./doc/IShowResourceResponse";
|
|
4
|
-
export declare function showRule(session: Session, ruleSetName: string, ruleName: string, subSystem: string): Promise<IShowRuleResponse>;
|
|
5
|
-
export declare function showResource(session: Session, resourceName: string, table: string, subsystem: string): Promise<IShowResourceResponse>;
|
|
4
|
+
export declare function showRule(session: Session, ruleSetName: string, ruleName: string, restApi: boolean, subSystem: string): Promise<IShowRuleResponse>;
|
|
5
|
+
export declare function showResource(session: Session, resourceName: string, restApi: boolean, table: string, subsystem: string): Promise<IShowResourceResponse>;
|
|
6
|
+
export declare function showRuleset(session: Session, ruleSetName: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowRuleResponse>;
|
package/lib/api/Show.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -31,23 +31,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
31
31
|
});
|
|
32
32
|
};
|
|
33
33
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34
|
-
exports.showResource = exports.showRule = void 0;
|
|
34
|
+
exports.showRuleset = exports.showResource = exports.showRule = void 0;
|
|
35
35
|
const RuleUtils_1 = require("./utils/RuleUtils");
|
|
36
|
+
const RulesetUtils_1 = require("./utils/RulesetUtils");
|
|
36
37
|
const SSMUtils_1 = require("./utils/SSMUtils");
|
|
37
38
|
const constants_1 = require("./constants");
|
|
38
39
|
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
39
|
-
function showRule(session, ruleSetName, ruleName, subSystem) {
|
|
40
|
+
function showRule(session, ruleSetName, ruleName, restApi, subSystem) {
|
|
40
41
|
return __awaiter(this, void 0, void 0, function* () {
|
|
41
|
-
const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, subSystem);
|
|
42
|
+
const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
|
|
42
43
|
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers);
|
|
43
44
|
});
|
|
44
45
|
}
|
|
45
46
|
exports.showRule = showRule;
|
|
46
|
-
function showResource(session, resourceName, table, subsystem) {
|
|
47
|
+
function showResource(session, resourceName, restApi, table, subsystem) {
|
|
47
48
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resourceName, table, subsystem);
|
|
49
|
+
const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resourceName, restApi, table, subsystem);
|
|
49
50
|
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers);
|
|
50
51
|
});
|
|
51
52
|
}
|
|
52
53
|
exports.showResource = showResource;
|
|
54
|
+
function showRuleset(session, ruleSetName, restApi, subSystem, params) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
if (restApi) {
|
|
57
|
+
const rulesetUrl = RulesetUtils_1.RulesetUtils.getRulesetURL(session, ruleSetName, restApi, subSystem);
|
|
58
|
+
return OpsRestClient_1.OpsRestClient.getExpectJSON(session, rulesetUrl, constants_1.OpsConstants.headers);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
// Display message indicating 'show ruleset' not supported with web services
|
|
62
|
+
params.response.console.log("Command 'show ruleset' is only supported with the OPS/MVS REST API server");
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
exports.showRuleset = showRuleset;
|
|
53
67
|
//# sourceMappingURL=Show.js.map
|
package/lib/api/Show.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,iDAA8C;AAC9C,+CAA4C;AAC5C,2CAA2C;AAG3C,yDAAsD;AAEtD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,SAAiB;;
|
|
1
|
+
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,iDAA8C;AAC9C,uDAAoD;AACpD,+CAA4C;AAC5C,2CAA2C;AAG3C,yDAAsD;AAEtD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,OAAgB,EACzE,SAAiB;;QAC5C,MAAM,OAAO,GAAG,qBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QACzF,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IAC/E,CAAC;CAAA;AAJD,4BAIC;AAED,SAAsB,YAAY,CAAC,OAAgB,EAAE,YAAoB,EAAE,OAAgB,EAAE,KAAa,EACvE,SAAiB;;QAChD,MAAM,WAAW,GAAG,mBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC9F,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;CAAA;AAJD,oCAIC;AAED,SAAsB,WAAW,CAAC,OAAgB,EAAE,WAAmB,EAAE,OAAgB,EACvD,SAAiB,EAAE,MAA0B;;QAE3E,IAAI,OAAO,EAAE;YACT,MAAM,UAAU,GAAG,2BAAY,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;YACxF,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,UAAU,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;SACjF;aAAM;YACH,4EAA4E;YAC5E,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;SAC5G;IACL,CAAC;CAAA;AAVD,kCAUC"}
|
package/lib/api/Update.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Session } from "@zowe/imperative";
|
|
2
2
|
export declare function updateRule(session: Session, ruleSetName: string, ruleName: string, newStatus: string, // eslint-disable-line
|
|
3
|
-
subSystem?: string): Promise<{}>;
|
|
3
|
+
restApi: boolean, subSystem?: string): Promise<{}>;
|
|
4
4
|
/**
|
|
5
5
|
* updateResource
|
|
6
6
|
*/
|
|
7
|
-
export declare function updateResource(session: Session, resource: string, desiredState: string, subsystem?: string, // eslint-disable-line
|
|
7
|
+
export declare function updateResource(session: Session, resource: string, restApi: boolean, desiredState: string, subsystem?: string, // eslint-disable-line
|
|
8
8
|
table?: string, wait?: number): Promise<{}>;
|
package/lib/api/Update.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -40,31 +40,45 @@ const ResourceParameterDefinitions_1 = require("../cli/ResourceParameterDefiniti
|
|
|
40
40
|
const Show_1 = require("./Show");
|
|
41
41
|
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
42
42
|
function updateRule(session, ruleSetName, ruleName, newStatus, // eslint-disable-line
|
|
43
|
-
subSystem) {
|
|
43
|
+
restApi, subSystem) {
|
|
44
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, subSystem);
|
|
46
|
-
const
|
|
45
|
+
const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
|
|
46
|
+
const body = {
|
|
47
47
|
status: newStatus
|
|
48
48
|
};
|
|
49
|
-
|
|
49
|
+
if (restApi === false) {
|
|
50
|
+
return OpsRestClient_1.OpsRestClient.postExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, body);
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
return OpsRestClient_1.OpsRestClient.putExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers, body);
|
|
54
|
+
}
|
|
50
55
|
});
|
|
51
56
|
}
|
|
52
57
|
exports.updateRule = updateRule;
|
|
53
58
|
/**
|
|
54
59
|
* updateResource
|
|
55
60
|
*/
|
|
56
|
-
function updateResource(session, resource, desiredState, subsystem, // eslint-disable-line
|
|
61
|
+
function updateResource(session, resource, restApi, desiredState, subsystem, // eslint-disable-line
|
|
57
62
|
table, wait) {
|
|
58
63
|
return __awaiter(this, void 0, void 0, function* () {
|
|
59
64
|
if (wait != null) {
|
|
60
|
-
imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY, true, "Wait value must be between 0 and " + ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY + "(inclusive) if specified. " +
|
|
65
|
+
imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY, true, "Wait value must be between 0 and " + ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY + " (inclusive), if specified. " +
|
|
61
66
|
"You specified: " + wait);
|
|
62
67
|
}
|
|
63
|
-
const resourceUrl = SSMUtils_1.SSMUtils.
|
|
68
|
+
const resourceUrl = SSMUtils_1.SSMUtils.getResourceURLWithQueryParms(session, resource, restApi, table, subsystem);
|
|
64
69
|
const postBody = {
|
|
65
70
|
desired: desiredState
|
|
66
71
|
};
|
|
67
|
-
const
|
|
72
|
+
const postBodyRestApi = {
|
|
73
|
+
desiredState: desiredState
|
|
74
|
+
};
|
|
75
|
+
let response;
|
|
76
|
+
if (restApi) {
|
|
77
|
+
response = yield OpsRestClient_1.OpsRestClient.putExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers, postBodyRestApi);
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers, postBody);
|
|
81
|
+
}
|
|
68
82
|
if (wait == null) {
|
|
69
83
|
// if we're not waiting, just return immediately
|
|
70
84
|
return response;
|
|
@@ -72,19 +86,31 @@ table, wait) {
|
|
|
72
86
|
else {
|
|
73
87
|
// we are waiting, so set up the polling to determine if current = desired state
|
|
74
88
|
// did we happen to instantly start/ stop the resource the first time? check
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
let currentState = "";
|
|
90
|
+
if (restApi) {
|
|
91
|
+
if (response.currentState.toUpperCase() === desiredState.toUpperCase())
|
|
92
|
+
return response;
|
|
93
|
+
currentState = response.currentState;
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
if (response.ssmresource[0].current.toUpperCase() === desiredState.toUpperCase())
|
|
97
|
+
return response;
|
|
98
|
+
currentState = response.ssmresource[0].current;
|
|
77
99
|
}
|
|
78
100
|
// otherwise we have to poll
|
|
79
101
|
let pollResponse;
|
|
80
|
-
let currentState = response.ssmresource[0].current;
|
|
81
102
|
const ONE_SECOND = 1000;
|
|
82
103
|
const start = new Date().getTime();
|
|
83
104
|
// looping with 'wait' value as max was taking approximately twice the requested time
|
|
84
105
|
// so use the actual time to calculate when the 'wait' time is exceeded
|
|
85
106
|
while (((new Date().getTime() - start) / ONE_SECOND) < wait) {
|
|
86
|
-
pollResponse = yield Show_1.showResource(session, resource, table, subsystem);
|
|
87
|
-
|
|
107
|
+
pollResponse = yield (0, Show_1.showResource)(session, resource, restApi, table, subsystem);
|
|
108
|
+
if (restApi) {
|
|
109
|
+
currentState = pollResponse[0].currentState;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
currentState = pollResponse.ssmresource[0].current;
|
|
113
|
+
}
|
|
88
114
|
if (currentState.toUpperCase() === desiredState.toUpperCase()) {
|
|
89
115
|
// successfully waited until the desired state equaled the current state
|
|
90
116
|
return pollResponse;
|
package/lib/api/Update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../src/api/Update.ts"],"names":[],"m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6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -30,12 +30,14 @@ exports.OpsConstants = {
|
|
|
30
30
|
APP_URL: "/opsmvs/api",
|
|
31
31
|
VERSION: "v1",
|
|
32
32
|
BASE_URL: "/opsmvs/api/v1",
|
|
33
|
-
AOF_URL: "/
|
|
34
|
-
|
|
33
|
+
AOF_URL: "/api/v1/aof",
|
|
34
|
+
OPSMVS_URL: "/opsmvs",
|
|
35
|
+
RULES_URL: "/api/v1/aof/rules",
|
|
36
|
+
RULESET_URL: "/api/v1/aof/rulesets",
|
|
35
37
|
RULE_URL: "/rules",
|
|
36
38
|
STATUS_URL: "/status",
|
|
37
|
-
SSM_URL: "/
|
|
38
|
-
RESOURCES_URL: "/
|
|
39
|
+
SSM_URL: "/api/v1/ssm",
|
|
40
|
+
RESOURCES_URL: "/api/v1/ssm/resources",
|
|
39
41
|
STATE_URL: "/state",
|
|
40
42
|
headers: [{ "Content-Type": "application/json" }, { Accept: "application/json" }]
|
|
41
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Ops.constants.js","sourceRoot":"","sources":["../../../src/api/constants/Ops.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACU,QAAA,YAAY,GAA2B;IAChD,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"Ops.constants.js","sourceRoot":"","sources":["../../../src/api/constants/Ops.constants.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH;;GAEG;AACU,QAAA,YAAY,GAA2B;IAChD,OAAO,EAAE,aAAa;IACtB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,gBAAgB;IAC1B,OAAO,EAAE,aAAa;IACtB,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,sBAAsB;IACnC,QAAQ,EAAE,QAAQ;IAClB,UAAU,EAAE,SAAS;IACrB,OAAO,EAAE,aAAa;IACtB,aAAa,EAAE,uBAAuB;IACtC,SAAS,EAAE,QAAQ;IACnB,OAAO,EAAE,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC;CACjF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -23,13 +23,17 @@
|
|
|
23
23
|
*/
|
|
24
24
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
25
|
if (k2 === undefined) k2 = k;
|
|
26
|
-
Object.
|
|
26
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
27
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
28
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
29
|
+
}
|
|
30
|
+
Object.defineProperty(o, k2, desc);
|
|
27
31
|
}) : (function(o, m, k, k2) {
|
|
28
32
|
if (k2 === undefined) k2 = k;
|
|
29
33
|
o[k2] = m[k];
|
|
30
34
|
}));
|
|
31
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
37
|
};
|
|
34
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
39
|
__exportStar(require("./Ops.constants"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/constants/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/api/constants/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,kDAAgC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
|
+
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
|
+
*
|
|
6
|
+
* This software and all information contained therein is
|
|
7
|
+
* confidential and proprietary and shall not be duplicated,
|
|
8
|
+
* used, disclosed, or disseminated in any way except as
|
|
9
|
+
* authorized by the applicable license agreement, without the
|
|
10
|
+
* express written permission of Broadcom. All authorized
|
|
11
|
+
* reproductions must be marked with this language.
|
|
12
|
+
*
|
|
13
|
+
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO
|
|
14
|
+
* THE EXTENT PERMITTED BY APPLICABLE LAW, BROADCOM PROVIDES THIS
|
|
15
|
+
* SOFTWARE WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT
|
|
16
|
+
* LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR
|
|
17
|
+
* FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL BROADCOM
|
|
18
|
+
* BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR
|
|
19
|
+
* DAMAGE, DIRECT OR INDIRECT, FROM THE USE OF THIS SOFTWARE,
|
|
20
|
+
* INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS
|
|
21
|
+
* INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF BROADCOM IS
|
|
22
|
+
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
|
|
23
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
//# sourceMappingURL=IShowRulesetResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IShowRulesetResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IShowRulesetResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
package/lib/api/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -23,13 +23,17 @@
|
|
|
23
23
|
*/
|
|
24
24
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
25
25
|
if (k2 === undefined) k2 = k;
|
|
26
|
-
Object.
|
|
26
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
27
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
28
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
29
|
+
}
|
|
30
|
+
Object.defineProperty(o, k2, desc);
|
|
27
31
|
}) : (function(o, m, k, k2) {
|
|
28
32
|
if (k2 === undefined) k2 = k;
|
|
29
33
|
o[k2] = m[k];
|
|
30
34
|
}));
|
|
31
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
-
for (var p in m) if (p !== "default" && !
|
|
36
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
37
|
};
|
|
34
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
39
|
__exportStar(require("./Show"), exports);
|
package/lib/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,8DAA4C;AAC5C,0DAAwC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ICommandDefinitionPassOn, ICommandOptionDefinition } from "@zowe/imperative";
|
|
2
2
|
/**
|
|
3
|
-
* Class to hold APIs related to OPS Web Services
|
|
3
|
+
* Class to hold APIs related to OPS/MVS Web Services / REST API
|
|
4
4
|
* @export
|
|
5
5
|
* @class OpsRestUtils
|
|
6
6
|
*/
|
|
@@ -9,7 +9,7 @@ export declare class OpsRestUtils {
|
|
|
9
9
|
static readonly VERSION: string;
|
|
10
10
|
static readonly BASE_URL: string;
|
|
11
11
|
static readonly AOF_URL: string;
|
|
12
|
-
static readonly OPS_CONNECTION_GROUP = "OPS
|
|
12
|
+
static readonly OPS_CONNECTION_GROUP = "OPS/MVS Web Services / REST API connection options";
|
|
13
13
|
static HOST_OPTION: ICommandOptionDefinition;
|
|
14
14
|
static PORT_OPTION: ICommandOptionDefinition;
|
|
15
15
|
static USER_OPTION: ICommandOptionDefinition;
|
|
@@ -17,6 +17,7 @@ export declare class OpsRestUtils {
|
|
|
17
17
|
static PROTOCOL_OPTION: ICommandOptionDefinition;
|
|
18
18
|
static REJECT_UNAUTHORIZED_OPTION: ICommandOptionDefinition;
|
|
19
19
|
static SUBSYSTEM_OPTION: ICommandOptionDefinition;
|
|
20
|
+
static RESTAPI_OPTION: ICommandOptionDefinition;
|
|
20
21
|
static OPS_CONNECTION_OPTIONS: ICommandOptionDefinition[];
|
|
21
22
|
/**
|
|
22
23
|
* Using the passOn feature of imperative, we can make all child commands
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/*
|
|
3
|
-
* Copyright (c)
|
|
3
|
+
* Copyright (c) 2024 Broadcom. All Rights Reserved. The term
|
|
4
4
|
* "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
|
|
5
5
|
*
|
|
6
6
|
* This software and all information contained therein is
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
25
|
exports.OpsRestUtils = void 0;
|
|
26
26
|
/**
|
|
27
|
-
* Class to hold APIs related to OPS Web Services
|
|
27
|
+
* Class to hold APIs related to OPS/MVS Web Services / REST API
|
|
28
28
|
* @export
|
|
29
29
|
* @class OpsRestUtils
|
|
30
30
|
*/
|
|
@@ -36,37 +36,37 @@ OpsRestUtils.VERSION = "v1";
|
|
|
36
36
|
// public static serviceID: string = "serviceId";
|
|
37
37
|
OpsRestUtils.BASE_URL = OpsRestUtils.APP_URL + "/" + OpsRestUtils.VERSION;
|
|
38
38
|
OpsRestUtils.AOF_URL = OpsRestUtils.BASE_URL + "/aof";
|
|
39
|
-
OpsRestUtils.OPS_CONNECTION_GROUP = "OPS
|
|
39
|
+
OpsRestUtils.OPS_CONNECTION_GROUP = "OPS/MVS Web Services / REST API connection options";
|
|
40
40
|
OpsRestUtils.HOST_OPTION = {
|
|
41
|
-
description: "The hostname of the server where OPS Web Services is running.",
|
|
41
|
+
description: "The hostname of the server where OPS/MVS Web Services / REST API is running.",
|
|
42
42
|
type: "string",
|
|
43
43
|
name: "host",
|
|
44
44
|
required: false,
|
|
45
45
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
46
46
|
};
|
|
47
47
|
OpsRestUtils.PORT_OPTION = {
|
|
48
|
-
description: "The port number for OPS Web Services.",
|
|
48
|
+
description: "The port number for OPS/MVS Web Services / REST API.",
|
|
49
49
|
type: "number",
|
|
50
50
|
name: "port", aliases: ["p"],
|
|
51
51
|
required: false,
|
|
52
52
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
53
53
|
};
|
|
54
54
|
OpsRestUtils.USER_OPTION = {
|
|
55
|
-
description: "Your z/OS user name used to authenticate to OPS Web Services",
|
|
55
|
+
description: "Your z/OS user name that is used to authenticate to OPS/MVS Web Services / REST API.",
|
|
56
56
|
type: "string",
|
|
57
57
|
name: "user",
|
|
58
58
|
required: false,
|
|
59
59
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
60
60
|
};
|
|
61
61
|
OpsRestUtils.PASSWORD_OPTION = {
|
|
62
|
-
description: "Your z/OS password used to authenticate to OPS Web Services",
|
|
62
|
+
description: "Your z/OS password that is used to authenticate to OPS/MVS Web Services / REST API.",
|
|
63
63
|
type: "string",
|
|
64
64
|
name: "password", aliases: ["pass"],
|
|
65
65
|
required: false,
|
|
66
66
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
67
67
|
};
|
|
68
68
|
OpsRestUtils.PROTOCOL_OPTION = {
|
|
69
|
-
description: "The protocol used for connecting to OPS Web Services",
|
|
69
|
+
description: "The protocol that is used for connecting to OPS/MVS Web Services / REST API.",
|
|
70
70
|
type: "string",
|
|
71
71
|
name: "protocol", aliases: ["prot"],
|
|
72
72
|
defaultValue: "https",
|
|
@@ -89,6 +89,16 @@ OpsRestUtils.SUBSYSTEM_OPTION = {
|
|
|
89
89
|
description: "Specifies the subsystem id of the OPS/MVS instance to which commands will be directed.",
|
|
90
90
|
type: "string",
|
|
91
91
|
name: "subsystem", aliases: ["subs"],
|
|
92
|
+
defaultValue: "OPSS",
|
|
93
|
+
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
94
|
+
};
|
|
95
|
+
OpsRestUtils.RESTAPI_OPTION = {
|
|
96
|
+
description: "If set to true, the plugin executes the command against the OPS/MVS REST API. If " +
|
|
97
|
+
"set to false, the plugin executes against the OPS/MVS Web Services.",
|
|
98
|
+
type: "boolean",
|
|
99
|
+
name: "rest-api", aliases: ["ra"],
|
|
100
|
+
defaultValue: false,
|
|
101
|
+
required: false,
|
|
92
102
|
group: OpsRestUtils.OPS_CONNECTION_GROUP
|
|
93
103
|
};
|
|
94
104
|
OpsRestUtils.OPS_CONNECTION_OPTIONS = [
|
|
@@ -98,7 +108,8 @@ OpsRestUtils.OPS_CONNECTION_OPTIONS = [
|
|
|
98
108
|
OpsRestUtils.PORT_OPTION,
|
|
99
109
|
OpsRestUtils.REJECT_UNAUTHORIZED_OPTION,
|
|
100
110
|
OpsRestUtils.PROTOCOL_OPTION,
|
|
101
|
-
OpsRestUtils.SUBSYSTEM_OPTION
|
|
111
|
+
OpsRestUtils.SUBSYSTEM_OPTION,
|
|
112
|
+
OpsRestUtils.RESTAPI_OPTION
|
|
102
113
|
];
|
|
103
114
|
/**
|
|
104
115
|
* Using the passOn feature of imperative, we can make all child commands
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsRestUtils.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAIH;;;;GAIG;AACH,MAAa,YAAY;;AAAzB,
|
|
1
|
+
{"version":3,"file":"OpsRestUtils.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAIH;;;;GAIG;AACH,MAAa,YAAY;;AAAzB,oCAwGC;AAtG0B,oBAAO,GAAW,aAAa,CAAC;AAChC,oBAAO,GAAW,IAAI,CAAC;AAC9C,iDAAiD;AAC1B,qBAAQ,GAAG,YAAY,CAAC,OAAO,GAAG,GAAG,GAAG,YAAY,CAAC,OAAO,CAAC;AAC7D,oBAAO,GAAW,YAAY,CAAC,QAAQ,GAAG,MAAM,CAAC;AACjD,iCAAoB,GAAG,oDAAo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