- apply-macro apply-macro-name {
-
parameter-name parameter-value;
- }
All hierarchy levels
Statement introduced in JUNOS Release 7.4.
With commit script macros, use custom syntax in your configuration.
Macros work by locating apply-macro statements that you include in the candidate configuration and using the values specified in the apply-macro statement as parameters to a set of instructions (the macro) defined in a commit script. The commit script alters your configuration from one that contains custom syntax into a full configuration containing standard JUNOS statements.
In effect, your custom configuration syntax serves a dual purpose. The syntax allows you to simplify your configuration tasks, and it provides data (or hooks) that are used by a commit script macros.
You can include the apply-macro statement at any level of the configuration hierarchy. You can include multiple apply-macro statements at each level of the configuration hierarchy; however, each must have a unique name.
apply-macro-name—Name of the apply-macro statement.
parameter-name—One or more parameters. Parameters can be any text you want to include in your configuration.
parameter-value—A value that corresponds to the parameter name. Parameter values can be any text you want to include in your configuration.
See Creating Custom Configuration Syntax with Macros.
configure—To enter configuration mode; other required privilege levels depend on where the statement is located in the configuration hierarchy.