Creating a Script
You can use a bastion host to manage scripts. You can execute scripts to perform complicated or repetitive operation tasks, improving O&M efficiency. You can compile scripts online or import scripts by file.
HSS-Agent automatic download and installation scripts have been built in bastion hosts.
Constraints
- Script management is supported by professional editions only.
- Currently, Python and Shell script can be managed.
- Your scripts can be managed by yourself, administrator, or department administrator.
Prerequisites
You have the management permissions for the Script module.
Procedure
- Log in to your bastion host.
- Choose Operation > Script to go to the script management page.
- Click New in the upper right corner of the page.
- In the displayed New Script dialog box, configure the basic information about the script.
Table 1 Script information parameters Parameter
Description
Source
The script content source. This parameter can be set to Edit online or From file.
- Edit online: indicates that you can edit the script information online to form your script.
- From file: You can import offline scripts. Only Shell and Python scripts can be uploaded. The file size cannot exceed 5 MB.
Department Name
Department to which the host resource belongs.
Name
Name of the script. For a user-defined script rule, the script name must be unique in the system.
NOTE:For the script imported by file, the name is automatically filled based on the name of the imported file.
Remarks
Brief description of the script. A maximum of 128 characters are allowed.
- Click OK. The system returns to the script list page, and you can view the information about the new script.
Follow-up Operations
After creating an online edited script, you can edit the script online on the script details page. For more details, see Viewing and Modifying Script Information.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot