EasyManua.ls Logo

Cisco Catalyst 2960 Series

Cisco Catalyst 2960 Series
2288 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Once saved information is retrieved, it is automatically deleted. If that information is needed by another
policy, the policy that retrieves it (using the context_retrieve command extension) should also save it
again (using the context_save command extension).
Note
Syntax
context_save ctxt [pattern]
Arguments
(Mandatory) Context name.ctxt
(Optional) The glob-style pattern as used by the string
matchTcl command. If this argument is not specified,
the pattern defaults to the wildcard *.
There are three constructs used in glob patterns:
* = all characters
? = 1 character
[abc] = match one of a set of characters
pattern
Result String
None
Set _cerrno
A string displaying _cerrno, _cerr_sub_num, _cerr_sub_err, _cerr_posix_err, _cerr_str due to appl_setinfo
error.
Sample Usage
The following examples show how to use the context_saveand context_retrieve command extension
functionality to save and retrieve data. The examples are shown in save and retrieve pairs.
Example 1: Save
If var is unspecified or if a pattern if specified, saves multiple variables to the context.
::cisco::eem::event_register_none
namespace import ::cisco::eem::*
namespace import ::cisco::lib::*
set testvara 123
set testvarb 345
set testvarc 789
if {[catch {context_save TESTCTX "testvar*"} errmsg]} {
action_syslog msg "context_save failed: $errmsg"
} else {
Consolidated Platform Configuration Guide, Cisco IOS Release 15.2(4)E (Catalyst 2960-X Switches)
1865
context_save

Table of Contents

Other manuals for Cisco Catalyst 2960 Series

Related product manuals