@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.
- package/README.md +154 -73
- package/lib/api/Execute.d.ts +5 -0
- package/lib/api/Execute.js +138 -0
- package/lib/api/Execute.js.map +1 -0
- package/lib/api/OpsProfilesConfig.js +5 -19
- package/lib/api/OpsProfilesConfig.js.map +1 -1
- package/lib/api/Show.d.ts +8 -1
- package/lib/api/Show.js +57 -7
- package/lib/api/Show.js.map +1 -1
- package/lib/api/Update.js +57 -45
- package/lib/api/Update.js.map +1 -1
- package/lib/api/constants/Ops.constants.js +17 -8
- package/lib/api/constants/Ops.constants.js.map +1 -1
- package/lib/api/doc/IExecuteRexxResponse.d.ts +9 -0
- package/lib/api/doc/IExecuteRexxResponse.js +34 -0
- package/lib/api/doc/IExecuteRexxResponse.js.map +1 -0
- package/lib/api/doc/IShowLognameResponse.d.ts +12 -0
- package/lib/api/doc/IShowLognameResponse.js +25 -0
- package/lib/api/doc/IShowLognameResponse.js.map +1 -0
- package/lib/api/doc/IShowStatusResponse.d.ts +13 -0
- package/lib/api/doc/IShowStatusResponse.js +25 -0
- package/lib/api/doc/IShowStatusResponse.js.map +1 -0
- package/lib/api/doc/IShowSubsystemsResponse.d.ts +12 -0
- package/lib/api/doc/IShowSubsystemsResponse.js +25 -0
- package/lib/api/doc/IShowSubsystemsResponse.js.map +1 -0
- package/lib/api/index.d.ts +6 -0
- package/lib/api/index.js +6 -0
- package/lib/api/index.js.map +1 -1
- package/lib/api/utils/LognameListUtils.d.ts +12 -0
- package/lib/api/utils/LognameListUtils.js +104 -0
- package/lib/api/utils/LognameListUtils.js.map +1 -0
- package/lib/api/utils/LognameUtils.d.ts +4 -0
- package/lib/api/utils/LognameUtils.js +41 -0
- package/lib/api/utils/LognameUtils.js.map +1 -0
- package/lib/api/utils/OpsRestClient.js +2 -0
- package/lib/api/utils/OpsRestClient.js.map +1 -1
- package/lib/api/utils/OpsRestUtils.d.ts +1 -0
- package/lib/api/utils/OpsRestUtils.js +18 -6
- package/lib/api/utils/OpsRestUtils.js.map +1 -1
- package/lib/api/utils/OpsTextUtils.d.ts +1 -1
- package/lib/api/utils/OpsTextUtils.js +8 -4
- package/lib/api/utils/OpsTextUtils.js.map +1 -1
- package/lib/api/utils/RexxListUtils.d.ts +9 -0
- package/lib/api/utils/RexxListUtils.js +146 -0
- package/lib/api/utils/RexxListUtils.js.map +1 -0
- package/lib/api/utils/RexxUtils.d.ts +5 -0
- package/lib/api/utils/RexxUtils.js +48 -0
- package/lib/api/utils/RexxUtils.js.map +1 -0
- package/lib/api/utils/RuleListUtils.d.ts +15 -3
- package/lib/api/utils/RuleListUtils.js +173 -21
- package/lib/api/utils/RuleListUtils.js.map +1 -1
- package/lib/api/utils/RuleUtils.d.ts +1 -3
- package/lib/api/utils/RuleUtils.js +21 -39
- package/lib/api/utils/RuleUtils.js.map +1 -1
- package/lib/api/utils/RulesetListUtils.d.ts +9 -1
- package/lib/api/utils/RulesetListUtils.js +102 -4
- package/lib/api/utils/RulesetListUtils.js.map +1 -1
- package/lib/api/utils/RulesetUtils.d.ts +0 -1
- package/lib/api/utils/RulesetUtils.js +6 -10
- package/lib/api/utils/RulesetUtils.js.map +1 -1
- package/lib/api/utils/SSMResourceListUtils.d.ts +14 -1
- package/lib/api/utils/SSMResourceListUtils.js +274 -17
- package/lib/api/utils/SSMResourceListUtils.js.map +1 -1
- package/lib/api/utils/{SSMUtils.d.ts → SSMResourceUtils.d.ts} +2 -3
- package/lib/api/utils/{SSMUtils.js → SSMResourceUtils.js} +39 -66
- package/lib/api/utils/SSMResourceUtils.js.map +1 -0
- package/lib/api/utils/StatusListUtils.d.ts +9 -0
- package/lib/api/utils/StatusListUtils.js +100 -0
- package/lib/api/utils/StatusListUtils.js.map +1 -0
- package/lib/api/utils/StatusUtils.d.ts +4 -0
- package/lib/api/utils/StatusUtils.js +37 -0
- package/lib/api/utils/StatusUtils.js.map +1 -0
- package/lib/api/utils/SubsystemListUtils.d.ts +12 -0
- package/lib/api/utils/SubsystemListUtils.js +104 -0
- package/lib/api/utils/SubsystemListUtils.js.map +1 -0
- package/lib/api/utils/SubsystemUtils.d.ts +4 -0
- package/lib/api/utils/SubsystemUtils.js +37 -0
- package/lib/api/utils/SubsystemUtils.js.map +1 -0
- package/lib/api/utils/index.d.ts +9 -1
- package/lib/api/utils/index.js +9 -1
- package/lib/api/utils/index.js.map +1 -1
- package/lib/cli/LognameParameterDefinitions.d.ts +4 -0
- package/lib/cli/LognameParameterDefinitions.js +40 -0
- package/lib/cli/LognameParameterDefinitions.js.map +1 -0
- package/lib/cli/OpsBaseHandler.js +4 -2
- package/lib/cli/OpsBaseHandler.js.map +1 -1
- package/lib/cli/ResourceParameterDefinitions.d.ts +1 -1
- package/lib/cli/ResourceParameterDefinitions.js +9 -4
- package/lib/cli/ResourceParameterDefinitions.js.map +1 -1
- package/lib/cli/RexxParameterDefinitions.d.ts +14 -0
- package/lib/cli/RexxParameterDefinitions.js +125 -0
- package/lib/cli/RexxParameterDefinitions.js.map +1 -0
- package/lib/cli/RuleParameterDefinitions.d.ts +2 -1
- package/lib/cli/RuleParameterDefinitions.js +11 -0
- package/lib/cli/RuleParameterDefinitions.js.map +1 -1
- package/lib/cli/RulesetParameterDefinitions.d.ts +1 -0
- package/lib/cli/RulesetParameterDefinitions.js +11 -0
- package/lib/cli/RulesetParameterDefinitions.js.map +1 -1
- package/lib/cli/StatusParameterDefinitions.d.ts +4 -0
- package/lib/cli/StatusParameterDefinitions.js +40 -0
- package/lib/cli/StatusParameterDefinitions.js.map +1 -0
- package/lib/cli/SubsystemsParameterDefinitions.d.ts +4 -0
- package/lib/cli/SubsystemsParameterDefinitions.js +40 -0
- package/lib/cli/SubsystemsParameterDefinitions.js.map +1 -0
- package/lib/cli/disable/Disable.definition.js +2 -2
- package/lib/cli/disable/Disable.definition.js.map +1 -1
- package/lib/cli/disable/rule/Rule.definition.js +3 -1
- package/lib/cli/disable/rule/Rule.definition.js.map +1 -1
- package/lib/cli/disable/rule/Rule.handler.js +1 -1
- package/lib/cli/disable/rule/Rule.handler.js.map +1 -1
- package/lib/cli/enable/Enable.definition.js +2 -2
- package/lib/cli/enable/Enable.definition.js.map +1 -1
- package/lib/cli/enable/rule/Rule.handler.js +1 -1
- package/lib/cli/enable/rule/Rule.handler.js.map +1 -1
- package/lib/cli/execute/Execute.definition.d.ts +3 -0
- package/lib/cli/execute/Execute.definition.js +35 -0
- package/lib/cli/execute/Execute.definition.js.map +1 -0
- package/lib/cli/execute/rexx/Rexx.definition.d.ts +2 -0
- package/lib/cli/execute/rexx/Rexx.definition.js +55 -0
- package/lib/cli/execute/rexx/Rexx.definition.js.map +1 -0
- package/lib/cli/execute/rexx/Rexx.handler.d.ts +5 -0
- package/lib/cli/execute/rexx/Rexx.handler.js +46 -0
- package/lib/cli/execute/rexx/Rexx.handler.js.map +1 -0
- package/lib/cli/show/Show.definition.js +10 -5
- package/lib/cli/show/Show.definition.js.map +1 -1
- package/lib/cli/show/logname/Logname.definition.d.ts +17 -0
- package/lib/cli/show/logname/Logname.definition.js +62 -0
- package/lib/cli/show/logname/Logname.definition.js.map +1 -0
- package/lib/cli/show/logname/Logname.handler.d.ts +5 -0
- package/lib/cli/show/logname/Logname.handler.js +49 -0
- package/lib/cli/show/logname/Logname.handler.js.map +1 -0
- package/lib/cli/show/resource/Resource.definition.js +3 -1
- package/lib/cli/show/resource/Resource.definition.js.map +1 -1
- package/lib/cli/show/resource/Resource.handler.js +3 -3
- package/lib/cli/show/resource/Resource.handler.js.map +1 -1
- package/lib/cli/show/rule/Rule.definition.d.ts +1 -1
- package/lib/cli/show/rule/Rule.definition.js +9 -7
- package/lib/cli/show/rule/Rule.definition.js.map +1 -1
- package/lib/cli/show/rule/Rule.handler.js +5 -5
- package/lib/cli/show/rule/Rule.handler.js.map +1 -1
- package/lib/cli/show/ruleset/Ruleset.definition.js +1 -0
- package/lib/cli/show/ruleset/Ruleset.definition.js.map +1 -1
- package/lib/cli/show/ruleset/Ruleset.handler.js +3 -4
- package/lib/cli/show/ruleset/Ruleset.handler.js.map +1 -1
- package/lib/cli/show/status/Status.definition.d.ts +17 -0
- package/lib/cli/show/status/Status.definition.js +62 -0
- package/lib/cli/show/status/Status.definition.js.map +1 -0
- package/lib/cli/show/status/Status.handler.d.ts +5 -0
- package/lib/cli/show/status/Status.handler.js +49 -0
- package/lib/cli/show/status/Status.handler.js.map +1 -0
- package/lib/cli/show/subsystem/Subsystem.definition.d.ts +17 -0
- package/lib/cli/show/subsystem/Subsystem.definition.js +62 -0
- package/lib/cli/show/subsystem/Subsystem.definition.js.map +1 -0
- package/lib/cli/show/subsystem/Subsystem.handler.d.ts +5 -0
- package/lib/cli/show/subsystem/Subsystem.handler.js +49 -0
- package/lib/cli/show/subsystem/Subsystem.handler.js.map +1 -0
- package/lib/cli/start/Start.definition.js +2 -2
- package/lib/cli/start/Start.definition.js.map +1 -1
- package/lib/cli/start/resource/Resource.handler.js +3 -4
- package/lib/cli/start/resource/Resource.handler.js.map +1 -1
- package/lib/cli/stop/Stop.definition.js +2 -2
- package/lib/cli/stop/Stop.definition.js.map +1 -1
- package/lib/cli/stop/resource/Resource.definition.js +1 -1
- package/lib/cli/stop/resource/Resource.handler.js +3 -4
- package/lib/cli/stop/resource/Resource.handler.js.map +1 -1
- package/lib/healthCheck.handler.js +2 -1
- package/lib/healthCheck.handler.js.map +1 -1
- package/lib/imperative.js +0 -2
- package/lib/imperative.js.map +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +5 -1
- package/lib/index.js.map +1 -1
- package/package.json +25 -24
- package/lib/api/utils/SSMUtils.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,120 +1,201 @@
|
|
|
1
1
|
# OPS/MVS® Plug-in for Zowe CLI
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
12
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
40
|
+
zowe plugins install @broadcom/ops-for-zowe-cli
|
|
39
41
|
```
|
|
40
|
-
|
|
42
|
+
2. Issue the following command to validate the installed plug-in.
|
|
41
43
|
```sh
|
|
42
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+

|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
104
|
+

|
|
71
105
|
|
|
72
|
-
|
|
106
|
+
## Using the OPS/MVS Plug-in for Zowe CLI
|
|
73
107
|
|
|
74
|
-
|
|
108
|
+
For details about the commands, actions, and options in this plug-in, refer to the Zowe CLI Help.
|
|
75
109
|
|
|
76
|
-
|
|
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
|
-
|
|
116
|
+
### Return Codes
|
|
79
117
|
|
|
80
|
-
|
|
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
|
-
|
|
120
|
+
0 - Execution succeeded
|
|
121
|
+
|
|
122
|
+
1 - Execution failed
|
|
83
123
|
|
|
84
|
-
|
|
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
|
-
|
|
127
|
+
Release 5.0.0 includes a breaking change and support for the OPS/MVS REST API.
|
|
87
128
|
|
|
88
|
-
|
|
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
|
-
|
|
137
|
+
**tablename** (string)(required)
|
|
138
|
+
|
|
139
|
+
The name of the table that contains the resource.
|
|
140
|
+
|
|
93
141
|
|
|
94
|
-
|
|
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
|
-
|
|
146
|
+
**show ruleset**
|
|
147
|
+
|
|
148
|
+
Use the new `show ruleset` command to display the status of a specific automation rule set.
|
|
99
149
|
|
|
100
|
-
|
|
150
|
+
**show logname**
|
|
101
151
|
|
|
102
|
-
|
|
152
|
+
Use the new `show logname` command to display the logs defined to a subsystem.
|
|
103
153
|
|
|
104
|
-
|
|
154
|
+
**show status**
|
|
105
155
|
|
|
106
|
-
|
|
156
|
+
Use the new `show status` command to display the status of the REST API server.
|
|
107
157
|
|
|
108
|
-
|
|
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
|
-
|
|
162
|
+
**execute rexx**
|
|
113
163
|
|
|
114
|
-
|
|
164
|
+
Use the new `execute rexx` command to execute the specified OPS/MVS REXX program.
|
|
115
165
|
|
|
116
|
-
|
|
166
|
+
### Enhanced Commands
|
|
117
167
|
|
|
118
|
-
|
|
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
|
-
|
|
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,IAAI,EACnF,oCAAoC,mDAAwB,CAAC,SAAS,8CAA8C,IAAI,EAAE,CAAC,CAAC;SACnI;QAED,MAAM,cAAc,GAAG,iBAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;QAYvE,MAAM,QAAQ,GAAa;YACvB,OAAO,EA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AO,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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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<
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
package/lib/api/Show.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,
|
|
1
|
+
{"version":3,"file":"Show.js","sourceRoot":"","sources":["../../src/api/Show.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;;;;;;;;;;AAGH,mCAA+F;AAC/F,2CAA2C;AAM3C,yDAAsD;AACtD,2DAAyD;AAGzD,SAAsB,QAAQ,CAAC,OAAgB,EAAE,WAAmB,EAAE,QAAgB,EAAE,OAAgB,EACzE,SAAiB;;QAC5C,MAAM,OAAO,GAAG,iBAAS,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,S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