replace-pattern
使用
<rpc> <load-configuration> <!-- replace a pattern globally --> <configuration replace-pattern="pattern1" with="pattern2" [upto="n"]> </configuration> <!-- replace a pattern at a specific hierarchy level --> <configuration> <!-- opening tag for each parent element --> <level-or-object replace-pattern="pattern1" with="pattern2" [upto="n"]/> <!-- closing tag for each parent element --> </configuration> <!-- replace a pattern for an object that has an identifier --> <configuration> <!-- opening tag for each parent element --> <container-tag replace-pattern="pattern1" with="pattern2" [upto="n"]> <name>identifier</name> </container-tag> <!-- closing tag for each parent element --> </configuration> </load-configuration> </rpc>
説明
候補コンフィギュレーションまたはオープン・コンフィギュレーション・データベース内の変数または識別子を置き換えます。Junos OS は、 属性で指定されたパターンを replace-pattern
、 属性で定義された置換パターンに with
置き換えます。オプション upto
の属性は、置き換えられるオブジェクトの数を制限します。置き換えのスコープは、設定データ内の属性の配置によって決定されます。
属性
replace-pattern="pattern1" |
一致させたい識別子または値を定義するテキスト文字列または正規表現。 |
with="pattern2" |
に置 pattern1き換えられる識別子と値をテキスト文字列または正規表現。 |
upto="n" |
置き換えられたオブジェクトの数。の n 値は、設定で置き換えられるオブジェクトの総数を制御します(パターンが発生した回数の総数ではありません)。同じ階層レベルのオブジェクト(兄弟)が最初に置き換えられます。特定のオブジェクト内でパターンが複数回出現した場合は、単一の置換とみなされます。属性を含まない場合、または属性を
|
リリース情報
Junos OS リリース 15.1R1 で導入された属性。