xpl global-value

Function

The xpl global-value command creates a global variable set and displays the global variable set view.

The undo xpl global-value command deletes a specified global variable set.

By default, no global variable sets are configured.

Format

xpl global-value

undo xpl global-value

Parameters

None

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
route-base write

Usage Guidelines

Usage Scenario

A global variable set is a group of frequently used values that are defined as global variables. Global variables are variables that can be referenced by all route-filters configured on a device. To enable a route-filter or a set to reference a global variable, enter $+variable name, for example, $glovar1. The global variables on a device must be unique. A new global variable will override an existing global variable with the same name. To create a global variable set and enter the global variable set view, run the xpl global-value command.

Follow-up Procedure

  1. Configure set elements in the format of variable name+'value' in the global variable set view.
    • The variable value range is The value is a string of 1 to 200 case-sensitive characters, spaces not supported. The string can contain letters, digits, underscores (_), hyphens (-), and dots (.). It must start with a letter or digit.The variable name must not be abort, display, end-global-value, or any abbreviation of the keywords, for example, a, ab, abo, di, e, or end.
    • Separate every two neighboring elements with a comma (,), for example, aaa '12', bbb '34', aaa '1.2.3.4'.
  2. Run the end-global-value command in the global variable set view to conclude the configuration of the global variable set.

Precautions

The data type of each value in a global variable set may vary with the route-filter that references the set. If glovar '12' is referenced to set the MED for BGP routes, the value of glovar is an integer.

New configurations of a global variable set will replace current configurations of the global variable set. To exit from the global variable set view, run the abort command in the global variable set view.

Example

# Configure a global variable set.
<HUAWEI> system-view
[~HUAWEI] xpl global-value
[~HUAWEI-xpl-global] aaa '12',
[~HUAWEI-xpl-global] bbb '34',
[~HUAWEI-xpl-global] ccc '1.2.3.4'
[~HUAWEI-xpl-global] end-global-value
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >