Referencing ISG applications in Management Center scripts
search cancel

Referencing ISG applications in Management Center scripts

book

Article ID: 276703

calendar_today

Updated On:

Products

Management Center - VA ISG Proxy ISG Content Analysis SSP-S410 PLATFORM SSP-S210 PLATFORM Management Center

Issue/Introduction

Management Center provides administrators with the ability to write scripts to perform routine tasks with devices. Applications deployed on the Integrated Secure Gateway (ISG) are managed from the ISG OS for tasks such as; upgrading, updating the license, model resizing, or updating the assigned network definition. The commands used to perform these tasks reference each application by unique values such as the application's name or serial number.

This article outlines how to utilize device attributes as substitution variables to write universal scripts that can be executed against any device.

Resolution

Configure Device Attributes

  1. Log in to the Management Center administrative console.
  2. Navigate to Administration > Attributes and select Device then +Add Attribute



  3. Complete the form to create an attribute for the value you need to use.

    NOTE  Ensure the Device Type is set to Integrated Secure Gateway so the attribute only applies to ISG devices.
    NOTE  Select Mandatory to require this attribute to be set on all Integrated Secure Gateway devices.



  4. Set the attribute value under any existing Integrated Secure Gateway appliance from the Settings tab of the device. Save the settings.

    NOTE  The device creation wizard prompts the administrator to set the device attributes when adding new devices.

 

Use Device Attributes in a Script

  1. Navigate to Configuration > Scripts and select +Add to create a new script.

    NOTE  The Device Type must be set to Integrated Secure Gateway.
    NOTE  The option Replace substitution variables must be selected.



  2. Write the script and use the syntax ${device.attributes.attribute_name} where attribute_name is the name of the device attribute to include.

    NOTE  The Preview tool can be used to validate how Management Center will interpret the substitution variables against specific devices.


 

Sample Scripts

The following sample scripts use the following device attributes.

Attribute Name Description
proxy_serial Contains the serial number of the application.
proxy_name Contains the application name.

 

Sample 1: Update the ISG Proxy application license

;Update ISG Proxy License Script
;WARNING - This script will stop and start the application.
conf t
licensing view id ${device.attributes.proxy_serial}
licensing load id ${device.attributes.proxy_serial}
licensing view id ${device.attributes.proxy_serial}
applications
stop ${device.attributes.proxy_name}
start ${device.attributes.proxy_name}
view

 

Sample 2: Upgrade the ISG Proxy application

;Upgrade ISG Proxy Script
;WARNING - This script will stop and start the application
;Set the <download URL> and <image ID> for the new code version.
conf t
images
load <download url>
exit
applications
stop ${device.attributes.proxy_name}
edit ${device.attributes.proxy_name} image-id <image id>
start ${device.attributes.proxy_name}
view