@broadcom/ops-for-zowe-cli 5.0.0-next.202401231457 → 5.0.0-next.202408051627

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 (174) hide show
  1. package/README.md +154 -73
  2. package/lib/api/Execute.d.ts +5 -0
  3. package/lib/api/Execute.js +138 -0
  4. package/lib/api/Execute.js.map +1 -0
  5. package/lib/api/OpsProfilesConfig.js +5 -19
  6. package/lib/api/OpsProfilesConfig.js.map +1 -1
  7. package/lib/api/Show.d.ts +8 -1
  8. package/lib/api/Show.js +57 -7
  9. package/lib/api/Show.js.map +1 -1
  10. package/lib/api/Update.js +57 -45
  11. package/lib/api/Update.js.map +1 -1
  12. package/lib/api/constants/Ops.constants.js +17 -8
  13. package/lib/api/constants/Ops.constants.js.map +1 -1
  14. package/lib/api/doc/IExecuteRexxResponse.d.ts +9 -0
  15. package/lib/api/doc/IExecuteRexxResponse.js +34 -0
  16. package/lib/api/doc/IExecuteRexxResponse.js.map +1 -0
  17. package/lib/api/doc/IShowLognameResponse.d.ts +12 -0
  18. package/lib/api/doc/IShowLognameResponse.js +25 -0
  19. package/lib/api/doc/IShowLognameResponse.js.map +1 -0
  20. package/lib/api/doc/IShowStatusResponse.d.ts +13 -0
  21. package/lib/api/doc/IShowStatusResponse.js +25 -0
  22. package/lib/api/doc/IShowStatusResponse.js.map +1 -0
  23. package/lib/api/doc/IShowSubsystemsResponse.d.ts +12 -0
  24. package/lib/api/doc/IShowSubsystemsResponse.js +25 -0
  25. package/lib/api/doc/IShowSubsystemsResponse.js.map +1 -0
  26. package/lib/api/index.d.ts +6 -0
  27. package/lib/api/index.js +6 -0
  28. package/lib/api/index.js.map +1 -1
  29. package/lib/api/utils/LognameListUtils.d.ts +12 -0
  30. package/lib/api/utils/LognameListUtils.js +104 -0
  31. package/lib/api/utils/LognameListUtils.js.map +1 -0
  32. package/lib/api/utils/LognameUtils.d.ts +4 -0
  33. package/lib/api/utils/LognameUtils.js +41 -0
  34. package/lib/api/utils/LognameUtils.js.map +1 -0
  35. package/lib/api/utils/OpsRestClient.js +2 -0
  36. package/lib/api/utils/OpsRestClient.js.map +1 -1
  37. package/lib/api/utils/OpsRestUtils.d.ts +1 -0
  38. package/lib/api/utils/OpsRestUtils.js +18 -6
  39. package/lib/api/utils/OpsRestUtils.js.map +1 -1
  40. package/lib/api/utils/OpsTextUtils.d.ts +1 -1
  41. package/lib/api/utils/OpsTextUtils.js +8 -4
  42. package/lib/api/utils/OpsTextUtils.js.map +1 -1
  43. package/lib/api/utils/RexxListUtils.d.ts +9 -0
  44. package/lib/api/utils/RexxListUtils.js +146 -0
  45. package/lib/api/utils/RexxListUtils.js.map +1 -0
  46. package/lib/api/utils/RexxUtils.d.ts +5 -0
  47. package/lib/api/utils/RexxUtils.js +48 -0
  48. package/lib/api/utils/RexxUtils.js.map +1 -0
  49. package/lib/api/utils/RuleListUtils.d.ts +15 -3
  50. package/lib/api/utils/RuleListUtils.js +173 -21
  51. package/lib/api/utils/RuleListUtils.js.map +1 -1
  52. package/lib/api/utils/RuleUtils.d.ts +1 -3
  53. package/lib/api/utils/RuleUtils.js +21 -39
  54. package/lib/api/utils/RuleUtils.js.map +1 -1
  55. package/lib/api/utils/RulesetListUtils.d.ts +9 -1
  56. package/lib/api/utils/RulesetListUtils.js +102 -4
  57. package/lib/api/utils/RulesetListUtils.js.map +1 -1
  58. package/lib/api/utils/RulesetUtils.d.ts +0 -1
  59. package/lib/api/utils/RulesetUtils.js +6 -10
  60. package/lib/api/utils/RulesetUtils.js.map +1 -1
  61. package/lib/api/utils/SSMResourceListUtils.d.ts +14 -1
  62. package/lib/api/utils/SSMResourceListUtils.js +274 -17
  63. package/lib/api/utils/SSMResourceListUtils.js.map +1 -1
  64. package/lib/api/utils/{SSMUtils.d.ts → SSMResourceUtils.d.ts} +2 -3
  65. package/lib/api/utils/{SSMUtils.js → SSMResourceUtils.js} +39 -66
  66. package/lib/api/utils/SSMResourceUtils.js.map +1 -0
  67. package/lib/api/utils/StatusListUtils.d.ts +9 -0
  68. package/lib/api/utils/StatusListUtils.js +100 -0
  69. package/lib/api/utils/StatusListUtils.js.map +1 -0
  70. package/lib/api/utils/StatusUtils.d.ts +4 -0
  71. package/lib/api/utils/StatusUtils.js +37 -0
  72. package/lib/api/utils/StatusUtils.js.map +1 -0
  73. package/lib/api/utils/SubsystemListUtils.d.ts +12 -0
  74. package/lib/api/utils/SubsystemListUtils.js +104 -0
  75. package/lib/api/utils/SubsystemListUtils.js.map +1 -0
  76. package/lib/api/utils/SubsystemUtils.d.ts +4 -0
  77. package/lib/api/utils/SubsystemUtils.js +37 -0
  78. package/lib/api/utils/SubsystemUtils.js.map +1 -0
  79. package/lib/api/utils/index.d.ts +9 -1
  80. package/lib/api/utils/index.js +9 -1
  81. package/lib/api/utils/index.js.map +1 -1
  82. package/lib/cli/LognameParameterDefinitions.d.ts +4 -0
  83. package/lib/cli/LognameParameterDefinitions.js +40 -0
  84. package/lib/cli/LognameParameterDefinitions.js.map +1 -0
  85. package/lib/cli/OpsBaseHandler.js +4 -2
  86. package/lib/cli/OpsBaseHandler.js.map +1 -1
  87. package/lib/cli/ResourceParameterDefinitions.d.ts +1 -1
  88. package/lib/cli/ResourceParameterDefinitions.js +9 -4
  89. package/lib/cli/ResourceParameterDefinitions.js.map +1 -1
  90. package/lib/cli/RexxParameterDefinitions.d.ts +14 -0
  91. package/lib/cli/RexxParameterDefinitions.js +125 -0
  92. package/lib/cli/RexxParameterDefinitions.js.map +1 -0
  93. package/lib/cli/RuleParameterDefinitions.d.ts +2 -1
  94. package/lib/cli/RuleParameterDefinitions.js +11 -0
  95. package/lib/cli/RuleParameterDefinitions.js.map +1 -1
  96. package/lib/cli/RulesetParameterDefinitions.d.ts +1 -0
  97. package/lib/cli/RulesetParameterDefinitions.js +11 -0
  98. package/lib/cli/RulesetParameterDefinitions.js.map +1 -1
  99. package/lib/cli/StatusParameterDefinitions.d.ts +4 -0
  100. package/lib/cli/StatusParameterDefinitions.js +40 -0
  101. package/lib/cli/StatusParameterDefinitions.js.map +1 -0
  102. package/lib/cli/SubsystemsParameterDefinitions.d.ts +4 -0
  103. package/lib/cli/SubsystemsParameterDefinitions.js +40 -0
  104. package/lib/cli/SubsystemsParameterDefinitions.js.map +1 -0
  105. package/lib/cli/disable/Disable.definition.js +2 -2
  106. package/lib/cli/disable/Disable.definition.js.map +1 -1
  107. package/lib/cli/disable/rule/Rule.definition.js +3 -1
  108. package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
  109. package/lib/cli/disable/rule/Rule.handler.js +1 -1
  110. package/lib/cli/disable/rule/Rule.handler.js.map +1 -1
  111. package/lib/cli/enable/Enable.definition.js +2 -2
  112. package/lib/cli/enable/Enable.definition.js.map +1 -1
  113. package/lib/cli/enable/rule/Rule.handler.js +1 -1
  114. package/lib/cli/enable/rule/Rule.handler.js.map +1 -1
  115. package/lib/cli/execute/Execute.definition.d.ts +3 -0
  116. package/lib/cli/execute/Execute.definition.js +35 -0
  117. package/lib/cli/execute/Execute.definition.js.map +1 -0
  118. package/lib/cli/execute/rexx/Rexx.definition.d.ts +2 -0
  119. package/lib/cli/execute/rexx/Rexx.definition.js +55 -0
  120. package/lib/cli/execute/rexx/Rexx.definition.js.map +1 -0
  121. package/lib/cli/execute/rexx/Rexx.handler.d.ts +5 -0
  122. package/lib/cli/execute/rexx/Rexx.handler.js +46 -0
  123. package/lib/cli/execute/rexx/Rexx.handler.js.map +1 -0
  124. package/lib/cli/show/Show.definition.js +10 -5
  125. package/lib/cli/show/Show.definition.js.map +1 -1
  126. package/lib/cli/show/logname/Logname.definition.d.ts +17 -0
  127. package/lib/cli/show/logname/Logname.definition.js +62 -0
  128. package/lib/cli/show/logname/Logname.definition.js.map +1 -0
  129. package/lib/cli/show/logname/Logname.handler.d.ts +5 -0
  130. package/lib/cli/show/logname/Logname.handler.js +49 -0
  131. package/lib/cli/show/logname/Logname.handler.js.map +1 -0
  132. package/lib/cli/show/resource/Resource.definition.js +3 -1
  133. package/lib/cli/show/resource/Resource.definition.js.map +1 -1
  134. package/lib/cli/show/resource/Resource.handler.js +3 -3
  135. package/lib/cli/show/resource/Resource.handler.js.map +1 -1
  136. package/lib/cli/show/rule/Rule.definition.d.ts +1 -1
  137. package/lib/cli/show/rule/Rule.definition.js +9 -7
  138. package/lib/cli/show/rule/Rule.definition.js.map +1 -1
  139. package/lib/cli/show/rule/Rule.handler.js +5 -5
  140. package/lib/cli/show/rule/Rule.handler.js.map +1 -1
  141. package/lib/cli/show/ruleset/Ruleset.definition.js +1 -0
  142. package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -1
  143. package/lib/cli/show/ruleset/Ruleset.handler.js +3 -4
  144. package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -1
  145. package/lib/cli/show/status/Status.definition.d.ts +17 -0
  146. package/lib/cli/show/status/Status.definition.js +62 -0
  147. package/lib/cli/show/status/Status.definition.js.map +1 -0
  148. package/lib/cli/show/status/Status.handler.d.ts +5 -0
  149. package/lib/cli/show/status/Status.handler.js +49 -0
  150. package/lib/cli/show/status/Status.handler.js.map +1 -0
  151. package/lib/cli/show/subsystem/Subsystem.definition.d.ts +17 -0
  152. package/lib/cli/show/subsystem/Subsystem.definition.js +62 -0
  153. package/lib/cli/show/subsystem/Subsystem.definition.js.map +1 -0
  154. package/lib/cli/show/subsystem/Subsystem.handler.d.ts +5 -0
  155. package/lib/cli/show/subsystem/Subsystem.handler.js +49 -0
  156. package/lib/cli/show/subsystem/Subsystem.handler.js.map +1 -0
  157. package/lib/cli/start/Start.definition.js +2 -2
  158. package/lib/cli/start/Start.definition.js.map +1 -1
  159. package/lib/cli/start/resource/Resource.handler.js +3 -4
  160. package/lib/cli/start/resource/Resource.handler.js.map +1 -1
  161. package/lib/cli/stop/Stop.definition.js +2 -2
  162. package/lib/cli/stop/Stop.definition.js.map +1 -1
  163. package/lib/cli/stop/resource/Resource.definition.js +1 -1
  164. package/lib/cli/stop/resource/Resource.handler.js +3 -4
  165. package/lib/cli/stop/resource/Resource.handler.js.map +1 -1
  166. package/lib/healthCheck.handler.js +2 -1
  167. package/lib/healthCheck.handler.js.map +1 -1
  168. package/lib/imperative.js +0 -2
  169. package/lib/imperative.js.map +1 -1
  170. package/lib/index.d.ts +5 -1
  171. package/lib/index.js +5 -1
  172. package/lib/index.js.map +1 -1
  173. package/package.json +25 -24
  174. package/lib/api/utils/SSMUtils.js.map +0 -1
package/README.md CHANGED
@@ -1,120 +1,201 @@
1
1
  # OPS/MVS® Plug-in for Zowe CLI
2
2
 
3
- <img src="imgs/zowe-conformant-zowev2-cli-color.png" width=25% alt="Zowe v2 CLI Conformance Badge"/>
3
+ The Broadcom® OPS/MVS® Plug-in for Zowe CLI lets you interact with OPS/MVS automation elements, enabling efficient automation administration and resource management from a single command-line interface. The plug-in also lets you include automation administration and resource management in workflows to foster continuous integration.
4
4
 
5
- This repository contains the OPS/MVS® Plug-in for Zowe CLI (OPS).
5
+ ## Key Features
6
+ Using the plug-in, you can benefit from the following OPS/MVS features:
7
+ - Display the status of specific automation rules and *rule sets.
8
+ - Enable and disable specific automation rules.
9
+ - Display the state of specific System State Manager (SSM) resources.
10
+ - Start and stop specific SSM resources.
11
+ - *Display the status of a REST API server.
12
+ - *Display the log names.
13
+ - *Display the subsystems.
14
+ - *Execute a REXX program.
6
15
 
7
- ## Install the OPS/MVS® Plug-in From Packages
8
- To install the OPS/MVS® plug-in to the Zowe CLI from packages, issue the following commands:
9
- 1. Install the plug-in:
16
+ Note: * Indicates only available if you are using the plug-in with the OPS/MVS REST API.
10
17
 
11
- ```sh
12
- $ zowe plugins install @broadcom/ops-for-zowe-cli
13
- ```
18
+ ## Prerequisites
19
+ - Install <a href="https://docs.zowe.org/stable/user-guide/cli-installcli/" target="_blank">Zowe CLI</a> on your computer.
20
+
21
+ <img src="imgs/zowe-conformant-zowev2-cli-color.png" width=25% alt="Zowe v2 CLI Conformance Badge"/>
14
22
 
15
- **Note**: The `latest` npm tag installs a version of the product that is intended for public consumption. You can use different npm tags to install other versions of the product. For more information about tag usage, see [NPM Tag Names](https://github.com/zowe/zowe-cli/blob/master/docs/MaintainerVersioning.md#npm-tag-names).
23
+ - Install one of the following OPS/MVS components:
24
+ - <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>
25
+ - <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>
16
26
 
17
- 2. Validate the installed plug-in:
18
- ```sh
19
- $ zowe plugins validate @broadcom/ops-for-zowe-cli
20
- ```
27
+ 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.
21
28
 
22
- ## Install the OPS/MVS® Plug-in From Source
29
+ **Note:** To use the OPS/MVS Plug-in for Zowe CLI with the Zowe API Mediation Layer (API ML), you must use the OPS/MVS REST API. For more information, see [Create an OPS/MVS Profile for the Zowe API ML](#create-an-opsmvs-profile-for-the-zowe-api-ml).
30
+
31
+ ### Security Requirements
32
+ To issue OPS/MVS commands through the plug-in, you must be authorized for those commands through OPS/MVS
33
+ 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>.
34
+
35
+ ## Install the OPS/MVS Plug-in From a Local Package
36
+ To install the OPS/MVS plug-in to the Zowe CLI from a local package:
37
+ 1. Issue the following command to install the plug-in.
23
38
 
24
- ### Download and Build the Source Code
25
- To install the OPS/MVS® plug-in to the Zowe CLI from source, issue the following commands:
26
- 1. Clone this repository to your PC
27
- 2. In a command line, navigate to the repository
28
- 3. Install dependencies:
29
- ```sh
30
- $ npm install
31
- ```
32
- 4. Build the plug-in:
33
- ```sh
34
- $ npm run build
35
- ```
36
- 5. Install the plug-in:
37
39
  ```sh
38
- $ zowe plugins install .
40
+ zowe plugins install @broadcom/ops-for-zowe-cli
39
41
  ```
40
- 6. Validate the installed plug-in:
42
+ 2. Issue the following command to validate the installed plug-in.
41
43
  ```sh
42
- $ zowe plugins validate @broadcom/ops-for-zowe-cli
44
+ zowe plugins validate @broadcom/ops-for-zowe-cli
43
45
  ```
46
+ After the installation process completes, it validates that the plug-in was installed correctly and that the names of its commands, options, and arguments do not conflict with that of any other plug-ins that you have installed into your Zowe CLI implementation.
44
47
 
45
- ## Uninstall the OPS/MVS® Plug-in From Zowe CLI
46
- To uninstall the plug-in from Zowe CLI, issue the following command:
48
+ When the validation process is successful, the following message displays:
47
49
  ```sh
48
- $ zowe plugins uninstall @broadcom/ops-for-zowe-cli
50
+ _____ Validation results for plugin '@broadcom/ops-for-zowe-cli' _____
51
+ This plugin was successfully validated. Enjoy the plugin.
49
52
  ```
53
+ ### Installation Failure
54
+ If the validation process fails, a failure message displays.
55
+ 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.
50
56
 
51
- ### Create an OPS/MVS® Profile
57
+ ## Create an OPS/MVS Profile
58
+ You can set up an OPS/MVS profile to avoid typing your connection details on every command.
59
+ 1. Gather the following data:
60
+ - The host name of the LPAR on which OPS/MVS Web Services or the OPS/MVS REST API server is running
61
+ - The port number for OPS/MVS Web Services or the OPS/MVS REST API server
62
+ - A user name that has authority to access OPS/MVS Web Services or the OPS/MVS REST API server
63
+ - The password to the account assigned to the user name
64
+
65
+ 2. Do _one_ of the following:
52
66
 
53
- To create an OPS/MVS® plug-in profile gather the following data:
54
- - The host name of the LPAR on which OPS/MVS® Web Services or OPS/MVS® REST API server is running
55
- - The OPS/MVS® Web Services or OPS/MVS® REST API server port number
56
- - A user name that has authority to access OPS/MVS® Web Services or OPS/MVS® REST API server
57
- - The password to the account assigned to the user name
67
+ - Edit the global configuration file located at `~/.zowe/zowe.config.json` by issuing the following command.
68
+ ```sh
69
+ zowe config edit --gc
70
+ ```
58
71
 
59
- To create an OPS/MVS® profile, edit the "global config" located at ~/'.zowe/zowe.config.json' file:
60
- ```sh
61
- $ zowe config edit --gc
62
- ```
63
- NOTE: See the 'zowe.config.example.json' file in this project for examples of
64
- profiles for both OPS/MVS® Web Services or OPS/MVS® REST API server.
72
+ - Use `zowe config set profiles` commands to set the OPS/MVS profile. In the examples below, `ops` is the profile name.
73
+
74
+ ```zowe config set profiles.ops.properties.host example.net --gc
75
+ zowe config set profiles.ops.properties.port 1234 --gc
76
+ zowe config set profiles.ops.properties.user user --gc
77
+ zowe config set profiles.ops.properties.password password --gc
78
+ zowe config set profiles.ops.properties.reject-unauthorized true or false --gc
79
+ zowe config set profiles.ops.properties.protocol http or https --gc
80
+ zowe config set profiles.ops.properties.subsystem sys1 --gc
81
+ zowe config set profiles.ops.properties.rest-api true or false --gc
82
+ ```
83
+
84
+ The following image shows an OPS/MVS profile inside a global configuration file:
85
+
86
+ ![opsprofile.png](opsprofile.png)
87
+
88
+
89
+ ## Create an OPS/MVS Profile for the Zowe API ML</a>
90
+ **Important:** The <a href="https://docs.zowe.org/v2.15.x/user-guide/cli-using-integrating-apiml/" target="_blank">Zowe API Mediation Layer (API ML)</a> can only be used with the OPS/MVS REST API, which must be registered with the API ML server used in the profile.
65
91
 
66
- # Changes
92
+ To create an OPS/MVS plug-in profile for the Zowe API ML:
93
+ 1. Gather the following data:
94
+ - The host name of the LPAR on which the API ML is installed
95
+ - The API ML server port number
96
+ - A user name that has authority to access the registered OPS/MVS REST API server
97
+ - The password to the account assigned to the user name
98
+ - The base path for your API ML instance. The first part of the base path is the service ID of the REST API server that is defined to the API ML server, for example: `<service_id>/api/v1`
67
99
 
68
- Changes made to the OPS/MVS® Plug-in for Zowe CLI (OPS) are documented below.
100
+ 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.
101
+
102
+ The following image shows an OPS/MVS profile for the Zowe API ML inside a global configuration file:
69
103
 
70
- ## [5.0.0] - 2024-01-19
104
+ ![opsapimlprofile.png](opsapimlprofile.png)
71
105
 
72
- This release includes a breaking change from the prior release (4.1.2) and support for the OPS/MVS® REST API server.
106
+ ## Using the OPS/MVS Plug-in for Zowe CLI
73
107
 
74
- ### Breaking change
108
+ For details about the commands, actions, and options in this plug-in, refer to the Zowe CLI Help. 
75
109
 
76
- Commands 'start resource' and 'stop resource'
110
+ 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:
111
+
112
+ - Enter `zowe ops` to display a summary of available commands and options for the plug-in in the command prompt window.
113
+
114
+ - Enter `zowe ops --hw` to display Zowe CLI web help for the plug-in in a browser window.
77
115
 
78
- 'tablename' is now a required positional argument
116
+ ### Return Codes
79
117
 
80
- POSITIONAL ARGUMENTS
118
+ When you enter a command using the OPS/MVS Plug-in for Zowe CLI, you will receive one of the following return codes:
81
119
 
82
- resourcename (string)
120
+ 0 - Execution succeeded
121
+
122
+ 1 - Execution failed
83
123
 
84
- The name of the resource.
124
+ ## Changes in Release 5.0.0
125
+ This section describes changes that have been made to the OPS/MVS Plug-in for Zowe CLI since the previous release (4.1.2).
85
126
 
86
- tablename (string)
127
+ Release 5.0.0 includes a breaking change and support for the OPS/MVS REST API.
87
128
 
88
- The name of the table that contains the resource.
129
+ ### Breaking Change: Positional Arguments
130
+ The commands `start resource` and `stop resource` have the following positional arguments.
131
+ In a breaking change, `tablename` is now a required positional argument.
89
132
 
90
- ----------------------------------------------------------------------------------------------------------------------------
133
+ **resourcename** (string)(optional)
134
+
135
+ The name of the resource.
91
136
 
92
- ### New command (only available with the REST API server)
137
+ **tablename** (string)(required)
138
+
139
+ The name of the table that contains the resource.
140
+
93
141
 
94
- show ruleset
142
+ ### New Commands
95
143
 
96
- ----------------------------------------------------------------------------------------------------------------------------
144
+ **Note:** The following new command is only available when you use the OPS/MVS plug-in for Zowe CLI with the OPS/MVS REST API.
97
145
 
98
- ### Enhanced commands (only available with the REST API server)
146
+ **show ruleset**
147
+
148
+ Use the new `show ruleset` command to display the status of a specific automation rule set.
99
149
 
100
- show resource
150
+ **show logname**
101
151
 
102
- Show the current and desired state of all resources in the table MYTABLE for the OPSS subsystem.
152
+ Use the new `show logname` command to display the logs defined to a subsystem.
103
153
 
104
- zowe ops show resource * --table MYTABLE --subsystem OPSS
154
+ **show status**
105
155
 
106
- Show the current and desired state of all resources in all tables for the OPSS subsystem.
156
+ Use the new `show status` command to display the status of the REST API server.
107
157
 
108
- zowe ops show resource * --subsystem OPSS
158
+ **show subsystem**
109
159
 
110
- ----------------------------------------------------------------------------------------------------------------------------
160
+ Use the new `show subsystem` command to display the subsystems running on an OPS system.
111
161
 
112
- show rule
162
+ **execute rexx**
113
163
 
114
- Show the status of all rules in ruleset OPSRULES for the OPSS subsystem.
164
+ Use the new `execute rexx` command to execute the specified OPS/MVS REXX program.
115
165
 
116
- zowe ops show rule OPSRULES * --subsystem OPSS
166
+ ### Enhanced Commands
117
167
 
118
- Show the status of all rules in all rulesets for the OPSS subsystem.
168
+ **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.
169
+
170
+ **show resource**
171
+
172
+ 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:
173
+
174
+ ```
175
+ zowe ops show resource * --table MYTABLE --subsystem OPSS
176
+ ```
119
177
 
120
- zowe ops show rule * * --subsystem OPSS
178
+ 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:
179
+
180
+ ```
181
+ zowe ops show resource * --subsystem OPSS
182
+ ```
183
+
184
+ **show rule**
185
+
186
+ 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:
187
+
188
+ ```
189
+ zowe ops show rule OPSRULES * --subsystem OPSS
190
+ ```
191
+ 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:
192
+
193
+ ```
194
+ zowe ops show rule * * --subsystem OPSS
195
+ ```
196
+
197
+ ## Uninstall the OPS/MVS Plug-in From Zowe CLI
198
+ To uninstall the plug-in from Zowe CLI, issue the following command:
199
+ ```sh
200
+ zowe plugins uninstall @broadcom/ops-for-zowe-cli
201
+ ```
@@ -0,0 +1,5 @@
1
+ import { IHandlerParameters, Session } from "@zowe/imperative";
2
+ import { IExecuteRexxResponse } from "./doc/IExecuteRexxResponse";
3
+ export declare function executeRexx(session: Session, program: string, restApi: boolean, subSystem: string, params: IHandlerParameters, arg?: string, maxQueue?: string, workspace?: string, timeout?: string, outputLimit?: string, wait?: number, debug?: string): Promise<IExecuteRexxResponse>;
4
+ export declare function retrieveRexx(session: Session, instanceToken: string, restApi: boolean, params: IHandlerParameters): Promise<IExecuteRexxResponse>;
5
+ export declare function processWait(response: any, session: Session, program: string, instanceToken: string, restApi: boolean, wait?: number): Promise<{}>;
@@ -0,0 +1,138 @@
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
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
25
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
26
+ return new (P || (P = Promise))(function (resolve, reject) {
27
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
28
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
29
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
30
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
31
+ });
32
+ };
33
+ Object.defineProperty(exports, "__esModule", { value: true });
34
+ exports.processWait = exports.retrieveRexx = exports.executeRexx = void 0;
35
+ const imperative_1 = require("@zowe/imperative");
36
+ const utils_1 = require("./utils");
37
+ const constants_1 = require("./constants");
38
+ const OpsRestClient_1 = require("./utils/OpsRestClient");
39
+ const RexxParameterDefinitions_1 = require("../cli/RexxParameterDefinitions");
40
+ function executeRexx(session, program, restApi, subSystem, params, arg, maxQueue, workspace, timeout, outputLimit, wait, debug) {
41
+ return __awaiter(this, void 0, void 0, function* () {
42
+ if (wait != null) {
43
+ imperative_1.ImperativeExpect.toBeEqual(wait > 0 && wait <= RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME, true, `Wait value must be between 1 and ${RexxParameterDefinitions_1.RexxParameterDefinitions.WAIT_TIME} (inclusive), if specified. You specified: ${wait}`);
44
+ }
45
+ const executeRexxUrl = utils_1.RexxUtils.getExecuteRexxURL(session, subSystem);
46
+ const rexxBody = {
47
+ program: program //"'" + program + "'"
48
+ };
49
+ if (arg !== "" && arg !== undefined) {
50
+ rexxBody.arg = arg;
51
+ }
52
+ if (maxQueue !== "" && maxQueue !== undefined) {
53
+ rexxBody.maxQueue = maxQueue;
54
+ }
55
+ if (workspace !== "" && workspace !== undefined) {
56
+ rexxBody.workspace = workspace;
57
+ }
58
+ if (timeout !== "" && timeout !== undefined) {
59
+ rexxBody.timeout = timeout;
60
+ }
61
+ if (outputLimit !== "" && outputLimit !== undefined) {
62
+ rexxBody.outputLimit = outputLimit;
63
+ }
64
+ if (debug !== "" && debug !== undefined) {
65
+ rexxBody.debug = debug;
66
+ }
67
+ let response;
68
+ if (restApi) {
69
+ response = yield OpsRestClient_1.OpsRestClient.postExpectJSON(session, executeRexxUrl, constants_1.OpsConstants.headers, rexxBody);
70
+ if (wait == null) {
71
+ return response;
72
+ }
73
+ else {
74
+ // retrieve the result of the REXX program execution
75
+ response = yield processWait(response, session, program, response.instanceToken, restApi, wait);
76
+ return response;
77
+ }
78
+ }
79
+ else {
80
+ /* istanbul ignore next */
81
+ // Display message indicating 'execute rexx' not supported with web services
82
+ params.response.console.log("Command 'execute rexx' is only supported with the OPS/MVS REST API server");
83
+ }
84
+ /* istanbul ignore next */
85
+ return null;
86
+ // avoid code smell
87
+ });
88
+ }
89
+ exports.executeRexx = executeRexx;
90
+ function retrieveRexx(session, instanceToken, restApi, params) {
91
+ return __awaiter(this, void 0, void 0, function* () {
92
+ const retrieveRexxUrl = utils_1.RexxUtils.getRetrieveRexxURL(session, instanceToken);
93
+ let response;
94
+ if (restApi) {
95
+ response = yield OpsRestClient_1.OpsRestClient.getExpectJSON(session, retrieveRexxUrl, constants_1.OpsConstants.headers);
96
+ return response;
97
+ }
98
+ else {
99
+ /* istanbul ignore next */
100
+ // Display message indicating 'execute rexx' not supported with web services
101
+ params.response.console.log("Command 'retrieve rexx' is only supported with the OPS/MVS REST API server");
102
+ }
103
+ /* istanbul ignore next */
104
+ return null; // avoid code smell
105
+ });
106
+ }
107
+ exports.retrieveRexx = retrieveRexx;
108
+ function processWait(response, session, program, instanceToken, restApi, wait) {
109
+ return __awaiter(this, void 0, void 0, function* () {
110
+ // otherwise we have to poll
111
+ let pollResponse;
112
+ const ONE_SECOND = 1000;
113
+ const start = new Date().getTime();
114
+ // looping with 'wait' value as max was taking approximately twice the requested time
115
+ // so use the actual time to calculate when the 'wait' time is exceeded
116
+ while (((new Date().getTime() - start) / ONE_SECOND) < wait) {
117
+ pollResponse = yield retrieveRexx(session, instanceToken, restApi, null);
118
+ /* istanbul ignore if */
119
+ if (pollResponse.returnCode === undefined) {
120
+ // no returnCode, poll again after (at least) one second
121
+ yield new Promise((resolve) => {
122
+ setTimeout(resolve, ONE_SECOND);
123
+ });
124
+ } /* istanbul ignore else */
125
+ else {
126
+ return pollResponse;
127
+ }
128
+ }
129
+ // if we get here, the timeout was exceeded.
130
+ /* istanbul ignore next */
131
+ throw new imperative_1.ImperativeError({
132
+ msg: `The requested wait time of ${wait} second${wait > 1 ? "s" : ""} was exceeded and REXX program,` +
133
+ ` '${program}' is still executing.`
134
+ });
135
+ });
136
+ }
137
+ exports.processWait = processWait;
138
+ //# sourceMappingURL=Execute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Execute.js","sourceRoot":"","sources":["../../src/api/Execute.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAEH,iDAAkG;AAClG,mCAAoC;AACpC,2CAA2C;AAE3C,yDAAsD;AACtD,8EAA2E;AAE3E,SAAsB,WAAW,CAAC,OAAgB,EAAE,OAAe,EAAE,OAAgB,EAAE,SAAiB,EAAE,MAA0B,EAClG,GAAY,EAAE,QAAiB,EAAE,SAAkB,EAAE,OAAgB,EAAE,WAAoB,EAC3F,IAAa,EAAE,KAAc;;QAE3D,IAAI,IAAI,IAAI,IAAI,EAAE;YACd,6BAAgB,CAAC,SAAS,CAAC,IAAI,GAAG,CAAC,IAAI,IAAI,IAAI,mDAAwB,CAAC,SAAS,EAAE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YAAY,GAAG,MAAM,YAAY,CAAC,OAAO,EAAE,aAAa,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC;YACzE,wBAAwB;YACxB,IAAI,YAAY,CAAC,UAAU,KAAK,SAAS,EAAE;gBACvC,wDAAwD;gBACxD,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;oBAC1B,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;gBACpC,CAAC,CAAC,CAAC;aACN,CAAE,0BAA0B;iBACxB;gBACD,OAAO,YAAY,CAAC;aACvB;SACJ;QACD,4CAA4C;QAC5C,0BAA0B;QAC1B,MAAM,IAAI,4BAAe,CAAC;YACtB,GAAG,EAAE,8BAA8B,IAAI,UAAU,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,iCAAiC;gBACjG,KAAK,OAAO,uBAAuB;SAC1C,CAAC,CAAC;IACP,CAAC;CAAA;AA7BD,kCA6BC"}
@@ -65,27 +65,13 @@ exports.OpsProfilesConfig = [
65
65
  restApi: {
66
66
  optionDefinition: OpsRestUtils_1.OpsRestUtils.RESTAPI_OPTION,
67
67
  type: "boolean"
68
+ },
69
+ basePath: {
70
+ optionDefinition: OpsRestUtils_1.OpsRestUtils.RESTAPI_OPTION,
71
+ type: "string"
68
72
  }
69
- },
70
- // required: ["host", "port"],
71
- },
72
- createProfileExamples: [
73
- {
74
- options: "myLPAR --host lpar123 --port 8080 --user ibmuser --password !@#$^ --prot http --reject-unauthorized false",
75
- description: "Create an OPS profile called 'myLPAR' to connect to OPS/MVS REST API at host lpar123 and port 8080, " +
76
- "using http protocol, allowing self-signed certificates"
77
- }
78
- ],
79
- updateProfileExamples: [
80
- {
81
- options: "myLPAR --host lpar456",
82
- description: "Update an OPS profile called 'myLPAR' to connect to OPS/MVS Web Services at host lpar456"
83
- },
84
- {
85
- options: "myLPAR --user user101 --password Km5sv78",
86
- description: "Update an OPS profile called 'myLPAR' to have username user101 with password Km5sv78"
87
73
  }
88
- ]
74
+ }
89
75
  }
90
76
  ];
91
77
  //# sourceMappingURL=OpsProfilesConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"OpsProfilesConfig.js","sourceRoot":"","sources":["../../src/api/OpsProfilesConfig.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAGH,uDAAoD;AAEvC,QAAA,iBAAiB,GAAuC;IACjE;QACI,IAAI,EAAE,KAAK;QACX,MAAM,EAAE;YACJ,IAAI,EAAE,QAAQ;YACd,KAAK,EAAE,iDAAiD;YACxD,WAAW,EAAE,wHAAwH;YACrI,UAAU,EAAE;gBACR,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,IAAI,EAAE,QAAQ;iBACjB;gBACD,IAAI,EAAE;oBACF,gBAAgB,EAAE,2BAAY,CAAC,WAAW;oBAC1C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,eAAe;oBAC9C,MAAM,EAAE,IAAI;oBACZ,IAAI,EAAE,QAAQ;iBACjB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,eAAe;oBAC9C,IAAI,EAAE,QAAQ;iBACjB;gBACD,kBAAkB,EAAE;oBAChB,gBAAgB,EAAE,2BAAY,CAAC,0BAA0B;oBACzD,IAAI,EAAE,SAAS;iBAClB;gBACD,SAAS,EAAE;oBACP,gBAAgB,EAAE,2BAAY,CAAC,gBAAgB;oBAC/C,IAAI,EAAE,QAAQ;iBACjB;gBACD,OAAO,EAAE;oBACL,gBAAgB,EAAE,2BAAY,CAAC,cAAc;oBAC7C,IAAI,EAAE,SAAS;iBAClB;aACJ;YACD,8BAA8B;SACjC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ACP,gBAAgB,EAAE,2BAAY,CAAC,gBAAgB;oBAC/C,IAAI,EAAE,QAAQ;iBACjB;gBACD,OAAO,EAAE;oBACL,gBAAgB,EAAE,2BAAY,CAAC,cAAc;oBAC7C,IAAI,EAAE,SAAS;iBAClB;gBACD,QAAQ,EAAE;oBACN,gBAAgB,EAAE,2BAAY,CAAC,cAAc;oBAC7C,IAAI,EAAE,QAAQ;iBACjB;aACJ;SACJ;KACJ;CACJ,CAAC"}
package/lib/api/Show.d.ts CHANGED
@@ -1,6 +1,13 @@
1
1
  import { IHandlerParameters, Session } from "@zowe/imperative";
2
2
  import { IShowRuleResponse } from "./doc/IShowRuleResponse";
3
+ import { IShowRulesetResponse } from "./doc/IShowRulesetResponse";
3
4
  import { IShowResourceResponse } from "./doc/IShowResourceResponse";
5
+ import { IShowStatusResponse } from "./doc/IShowStatusResponse";
6
+ import { IShowLognameResponse } from "./doc/IShowLognameResponse";
7
+ import { IShowSubsystemResponse } from "./doc/IShowSubsystemsResponse";
4
8
  export declare function showRule(session: Session, ruleSetName: string, ruleName: string, restApi: boolean, subSystem: string): Promise<IShowRuleResponse>;
5
9
  export declare function showResource(session: Session, resourceName: string, restApi: boolean, table: string, subsystem: string): Promise<IShowResourceResponse>;
6
- export declare function showRuleset(session: Session, ruleSetName: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowRuleResponse>;
10
+ export declare function showRuleset(session: Session, ruleSetName: string, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowRulesetResponse>;
11
+ export declare function showStatus(session: Session, restApi: boolean, params: IHandlerParameters): Promise<IShowStatusResponse>;
12
+ export declare function showLogname(session: Session, restApi: boolean, subSystem: string, params: IHandlerParameters): Promise<IShowLognameResponse>;
13
+ export declare function showSubsystem(session: Session, restApi: boolean, params: IHandlerParameters): Promise<IShowSubsystemResponse>;
package/lib/api/Show.js CHANGED
@@ -31,22 +31,21 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
31
31
  });
32
32
  };
33
33
  Object.defineProperty(exports, "__esModule", { value: true });
34
- exports.showRuleset = exports.showResource = exports.showRule = void 0;
35
- const RuleUtils_1 = require("./utils/RuleUtils");
36
- const RulesetUtils_1 = require("./utils/RulesetUtils");
37
- const SSMUtils_1 = require("./utils/SSMUtils");
34
+ exports.showSubsystem = exports.showLogname = exports.showStatus = exports.showRuleset = exports.showResource = exports.showRule = void 0;
35
+ const utils_1 = require("./utils");
38
36
  const constants_1 = require("./constants");
39
37
  const OpsRestClient_1 = require("./utils/OpsRestClient");
38
+ const SubsystemUtils_1 = require("./utils/SubsystemUtils");
40
39
  function showRule(session, ruleSetName, ruleName, restApi, subSystem) {
41
40
  return __awaiter(this, void 0, void 0, function* () {
42
- const ruleUrl = RuleUtils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
41
+ const ruleUrl = utils_1.RuleUtils.getRuleURL(session, ruleSetName, ruleName, restApi, subSystem);
43
42
  return OpsRestClient_1.OpsRestClient.getExpectJSON(session, ruleUrl, constants_1.OpsConstants.headers);
44
43
  });
45
44
  }
46
45
  exports.showRule = showRule;
47
46
  function showResource(session, resourceName, restApi, table, subsystem) {
48
47
  return __awaiter(this, void 0, void 0, function* () {
49
- const resourceUrl = SSMUtils_1.SSMUtils.getResourceURL(session, resourceName, restApi, table, subsystem);
48
+ const resourceUrl = utils_1.SSMResourceUtils.getResourceURL(session, resourceName, restApi, table, subsystem);
50
49
  return OpsRestClient_1.OpsRestClient.getExpectJSON(session, resourceUrl, constants_1.OpsConstants.headers);
51
50
  });
52
51
  }
@@ -54,14 +53,65 @@ exports.showResource = showResource;
54
53
  function showRuleset(session, ruleSetName, restApi, subSystem, params) {
55
54
  return __awaiter(this, void 0, void 0, function* () {
56
55
  if (restApi) {
57
- const rulesetUrl = RulesetUtils_1.RulesetUtils.getRulesetURL(session, ruleSetName, restApi, subSystem);
56
+ const rulesetUrl = utils_1.RulesetUtils.getRulesetURL(session, ruleSetName, restApi, subSystem);
58
57
  return OpsRestClient_1.OpsRestClient.getExpectJSON(session, rulesetUrl, constants_1.OpsConstants.headers);
59
58
  }
60
59
  else {
60
+ /* istanbul ignore next */
61
61
  // Display message indicating 'show ruleset' not supported with web services
62
62
  params.response.console.log("Command 'show ruleset' is only supported with the OPS/MVS REST API server");
63
63
  }
64
+ /* istanbul ignore next */
65
+ return null; // avoid code smell
64
66
  });
65
67
  }
66
68
  exports.showRuleset = showRuleset;
69
+ function showStatus(session, restApi, params) {
70
+ return __awaiter(this, void 0, void 0, function* () {
71
+ if (restApi) {
72
+ const statusUrl = utils_1.StatusUtils.getStatusURL(session);
73
+ return OpsRestClient_1.OpsRestClient.getExpectJSON(session, statusUrl, constants_1.OpsConstants.headers);
74
+ }
75
+ else {
76
+ /* istanbul ignore next */
77
+ // Display message indicating 'show status' not supported with web services
78
+ params.response.console.log("Command 'show status' is only supported with the OPS/MVS REST API server");
79
+ }
80
+ /* istanbul ignore next */
81
+ return null; // avoid code smell
82
+ });
83
+ }
84
+ exports.showStatus = showStatus;
85
+ function showLogname(session, restApi, subSystem, params) {
86
+ return __awaiter(this, void 0, void 0, function* () {
87
+ if (restApi) {
88
+ const logUrl = utils_1.LognameUtils.getLogURL(session, subSystem);
89
+ return OpsRestClient_1.OpsRestClient.getExpectJSON(session, logUrl, constants_1.OpsConstants.headers);
90
+ }
91
+ else {
92
+ /* istanbul ignore next */
93
+ // Display message indicating 'show log' not supported with web services
94
+ params.response.console.log("Command 'show logname' is only supported with the OPS/MVS REST API server");
95
+ }
96
+ /* istanbul ignore next */
97
+ return null; // avoid code smell
98
+ });
99
+ }
100
+ exports.showLogname = showLogname;
101
+ function showSubsystem(session, restApi, params) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ if (restApi) {
104
+ const subsystemsURL = SubsystemUtils_1.SubsystemsUtils.getSubsystemsURL(session);
105
+ return OpsRestClient_1.OpsRestClient.getExpectJSON(session, subsystemsURL, constants_1.OpsConstants.headers);
106
+ }
107
+ else {
108
+ /* istanbul ignore next */
109
+ // Display message indicating 'show log' not supported with web services
110
+ params.response.console.log("Command 'show subsystem' is only supported with the OPS/MVS REST API server");
111
+ }
112
+ /* istanbul ignore next */
113
+ return null; // avoid code smell
114
+ });
115
+ }
116
+ exports.showSubsystem = showSubsystem;
67
117
  //# sourceMappingURL=Show.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,iDAA8C;AAC9C,uDAAoD;AACpD,+CAA4C;AAC5C,2CAA2C;AAG3C,yDAAsD;AAEtD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,OAAgB,EACzE,SAAiB;;QAC5C,MAAM,OAAO,GAAG,qBAAS,CAAC,UAAU,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;QACzF,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IAC/E,CAAC;CAAA;AAJD,4BAIC;AAED,SAAsB,YAAY,CAAC,OAAgB,EAAE,YAAoB,EAAE,OAAgB,EAAE,KAAa,EACvE,SAAiB;;QAChD,MAAM,WAAW,GAAG,mBAAQ,CAAC,cAAc,CAAC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;QAC9F,OAAO,6BAAa,CAAC,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,wBAAY,CAAC,OAAO,CAAC,CAAC;IACnF,CAAC;CAAA;AAJD,oCAIC;AAED,SAAsB,WAAW,CAAC,OAAgB,EAAE,WAAmB,EAAE,OAAgB,EACvD,SAAiB,EAAE,MAA0B;;QAE3E,IAAI,OAAO,EAAE;YACT,MAAM,UAAU,GAAG,2BAAY,CAAC,aAAa,CAAC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