@broadcom/ops-for-zowe-cli
TypeScript icon, indicating that this package has built-in type declarations

5.2.0 • Public • Published

OPS/MVS® Plug-in for Zowe CLI

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.

Key Features

Using the plug-in, you can benefit from the following OPS/MVS features:

  • Display the status of specific automation rules and *rule sets.
  • Enable and disable specific automation rules.
  • Display the state of specific System State Manager (SSM) resources.
  • Start and stop specific SSM resources.
  • *Display the status of a REST API server.
  • *Display the log names.
  • *Display the subsystems.
  • *Display RDF tables.
  • *Display SSM parms.
  • *Display OPSLOG records.
  • *Execute a REXX program.
  • *Execute a operator command.
  • *Create a generic AOF event for API rules processing.

Note: * Indicates only available if you are using the plug-in with the OPS/MVS REST API.

Prerequisites

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.

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.

Security Requirements

To issue OPS/MVS commands through the plug-in, you must be authorized for those commands through OPS/MVS security. For more information, refer to the article REST API Security.

Install the OPS/MVS Plug-in From a Local Package

To install the OPS/MVS plug-in to the Zowe CLI from a local package:

  1. Issue the following command to install the plug-in.

    zowe plugins install @broadcom/ops-for-zowe-cli
  2. Issue the following command to validate the installed plug-in.

    zowe plugins validate @broadcom/ops-for-zowe-cli

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.

When the validation process is successful, the following message displays:

   _____ Validation results for plugin '@broadcom/ops-for-zowe-cli' _____
   This plugin was successfully validated. Enjoy the plugin.         

Installation Failure

If the validation process fails, a failure message displays. 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.

Uninstall the OPS/MVS Plug-in From Zowe CLI

To uninstall the plug-in from Zowe CLI, issue the following command:

zowe plugins uninstall @broadcom/ops-for-zowe-cli

Create an OPS/MVS Profile

You can set up an OPS/MVS profile to avoid typing your connection details on every command.

  1. Gather the following data:

    • The host name of the LPAR on which OPS/MVS Web Services or the OPS/MVS REST API server is running
    • The port number for OPS/MVS Web Services or the OPS/MVS REST API server
    • A user name that has authority to access OPS/MVS Web Services or the OPS/MVS REST API server
    • The password to the account assigned to the user name
  2. Do one of the following:

    • Edit the global configuration file located at ~/.zowe/zowe.config.json by issuing the following command.

      zowe config edit --gc
    • Use zowe config set profiles commands to set the OPS/MVS profile. In the examples below, ops is the profile name.

      zowe config set profiles.ops.properties.port 1234 --gc
      zowe config set profiles.ops.properties.user user --gc
      zowe config set profiles.ops.properties.password password --gc
      zowe config set profiles.ops.properties.reject-unauthorized true or false --gc
      zowe config set profiles.ops.properties.protocol http or https --gc
      zowe config set profiles.ops.properties.subsystem sys1 --gc
      zowe config set profiles.ops.properties.rest-api true or false --gc
      

The following example shows an OPS/MVS profile inside a global configuration file:

"profiles": {
    "ops": {
        "type": "ops",
        "properties": {
            "host": "example.net",
            "port": 12345,
            "protocol": "https",
            "subsystem": "SYS1",
            "rest-api": false,
            "reject-unauthorized": false
        },
        "secure": []
    }
}

Create an OPS/MVS Profile for the Zowe API ML

Important: The Zowe API Mediation Layer (API ML) can only be used with the OPS/MVS REST API, which must be registered with the API ML server used in the profile.

To create an OPS/MVS plug-in profile for the Zowe API ML:

  1. Gather the following data:

    • The host name of the LPAR on which the API ML is installed
    • The API ML server port number
    • A user name that has authority to access the registered OPS/MVS REST API server
    • The password to the account assigned to the user name
    • 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
  2. Follow the directions in step 2 of Create an OPS/MVS Profile, including the additional data you gathered in step 1 of this section.

The following example shows an OPS/MVS profile for the Zowe API ML inside a global configuration file:

"opsapiml": {
        "type": "ops",
        "properties": {
            "host": "example.net",
            "port": 12345,
            "user": "user1",
            "password": "password",
            "protocol": "https",
            "subsystem": "SYS1",
            "rest-api": true,
            "reject-unauthorized": false,
            "base-path": "opsrestapi/api/v1"
        },
        "secure": []
}

Using the OPS/MVS Plug-in for Zowe CLI

For details about the commands, actions, and options in this plug-in, refer to the Zowe CLI Help.

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:

  • Enter zowe ops to display a summary of available commands and options for the plug-in in the command prompt window.

  • Enter zowe ops --hw to display Zowe CLI web help for the plug-in in a browser window.

Return Codes

When you enter a command using the OPS/MVS Plug-in for Zowe CLI, you will receive one of the following return codes:

0 - Execution succeeded

1 - Execution failed

Available Commands

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.

create

  • create event*

    • Use the create event command to create a generic AOF event for API rules processing.

disable

  • disable rule

    • Use the disable rule command to disable the specified rule.

enable

  • enable rule

    • Use the enable rule command to enable the specified rule.

execute

  • execute command*

    • Use the execute command command to execute the specified operator command.
  • execute rexx*

    • Use the execute rexx command to execute the specified OPS/MVS REXX program.

show

  • show logname*

    • Use the show logname command to display the logs defined to a subsystem.
  • show parms*

    • Use the show parms command to display all the SSM parameters defined to a subsystem.
  • show records*

    • 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.
  • show resource

    • Use the show resource command to show the current and desired state of all resources associated with the specified SSM resource.
  • show rule

    • Use the show rule command with to display data associated with the specified rule.
  • show ruleset*

    • Use the show ruleset command to display the status of a specific automation rule set.
  • show status*

    • Use the show status command to display the status of the REST API server.
  • show subsystem*

    • Use the show subsystem command to display the subsystems running on an OPS system.
  • show table*

    • Use the show table command to display data associated with RDF tables.

start

  • start resource

    • Use the start resource command to start the specified resource.

stop

  • stop resource

    • Use the stop resource command to stop the specified resource.

Package Sidebar

Install

npm i @broadcom/ops-for-zowe-cli

Weekly Downloads

9

Version

5.2.0

License

SEE LICENSE IN LICENSE

Unpacked Size

530 kB

Total Files

315

Last publish

Collaborators

  • zfernand0
  • broadcom-mbauto
  • markackert
  • jt1989
  • mikebauerca