Concept Guide
Table Of Contents
- Dell EMC Networking Open Automation Guide 9.14.1.0 November 2018
- About this Guide
- Open Automation Framework
- Bare Metal Provisioning
- Introduction
- How it Works
- Prerequisites
- Industry Standard Upgrades with BMP
- BMP Process Overview
- BMP Operations
- Configure BMP
- BMP Commands and Examples
- System Boot and Set-up Behavior in BMP Mode
- BMP Mode - Boot and Set-up Behavior
- DHCP Offer Vendor-Specific Option for BMP
- DHCP Offer Relay Option 82
- Software Upgrade Using BMP
- Apply Configurations Using BMP Scripts
- Using the Post-configuration Script
- Using Auto-Execution Script - Normal Mode Only
- Timers in Pre–configuration and Post–configuration Scripts
- Script Examples
- BMP Operations on Servers Overview
- File Server Settings
- Domain Name Server Settings
- BMP MIB Support
- Bare Metal Provisioning CLI
- Open Management Infrastructure
- Puppet
- Smart Scripting
- Overview
- Download the Smart Scripting Package
- Dell EMC Environment Variables
- Dell EMC Proprietary Utilities
- Dell EMC SmartScript Utilities
- SQLite
- NET SNMP Client
- Limits on System Usage
- Supported UNIX Utilities
- Creating a Username and Password for Smart Scripting
- Logging in to a NetBSD UNIX Shell
- Downloading Scripts to a Switch
- Network File System (NFS)
- Setting a Search Path for Scripts
- Scheduling and Executing Scripts
- Running a Script from the UNIX Shell
- Running Scripts with User Privileges
- Smart Scripting CLI
- disable
- execute
- mount nfs
- package clear-all
- package install
- package uninstall
- script (run)
- script (stop/resume/clear/kill/unschedule)
- script event-handler
- script execute (EXEC mode)
- script execute
- script get
- script path
- script remove
- script trigger-event
- show packages
- show script
- start shell
- triggered-by
- switch script limit
- username (event handler)
- username
- SNMP MIBs
- Virtual Server Networking
- Virtual Server Networking CLI
- REST API
- HTTP and HTTPS
- XML
- Important Points to Remember
- REST Authentication
- Request Query Parameters
- Sample BGP Configurations
- HTTP Status Error Codes
- REST API — Protocol Data Unit (PDU) Structure
- Configurations
- Operational
- Operational Data for IPv6
- Management Information Base (MIB)
- IETF Interface Operations
- REST API Framework to Execute the CLIs
- Samples of the config-command
- Samples of the EXEC command
- Samples of the show-command
- REST API CLI
- Web Server

Displaying Installed Packages
To view the Open Automation packages currently installed on a switch, including version numbers and content, use the following
commands.
• View package information.
EXEC Privilege mode
show packages
show packages system
Uninstalling SmartScripts
Uninstalling the SmartScripts package removes it from the internal ash memory.
CAUTION: Before you uninstall the Smart Scripting package, stop all scripts that are running using the no script script-
name command. You must also manually stop the HTTP server daemon.
CAUTION: Uninstall all the SmartScripts, OMI, Puppet, and VSN packages before installing the new versions.
NOTE: If you have the SmartScripts package with version 2.x.x or 3.x.x, the Open Automation packages must be cleared before
upgrading or downgrading the Dell EMC Networking OS image.
• Clear all the Open Automation packages stored on the switch.
EXEC Privilege
package clear-all
Dell EMC Environment Variables
Dell EMC Networking OS provides the following set of environment variables that you can access through scripts (PERL, Python, Ruby,
TCL, UNIX, and ZSH).
1 DELL_TRGEVT_NAME — gets the name of the Event that triggered the script.
2 DELL_TRGEVT_TYPE — displays the type of event that triggered the script. The event type can be mentioned as follows:
Table 3. DELL_TRGEVT_TYPE Event and Environment Variable
Event DELL_TRGEVT_TYPE (Environment Variable)
cpu-usage CPU
log-event LOG EVENT
mem-usage MEMORY
time-event TIME EVENT
3 DELL_TRGEVT_LOGMSG — displays the log message that triggered the script. It prints a maximum of 256 characters.
4 DELL_TRGEVT_CPU — gets the CPU percentage that triggered the script.
5 DELL_TRGEVT_MEM — displays the memory usage that triggered the script.
Following is the sample script illustrating the use of environment variables:
#! /usr/bin/tclsh
set filename "/f10/flash/Log.txt"
74
Smart Scripting