@broadcom/ops-for-zowe-cli 5.1.0 → 5.2.1

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.
Files changed (98) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +105 -74
  3. package/lib/api/Create.d.ts +14 -2
  4. package/lib/api/Create.js +13 -15
  5. package/lib/api/Create.js.map +1 -1
  6. package/lib/api/Execute.d.ts +13 -2
  7. package/lib/api/Execute.js +22 -110
  8. package/lib/api/Execute.js.map +1 -1
  9. package/lib/api/Show.d.ts +66 -8
  10. package/lib/api/Show.js +77 -75
  11. package/lib/api/Show.js.map +1 -1
  12. package/lib/api/Update.d.ts +2 -4
  13. package/lib/api/Update.js +4 -9
  14. package/lib/api/Update.js.map +1 -1
  15. package/lib/api/doc/IExecuteCommandCommandBody.d.ts +23 -0
  16. package/lib/api/doc/IExecuteCommandCommandBody.js +25 -0
  17. package/lib/api/doc/IExecuteCommandCommandBody.js.map +1 -0
  18. package/lib/api/doc/IShowRecordsCommandBody.d.ts +16 -0
  19. package/lib/api/doc/IShowRecordsCommandBody.js +25 -0
  20. package/lib/api/doc/IShowRecordsCommandBody.js.map +1 -0
  21. package/lib/api/doc/IShowRecordsResponse.d.ts +60 -0
  22. package/lib/api/doc/IShowRecordsResponse.js +25 -0
  23. package/lib/api/doc/IShowRecordsResponse.js.map +1 -0
  24. package/lib/api/doc/IShowTableResponse.d.ts +3 -0
  25. package/lib/api/doc/IShowTableResponse.js +25 -0
  26. package/lib/api/doc/IShowTableResponse.js.map +1 -0
  27. package/lib/api/doc/index.d.ts +1 -0
  28. package/lib/api/doc/index.js +1 -0
  29. package/lib/api/doc/index.js.map +1 -1
  30. package/lib/api/utils/CommandListUtils.js +8 -3
  31. package/lib/api/utils/CommandListUtils.js.map +1 -1
  32. package/lib/api/utils/LognameListUtils.js +0 -1
  33. package/lib/api/utils/LognameListUtils.js.map +1 -1
  34. package/lib/api/utils/OpsRestClient.js +0 -2
  35. package/lib/api/utils/OpsRestClient.js.map +1 -1
  36. package/lib/api/utils/OpsTextUtils.js +0 -1
  37. package/lib/api/utils/OpsTextUtils.js.map +1 -1
  38. package/lib/api/utils/RecordsListUtils.d.ts +53 -0
  39. package/lib/api/utils/RecordsListUtils.js +146 -0
  40. package/lib/api/utils/RecordsListUtils.js.map +1 -0
  41. package/lib/api/utils/RecordsUtils.d.ts +5 -0
  42. package/lib/api/utils/RecordsUtils.js +45 -0
  43. package/lib/api/utils/RecordsUtils.js.map +1 -0
  44. package/lib/api/utils/RexxListUtils.js +7 -6
  45. package/lib/api/utils/RexxListUtils.js.map +1 -1
  46. package/lib/api/utils/RuleUtils.js +2 -2
  47. package/lib/api/utils/RuleUtils.js.map +1 -1
  48. package/lib/api/utils/RulesetListUtils.js +0 -1
  49. package/lib/api/utils/RulesetListUtils.js.map +1 -1
  50. package/lib/api/utils/RulesetUtils.d.ts +1 -1
  51. package/lib/api/utils/RulesetUtils.js +1 -1
  52. package/lib/api/utils/RulesetUtils.js.map +1 -1
  53. package/lib/api/utils/SubsystemListUtils.js +0 -1
  54. package/lib/api/utils/SubsystemListUtils.js.map +1 -1
  55. package/lib/api/utils/TableUtils.d.ts +4 -1
  56. package/lib/api/utils/TableUtils.js +7 -7
  57. package/lib/api/utils/TableUtils.js.map +1 -1
  58. package/lib/api/utils/index.d.ts +3 -0
  59. package/lib/api/utils/index.js +3 -0
  60. package/lib/api/utils/index.js.map +1 -1
  61. package/lib/cli/OpsBaseHandler.js +0 -2
  62. package/lib/cli/OpsBaseHandler.js.map +1 -1
  63. package/lib/cli/RecordsParameterDefinitions.d.ts +18 -0
  64. package/lib/cli/RecordsParameterDefinitions.js +157 -0
  65. package/lib/cli/RecordsParameterDefinitions.js.map +1 -0
  66. package/lib/cli/create/event/Event.handler.js +12 -2
  67. package/lib/cli/create/event/Event.handler.js.map +1 -1
  68. package/lib/cli/execute/command/Command.handler.js +50 -5
  69. package/lib/cli/execute/command/Command.handler.js.map +1 -1
  70. package/lib/cli/show/Show.definition.js +4 -3
  71. package/lib/cli/show/Show.definition.js.map +1 -1
  72. package/lib/cli/show/logname/Logname.handler.js +4 -2
  73. package/lib/cli/show/logname/Logname.handler.js.map +1 -1
  74. package/lib/cli/show/parms/Parms.handler.js +4 -3
  75. package/lib/cli/show/parms/Parms.handler.js.map +1 -1
  76. package/lib/cli/show/records/Records.definition.d.ts +17 -0
  77. package/lib/cli/show/records/Records.definition.js +82 -0
  78. package/lib/cli/show/records/Records.definition.js.map +1 -0
  79. package/lib/cli/show/records/Records.handler.d.ts +5 -0
  80. package/lib/cli/show/records/Records.handler.js +67 -0
  81. package/lib/cli/show/records/Records.handler.js.map +1 -0
  82. package/lib/cli/show/ruleset/Ruleset.handler.js +8 -2
  83. package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -1
  84. package/lib/cli/show/status/Status.handler.js +4 -2
  85. package/lib/cli/show/status/Status.handler.js.map +1 -1
  86. package/lib/cli/show/subsystem/Subsystem.handler.js +4 -2
  87. package/lib/cli/show/subsystem/Subsystem.handler.js.map +1 -1
  88. package/lib/cli/show/table/Table.handler.js +8 -2
  89. package/lib/cli/show/table/Table.handler.js.map +1 -1
  90. package/lib/healthCheck.handler.js +0 -1
  91. package/lib/healthCheck.handler.js.map +1 -1
  92. package/lib/index.d.ts +2 -0
  93. package/lib/index.js +2 -0
  94. package/lib/index.js.map +1 -1
  95. package/package.json +4 -4
  96. package/imgs/zowe-conformant-v1.png +0 -0
  97. package/imgs/zowe-conformant-zowev2-cli-color.png +0 -0
  98. package/imgs/zowe-conformant-zowev3-cli-color.png +0 -0
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2024 Broadcom. All Rights Reserved. The term
1
+ Copyright (c) 2025 Broadcom. All Rights Reserved. The term
2
2
  "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
3
3
 
4
4
  This software and all information contained therein is
package/README.md CHANGED
@@ -13,6 +13,7 @@ Using the plug-in, you can benefit from the following OPS/MVS features:
13
13
  - *Display the subsystems.
14
14
  - *Display RDF tables.
15
15
  - *Display SSM parms.
16
+ - *Display OPSLOG records.
16
17
  - *Execute a REXX program.
17
18
  - *Execute a operator command.
18
19
  - *Create a generic AOF event for API rules processing.
@@ -20,13 +21,13 @@ Using the plug-in, you can benefit from the following OPS/MVS features:
20
21
  Note: * Indicates only available if you are using the plug-in with the OPS/MVS REST API.
21
22
 
22
23
  ## Prerequisites
23
- - Install <a href="https://docs.zowe.org/stable/user-guide/cli-installcli/" target="_blank">Zowe CLI</a> on your computer.
24
+ - Install [Zowe CLI](https://docs.zowe.org/stable/user-guide/cli-installcli/) on your computer.
24
25
 
25
- <img src="imgs/zowe-conformant-zowev3-cli-color.png" width=25% alt="Zowe v2 CLI Conformance Badge"/>
26
+ <img src="https://artwork.openmainframeproject.org/other/zowe-conformant/zowev3/cli/color/zowe-conformant-zowev3-cli-color.svg" width=25% alt="Zowe v2 CLI Conformance Badge">
26
27
 
27
28
  - Install one of the following OPS/MVS components:
28
- - <a href="https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/installing/install-and-configure-optional-components/deploy-and-configure-the-ops-mvs-rest-server.html" target="_blank">The REST API</a>
29
- - <a href="https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/administrating/restful-web-services/deploy-and-configure-ca-ops-mvs-restful-web-services.html" target="_blank">RESTful Web Services</a>
29
+ - [The REST API](https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/using/use-the-rest-api.html)
30
+ - [RESTful Web Services](https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/administrating/restful-web-services/deploy-and-configure-ca-ops-mvs-restful-web-services.html)
30
31
 
31
32
  To use the plug-in with multiple OPS/MVS instances running on different systems, install and configure the RESTful Web Services component or the REST API to one OPS/MVS instance on each system. When you have multiple instances of OPS/MVS running on a single system, only one instance of the RESTful Web Services component or the REST API is required.
32
33
 
@@ -34,7 +35,7 @@ To use the plug-in with multiple OPS/MVS instances running on different systems,
34
35
 
35
36
  ### Security Requirements
36
37
  To issue OPS/MVS commands through the plug-in, you must be authorized for those commands through OPS/MVS
37
- security. For more information, refer to the article <a href="https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/securing/rest-api-security.html" target="_blank">REST API Security</a>.
38
+ security. For more information, refer to the article [Authorize REST API Users](https://techdocs.broadcom.com/us/en/ca-mainframe-software/automation/ca-ops-mvs-event-management-and-automation/14-0/securing/authorize-rest-api-users.html).
38
39
 
39
40
  ## Install the OPS/MVS Plug-in From a Local Package
40
41
  To install the OPS/MVS plug-in to the Zowe CLI from a local package:
@@ -58,6 +59,12 @@ When the validation process is successful, the following message displays:
58
59
  If the validation process fails, a failure message displays.
59
60
  You can troubleshoot the installation by addressing the issues that the message describes. You can also review the information contained in the log file that is located in the Zowe CLI home directory.
60
61
 
62
+ ## Uninstall the OPS/MVS Plug-in From Zowe CLI
63
+ To uninstall the plug-in from Zowe CLI, issue the following command:
64
+ ```sh
65
+ zowe plugins uninstall @broadcom/ops-for-zowe-cli
66
+ ```
67
+
61
68
  ## Create an OPS/MVS Profile
62
69
  You can set up an OPS/MVS profile to avoid typing your connection details on every command.
63
70
  1. Gather the following data:
@@ -85,9 +92,24 @@ You can set up an OPS/MVS profile to avoid typing your connection details on eve
85
92
  zowe config set profiles.ops.properties.rest-api true or false --gc
86
93
  ```
87
94
 
88
- The following image shows an OPS/MVS profile inside a global configuration file:
95
+ The following example shows an OPS/MVS profile inside a global configuration file:
89
96
 
90
- ![opsprofile.png](opsprofile.png)
97
+ ```
98
+ "profiles": {
99
+ "ops": {
100
+ "type": "ops",
101
+ "properties": {
102
+ "host": "example.net",
103
+ "port": 12345,
104
+ "protocol": "https",
105
+ "subsystem": "SYS1",
106
+ "rest-api": false,
107
+ "reject-unauthorized": false
108
+ },
109
+ "secure": []
110
+ }
111
+ }
112
+ ```
91
113
 
92
114
 
93
115
  ## Create an OPS/MVS Profile for the Zowe API ML</a>
@@ -103,13 +125,29 @@ To create an OPS/MVS plug-in profile for the Zowe API ML:
103
125
 
104
126
  2. Follow the directions in step 2 of [Create an OPS/MVS Profile](#create-an-opsmvs-profile), including the additional data you gathered in step 1 of this section.
105
127
 
106
- The following image shows an OPS/MVS profile for the Zowe API ML inside a global configuration file:
128
+ The following example shows an OPS/MVS profile for the Zowe API ML inside a global configuration file:
107
129
 
108
- ![opsapimlprofile.png](opsapimlprofile.png)
130
+ ```
131
+ "opsapiml": {
132
+ "type": "ops",
133
+ "properties": {
134
+ "host": "example.net",
135
+ "port": 12345,
136
+ "user": "user1",
137
+ "password": "password",
138
+ "protocol": "https",
139
+ "subsystem": "SYS1",
140
+ "rest-api": true,
141
+ "reject-unauthorized": false,
142
+ "base-path": "opsrestapi/api/v1"
143
+ },
144
+ "secure": []
145
+ }
146
+ ```
109
147
 
110
148
  ## Using the OPS/MVS Plug-in for Zowe CLI
111
149
 
112
- For details about the commands, actions, and options in this plug-in, refer to the Zowe CLI Help. 
150
+ For details about the commands, actions, and options in this plug-in, refer to the Zowe CLI Help.
113
151
 
114
152
  When Zowe CLI is installed, you can display Zowe CLI Help for the OPS/MVS plug-in by doing _one_ of the following from a command line:
115
153
 
@@ -125,90 +163,83 @@ When you enter a command using the OPS/MVS Plug-in for Zowe CLI, you will receiv
125
163
 
126
164
  1 - Execution failed
127
165
 
128
- ## Changes in Release 5.0.0
129
- This section describes changes that have been made to the OPS/MVS Plug-in for Zowe CLI since the previous release (4.1.2).
166
+ ## Available Commands
167
+ **Note:** an asterisk (*) beside the command name indicates that it is only available if you are using the plug-in with the OPS/MVS REST API. To use these commands, you must either have the parameter `"rest-api": true,` included in your Zowe team config ops profile, or include the parameter `--rest-api true` as part of the command line request.
130
168
 
131
- Release 5.0.0 includes a breaking change and support for the OPS/MVS REST API.
169
+ ### create
132
170
 
133
- ### Breaking Change: Positional Arguments
134
- The commands `start resource` and `stop resource` have the following positional arguments.
135
- In a breaking change, `tablename` is now a required positional argument.
171
+ - **create event***
136
172
 
137
- **resourcename** (string)(optional)
138
-
139
- The name of the resource.
173
+ - Use the `create event` command to create a generic AOF event for API rules processing.
140
174
 
141
- **tablename** (string)(required)
142
-
143
- The name of the table that contains the resource.
144
-
175
+ ### disable
145
176
 
146
- ### 5.0.0 Commands
177
+ - **disable rule**
147
178
 
148
- **Note:** The following commands are only available when you use the OPS/MVS plug-in for Zowe CLI with the OPS/MVS REST API.
179
+ - Use the `disable rule` command to disable the specified rule.
149
180
 
150
- **show ruleset**
151
-
152
- Use the new `show ruleset` command to display the status of a specific automation rule set.
181
+ ### enable
153
182
 
154
- **show logname**
183
+ - **enable rule**
155
184
 
156
- Use the new `show logname` command to display the logs defined to a subsystem.
185
+ - Use the `enable rule` command to enable the specified rule.
157
186
 
158
- **show status**
187
+ ### execute
159
188
 
160
- Use the new `show status` command to display the status of the REST API server.
189
+ - **execute command***
161
190
 
162
- **show subsystem**
191
+ - Use the `execute command` command to execute the specified operator command.
163
192
 
164
- Use the new `show subsystem` command to display the subsystems running on an OPS system.
193
+ - **execute rexx***
165
194
 
166
- **execute rexx**
195
+ - Use the `execute rexx` command to execute the specified OPS/MVS REXX program.
167
196
 
168
- Use the new `execute rexx` command to execute the specified OPS/MVS REXX program.
197
+ ### show
169
198
 
170
- **Note:** There is a bug in @zowe/cli v2 that strips the single quotes when specifying a program name that requires single quotes to delimit the fully qualified dataset name.
171
- The work-around is to specify two single quotes. Example: "''fully.qualified.dataset(member)''"
199
+ - **show logname***
172
200
 
173
- ### 5.1.0 Commands
201
+ - Use the `show logname` command to display the logs defined to a subsystem.
174
202
 
175
- **Note:** The following command is only available when you use the OPS/MVS plug-in for Zowe CLI with the OPS/MVS REST API.
203
+ - **show parms***
176
204
 
177
- Use the new `show parms` command to display all the SSM parameters defined to a subsystem.
205
+ - Use the `show parms` command to display all the SSM parameters defined to a subsystem.
178
206
 
179
- ### Enhanced Commands in 5.0.0
207
+ - **show records***
180
208
 
181
- **Note:** The following enhanced commands are only available when you use the OPS/MVS plug-in for Zowe CLI with the OPS/MVS REST API.
182
-
183
- **show resource**
184
-
185
- Use the `show resource` command to show the current and desired state of all resources in the table MYTABLE for the OPSS subsystem, as shown in the following example:
186
-
187
- ```
188
- zowe ops show resource * --table MYTABLE --subsystem OPSS
189
- ```
190
-
191
- Use the `show resource` command to show the current and desired state of all resources in all tables for the OPSS subsystem, as shown in the following example:
192
-
193
- ```
194
- zowe ops show resource * --subsystem OPSS
195
- ```
196
-
197
- **show rule**
209
+ - Use the `show records` command to display a list of the OPSLOG records with attributes that are defined in the search query from the specified OPSLOG.
210
+
211
+ - **show resource**
212
+
213
+ - Use the `show resource` command to show the current and desired state of all resources associated with the specified SSM resource.
214
+
215
+ - **show rule**
216
+
217
+ - Use the `show rule` command with to display data associated with the specified rule.
218
+
219
+ - **show ruleset***
198
220
 
199
- Use the `show rule` command with the syntax shown in the following example to display the status of all rules in rule set OPSRULES for the OPSS subsystem:
200
-
201
- ```
202
- zowe ops show rule OPSRULES * --subsystem OPSS
203
- ```
204
- Use the `show rule` command with the syntax shown in the following example to display the status of all rules in all rule sets for the OPSS subsystem:
205
-
206
- ```
207
- zowe ops show rule * * --subsystem OPSS
208
- ```
221
+ - Use the `show ruleset` command to display the status of a specific automation rule set.
209
222
 
210
- ## Uninstall the OPS/MVS Plug-in From Zowe CLI
211
- To uninstall the plug-in from Zowe CLI, issue the following command:
212
- ```sh
213
- zowe plugins uninstall @broadcom/ops-for-zowe-cli
214
- ```
223
+ - **show status***
224
+
225
+ - Use the `show status` command to display the status of the REST API server.
226
+
227
+ - **show subsystem***
228
+
229
+ - Use the `show subsystem` command to display the subsystems running on an OPS system.
230
+
231
+ - **show table***
232
+
233
+ - Use the `show table` command to display data associated with RDF tables.
234
+
235
+ ### start
236
+
237
+ - **start resource**
238
+
239
+ - Use the `start resource` command to start the specified resource.
240
+
241
+ ### stop
242
+
243
+ - **stop resource**
244
+
245
+ - Use the `stop resource` command to stop the specified resource.
@@ -1,2 +1,14 @@
1
- import { IHandlerParameters, Session } from "@zowe/imperative";
2
- export declare function createEvent(session: Session, eventCode: string, eventText: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<object>;
1
+ import { Session } from "@zowe/imperative";
2
+ /**
3
+ * creates OPS/MVS Event
4
+ *
5
+ * @export
6
+ * @param {Session} session
7
+ * @param {{ eventCode?: any, eventText?: any, subSystem?: any }} body
8
+ * @return {*} {Promise<object>}
9
+ */
10
+ export declare function createEvent(session: Session, body: {
11
+ eventCode?: any;
12
+ eventText?: any;
13
+ subSystem?: any;
14
+ }): Promise<object>;
package/lib/api/Create.js CHANGED
@@ -35,24 +35,22 @@ exports.createEvent = void 0;
35
35
  const utils_1 = require("./utils");
36
36
  const constants_1 = require("./constants");
37
37
  const OpsRestClient_1 = require("./utils/OpsRestClient");
38
- function createEvent(session, eventCode, eventText, restApi, subSystem, params) {
38
+ /**
39
+ * creates OPS/MVS Event
40
+ *
41
+ * @export
42
+ * @param {Session} session
43
+ * @param {{ eventCode?: any, eventText?: any, subSystem?: any }} body
44
+ * @return {*} {Promise<object>}
45
+ */
46
+ function createEvent(session, body) {
39
47
  return __awaiter(this, void 0, void 0, function* () {
40
- const createEventUrl = utils_1.EventUtils.getCreateEventURL(session, subSystem);
48
+ const createEventUrl = utils_1.EventUtils.getCreateEventURL(session, body.subSystem);
41
49
  const commandBody = {
42
- eventCode: eventCode,
43
- eventText: eventText
50
+ eventCode: body.eventCode,
51
+ eventText: body.eventText
44
52
  };
45
- if (restApi) {
46
- return OpsRestClient_1.OpsRestClient.postExpectJSON(session, createEventUrl, constants_1.OpsConstants.headers, commandBody);
47
- }
48
- else {
49
- /* istanbul ignore next */
50
- // Display message indicating 'execute rexx' not supported with web services
51
- params.response.console.log("Command 'create event' is only supported with the OPS/MVS REST API server");
52
- }
53
- /* istanbul ignore next */
54
- return null;
55
- // avoid code smell
53
+ return OpsRestClient_1.OpsRestClient.postExpectJSON(session, createEventUrl, constants_1.OpsConstants.headers, commandBody);
56
54
  });
57
55
  }
58
56
  exports.createEvent = createEvent;
@@ -1 +1 @@
1
- {"version":3,"file":"Create.js","sourceRoot":"","sources":["../../src/api/Create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,mCAAqC;AACrC,2CAA2C;AAC3C,yDAAsD;AAEtD,SAAsB,WAAW,CAAC,OAAgB,EAAE,SAAiB,EAAE,SAAiB,EAAE,OAAgB,EACxE,SAAiB,EAAE,MAA0B;;QAE3E,MAAM,cAAc,GAAG,kBAAU,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAOxE,MAAM,WAAW,GAA4B;YACzC,SAAS,EAAE,SAAS;YACpB,SAAS,EAAE,SAAS;SACvB,CAAC;QAEF,IAAI,OAAO,EAAE;YACT,OAAO,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,wBAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;SACnG;aAAM;YACH,0BAA0B;YAC1B,4EAA4E;YAC5E,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,2EAA2E,CAAC,CAAC;SAC5G;QACD,0BAA0B;QAC1B,OAAO,IAAI,CAAC;QACZ,mBAAmB;IACvB,CAAC;CAAA;AAzBD,kCAyBC"}
1
+ {"version":3,"file":"Create.js","sourceRoot":"","sources":["../../src/api/Create.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,mCAAqC;AACrC,2CAA2C;AAC3C,yDAAsD;AAGtD;;;;;;;GAOG;AACH,SAAsB,WAAW,CAAC,OAAgB,EAAE,IAA2D;;QAC3G,MAAM,cAAc,GAAG,kBAAU,CAAC,iBAAiB,CAAC,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;QAK7E,MAAM,WAAW,GAA4B;YACzC,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,IAAI,CAAC,SAAS;SAC5B,CAAC;QACF,OAAO,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,wBAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACpG,CAAC;CAAA;AAXD,kCAWC"}
@@ -1,7 +1,8 @@
1
- import { IHandlerParameters, Session } from "@zowe/imperative";
1
+ import { Session } from "@zowe/imperative";
2
2
  import { IExecuteRexxResponse } from "./doc/IExecuteRexxResponse";
3
3
  import { IExecuteCommandResponse } from "./doc/IExecuteCommandResponse";
4
4
  import { IExecuteRexxCommandBody } from "./doc/IExecuteRexxCommandBody";
5
+ import { IExecuteCommandCommandBody } from "./doc/IExecuteCommandCommandBody";
5
6
  /**
6
7
  * formats and executes request to run opsrexx program
7
8
  *
@@ -33,4 +34,14 @@ export declare function processWait(session: Session, program: string, instanceT
33
34
  * @return {*} {Promise<IExecuteRexxResponse>}
34
35
  */
35
36
  export declare function retrieveRexx(session: Session, instanceToken: string): Promise<IExecuteRexxResponse>;
36
- export declare function executeCommand(session: Session, command: string, restApi: boolean, subSystem: string, params: IHandlerParameters, bmpCmdOut?: string, capture?: string, cart?: string, cmdEcho?: string, cmdLog?: string, cmdWait?: string, conName?: string, conType?: string, imsId?: string, imsPlex?: string, imsReply?: string, interval?: string, localOnly?: string, log?: string, maxCmdOut?: string, output?: string, stopEnd?: string, stopMsg?: string, stopResp?: string, wait?: string, debug?: string): Promise<IExecuteCommandResponse>;
37
+ /**
38
+ *
39
+ *
40
+ * @export
41
+ * @param {Session} session
42
+ * @param {IExecuteCommandCommandBody} body
43
+ * @param {string} subSystem
44
+ * @param {number} wait
45
+ * @return {*} {Promise<IExecuteCommandResponse>}
46
+ */
47
+ export declare function executeCommand(session: Session, body: IExecuteCommandCommandBody, subSystem?: string, wait?: string): Promise<IExecuteCommandResponse>;
@@ -112,118 +112,30 @@ function retrieveRexx(session, instanceToken) {
112
112
  });
113
113
  }
114
114
  exports.retrieveRexx = retrieveRexx;
115
- // The too many arguments sonarqube error being ignored can be rectified by using Craig's execute rexx changes
116
- // to use params for the arguments
117
- function executeCommand(session, command, restApi, subSystem, params, bmpCmdOut, capture, cart, cmdEcho, cmdLog, cmdWait, conName, conType, imsId, imsPlex, imsReply, interval, localOnly, log, maxCmdOut, output, stopEnd, stopMsg, stopResp, wait, debug) {
115
+ /**
116
+ *
117
+ *
118
+ * @export
119
+ * @param {Session} session
120
+ * @param {IExecuteCommandCommandBody} body
121
+ * @param {string} subSystem
122
+ * @param {number} wait
123
+ * @return {*} {Promise<IExecuteCommandResponse>}
124
+ */
125
+ function executeCommand(session, body, subSystem, wait) {
118
126
  return __awaiter(this, void 0, void 0, function* () {
119
- if (!restApi) {
120
- // Display message indicating 'execute command' not supported with web services
121
- params.response.console.log("Command 'execute command' is only supported with the OPS/MVS REST API server");
122
- /* istanbul ignore next */
123
- return null;
124
- }
125
- if (wait != null) {
126
- imperative_1.ImperativeExpect.toBeEqual(Number(wait) > 0 && Number(wait) <= CommandParameterDefinitions_1.CommandParameterDefinitions.WAIT_TIME, true, `Wait value must be between 1 and ${RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME} (inclusive), if specified. You specified: ${wait}`);
127
- }
128
- // Validation
129
- // 1. mutually exclusive - cmdWait and wait
130
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --cmdWait "30" --wait "30"
131
- // Parameters 'cmdWait' and 'wait' are mutually exclusive.
132
- // 2. mutually exclusive - conName and conType
133
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --output "NO" --wait "30"
134
- // Parameters 'cmdWait' and 'wait' are mutually exclusive.
135
- // 3. mutually exclusive - output = No and wait
136
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --conType "NO" --conName "30"
137
- // Parameters 'conType' and 'conName' are mutually exclusive.
138
- // 4. mutually exclusive - stopMsg and stopResp
139
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --stopMsg "NO" --stopResp "30"
140
- // Parameters 'stopMsg' and 'stopResp' are mutually exclusive.
141
- if ((cmdWait !== "" && cmdWait !== undefined) && (wait !== "" && wait !== undefined)) {
142
- params.response.console.log("Parameters 'cmdWait' and 'wait' are mutually exclusive.");
143
- /* istanbul ignore next */
144
- return null;
145
- }
146
- if ((output === "NO") && (wait !== "" && wait !== undefined)) {
147
- params.response.console.log(`Parameters 'output = "NO"' and 'wait' = ${wait} are mutually exclusive.`);
148
- /* istanbul ignore next */
149
- return null;
150
- }
151
- if ((conType !== "" && conType !== undefined) && (conName !== "" && conName !== undefined)) {
152
- params.response.console.log("Parameters 'conType' and 'conName' are mutually exclusive.");
153
- /* istanbul ignore next */
154
- return null;
155
- }
156
- if ((stopMsg !== "" && stopMsg !== undefined) && (stopResp !== "" && stopResp !== undefined)) {
157
- params.response.console.log("Parameters 'stopMsg' and 'stopResp' are mutually exclusive.");
158
- /* istanbul ignore next */
159
- return null;
160
- }
161
127
  const executeCommandUrl = utils_1.CommandUtils.getExecuteCommandURL(session, subSystem);
162
- const commandBody = {
163
- command: command
164
- };
165
- if (bmpCmdOut !== "" && bmpCmdOut !== undefined) {
166
- commandBody.bmpCmdOut = bmpCmdOut;
167
- }
168
- if (capture !== "" && capture !== undefined) {
169
- commandBody.capture = capture;
170
- }
171
- if (cart !== "" && cart !== undefined) {
172
- commandBody.cart = cart;
173
- }
174
- if (cmdEcho !== "" && cmdEcho !== undefined) {
175
- commandBody.cmdEcho = cmdEcho;
176
- }
177
- if (cmdLog !== "" && cmdLog !== undefined) {
178
- commandBody.cmdLog = cmdLog;
179
- }
180
- if (cmdWait !== "" && cmdWait !== undefined) {
181
- commandBody.cmdWait = cmdWait;
182
- }
183
- if (conName !== "" && conName !== undefined) {
184
- commandBody.conName = conName;
185
- }
186
- if (conType !== "" && conType !== undefined) {
187
- commandBody.conType = conType;
188
- }
189
- if (imsId !== "" && imsId !== undefined) {
190
- commandBody.imsId = imsId;
191
- }
192
- if (imsPlex !== "" && imsPlex !== undefined) {
193
- commandBody.imsPlex = imsPlex;
194
- }
195
- if (imsReply !== "" && imsReply !== undefined) {
196
- commandBody.imsReply = imsReply;
197
- }
198
- if (interval !== "" && interval !== undefined) {
199
- commandBody.interval = interval;
200
- }
201
- if (localOnly !== "" && localOnly !== undefined) {
202
- commandBody.localOnly = localOnly;
203
- }
204
- if (log !== "" && log !== undefined) {
205
- commandBody.log = log;
206
- }
207
- if (maxCmdOut !== "" && maxCmdOut !== undefined) {
208
- commandBody.maxCmdOut = maxCmdOut;
209
- }
210
- if (output !== "" && output !== undefined) {
211
- commandBody.output = output;
212
- }
213
- if (stopEnd !== "" && stopEnd !== undefined) {
214
- commandBody.stopEnd = stopEnd;
215
- }
216
- if (stopMsg !== "" && stopMsg !== undefined) {
217
- commandBody.stopMsg = stopMsg;
218
- }
219
- if (stopResp !== "" && stopResp !== undefined) {
220
- commandBody.stopResp = stopResp;
221
- }
222
- if (wait !== "" && wait !== undefined) {
223
- commandBody.wait = wait;
224
- }
225
- if (debug !== "" && debug !== undefined) {
226
- commandBody.debug = debug;
128
+ const commandBody = {};
129
+ const propertiesToCopy = ["command", "bmpCmdOut", "capture", "cart", "cmdEcho", "cmdLog", "cmdWait",
130
+ "conName", "conType", "imsId", "imsPlex", "imsReply", "interval", "localOnly", "log", "maxCmdOut", "output", "stopEnd", "stopMsg",
131
+ "stopResp", "debug"];
132
+ propertiesToCopy.forEach(property => {
133
+ if (body[property] !== undefined) {
134
+ commandBody[property] = body[property];
135
+ }
136
+ });
137
+ if (wait) {
138
+ imperative_1.ImperativeExpect.toBeEqual(Number(wait) > 0 && Number(wait) <= CommandParameterDefinitions_1.CommandParameterDefinitions.WAIT_TIME, true, `Wait value must be between 1 and ${RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME} (inclusive), if specified. You specified: ${wait}`);
227
139
  }
228
140
  return OpsRestClient_1.OpsRestClient.postExpectJSON(session, executeCommandUrl, constants_1.OpsConstants.headers, commandBody);
229
141
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Execute.js","sourceRoot":"","sources":["../../src/api/Execute.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAkG;AAClG,mCAAkD;AAClD,2CAA2C;AAG3C,yDAAsD;AACtD,8EAA2E;AAC3E,oFAAiF;AAIjF;;;;;;;;;GASG;AACH,SAAsB,WAAW,CAAC,OAAgB,EAAE,IAA6B,EAAE,SAAiB,EAAE,IAAY;;QAC9G,MAAM,cAAc,GAAG,iBAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QACvE,MAAM,WAAW,GAA4B,EAAE,CAAC;QAChD,MAAM,gBAAgB,GAAsC,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,OAAO,CAAC,CAAC;QAE3I,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAClC,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,SAAS,EAAE;gBAChC,WAAW,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;aACxC;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,QAAQ,GAAyB,MAAM,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,cAAc,EAAE,wBAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;QACtI,OAAO,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,aAAa,EAAE,IAAI,CAAC,CAAC;IAC5E,CAAC;CAAA;AAbD,kCAaC;AAED;;;;;;;;;GASG;AACH,SAAsB,WAAW,CAAC,OAAgB,EAAE,OAAe,EAAE,aAAqB,EAAE,IAAY;;QAEpG,6BAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MA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CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC;aACxC;QACH,CAAC,CAAC,CAAC;QAEH,IAAI,IAAI,EAAE;YACN,6BAAgB,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,yDAA2B,CAAC,SAAS,EAAE,IAAI,EACtG,oCAAoC,mDAAwB,CAAC,SAAS,8CAA8C,IAAI,EAAE,CAAC,CAAC;SACnI;QACD,OAAO,6BAAa,CAAC,cAAc,CAAC,OAAO,EAAE,iBAAiB,EAAE,wBAAY,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACvG,CAAC;CAAA;AAnBD,wCAmBC"}
package/lib/api/Show.d.ts CHANGED
@@ -1,10 +1,68 @@
1
- import { IHandlerParameters, Session } from "@zowe/imperative";
2
- import { IShowLognameResponse, IShowResourceResponse, IShowRuleResponse, IShowRulesetResponse, IShowStatusResponse, IShowSubsystemResponse } from ".";
1
+ import { Session } from "@zowe/imperative";
2
+ import { IShowLognameResponse, IShowResourceResponse, IShowRuleResponse, IShowRulesetResponse, IShowStatusResponse, IShowSubsystemResponse, IShowRecordsResponse } from ".";
3
+ import { IShowTableResponse } from "./doc/IShowTableResponse";
4
+ import { IShowRecordsCommandBody } from "./doc/IShowRecordsCommandBody";
3
5
  export declare function showRule(session: Session, ruleSetName: string, ruleName: string, restApi: boolean, subSystem: string): Promise<IShowRuleResponse>;
4
6
  export declare function showResource(session: Session, resourceName: string, restApi: boolean, table: string, subsystem: string): Promise<IShowResourceResponse>;
5
- export declare function showRuleset(session: Session, ruleSetName: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowRulesetResponse>;
6
- export declare function showStatus(session: Session, restApi: boolean, params: IHandlerParameters): Promise<IShowStatusResponse>;
7
- export declare function showLogname(session: Session, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowLognameResponse>;
8
- export declare function showSubsystem(session: Session, restApi: boolean, params: IHandlerParameters): Promise<IShowSubsystemResponse>;
9
- export declare function showTable(session: Session, restApi: boolean, subSystem: string, table: string, params: IHandlerParameters): Promise<IShowLognameResponse>;
10
- export declare function showParms(session: Session, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowLognameResponse>;
7
+ export declare function showRuleset(session: Session, body: {
8
+ ruleSetName: string;
9
+ subSystem: string;
10
+ }): Promise<IShowRulesetResponse>;
11
+ /**
12
+ * returns system status
13
+ *
14
+ * @export
15
+ * @param {Session} session
16
+ * @return {*} {Promise<IShowStatusResponse>}
17
+ */
18
+ export declare function showStatus(session: Session): Promise<IShowStatusResponse>;
19
+ /**
20
+ * returns list of opslog names
21
+ *
22
+ * @export
23
+ * @param {Session} session
24
+ * @param {string} subSystem
25
+ * @return {*} {Promise<IShowLognameResponse>}
26
+ */
27
+ export declare function showLogname(session: Session, subSystem: string): Promise<IShowLognameResponse>;
28
+ /**
29
+ * returns list of subsytems
30
+ *
31
+ * @export
32
+ * @param {Session} session
33
+ * @return {*} {Promise<IShowSubsystemResponse>}
34
+ */
35
+ export declare function showSubsystem(session: Session): Promise<IShowSubsystemResponse>;
36
+ /**
37
+ * returns a list of rdf tables that match request
38
+ *
39
+ * @export
40
+ * @param {Session} session
41
+ * @param {string} subSystem
42
+ * @param {string} table
43
+ * @param {IHandlerParameters} params
44
+ * @return {*} {Promise<IShowLognameResponse>}
45
+ */
46
+ export declare function showTable(session: Session, body: {
47
+ subSystem?: string;
48
+ table?: string;
49
+ }): Promise<IShowTableResponse>;
50
+ /**
51
+ * returns a list of SSM parms
52
+ *
53
+ * @export
54
+ * @param {Session} session
55
+ * @param {string} subSystem
56
+ * @return {*} {Promise<IShowLognameResponse>}
57
+ */
58
+ export declare function showSSMParms(session: Session, subSystem: string): Promise<IShowLognameResponse>;
59
+ /**
60
+ * returns a list of OPSLOG records
61
+ *
62
+ * @export
63
+ * @param {Session} session
64
+ * @param {IShowRecordsCommandBody} body
65
+ * @param {string} subSystem
66
+ * @return {*} {Promise<IShowRecordsResponse>}
67
+ */
68
+ export declare function showRecords(session: Session, body: IShowRecordsCommandBody, subSystem: string): Promise<IShowRecordsResponse>;