342
| Actions and Adaptive CLI
When using the CLI Format, The Adaptive CLI tool will prompt you to create new attributes
based upon your script markup. This lets you quickly create a script and schema to create an ACLI.
If you have attributes that are mainly simple String attributes, this is a very quick and automated
approach.
Using Perl in Adaptive CLI
If you need conditional logic that goes beyond simple scripting, you can use Perl in Adaptive CLI.
The example below checks to see if a String Attribute is empty (null) or not. If the String attribute
(ShowCmdString
) has content, the show command with
ShowCmdString
as a parameter goes
to the device. Otherwise, the Perl script skips or excludes this statement.
Embedded CLI Example:
[IF ShowCmdString]
Show [ShowCmdString]
[ENDIF ShowCmdString]
You could use the CLI format for the above example, but if you need to check attributes of other
types, besides String, then you must switch to Perl. For example:
Boolean
myFlag
equals True:
if ($myFlag)
{
…
}
Integer
myInt
greater than zero:
Example:
if ($myInt > 0)
{
…
}
To check whether a string is a particular value—like from a valid values list entry assigned to the
String attribute—then you must also use Perl. The CLI format only can test if the String exists. It
cannot validate its value when populated. For example: EncapsulationType = “VLAN-CCC”,
“VLAN-TCC”, … You can not do this check with the CLI Format:
[IF EncapsulationType =
“VLAN-TCC”].
Instead, use a Perl script with a statement like this:
If
($EncapsulationType eq “VLAN-TCC”)
{
print “set encapsulation $EncapsulationType\n”;
}
Содержание OpenManage Network Manager
Страница 1: ...Dell OpenManage Network Manager version 5 1 Web Client Guide ...
Страница 14: ...14 A Note About Performance Preface ...
Страница 98: ...98 Schedules Portal Conventions ...
Страница 141: ...Vendors Key Portlets 141 Vendors Snap Panel The snap panel displays the icon for the selected vendor ...
Страница 142: ...142 Vendors Key Portlets ...
Страница 232: ...232 File Management File Servers ...
Страница 242: ...242 Deploy Configuration ...
Страница 290: ...290 Key Metric Editor Monitoring Metrics This panel s display depends on the selected device ...
Страница 340: ...340 ...
Страница 374: ...374 Adaptive CLI Records Archiving Policy Actions and Adaptive CLI ...
Страница 380: ...380 Glossary ...
Страница 388: ...388 388 Index ...