![Juniper JUNOSE 11.3 Скачать руководство пользователя страница 489](http://html1.mh-extra.com/html/juniper/junose-11-3/junose-11-3_configuration-manual_2032852489.webp)
CHAPTER 8
Writing CLI Macros
An E Series router has an embedded macro language that enables you to define and run
macros that can generate and execute CLI commands. Macro files—identified by the
.mac
extension—can be used to store more than one macro. Depending on your needs,
you might want to store all of your macros in one file, group macros by function, or store
only one macro per file.
This chapter contains the following sections:
•
Platform Considerations on page 459
•
Writing Macros on page 459
•
Detecting and Recording Macro Errors on page 476
•
Running Macros on page 481
•
Scheduling Macros on page 484
•
Practical Examples on page 487
Platform Considerations
Macros are supported on all E Series routers.
For information about the modules supported on E Series routers:
•
See the
ERX Module Guide
for modules supported on ERX7xx models, ERX14xx models,
and the ERX310 Broadband Services Router.
•
See the
E120 and E320 Module Guide
for modules supported on the E120 and E320
Broadband Services Routers.
Writing Macros
You must write macros on your computer, not on the E Series router. The macros can
contain loops, variables, string and numeric values, and conditional statements. Macros
can invoke other macros (as long as they are contained within the same macro file),
including themselves, but infinite recursion is not permitted. Macros are case-insensitive.
Macros consist of
control expressions
and
noncontrol expressions
. Control expressions
are enclosed by
control brackets
, which are angle-bracket and number sign pairs, like
this: <#
controlExpression
#>. Examples of control expressions include the macro name
459
Copyright © 2010, Juniper Networks, Inc.
Содержание JUNOSE 11.3
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 8: ...Copyright 2010 Juniper Networks Inc viii JunosE 11 3 x System Basics Configuration Guide...
Страница 24: ...Copyright 2010 Juniper Networks Inc xxiv JunosE 11 3 x System Basics Configuration Guide...
Страница 32: ...Copyright 2010 Juniper Networks Inc 2 JunosE 11 3 x System Basics Configuration Guide...
Страница 146: ...Copyright 2010 Juniper Networks Inc 116 JunosE 11 3 x System Basics Configuration Guide...
Страница 166: ...Copyright 2010 Juniper Networks Inc 136 JunosE 11 3 x System Basics Configuration Guide...
Страница 432: ...Copyright 2010 Juniper Networks Inc 402 JunosE 11 3 x System Basics Configuration Guide...
Страница 488: ...Copyright 2010 Juniper Networks Inc 458 JunosE 11 3 x System Basics Configuration Guide...
Страница 524: ...Copyright 2010 Juniper Networks Inc 494 JunosE 11 3 x System Basics Configuration Guide...
Страница 554: ...Copyright 2010 Juniper Networks Inc 524 JunosE 11 3 x System Basics Configuration Guide...
Страница 566: ...Copyright 2010 Juniper Networks Inc 536 JunosE 11 3 x System Basics Configuration Guide...
Страница 588: ...Copyright 2010 Juniper Networks Inc 558 JunosE 11 3 x System Basics Configuration Guide...
Страница 613: ...PART 3 Index Index on page 585 583 Copyright 2010 Juniper Networks Inc...
Страница 614: ...Copyright 2010 Juniper Networks Inc 584 JunosE 11 3 x System Basics Configuration Guide...
Страница 632: ...Copyright 2010 Juniper Networks Inc 602 JunosE 11 3 x System Basics Configuration Guide...