HP

HP Systems Insight Manager Technical Reference Guide

English
  Tools that Extend Management  |  Creating New Command Line Tools  |  Examples of Using Parameter Strings in Command Line Tools   

Examples of Using Parameter Strings in Command Line Tools

»Table of Contents
»Index
»Notices
»Introduction
»Product Overview
»Getting Started
»Discovery and Identification
»Users and Authorizations
»Networking and Security
»Monitoring Systems, Clusters, and Events
»Storage Integration
»Managing with Tasks
»Tools that Extend Management
»Cluster Monitor
»Command Line Tools
»Creating New Command Line Tools
»New Command Line Tool
»New Copy a File Tool
»New X Window Tool
»Command Line Tools Reference
Examples of Using Parameter Strings in Command Line Tools
»Custom Commands
»Configuring DMI Access
»Configuring SNMP Access
»Device Ping
»Disk Thresholds
»License Manager
»Management Processor Tools
»Managing MIBs
»Installing OpenSSH
»PMP Tools
»Removing and Restoring Tools
»Replicate Agent Settings
»RPM Package Manager
»Server Migration Pack
»System Management Homepage
»System Page
»Version Control
»Virtual Machine Management Pack
»WBEM Based Tools
»Available MSA Tools
»Partner Applications
»Reporting
»Administering Systems and Events
»Troubleshooting
»Reference Information
»Printable version
»Glossary
»Using Help
» Related Procedures
» Related Topics

The URL strings for Web aware tools and command line tools must be provided as absolute URLs beginning with http:// or https://. For example,

https://%n:1188/kcweb/ https://%l:2381/

Web Launch Aware tools and command line tools that always run on the central management server (CMS) must be relative URLs beginning with /. For example,

/propertypages/Identify.jsp?device=%n

Multiple selections can be substituted into the URL. A selection index is used during the substitution process to keep track of the current selection. The selection index is initially set to one, and the first selection of the list of selected target systems remains current until a %z parameter is encountered in the URL (an exception to this exists in the repeat block, discussed later), at which time the next selection becomes current and the selection index is incremented by one, and so on. For example,

http://server/app/doit.jsp?name=%n%z&addr=%a

where the doit.jsp page is invoked with the network name of the first selected system assigned to the name parameter and the IP address of the second selected target assigned to the addr parameter.

Any number of selected targets can be substituted by using the repeat block construct, %( ... %). Anything inside the repeat block delimiters is repeated until the selection list is exhausted, starting with what is then the current selection and selection index. For example,

https://%{deploy.server%}/deploy/deployimage.jsp? device1=%n%z%(&device%i=%n%z%)

The use of the %i parameter. The current selection index (1,2,3,and so on) is substituted for this parameter during the substitution process.

If the end of the repetition clause is reached and no %z parameter has been encountered, then the selection index and current election are automatically incremented to avoid an infinite loop during the substitution phase.

If we have two selected target systems in the above example, the expanded URL string would look like:

https://deploy.hp.com:280/deploy/deployimage.jsp? device1=nodea.hp.com&device2=nodeb.hp.com

If we have only 1 selected target system in the above example, the expanded URL string would look like:

https://deploy.hp.com:280/deploy/deployimage.jsp? device1=nodea.hp.com

Since there is no current selection when we get to the repeat block, the entire repeat block is suppressed during the substitution process.

Related Procedures

» Creating New Command Line Tools - New Command Line Tool
» Creating New Command Line Tools - New Copy a File Tool
» Custom Commands - New Web Launch Tool
» Creating New Command Line Tools - New X Window Tool
» Tools that Extend Management - Removing and Restoring Tools

Related Topics

» Tools that Extend Management - Command Line Tools
» Tools that Extend Management - Creating New Command Line Tools