Saved Commands not working
search cancel

Saved Commands not working

book

Article ID: 415356

calendar_today

Updated On:

Products

Network Observability VMware Smart Assurance

Issue/Introduction

Saved Commands not working for Sonic devices with multiple lines. 

Example:

If saved commands has following

sonic-cli

show running-configuration | grep snmp

Fails to run second command from NCM. 

Environment

NCM 10.1.x/24.3.x

Cause

sonic-cli command would get device to config mode however in NCM generated script, stdEnablePromptState and stdDisablePromptState are checked. 

Resolution

In saved commands from Automation Library do following:

  1. Edit saved commands
  2. Navigate to script
  3. Remove stdEnablePromptState and stdDisablePromptState for sonic-cli
  4. Add stdConfigPromptState and save.

Run saved commands, it will work.