apply-command-group

Function

The apply-command-group command applies configurations in a specified configuration template in a specified view.

The undo apply-command-group command cancels the application of the configuration template.

By default, configurations in a configuration template are not applied.

Format

apply-command-group { group-name } &<1-8>

undo apply-command-group [ group-name ] &<1-8>

Parameters

Parameter Description Value
group-name

Specifies the name of a configuration template.

The value is a string of 1 to 32 case-insensitive characters. The name contains English letters, digits, hyphens (-), and underscores (_). The name must start with a letter and cannot contain special characters or blank space.

Views

BGP view, all-interface view, Management interface view, System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
cli write

Usage Guidelines

Usage Scenario

After a configuration template is created, to apply the configurations in the configuration template, run the apply-command-group command.

  • If this command is run in the system view, the device delivers the configurations in the configuration template to all matching service view instances.
  • If this command is run in a specified service view instance, the device delivers the configurations in the configuration template to the specified service view instance.
  • Multiple configuration templates can apply in a single service view instance.
  • Multiple configuration templates can be configured simultaneously in a single apply-command-group command instance.

The apply-command-group command is not supported in the NULL interface view.

Prerequisites

Configuration templates have been configured using the command group command.

Precautions

The configuration priorities are as follows:

  • Configurations performed by a user take precedence over those in a configuration template.
  • A configuration template in an existing view takes precedence over that in a parent view.
  • If multiple configuration templates apply to a single view using the running the apply-command-group command, configuration templates are prioritized in a descending order. A configuration template that is used earlier takes precedence over the one that is used later.

Example

# Apply configurations in a configuration template named g1 to all matching service view instances on a device.
<HUAWEI> system-view
[~HUAWEI] command group g1
[~HUAWEI] end-group
Warning: The configuration in the view of the current group will be committed. Are you sure you want to continue? [Y/N]:y
[~HUAWEI] apply-command-group g1
Warning: The template configurations will be applied to the matched view. Are you sure you want to continue? [Y/N]:y
# Apply configurations in a configuration template named g1 to the Loopback2 instance.
<HUAWEI> system-view
[~HUAWEI] command group g1
[~HUAWEI] end-group
Warning: The configuration in the view of the current group will be committed. Are you sure you want to continue? [Y/N]:y
[~HUAWEI] interface LoopBack 2
[*HUAWEI-LoopBack2] commit
[~HUAWEI-LoopBack2] apply-command-group g1
Warning: The template configurations will be applied to the matched view. Are you sure you want to continue? [Y/N]:y
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >