@broadcom/ops-for-zowe-cli 5.0.0-next.202401231457 → 5.0.0-next.202408061338
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/README.md +154 -73
- package/lib/api/Execute.d.ts +5 -0
- package/lib/api/Execute.js +138 -0
- package/lib/api/Execute.js.map +1 -0
- package/lib/api/OpsProfilesConfig.js +5 -19
- package/lib/api/OpsProfilesConfig.js.map +1 -1
- package/lib/api/Show.d.ts +8 -1
- package/lib/api/Show.js +57 -7
- package/lib/api/Show.js.map +1 -1
- package/lib/api/Update.js +57 -45
- package/lib/api/Update.js.map +1 -1
- package/lib/api/constants/Ops.constants.js +17 -8
- package/lib/api/constants/Ops.constants.js.map +1 -1
- package/lib/api/doc/IExecuteRexxResponse.d.ts +9 -0
- package/lib/api/doc/IExecuteRexxResponse.js +34 -0
- package/lib/api/doc/IExecuteRexxResponse.js.map +1 -0
- package/lib/api/doc/IShowLognameResponse.d.ts +12 -0
- package/lib/api/doc/IShowLognameResponse.js +25 -0
- package/lib/api/doc/IShowLognameResponse.js.map +1 -0
- package/lib/api/doc/IShowStatusResponse.d.ts +13 -0
- package/lib/api/doc/IShowStatusResponse.js +25 -0
- package/lib/api/doc/IShowStatusResponse.js.map +1 -0
- package/lib/api/doc/IShowSubsystemsResponse.d.ts +12 -0
- package/lib/api/doc/IShowSubsystemsResponse.js +25 -0
- package/lib/api/doc/IShowSubsystemsResponse.js.map +1 -0
- package/lib/api/index.d.ts +6 -0
- package/lib/api/index.js +6 -0
- package/lib/api/index.js.map +1 -1
- package/lib/api/utils/LognameListUtils.d.ts +12 -0
- package/lib/api/utils/LognameListUtils.js +104 -0
- package/lib/api/utils/LognameListUtils.js.map +1 -0
- package/lib/api/utils/LognameUtils.d.ts +4 -0
- package/lib/api/utils/LognameUtils.js +41 -0
- package/lib/api/utils/LognameUtils.js.map +1 -0
- package/lib/api/utils/OpsRestClient.js +2 -0
- package/lib/api/utils/OpsRestClient.js.map +1 -1
- package/lib/api/utils/OpsRestUtils.d.ts +1 -0
- package/lib/api/utils/OpsRestUtils.js +18 -6
- package/lib/api/utils/OpsRestUtils.js.map +1 -1
- package/lib/api/utils/OpsTextUtils.d.ts +1 -1
- package/lib/api/utils/OpsTextUtils.js +8 -4
- package/lib/api/utils/OpsTextUtils.js.map +1 -1
- package/lib/api/utils/RexxListUtils.d.ts +9 -0
- package/lib/api/utils/RexxListUtils.js +146 -0
- package/lib/api/utils/RexxListUtils.js.map +1 -0
- package/lib/api/utils/RexxUtils.d.ts +5 -0
- package/lib/api/utils/RexxUtils.js +48 -0
- package/lib/api/utils/RexxUtils.js.map +1 -0
- package/lib/api/utils/RuleListUtils.d.ts +15 -3
- package/lib/api/utils/RuleListUtils.js +173 -21
- package/lib/api/utils/RuleListUtils.js.map +1 -1
- package/lib/api/utils/RuleUtils.d.ts +1 -3
- package/lib/api/utils/RuleUtils.js +21 -39
- package/lib/api/utils/RuleUtils.js.map +1 -1
- package/lib/api/utils/RulesetListUtils.d.ts +9 -1
- package/lib/api/utils/RulesetListUtils.js +102 -4
- package/lib/api/utils/RulesetListUtils.js.map +1 -1
- package/lib/api/utils/RulesetUtils.d.ts +0 -1
- package/lib/api/utils/RulesetUtils.js +6 -10
- package/lib/api/utils/RulesetUtils.js.map +1 -1
- package/lib/api/utils/SSMResourceListUtils.d.ts +14 -1
- package/lib/api/utils/SSMResourceListUtils.js +274 -17
- package/lib/api/utils/SSMResourceListUtils.js.map +1 -1
- package/lib/api/utils/{SSMUtils.d.ts → SSMResourceUtils.d.ts} +2 -3
- package/lib/api/utils/{SSMUtils.js → SSMResourceUtils.js} +39 -66
- package/lib/api/utils/SSMResourceUtils.js.map +1 -0
- package/lib/api/utils/StatusListUtils.d.ts +9 -0
- package/lib/api/utils/StatusListUtils.js +100 -0
- package/lib/api/utils/StatusListUtils.js.map +1 -0
- package/lib/api/utils/StatusUtils.d.ts +4 -0
- package/lib/api/utils/StatusUtils.js +37 -0
- package/lib/api/utils/StatusUtils.js.map +1 -0
- package/lib/api/utils/SubsystemListUtils.d.ts +12 -0
- package/lib/api/utils/SubsystemListUtils.js +104 -0
- package/lib/api/utils/SubsystemListUtils.js.map +1 -0
- package/lib/api/utils/SubsystemUtils.d.ts +4 -0
- package/lib/api/utils/SubsystemUtils.js +37 -0
- package/lib/api/utils/SubsystemUtils.js.map +1 -0
- package/lib/api/utils/index.d.ts +9 -1
- package/lib/api/utils/index.js +9 -1
- package/lib/api/utils/index.js.map +1 -1
- package/lib/cli/LognameParameterDefinitions.d.ts +4 -0
- package/lib/cli/LognameParameterDefinitions.js +40 -0
- package/lib/cli/LognameParameterDefinitions.js.map +1 -0
- package/lib/cli/OpsBaseHandler.js +4 -2
- package/lib/cli/OpsBaseHandler.js.map +1 -1
- package/lib/cli/ResourceParameterDefinitions.d.ts +1 -1
- package/lib/cli/ResourceParameterDefinitions.js +9 -4
- package/lib/cli/ResourceParameterDefinitions.js.map +1 -1
- package/lib/cli/RexxParameterDefinitions.d.ts +14 -0
- package/lib/cli/RexxParameterDefinitions.js +125 -0
- package/lib/cli/RexxParameterDefinitions.js.map +1 -0
- package/lib/cli/RuleParameterDefinitions.d.ts +2 -1
- package/lib/cli/RuleParameterDefinitions.js +11 -0
- package/lib/cli/RuleParameterDefinitions.js.map +1 -1
- package/lib/cli/RulesetParameterDefinitions.d.ts +1 -0
- package/lib/cli/RulesetParameterDefinitions.js +11 -0
- package/lib/cli/RulesetParameterDefinitions.js.map +1 -1
- package/lib/cli/StatusParameterDefinitions.d.ts +4 -0
- package/lib/cli/StatusParameterDefinitions.js +40 -0
- package/lib/cli/StatusParameterDefinitions.js.map +1 -0
- package/lib/cli/SubsystemsParameterDefinitions.d.ts +4 -0
- package/lib/cli/SubsystemsParameterDefinitions.js +40 -0
- package/lib/cli/SubsystemsParameterDefinitions.js.map +1 -0
- package/lib/cli/disable/Disable.definition.js +2 -2
- package/lib/cli/disable/Disable.definition.js.map +1 -1
- package/lib/cli/disable/rule/Rule.definition.js +3 -1
- package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
- package/lib/cli/disable/rule/Rule.handler.js +1 -1
- package/lib/cli/disable/rule/Rule.handler.js.map +1 -1
- package/lib/cli/enable/Enable.definition.js +2 -2
- package/lib/cli/enable/Enable.definition.js.map +1 -1
- package/lib/cli/enable/rule/Rule.handler.js +1 -1
- package/lib/cli/enable/rule/Rule.handler.js.map +1 -1
- package/lib/cli/execute/Execute.definition.d.ts +3 -0
- package/lib/cli/execute/Execute.definition.js +35 -0
- package/lib/cli/execute/Execute.definition.js.map +1 -0
- package/lib/cli/execute/rexx/Rexx.definition.d.ts +2 -0
- package/lib/cli/execute/rexx/Rexx.definition.js +55 -0
- package/lib/cli/execute/rexx/Rexx.definition.js.map +1 -0
- package/lib/cli/execute/rexx/Rexx.handler.d.ts +5 -0
- package/lib/cli/execute/rexx/Rexx.handler.js +46 -0
- package/lib/cli/execute/rexx/Rexx.handler.js.map +1 -0
- package/lib/cli/show/Show.definition.js +10 -5
- package/lib/cli/show/Show.definition.js.map +1 -1
- package/lib/cli/show/logname/Logname.definition.d.ts +17 -0
- package/lib/cli/show/logname/Logname.definition.js +62 -0
- package/lib/cli/show/logname/Logname.definition.js.map +1 -0
- package/lib/cli/show/logname/Logname.handler.d.ts +5 -0
- package/lib/cli/show/logname/Logname.handler.js +49 -0
- package/lib/cli/show/logname/Logname.handler.js.map +1 -0
- package/lib/cli/show/resource/Resource.definition.js +3 -1
- package/lib/cli/show/resource/Resource.definition.js.map +1 -1
- package/lib/cli/show/resource/Resource.handler.js +3 -3
- package/lib/cli/show/resource/Resource.handler.js.map +1 -1
- package/lib/cli/show/rule/Rule.definition.d.ts +1 -1
- package/lib/cli/show/rule/Rule.definition.js +9 -7
- package/lib/cli/show/rule/Rule.definition.js.map +1 -1
- package/lib/cli/show/rule/Rule.handler.js +5 -5
- package/lib/cli/show/rule/Rule.handler.js.map +1 -1
- package/lib/cli/show/ruleset/Ruleset.definition.js +1 -0
- package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -1
- package/lib/cli/show/ruleset/Ruleset.handler.js +3 -4
- package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -1
- package/lib/cli/show/status/Status.definition.d.ts +17 -0
- package/lib/cli/show/status/Status.definition.js +62 -0
- package/lib/cli/show/status/Status.definition.js.map +1 -0
- package/lib/cli/show/status/Status.handler.d.ts +5 -0
- package/lib/cli/show/status/Status.handler.js +49 -0
- package/lib/cli/show/status/Status.handler.js.map +1 -0
- package/lib/cli/show/subsystem/Subsystem.definition.d.ts +17 -0
- package/lib/cli/show/subsystem/Subsystem.definition.js +62 -0
- package/lib/cli/show/subsystem/Subsystem.definition.js.map +1 -0
- package/lib/cli/show/subsystem/Subsystem.handler.d.ts +5 -0
- package/lib/cli/show/subsystem/Subsystem.handler.js +49 -0
- package/lib/cli/show/subsystem/Subsystem.handler.js.map +1 -0
- package/lib/cli/start/Start.definition.js +2 -2
- package/lib/cli/start/Start.definition.js.map +1 -1
- package/lib/cli/start/resource/Resource.handler.js +3 -4
- package/lib/cli/start/resource/Resource.handler.js.map +1 -1
- package/lib/cli/stop/Stop.definition.js +2 -2
- package/lib/cli/stop/Stop.definition.js.map +1 -1
- package/lib/cli/stop/resource/Resource.definition.js +1 -1
- package/lib/cli/stop/resource/Resource.handler.js +3 -4
- package/lib/cli/stop/resource/Resource.handler.js.map +1 -1
- package/lib/healthCheck.handler.js +2 -1
- package/lib/healthCheck.handler.js.map +1 -1
- package/lib/imperative.js +0 -2
- package/lib/imperative.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/package.json +25 -24
- package/lib/api/utils/SSMUtils.js.map +0 -1
package/lib/api/Update.js
CHANGED
|
@@ -34,15 +34,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
34
34
|
exports.updateResource = exports.updateRule = void 0;
|
|
35
35
|
const imperative_1 = require("@zowe/imperative");
|
|
36
36
|
const constants_1 = require("./constants");
|
|
37
|
-
const
|
|
38
|
-
const SSMUtils_1 = require("./utils/SSMUtils");
|
|
37
|
+
const utils_1 = require("./utils");
|
|
39
38
|
const ResourceParameterDefinitions_1 = require("../cli/ResourceParameterDefinitions");
|
|
40
39
|
const Show_1 = require("./Show");
|
|
41
40
|
const OpsRestClient_1 = require("./utils/OpsRestClient");
|
|
42
41
|
function updateRule(session, ruleSetName, ruleName, newStatus, // eslint-disable-line
|
|
43
42
|
restApi, subSystem) {
|
|
44
43
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
-
const ruleUrl =
|
|
44
|
+
const ruleUrl = utils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
|
|
46
45
|
const body = {
|
|
47
46
|
status: newStatus
|
|
48
47
|
};
|
|
@@ -62,10 +61,9 @@ function updateResource(session, resource, restApi, desiredState, subsystem, //
|
|
|
62
61
|
table, wait) {
|
|
63
62
|
return __awaiter(this, void 0, void 0, function* () {
|
|
64
63
|
if (wait != null) {
|
|
65
|
-
imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= ResourceParameterDefinitions_1.ResourceParameterDefinitions.ONE_DAY, true,
|
|
66
|
-
"You specified: " + wait);
|
|
64
|
+
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. You specified: ${wait}`);
|
|
67
65
|
}
|
|
68
|
-
const resourceUrl =
|
|
66
|
+
const resourceUrl = utils_1.SSMResourceUtils.getResourceURLWithQueryParms(session, resource, restApi, table, subsystem);
|
|
69
67
|
const postBody = {
|
|
70
68
|
desired: desiredState
|
|
71
69
|
};
|
|
@@ -84,51 +82,65 @@ table, wait) {
|
|
|
84
82
|
return response;
|
|
85
83
|
}
|
|
86
84
|
else {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
85
|
+
return processWait(response, session, `${resource}$${desiredState}`, restApi, subsystem, table, wait);
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
exports.updateResource = updateResource;
|
|
90
|
+
function processWait(response, session, resource$desiredState, restApi, subsystem, // eslint-disable-line
|
|
91
|
+
table, wait) {
|
|
92
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
93
|
+
// we are waiting, so set up the polling to determine if current = desired state
|
|
94
|
+
// did we happen to instantly start/ stop the resource the first time? check
|
|
95
|
+
// Sonarqube code smell says maximum arguments is 7 so combine 'resource' and 'desiredState'
|
|
96
|
+
const work = resource$desiredState.split("$");
|
|
97
|
+
const resource = work[0];
|
|
98
|
+
const desiredState = work[1];
|
|
99
|
+
let currentState = "";
|
|
100
|
+
if (restApi) {
|
|
101
|
+
if (response.currentState.toUpperCase() === desiredState.toUpperCase()) {
|
|
102
|
+
return response;
|
|
103
|
+
}
|
|
104
|
+
currentState = response.currentState;
|
|
105
|
+
}
|
|
106
|
+
else {
|
|
107
|
+
/* istanbul ignore if */
|
|
108
|
+
if (response.ssmresource[0].current.toUpperCase() === desiredState.toUpperCase()) {
|
|
109
|
+
return response;
|
|
110
|
+
}
|
|
111
|
+
currentState = response.ssmresource[0].current;
|
|
112
|
+
}
|
|
113
|
+
// otherwise we have to poll
|
|
114
|
+
let pollResponse;
|
|
115
|
+
const ONE_SECOND = 1000;
|
|
116
|
+
const start = new Date().getTime();
|
|
117
|
+
// looping with 'wait' value as max was taking approximately twice the requested time
|
|
118
|
+
// so use the actual time to calculate when the 'wait' time is exceeded
|
|
119
|
+
while (((new Date().getTime() - start) / ONE_SECOND) < wait) {
|
|
120
|
+
pollResponse = yield (0, Show_1.showResource)(session, resource, restApi, table, subsystem);
|
|
90
121
|
if (restApi) {
|
|
91
|
-
|
|
92
|
-
return response;
|
|
93
|
-
currentState = response.currentState;
|
|
122
|
+
currentState = pollResponse[0].currentState;
|
|
94
123
|
}
|
|
95
124
|
else {
|
|
96
|
-
|
|
97
|
-
return response;
|
|
98
|
-
currentState = response.ssmresource[0].current;
|
|
125
|
+
currentState = pollResponse.ssmresource[0].current;
|
|
99
126
|
}
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
currentState = pollResponse.ssmresource[0].current;
|
|
113
|
-
}
|
|
114
|
-
if (currentState.toUpperCase() === desiredState.toUpperCase()) {
|
|
115
|
-
// successfully waited until the desired state equaled the current state
|
|
116
|
-
return pollResponse;
|
|
117
|
-
}
|
|
118
|
-
else {
|
|
119
|
-
// no match, poll again after (at least) one second
|
|
120
|
-
yield new Promise((resolve) => {
|
|
121
|
-
setTimeout(resolve, ONE_SECOND);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
127
|
+
/* istanbul ignore if */
|
|
128
|
+
if (currentState.toUpperCase() === desiredState.toUpperCase()) {
|
|
129
|
+
// successfully waited until the desired state equaled the current state
|
|
130
|
+
return pollResponse;
|
|
131
|
+
} /* istanbul ignore else */
|
|
132
|
+
else {
|
|
133
|
+
// no match, poll again after (at least) one second
|
|
134
|
+
yield new Promise((resolve) => {
|
|
135
|
+
setTimeout(resolve, ONE_SECOND);
|
|
136
|
+
});
|
|
124
137
|
}
|
|
125
|
-
// if we get here, the timeout was exceeded.
|
|
126
|
-
throw new imperative_1.ImperativeError({
|
|
127
|
-
msg: `The requested wait time of ${wait} second${wait > 1 ? "s" : ""} was exceeded and the current state` +
|
|
128
|
-
` of resource '${resource}' is still ${currentState}.`
|
|
129
|
-
});
|
|
130
138
|
}
|
|
139
|
+
// if we get here, the timeout was exceeded.
|
|
140
|
+
throw new imperative_1.ImperativeError({
|
|
141
|
+
msg: `The requested wait time of ${wait} second${wait > 1 ? "s" : ""} was exceeded and the current state` +
|
|
142
|
+
` of resource '${resource}' is still ${currentState}.`
|
|
143
|
+
});
|
|
131
144
|
});
|
|
132
145
|
}
|
|
133
|
-
exports.updateResource = updateResource;
|
|
134
146
|
//# sourceMappingURL=Update.js.map
|
package/lib/api/Update.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../src/api/Update.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA8E;AAC9E,2CAA2C;AAC3C,
|
|
1
|
+
{"version":3,"file":"Update.js","sourceRoot":"","sources":["../../src/api/Update.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAA8E;AAC9E,2CAA2C;AAC3C,mCAAsD;AACtD,sFAAmF;AACnF,iCAAsC;AACtC,yDAAsD;AAEtD,SAAsB,UAAU,CAAC,OAAgB,EAAE,WAAmB,EACrC,QAAgB,EAAE,SAAiB,EAAG,sBAAsB;AAC5D,OAAgB,EAAE,SAAkB;;QAEjE,MAAM,OAAO,GAAG,iBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QACzF,MAAM,IAAI,GAAG;YACT,MAAM,EAAE,SAAS;SACpB,CAAC;QAEF,IAAI,OAAO,KAAK,KAAK,EAAE;YACnB,OAAO,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;SACrF;aAAM;YACH,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;SACpF;IACL,CAAC;CAAA;AAdD,gCAcC;AAED;;GAEG;AACH,SAAsB,cAAc,CAAC,OAAgB,EAAE,QAAgB,EAAE,OAAgB,EACpD,YAAoB,EAAE,SAAkB,EAAI,sBAAsB;AA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Y,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,WAAW,EAAE,EAAE;gBAC3D,wEAAwE;gBACxE,OAAO,YAAY,CAAC;aACvB,CAAE,0BAA0B;iBACxB;gBACD,mDAAmD;gBACnD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC1B,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;aACN;SACJ;QAED,4CAA4C;QAC5C,MAAM,IAAI,4BAAe,CAAC;YACtB,GAAG,EAAE,8BAA8B,IAAI,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,qCAAqC;gBACrG,iBAAiB,QAAQ,cAAc,YAAY,GAAG;SAC7D,CAAC,CAAC;IACP,CAAC;CAAA"}
|
|
@@ -27,18 +27,27 @@ exports.OpsConstants = void 0;
|
|
|
27
27
|
* Constants to be used by the API
|
|
28
28
|
*/
|
|
29
29
|
exports.OpsConstants = {
|
|
30
|
+
AOF_URL: "/aof",
|
|
30
31
|
APP_URL: "/opsmvs/api",
|
|
31
|
-
VERSION: "v1",
|
|
32
32
|
BASE_URL: "/opsmvs/api/v1",
|
|
33
|
-
|
|
33
|
+
DEFAULT_BASEPATH: "/api/v1",
|
|
34
|
+
LOGNAMES_URL: "/lognames",
|
|
35
|
+
OPSLOG_URL: "/opslog",
|
|
34
36
|
OPSMVS_URL: "/opsmvs",
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
RESOURCES_URL: "/ssm/resources",
|
|
38
|
+
REXX_URL: "/opsrexx",
|
|
37
39
|
RULE_URL: "/rules",
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
40
|
+
RULES_URL: "/aof/rules",
|
|
41
|
+
RULESET_URL: "/aof/rulesets",
|
|
42
|
+
SSM_URL: "/ssm",
|
|
41
43
|
STATE_URL: "/state",
|
|
42
|
-
|
|
44
|
+
STATUS_URL: "/status",
|
|
45
|
+
SUBSYSTEMS_URL: "/subsystems",
|
|
46
|
+
VERSION: "v1",
|
|
47
|
+
headers: [{ "Content-Type": "application/json" }, { Accept: "application/json" }],
|
|
48
|
+
NAMEVALUE: "NAMEVALUE",
|
|
49
|
+
NAMEVALUECOLOR: "NAMEVALUECOLOR",
|
|
50
|
+
CSV: "CSV",
|
|
51
|
+
JSON: "JSON",
|
|
43
52
|
};
|
|
44
53
|
//# sourceMappingURL=Ops.constants.js.map
|
|
@@ -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,
|
|
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,MAAM;IACf,OAAO,EAAE,aAAa;IACtB,QAAQ,EAAE,gBAAgB;IAC1B,gBAAgB,EAAE,SAAS;IAC3B,YAAY,EAAE,WAAW;IACzB,UAAU,EAAE,SAAS;IACrB,UAAU,EAAE,SAAS;IACrB,aAAa,EAAE,gBAAgB;IAC/B,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,YAAY;IACvB,WAAW,EAAE,eAAe;IAC5B,OAAO,EAAE,MAAM;IACf,SAAS,EAAE,QAAQ;IACnB,UAAU,EAAE,SAAS;IACrB,cAAc,EAAE,aAAa;IAC7B,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,CAAC,EAAC,cAAc,EAAE,kBAAkB,EAAC,EAAE,EAAC,MAAM,EAAG,kBAAkB,EAAC,CAAC;IAC9E,SAAS,EAAE,WAAW;IACtB,cAAc,EAAE,gBAAgB;IAChC,GAAG,EAAE,KAAK;IACV,IAAI,EAAE,MAAM;CACf,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
// export interface IRetrieveRexxResponse {
|
|
26
|
+
// instanceToken: string;
|
|
27
|
+
// program: string;
|
|
28
|
+
// arg: string;
|
|
29
|
+
// subsystem: string;
|
|
30
|
+
// output: string[];
|
|
31
|
+
// errorMessage: string;
|
|
32
|
+
// returnCode: string
|
|
33
|
+
// }
|
|
34
|
+
//# sourceMappingURL=IExecuteRexxResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IExecuteRexxResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IExecuteRexxResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;AAYH,2CAA2C;AAC3C,6BAA6B;AAC7B,uBAAuB;AACvB,mBAAmB;AACnB,yBAAyB;AACzB,wBAAwB;AACxB,4BAA4B;AAC5B,yBAAyB;AACzB,IAAI"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface IShowLognameResponse {
|
|
2
|
+
returnCode: string;
|
|
3
|
+
count: string;
|
|
4
|
+
logNames: IShowLognameResponse[];
|
|
5
|
+
}
|
|
6
|
+
export interface IShowLognameResponse {
|
|
7
|
+
logName: string;
|
|
8
|
+
live: boolean;
|
|
9
|
+
hostName: string;
|
|
10
|
+
systemName: string;
|
|
11
|
+
sysplexName: string;
|
|
12
|
+
}
|
|
@@ -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=IShowLognameResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IShowLognameResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IShowLognameResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IShowStatusResponse {
|
|
2
|
+
userId: string;
|
|
3
|
+
jobNumber: string;
|
|
4
|
+
jobName: string;
|
|
5
|
+
stepName: string;
|
|
6
|
+
lpar: string;
|
|
7
|
+
security: string;
|
|
8
|
+
javaVM: string;
|
|
9
|
+
version: string;
|
|
10
|
+
rexxProgramsLaunched: string;
|
|
11
|
+
rexxProgramsCanceled: string;
|
|
12
|
+
rexxProgramsRejected: string;
|
|
13
|
+
}
|
|
@@ -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=IShowStatusResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IShowStatusResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IShowStatusResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface IShowSubsystemResponse {
|
|
2
|
+
returnCode: string;
|
|
3
|
+
count: string;
|
|
4
|
+
subsystemNames: IShowSubsystemResponse[];
|
|
5
|
+
}
|
|
6
|
+
export interface IShowSubsystemResponse {
|
|
7
|
+
level: string;
|
|
8
|
+
name: string;
|
|
9
|
+
hostName: string;
|
|
10
|
+
systemName: string;
|
|
11
|
+
sysplexName: string;
|
|
12
|
+
}
|
|
@@ -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=IShowSubsystemsResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IShowSubsystemsResponse.js","sourceRoot":"","sources":["../../../src/api/doc/IShowSubsystemsResponse.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG"}
|
package/lib/api/index.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
+
export * from "./Execute";
|
|
1
2
|
export * from "./Show";
|
|
2
3
|
export * from "./Update";
|
|
3
4
|
export * from "./constants";
|
|
4
5
|
export * from "./utils";
|
|
6
|
+
export * from "./doc/IExecuteRexxResponse";
|
|
7
|
+
export * from "./doc/IShowLognameResponse";
|
|
5
8
|
export * from "./doc/IShowResourceResponse";
|
|
6
9
|
export * from "./doc/IShowRuleResponse";
|
|
10
|
+
export * from "./doc/IShowRulesetResponse";
|
|
11
|
+
export * from "./doc/IShowStatusResponse";
|
|
12
|
+
export * from "./doc/IShowSubsystemsResponse";
|
package/lib/api/index.js
CHANGED
|
@@ -36,10 +36,16 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
__exportStar(require("./Execute"), exports);
|
|
39
40
|
__exportStar(require("./Show"), exports);
|
|
40
41
|
__exportStar(require("./Update"), exports);
|
|
41
42
|
__exportStar(require("./constants"), exports);
|
|
42
43
|
__exportStar(require("./utils"), exports);
|
|
44
|
+
__exportStar(require("./doc/IExecuteRexxResponse"), exports);
|
|
45
|
+
__exportStar(require("./doc/IShowLognameResponse"), exports);
|
|
43
46
|
__exportStar(require("./doc/IShowResourceResponse"), exports);
|
|
44
47
|
__exportStar(require("./doc/IShowRuleResponse"), exports);
|
|
48
|
+
__exportStar(require("./doc/IShowRulesetResponse"), exports);
|
|
49
|
+
__exportStar(require("./doc/IShowStatusResponse"), exports);
|
|
50
|
+
__exportStar(require("./doc/IShowSubsystemsResponse"), exports);
|
|
45
51
|
//# sourceMappingURL=index.js.map
|
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;;;;;;;;;;;;;;;;AAEH,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,8DAA4C;AAC5C,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;;;;;AAEH,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,6DAA2C;AAC3C,6DAA2C;AAC3C,8DAA4C;AAC5C,0DAAwC;AACxC,6DAA2C;AAC3C,4DAA0C;AAC1C,gEAA8C"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IHandlerParameters } from "@zowe/imperative";
|
|
2
|
+
export declare class LognameListUtils {
|
|
3
|
+
static printShowLogResponse(logList: any, params: IHandlerParameters): string;
|
|
4
|
+
static formatOutputFromArrayRestApi(log: any, i: number, subsystem: string, params: IHandlerParameters): string;
|
|
5
|
+
static formatNameValueLogResponse(logList: any): string;
|
|
6
|
+
static formatNameValueHeaderLogResponse(logList: any, subsystem: string): string;
|
|
7
|
+
static formatNameValueColorHeaderLogResponse(logList: any, subsystem: string): string;
|
|
8
|
+
static formatNameValueColorLogResponse(logList: any): string;
|
|
9
|
+
static formatJsonDataResponse(logList: any, subsystem: string): string;
|
|
10
|
+
static formatCsvHeaderResponse(): string;
|
|
11
|
+
static formatCsvDataResponse(logList: any, subsystem: string): string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
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
|
+
exports.LognameListUtils = void 0;
|
|
26
|
+
const constants_1 = require("../constants");
|
|
27
|
+
const OpsTextUtils_1 = require("./OpsTextUtils");
|
|
28
|
+
class LognameListUtils {
|
|
29
|
+
static printShowLogResponse(logList, params) {
|
|
30
|
+
let output = "";
|
|
31
|
+
for (let i = 0; i < logList.logNames.length; i++) {
|
|
32
|
+
const log = logList.logNames[i];
|
|
33
|
+
output = output + LognameListUtils.formatOutputFromArrayRestApi(log, i, logList.sub, params);
|
|
34
|
+
}
|
|
35
|
+
// close out JSON
|
|
36
|
+
if (params.arguments.format.toUpperCase() === constants_1.OpsConstants.JSON) {
|
|
37
|
+
output = output + "]";
|
|
38
|
+
}
|
|
39
|
+
return output;
|
|
40
|
+
}
|
|
41
|
+
static formatOutputFromArrayRestApi(log, i, subsystem, params) {
|
|
42
|
+
let output = "";
|
|
43
|
+
if (params.arguments.format.toUpperCase() === constants_1.OpsConstants.CSV) {
|
|
44
|
+
if (i === 0) {
|
|
45
|
+
output = `${output}${LognameListUtils.formatCsvHeaderResponse()}`;
|
|
46
|
+
}
|
|
47
|
+
output = `${output}\n${LognameListUtils.formatCsvDataResponse(log, subsystem)}`;
|
|
48
|
+
}
|
|
49
|
+
else if (params.arguments.format.toUpperCase() === constants_1.OpsConstants.JSON) {
|
|
50
|
+
if (i === 0) {
|
|
51
|
+
output = output + "[";
|
|
52
|
+
}
|
|
53
|
+
else if (i > 0) {
|
|
54
|
+
output = output + ", ";
|
|
55
|
+
}
|
|
56
|
+
output = `${output}${LognameListUtils.formatJsonDataResponse(log, subsystem)}`;
|
|
57
|
+
}
|
|
58
|
+
else if (params.arguments.format.toUpperCase() === constants_1.OpsConstants.NAMEVALUECOLOR) {
|
|
59
|
+
if (i === 0) {
|
|
60
|
+
output = `${output}${LognameListUtils.formatNameValueColorHeaderLogResponse(log, subsystem)}`;
|
|
61
|
+
}
|
|
62
|
+
output = `${output}${LognameListUtils.formatNameValueColorLogResponse(log)}`;
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
if (i === 0) {
|
|
66
|
+
output = `${output}${LognameListUtils.formatNameValueHeaderLogResponse(log, subsystem)}`;
|
|
67
|
+
}
|
|
68
|
+
output = `${output}${LognameListUtils.formatNameValueLogResponse(log)}`;
|
|
69
|
+
}
|
|
70
|
+
return output;
|
|
71
|
+
}
|
|
72
|
+
static formatNameValueLogResponse(logList) {
|
|
73
|
+
return ` logName: ${logList.logName}, live: ${logList.live}\n`;
|
|
74
|
+
}
|
|
75
|
+
static formatNameValueHeaderLogResponse(logList, subsystem) {
|
|
76
|
+
return `name: ${logList.sysplexName}/${logList.systemName}/${subsystem}\n`;
|
|
77
|
+
}
|
|
78
|
+
static formatNameValueColorHeaderLogResponse(logList, subsystem) {
|
|
79
|
+
const name = OpsTextUtils_1.OpsTextUtils.colorizeAttention("name: ");
|
|
80
|
+
// eslint-disable-next-line max-len
|
|
81
|
+
return `${name}${logList.sysplexName}/${logList.systemName}/${subsystem}\n`;
|
|
82
|
+
}
|
|
83
|
+
static formatNameValueColorLogResponse(logList) {
|
|
84
|
+
const logNameText = OpsTextUtils_1.OpsTextUtils.colorizeAttention("logName:");
|
|
85
|
+
const liveText = OpsTextUtils_1.OpsTextUtils.colorizeAttention("live:");
|
|
86
|
+
return ` ${logNameText} ${logList.logName}, ${liveText} ${logList.live}\n`;
|
|
87
|
+
}
|
|
88
|
+
static formatJsonDataResponse(logList, subsystem) {
|
|
89
|
+
let output = `{`;
|
|
90
|
+
output = output + `"name": "${logList.sysplexName}/${logList.systemName}/${subsystem}", `;
|
|
91
|
+
output = output + `"logName": "${logList.logName}", `;
|
|
92
|
+
output = output + `"live": "${logList.live}"`;
|
|
93
|
+
output = output + `}`;
|
|
94
|
+
return output;
|
|
95
|
+
}
|
|
96
|
+
static formatCsvHeaderResponse() {
|
|
97
|
+
return `name,logName,live`;
|
|
98
|
+
}
|
|
99
|
+
static formatCsvDataResponse(logList, subsystem) {
|
|
100
|
+
return `"${logList.sysplexName}/${logList.systemName}/${subsystem}","${logList.logName}","${logList.live}"`;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.LognameListUtils = LognameListUtils;
|
|
104
|
+
//# sourceMappingURL=LognameListUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LognameListUtils.js","sourceRoot":"","sources":["../../../src/api/utils/LognameListUtils.ts"],"names":[],"mappings":";AAAA;;;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. 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
|
+
exports.LognameUtils = void 0;
|
|
26
|
+
const constants_1 = require("../constants");
|
|
27
|
+
class LognameUtils {
|
|
28
|
+
static getLogURL(session, subSystem) {
|
|
29
|
+
let log = "";
|
|
30
|
+
if (session.ISession.basePath === null || session.ISession.basePath === "") {
|
|
31
|
+
log = constants_1.OpsConstants.DEFAULT_BASEPATH;
|
|
32
|
+
}
|
|
33
|
+
let subsystemQueryString = "";
|
|
34
|
+
if (subSystem != null) {
|
|
35
|
+
subsystemQueryString = "?sub=" + encodeURIComponent(subSystem);
|
|
36
|
+
}
|
|
37
|
+
return `${log}${constants_1.OpsConstants.OPSLOG_URL}${constants_1.OpsConstants.LOGNAMES_URL}${subsystemQueryString}`;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.LognameUtils = LognameUtils;
|
|
41
|
+
//# sourceMappingURL=LognameUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LognameUtils.js","sourceRoot":"","sources":["../../../src/api/utils/LognameUtils.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,4CAA4C;AAE5C,MAAa,YAAY;IAEd,MAAM,CAAC,SAAS,CAAC,OAAgB,EAAE,SAAiB;QAEvD,IAAI,GAAG,GAAG,EAAE,CAAC;QAEb,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,KAAK,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,QAAQ,KAAK,EAAE,EAAE;YACxE,GAAG,GAAG,wBAAY,CAAC,gBAAgB,CAAC;SACvC;QAED,IAAI,oBAAoB,GAAG,EAAE,CAAC;QAC9B,IAAI,SAAS,IAAI,IAAI,EAAE;YACnB,oBAAoB,GAAG,OAAO,GAAG,kBAAkB,CAAC,SAAS,CAAC,CAAC;SAClE;QAED,OAAO,GAAG,GAAG,GAAG,wBAAY,CAAC,UAAU,GAAG,wBAAY,CAAC,YAAY,GAAG,oBAAoB,EAAE,CAAC;IACjG,CAAC;CACJ;AAjBD,oCAiBC"}
|
|
@@ -29,6 +29,7 @@ class OpsRestClient extends imperative_1.RestClient {
|
|
|
29
29
|
* Use the Zowe logger instead of the imperative logger
|
|
30
30
|
* @type {Logger}
|
|
31
31
|
*/
|
|
32
|
+
/* istanbul ignore next */
|
|
32
33
|
get log() {
|
|
33
34
|
return imperative_1.Logger.getAppLogger();
|
|
34
35
|
}
|
|
@@ -38,6 +39,7 @@ class OpsRestClient extends imperative_1.RestClient {
|
|
|
38
39
|
* @returns {IImperativeError} - the processed error with details added
|
|
39
40
|
* @memberof ZosmfRestClient
|
|
40
41
|
*/
|
|
42
|
+
/* istanbul ignore next */
|
|
41
43
|
processError(original) {
|
|
42
44
|
original.msg = "OPS REST API Error:\n" + original.msg;
|
|
43
45
|
let details = original.causeErrors;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpsRestClient.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,iDAAmF;AAEnF,MAAa,aAAc,SAAQ,uBAAU;IACzC;;;OAGG;IACH,IAAW,GAAG;QACV,OAAO,mBAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;IAED;;;;;OAKG;
|
|
1
|
+
{"version":3,"file":"OpsRestClient.js","sourceRoot":"","sources":["../../../src/api/utils/OpsRestClient.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAEH,iDAAmF;AAEnF,MAAa,aAAc,SAAQ,uBAAU;IACzC;;;OAGG;IACH,0BAA0B;IAC1B,IAAW,GAAG;QACV,OAAO,mBAAM,CAAC,YAAY,EAAE,CAAC;IACjC,CAAC;IAED;;;;;OAKG;IACH,0BAA0B;IAChB,YAAY,CAAC,QAA0B;QAC7C,QAAQ,CAAC,GAAG,GAAG,uBAAuB,GAAG,QAAQ,CAAC,GAAG,CAAC;QACtD,IAAI,OAAO,GAAG,QAAQ,CAAC,WAAW,CAAC;QACnC,IAAI;YACA,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACjC,4EAA4E;YAC5E,kCAAkC;YAClC,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,EAAE;gBACpB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,+CAA+C;oBAC1D,wDAAwD,EAAE,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;gBACpF,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mFAAmF,CAAC,CAAC;gBACpG,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,yBAAyB;aAC/C;YAED,uEAAuE;YACvE,OAAO,GAAG,sBAAS,CAAC,UAAU,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;SAC1D;QAAC,OAAO,CAAC,EAAE;YACR,wDAAwD;YACxD,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,mGAAmG,CAAC,CAAC;SACvH;QACD,QAAQ,CAAC,GAAG,IAAI,IAAI,GAAG,OAAO,CAAC,CAAC,kDAAkD;QAClF,OAAO,QAAQ,CAAC;IACpB,CAAC;CACJ;AAxCD,sCAwCC"}
|
|
@@ -18,6 +18,7 @@ export declare class OpsRestUtils {
|
|
|
18
18
|
static REJECT_UNAUTHORIZED_OPTION: ICommandOptionDefinition;
|
|
19
19
|
static SUBSYSTEM_OPTION: ICommandOptionDefinition;
|
|
20
20
|
static RESTAPI_OPTION: ICommandOptionDefinition;
|
|
21
|
+
static BASEPATH_OPTION: ICommandOptionDefinition;
|
|
21
22
|
static OPS_CONNECTION_OPTIONS: ICommandOptionDefinition[];
|
|
22
23
|
/**
|
|
23
24
|
* Using the passOn feature of imperative, we can make all child commands
|