-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #348 from zowe/anax-advanced-usage
Anax advanced usage
- Loading branch information
Showing
5 changed files
with
43 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
Advanced usage | ||
Advanced steps | ||
=============== | ||
|
||
- You can use a custom Certificate Authority. | ||
The python SDK supports the commonly used environmental variables `REQUESTS_CA_BUNDLE` and `CURL_CA_BUNDLE` to provide a certificate chain. Also, you may use the `SSL_CERT_FILE` environmental variable. | ||
- Use a custom Certificate Authority if working in a restricted environment. | ||
The Python SDK supports the commonly used environmental variables `REQUESTS_CA_BUNDLE` and `CURL_CA_BUNDLE` to provide a certificate chain. | ||
|
||
You can also use the `SSL_CERT_FILE` environmental variable in project-level configurations. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
Basic usage | ||
First steps | ||
============ | ||
|
||
After you install the package in your project, import the class for the required sub-package (i.e `Console` class for z/OS Console commands). | ||
Create a dictionary to handle communication with the plug-in: | ||
After you install the package in your project, integrate the SDK in your script: | ||
|
||
.. code-block:: python | ||
1. Import the class for the required sub-package in order to call the individual SDK method and run plug-in commands. | ||
|
||
from zowe.zos_console_for_zowe_sdk import Console | ||
profile = { | ||
"host": "<host address>", | ||
"port": 443, # Include the port if different from the default (443) | ||
"user": "<user>", | ||
"password": "<password>", | ||
# "rejectUnauthorized": True, # Set to False to disable SSL verification | ||
# "basePath": "", # Define base path if using Zowe API ML (e.g. "/ibmzosmf/api/v1" for z/OSMF) | ||
# "protocol": "https", # Include the protocol if different from the default (https) | ||
} | ||
For example, the `Console` class must be imported for z/OS Console commands to be issued. | ||
|
||
my_console = Console(profile) | ||
2. Create a dictionary to add connection information to communicate with the plug-in: | ||
|
||
Alternatively you can use an existing Zowe CLI profile instead: | ||
.. code-block:: python | ||
.. code-block:: python | ||
from zowe.zos_console_for_zowe_sdk import Console | ||
profile = { | ||
"host": "<host address>", | ||
"port": 443, # Include the port if different from the default (443) | ||
"user": "<user>", | ||
"password": "<password>", | ||
# "rejectUnauthorized": True, # Set to False to disable SSL verification | ||
# "basePath": "", # Define base path if using Zowe API ML (e.g. "/ibmzosmf/api/v1" for z/OSMF) | ||
# "protocol": "https", # Include the protocol if different from the default (https) | ||
} | ||
from zowe.zos_console_for_zowe_sdk import Console | ||
from zowe.core_for_zowe_sdk import ProfileManager | ||
my_console = Console(profile) | ||
# Load the profile using ProfileManager | ||
profile = ProfileManager().load(profile_name="<profile name>") | ||
Alternatively you can use an existing Zowe CLI profile instead: | ||
|
||
my_console = Console(profile) | ||
.. code-block:: python | ||
from zowe.zos_console_for_zowe_sdk import Console | ||
from zowe.core_for_zowe_sdk import ProfileManager | ||
# Load the profile using ProfileManager | ||
profile = ProfileManager().load(profile_name="<profile name>") | ||
my_console = Console(profile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
Requirements | ||
============= | ||
|
||
The project requires the following: | ||
Zowe Client Python SDK requires the following: | ||
|
||
- Python 3.9 and above | ||
- Sphinx (optional - To build project documentation) | ||
- Enchant (optional - to build project documentation) | ||
- **Python** 3.9+ to run your script | ||
- (optional) **Sphinx** to build project documentation | ||
- (optional) **Enchant** to build project documentation |