If you have a legacy device you want to manage via UCS Director that doesn’t have any richer way (API etc.) to be interacted with or an out of the box task commands can be issues via SSH. These can be used as a quick solution rather than going down the full SDK route or creating a custom task.

These tasks have some limitations however, like with other SSH type scripts (Python, Perl etc.), error handling must be manually done (as well as knowing what those errors may be!) and failures not easily detected. You will need to make sure you know (UCSD has no way of know a error indicates a failure) these errors to ensure that upon failure UCSD knows a problem has occurred otherwise it will continue down the workflow.

You also loose the ability to re-use these tasks (must be re-configured for each workflow) and potentially importantly cant produce outputs that be be used by other task further down the workflow.

The good news is you can add and ‘undo’ script to allow rollback.

Two variants of this type of task exist;

  • SSH Task
  • CLI Task

The main difference is that SSH scripts can configure unmanaged devices and CLI tasks allow the configuration of managed devices (network & Netapp).

You can map user input variables and also variables from previous task can be mapped using the syntax ‘${VARIABLE}’.

Example

Lets work through an example, we will create a task to configure SNMP on a device.

snmp-server community public RO 
snmp-server community private RW 

However we want the user executing the task to define the community strings as well as the ACL restricting access.

SSH Task

The SSH Task (‘SSH Command’) requires a number of parameters to be defined;

  • Host IP Address
  • Login
  • Password
  • Command & Error Text
  • Undo Command & Error Text

The command syntax using the user input variables is;

    conf t
    snmp-server community ${ro_string} ${ro_acl}  
    snmp-server community ${rw_string} ${rw_acl}

CLI Task

The CLI Task (‘Execute Network Device CLI’) works in a slightly different way in which you select the device that is already managed by UCSD (no need to enter credentials). The parameters required in this case are;

  • Select Device
  • CLI Commands
  • Undo CLI Commands
  • Error

The command syntax will be the same as above;

conf t
snmp-server community ${ro_string} ${ro_acl}  
snmp-server community ${rw_string} ${rw_acl}