@broadcom/ops-for-zowe-cli 5.0.1 → 5.2.0

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 (161) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +105 -67
  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 -108
  8. package/lib/api/Execute.js.map +1 -1
  9. package/lib/api/Show.d.ts +66 -7
  10. package/lib/api/Show.js +80 -62
  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/constants/Ops.constants.js +1 -0
  16. package/lib/api/constants/Ops.constants.js.map +1 -1
  17. package/lib/api/doc/IExecuteCommandCommandBody.d.ts +23 -0
  18. package/lib/{cli/LognameParameterDefinitions.js → api/doc/IExecuteCommandCommandBody.js} +1 -16
  19. package/lib/api/doc/IExecuteCommandCommandBody.js.map +1 -0
  20. package/lib/api/doc/IShowLognameResponse.d.ts +2 -2
  21. package/lib/api/doc/IShowRecordsCommandBody.d.ts +16 -0
  22. package/lib/api/doc/IShowRecordsCommandBody.js +25 -0
  23. package/lib/api/doc/IShowRecordsCommandBody.js.map +1 -0
  24. package/lib/api/doc/IShowRecordsResponse.d.ts +55 -0
  25. package/lib/api/doc/IShowRecordsResponse.js +25 -0
  26. package/lib/api/doc/IShowRecordsResponse.js.map +1 -0
  27. package/lib/api/doc/IShowSubsystemsResponse.d.ts +2 -2
  28. package/lib/api/doc/IShowTableResponse.d.ts +3 -0
  29. package/lib/{cli/SubsystemsParameterDefinitions.js → api/doc/IShowTableResponse.js} +1 -16
  30. package/lib/api/doc/IShowTableResponse.js.map +1 -0
  31. package/lib/api/doc/index.d.ts +9 -0
  32. package/lib/api/doc/index.js +48 -0
  33. package/lib/api/doc/index.js.map +1 -0
  34. package/lib/api/index.d.ts +1 -8
  35. package/lib/api/index.js +1 -8
  36. package/lib/api/index.js.map +1 -1
  37. package/lib/api/utils/CommandListUtils.js +8 -3
  38. package/lib/api/utils/CommandListUtils.js.map +1 -1
  39. package/lib/api/utils/LognameListUtils.js +0 -1
  40. package/lib/api/utils/LognameListUtils.js.map +1 -1
  41. package/lib/api/utils/OpsRestClient.js +0 -2
  42. package/lib/api/utils/OpsRestClient.js.map +1 -1
  43. package/lib/api/utils/OpsRestUtils.js +3 -3
  44. package/lib/api/utils/OpsRestUtils.js.map +1 -1
  45. package/lib/api/utils/OpsTextUtils.js +0 -1
  46. package/lib/api/utils/OpsTextUtils.js.map +1 -1
  47. package/lib/api/utils/ParmsListUtils.d.ts +11 -0
  48. package/lib/api/utils/ParmsListUtils.js +107 -0
  49. package/lib/api/utils/ParmsListUtils.js.map +1 -0
  50. package/lib/api/utils/ParmsUtils.d.ts +4 -0
  51. package/lib/api/utils/ParmsUtils.js +41 -0
  52. package/lib/api/utils/ParmsUtils.js.map +1 -0
  53. package/lib/api/utils/RecordsListUtils.d.ts +53 -0
  54. package/lib/api/utils/RecordsListUtils.js +146 -0
  55. package/lib/api/utils/RecordsListUtils.js.map +1 -0
  56. package/lib/api/utils/RecordsUtils.d.ts +5 -0
  57. package/lib/api/utils/RecordsUtils.js +45 -0
  58. package/lib/api/utils/RecordsUtils.js.map +1 -0
  59. package/lib/api/utils/RexxListUtils.js +7 -6
  60. package/lib/api/utils/RexxListUtils.js.map +1 -1
  61. package/lib/api/utils/RuleUtils.js +2 -2
  62. package/lib/api/utils/RuleUtils.js.map +1 -1
  63. package/lib/api/utils/RulesetListUtils.js +0 -1
  64. package/lib/api/utils/RulesetListUtils.js.map +1 -1
  65. package/lib/api/utils/RulesetUtils.d.ts +1 -1
  66. package/lib/api/utils/RulesetUtils.js +1 -1
  67. package/lib/api/utils/RulesetUtils.js.map +1 -1
  68. package/lib/api/utils/SubsystemListUtils.js +0 -1
  69. package/lib/api/utils/SubsystemListUtils.js.map +1 -1
  70. package/lib/api/utils/TableUtils.d.ts +4 -1
  71. package/lib/api/utils/TableUtils.js +7 -7
  72. package/lib/api/utils/TableUtils.js.map +1 -1
  73. package/lib/api/utils/index.d.ts +5 -0
  74. package/lib/api/utils/index.js +5 -0
  75. package/lib/api/utils/index.js.map +1 -1
  76. package/lib/cli/CommandParameterDefinitions.d.ts +0 -1
  77. package/lib/cli/CommandParameterDefinitions.js +0 -11
  78. package/lib/cli/CommandParameterDefinitions.js.map +1 -1
  79. package/lib/cli/{StatusParameterDefinitions.d.ts → FormatParameterDefinitions.d.ts} +1 -1
  80. package/lib/cli/{StatusParameterDefinitions.js → FormatParameterDefinitions.js} +5 -5
  81. package/lib/cli/{StatusParameterDefinitions.js.map → FormatParameterDefinitions.js.map} +1 -1
  82. package/lib/cli/OpsBaseHandler.js +0 -2
  83. package/lib/cli/OpsBaseHandler.js.map +1 -1
  84. package/lib/cli/RecordsParameterDefinitions.d.ts +18 -0
  85. package/lib/cli/RecordsParameterDefinitions.js +157 -0
  86. package/lib/cli/RecordsParameterDefinitions.js.map +1 -0
  87. package/lib/cli/ResourceParameterDefinitions.d.ts +0 -1
  88. package/lib/cli/ResourceParameterDefinitions.js +0 -11
  89. package/lib/cli/ResourceParameterDefinitions.js.map +1 -1
  90. package/lib/cli/RexxParameterDefinitions.d.ts +0 -1
  91. package/lib/cli/RexxParameterDefinitions.js +0 -11
  92. package/lib/cli/RexxParameterDefinitions.js.map +1 -1
  93. package/lib/cli/RuleParameterDefinitions.d.ts +1 -2
  94. package/lib/cli/RuleParameterDefinitions.js +0 -11
  95. package/lib/cli/RuleParameterDefinitions.js.map +1 -1
  96. package/lib/cli/RulesetParameterDefinitions.d.ts +0 -1
  97. package/lib/cli/RulesetParameterDefinitions.js +0 -11
  98. package/lib/cli/RulesetParameterDefinitions.js.map +1 -1
  99. package/lib/cli/TableParameterDefinitions.d.ts +0 -1
  100. package/lib/cli/TableParameterDefinitions.js +0 -11
  101. package/lib/cli/TableParameterDefinitions.js.map +1 -1
  102. package/lib/cli/create/event/Event.handler.js +12 -2
  103. package/lib/cli/create/event/Event.handler.js.map +1 -1
  104. package/lib/cli/disable/rule/Rule.definition.js +2 -1
  105. package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
  106. package/lib/cli/execute/command/Command.definition.js +2 -1
  107. package/lib/cli/execute/command/Command.definition.js.map +1 -1
  108. package/lib/cli/execute/command/Command.handler.js +50 -5
  109. package/lib/cli/execute/command/Command.handler.js.map +1 -1
  110. package/lib/cli/execute/rexx/Rexx.definition.js +2 -1
  111. package/lib/cli/execute/rexx/Rexx.definition.js.map +1 -1
  112. package/lib/cli/show/Show.definition.js +10 -5
  113. package/lib/cli/show/Show.definition.js.map +1 -1
  114. package/lib/cli/show/logname/Logname.definition.js +2 -2
  115. package/lib/cli/show/logname/Logname.definition.js.map +1 -1
  116. package/lib/cli/show/logname/Logname.handler.js +4 -2
  117. package/lib/cli/show/logname/Logname.handler.js.map +1 -1
  118. package/lib/cli/show/parms/Parms.definition.d.ts +17 -0
  119. package/lib/cli/show/parms/Parms.definition.js +62 -0
  120. package/lib/cli/show/parms/Parms.definition.js.map +1 -0
  121. package/lib/cli/show/parms/Parms.handler.d.ts +5 -0
  122. package/lib/cli/show/parms/Parms.handler.js +51 -0
  123. package/lib/cli/show/parms/Parms.handler.js.map +1 -0
  124. package/lib/cli/show/records/Records.definition.d.ts +17 -0
  125. package/lib/cli/show/records/Records.definition.js +82 -0
  126. package/lib/cli/show/records/Records.definition.js.map +1 -0
  127. package/lib/cli/show/records/Records.handler.d.ts +5 -0
  128. package/lib/cli/show/records/Records.handler.js +67 -0
  129. package/lib/cli/show/records/Records.handler.js.map +1 -0
  130. package/lib/cli/show/resource/Resource.definition.js +2 -1
  131. package/lib/cli/show/resource/Resource.definition.js.map +1 -1
  132. package/lib/cli/show/rule/Rule.definition.js +2 -1
  133. package/lib/cli/show/rule/Rule.definition.js.map +1 -1
  134. package/lib/cli/show/ruleset/Ruleset.definition.js +2 -1
  135. package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -1
  136. package/lib/cli/show/ruleset/Ruleset.handler.js +8 -2
  137. package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -1
  138. package/lib/cli/show/status/Status.definition.js +2 -2
  139. package/lib/cli/show/status/Status.handler.js +4 -2
  140. package/lib/cli/show/status/Status.handler.js.map +1 -1
  141. package/lib/cli/show/subsystem/Subsystem.definition.js +2 -2
  142. package/lib/cli/show/subsystem/Subsystem.definition.js.map +1 -1
  143. package/lib/cli/show/subsystem/Subsystem.handler.js +4 -2
  144. package/lib/cli/show/subsystem/Subsystem.handler.js.map +1 -1
  145. package/lib/cli/show/table/Table.definition.js +2 -1
  146. package/lib/cli/show/table/Table.definition.js.map +1 -1
  147. package/lib/cli/show/table/Table.handler.js +8 -2
  148. package/lib/cli/show/table/Table.handler.js.map +1 -1
  149. package/lib/healthCheck.handler.js +0 -1
  150. package/lib/healthCheck.handler.js.map +1 -1
  151. package/lib/index.d.ts +2 -0
  152. package/lib/index.js +2 -0
  153. package/lib/index.js.map +1 -1
  154. package/package.json +7 -7
  155. package/imgs/zowe-conformant-v1.png +0 -0
  156. package/imgs/zowe-conformant-zowev2-cli-color.png +0 -0
  157. package/imgs/zowe-conformant-zowev3-cli-color.png +0 -0
  158. package/lib/cli/LognameParameterDefinitions.d.ts +0 -4
  159. package/lib/cli/LognameParameterDefinitions.js.map +0 -1
  160. package/lib/cli/SubsystemsParameterDefinitions.d.ts +0 -4
  161. package/lib/cli/SubsystemsParameterDefinitions.js.map +0 -1
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
@@ -12,6 +12,8 @@ Using the plug-in, you can benefit from the following OPS/MVS features:
12
12
  - *Display the log names.
13
13
  - *Display the subsystems.
14
14
  - *Display RDF tables.
15
+ - *Display SSM parms.
16
+ - *Display OPSLOG records.
15
17
  - *Execute a REXX program.
16
18
  - *Execute a operator command.
17
19
  - *Create a generic AOF event for API rules processing.
@@ -21,7 +23,7 @@ Note: * Indicates only available if you are using the plug-in with the OPS/MVS R
21
23
  ## Prerequisites
22
24
  - Install <a href="https://docs.zowe.org/stable/user-guide/cli-installcli/" target="_blank">Zowe CLI</a> on your computer.
23
25
 
24
- <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">
25
27
 
26
28
  - Install one of the following OPS/MVS components:
27
29
  - <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>
@@ -57,6 +59,12 @@ When the validation process is successful, the following message displays:
57
59
  If the validation process fails, a failure message displays.
58
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.
59
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
+
60
68
  ## Create an OPS/MVS Profile
61
69
  You can set up an OPS/MVS profile to avoid typing your connection details on every command.
62
70
  1. Gather the following data:
@@ -84,9 +92,24 @@ You can set up an OPS/MVS profile to avoid typing your connection details on eve
84
92
  zowe config set profiles.ops.properties.rest-api true or false --gc
85
93
  ```
86
94
 
87
- 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:
88
96
 
89
- ![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
+ ```
90
113
 
91
114
 
92
115
  ## Create an OPS/MVS Profile for the Zowe API ML</a>
@@ -102,13 +125,29 @@ To create an OPS/MVS plug-in profile for the Zowe API ML:
102
125
 
103
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.
104
127
 
105
- 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:
106
129
 
107
- ![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
+ ```
108
147
 
109
148
  ## Using the OPS/MVS Plug-in for Zowe CLI
110
149
 
111
- 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.
112
151
 
113
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:
114
153
 
@@ -124,84 +163,83 @@ When you enter a command using the OPS/MVS Plug-in for Zowe CLI, you will receiv
124
163
 
125
164
  1 - Execution failed
126
165
 
127
- ## Changes in Release 5.0.0
128
- 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.
129
168
 
130
- Release 5.0.0 includes a breaking change and support for the OPS/MVS REST API.
169
+ ### create
131
170
 
132
- ### Breaking Change: Positional Arguments
133
- The commands `start resource` and `stop resource` have the following positional arguments.
134
- In a breaking change, `tablename` is now a required positional argument.
171
+ - **create event***
135
172
 
136
- **resourcename** (string)(optional)
137
-
138
- The name of the resource.
173
+ - Use the `create event` command to create a generic AOF event for API rules processing.
139
174
 
140
- **tablename** (string)(required)
141
-
142
- The name of the table that contains the resource.
143
-
175
+ ### disable
144
176
 
145
- ### New Commands
177
+ - **disable rule**
146
178
 
147
- **Note:** The following new 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.
148
180
 
149
- **show ruleset**
150
-
151
- Use the new `show ruleset` command to display the status of a specific automation rule set.
181
+ ### enable
152
182
 
153
- **show logname**
183
+ - **enable rule**
154
184
 
155
- 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.
156
186
 
157
- **show status**
187
+ ### execute
158
188
 
159
- Use the new `show status` command to display the status of the REST API server.
189
+ - **execute command***
160
190
 
161
- **show subsystem**
191
+ - Use the `execute command` command to execute the specified operator command.
162
192
 
163
- Use the new `show subsystem` command to display the subsystems running on an OPS system.
193
+ - **execute rexx***
164
194
 
165
- **execute rexx**
195
+ - Use the `execute rexx` command to execute the specified OPS/MVS REXX program.
166
196
 
167
- Use the new `execute rexx` command to execute the specified OPS/MVS REXX program.
197
+ ### show
168
198
 
169
- **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.
170
- The work-around is to specify two single quotes. Example: "''fully.qualified.dataset(member)''"
199
+ - **show logname***
171
200
 
172
- ### Enhanced Commands
201
+ - Use the `show logname` command to display the logs defined to a subsystem.
173
202
 
174
- **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.
175
-
176
- **show resource**
177
-
178
- 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:
179
-
180
- ```
181
- zowe ops show resource * --table MYTABLE --subsystem OPSS
182
- ```
183
-
184
- 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:
185
-
186
- ```
187
- zowe ops show resource * --subsystem OPSS
188
- ```
189
-
190
- **show rule**
203
+ - **show parms***
204
+
205
+ - Use the `show parms` command to display all the SSM parameters defined to a subsystem.
206
+
207
+ - **show records***
208
+
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***
191
220
 
192
- 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:
193
-
194
- ```
195
- zowe ops show rule OPSRULES * --subsystem OPSS
196
- ```
197
- 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:
198
-
199
- ```
200
- zowe ops show rule * * --subsystem OPSS
201
- ```
221
+ - Use the `show ruleset` command to display the status of a specific automation rule set.
202
222
 
203
- ## Uninstall the OPS/MVS Plug-in From Zowe CLI
204
- To uninstall the plug-in from Zowe CLI, issue the following command:
205
- ```sh
206
- zowe plugins uninstall @broadcom/ops-for-zowe-cli
207
- ```
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,116 +112,30 @@ function retrieveRexx(session, instanceToken) {
112
112
  });
113
113
  }
114
114
  exports.retrieveRexx = retrieveRexx;
115
- 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) {
116
126
  return __awaiter(this, void 0, void 0, function* () {
117
- if (!restApi) {
118
- // Display message indicating 'execute command' not supported with web services
119
- params.response.console.log("Command 'execute command' is only supported with the OPS/MVS REST API server");
120
- /* istanbul ignore next */
121
- return null;
122
- }
123
- if (wait != null) {
124
- 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}`);
125
- }
126
- // Validation
127
- // 1. mutually exclusive - cmdWait and wait
128
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --cmdWait "30" --wait "30"
129
- // Parameters 'cmdWait' and 'wait' are mutually exclusive.
130
- // 2. mutually exclusive - conName and conType
131
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --output "NO" --wait "30"
132
- // Parameters 'cmdWait' and 'wait' are mutually exclusive.
133
- // 3. mutually exclusive - output = No and wait
134
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --conType "NO" --conName "30"
135
- // Parameters 'conType' and 'conName' are mutually exclusive.
136
- // 4. mutually exclusive - stopMsg and stopResp
137
- // $ zowe ops execute command "D T" --ops-p "ops11restapi" --stopMsg "NO" --stopResp "30"
138
- // Parameters 'stopMsg' and 'stopResp' are mutually exclusive.
139
- if ((cmdWait !== "" && cmdWait !== undefined) && (wait !== "" && wait !== undefined)) {
140
- params.response.console.log("Parameters 'cmdWait' and 'wait' are mutually exclusive.");
141
- /* istanbul ignore next */
142
- return null;
143
- }
144
- if ((output === "NO") && (wait !== "" && wait !== undefined)) {
145
- params.response.console.log(`Parameters 'output = "NO"' and 'wait' = ${wait} are mutually exclusive.`);
146
- /* istanbul ignore next */
147
- return null;
148
- }
149
- if ((conType !== "" && conType !== undefined) && (conName !== "" && conName !== undefined)) {
150
- params.response.console.log("Parameters 'conType' and 'conName' are mutually exclusive.");
151
- /* istanbul ignore next */
152
- return null;
153
- }
154
- if ((stopMsg !== "" && stopMsg !== undefined) && (stopResp !== "" && stopResp !== undefined)) {
155
- params.response.console.log("Parameters 'stopMsg' and 'stopResp' are mutually exclusive.");
156
- /* istanbul ignore next */
157
- return null;
158
- }
159
127
  const executeCommandUrl = utils_1.CommandUtils.getExecuteCommandURL(session, subSystem);
160
- const commandBody = {
161
- command: command
162
- };
163
- if (bmpCmdOut !== "" && bmpCmdOut !== undefined) {
164
- commandBody.bmpCmdOut = bmpCmdOut;
165
- }
166
- if (capture !== "" && capture !== undefined) {
167
- commandBody.capture = capture;
168
- }
169
- if (cart !== "" && cart !== undefined) {
170
- commandBody.cart = cart;
171
- }
172
- if (cmdEcho !== "" && cmdEcho !== undefined) {
173
- commandBody.cmdEcho = cmdEcho;
174
- }
175
- if (cmdLog !== "" && cmdLog !== undefined) {
176
- commandBody.cmdLog = cmdLog;
177
- }
178
- if (cmdWait !== "" && cmdWait !== undefined) {
179
- commandBody.cmdWait = cmdWait;
180
- }
181
- if (conName !== "" && conName !== undefined) {
182
- commandBody.conName = conName;
183
- }
184
- if (conType !== "" && conType !== undefined) {
185
- commandBody.conType = conType;
186
- }
187
- if (imsId !== "" && imsId !== undefined) {
188
- commandBody.imsId = imsId;
189
- }
190
- if (imsPlex !== "" && imsPlex !== undefined) {
191
- commandBody.imsPlex = imsPlex;
192
- }
193
- if (imsReply !== "" && imsReply !== undefined) {
194
- commandBody.imsReply = imsReply;
195
- }
196
- if (interval !== "" && interval !== undefined) {
197
- commandBody.interval = interval;
198
- }
199
- if (localOnly !== "" && localOnly !== undefined) {
200
- commandBody.localOnly = localOnly;
201
- }
202
- if (log !== "" && log !== undefined) {
203
- commandBody.log = log;
204
- }
205
- if (maxCmdOut !== "" && maxCmdOut !== undefined) {
206
- commandBody.maxCmdOut = maxCmdOut;
207
- }
208
- if (output !== "" && output !== undefined) {
209
- commandBody.output = output;
210
- }
211
- if (stopEnd !== "" && stopEnd !== undefined) {
212
- commandBody.stopEnd = stopEnd;
213
- }
214
- if (stopMsg !== "" && stopMsg !== undefined) {
215
- commandBody.stopMsg = stopMsg;
216
- }
217
- if (stopResp !== "" && stopResp !== undefined) {
218
- commandBody.stopResp = stopResp;
219
- }
220
- if (wait !== "" && wait !== undefined) {
221
- commandBody.wait = wait;
222
- }
223
- if (debug !== "" && debug !== undefined) {
224
- 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}`);
225
139
  }
226
140
  return OpsRestClient_1.OpsRestClient.postExpectJSON(session, executeCommandUrl, constants_1.Op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Q,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,9 +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>;
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>;