No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

NETCONF YANG API Reference

AR100, AR120, AR160, AR1200, AR2200, AR3200, and AR3600 V300R003

NETCONF YANG API Reference
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Routing Policy

Routing Policy

Data Model

The data model file matching the routing policy definition is huawei-route-policy.yang.

Table 3-773 Data model of the routing policy

Object

Description

huawei-route-policy:route-policys

Indicates that the operation request (creating, deleting, and modifying) object is the routing policy-related configurations. It is only used to contain sub-objects, but does not have any data meaning.

huawei-route-policy:route-policys/route-policy/name

Indicates the name of a routing policy. The value is a string of 1 to 40 case-sensitive characters without spaces. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:route-policys/route-policy/nodes/node/node-index

Indicates the ID of a routing policy node. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:route-policys/route-policy/nodes/node/match-mode

Indicates a routing policy action. The value is of the enumerated type, and can be permit or deny.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/interfaces/interface/if-name

Indicates the name of a matching interface.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/destination/acl-name-or-num

Indicates the number or name of a named ACL. When it indicates the number of an ACL, the value is an integer that ranges from 2000 to 2999. When it indicates the name of an ACL, the value is a string of 1 to 32 case-sensitive characters without spaces and must begin with a letter.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/ipv4-nexthop/acl-name-or-num

Indicates the number or name of an ACL for the next-hop IPv4 address. When it indicates the number of an ACL, the value is an integer that ranges from 2000 to 2999. When it indicates the name of an ACL, the value is a string of 1 to 32 case-sensitive characters without spaces and must begin with a letter.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-cost/apply-choice

Indicates the action for changing the route cost in a routing policy. The value is of the enumerated type and can be add or sub. The value add indicates that the cost needs to be increased, and the value sub indicates that the cost needs to be reduced.

NOTE:
  • If the MED of BGP routes or cost of non-BGP routes is greater than 4294967295 after the adjustment, the value 4294967295 takes effect.
  • If the MED of BGP routes or cost of non-BGP routes is smaller than 0 after the adjustment, the value 0 takes effect.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-cost/cost-value

Indicates the route cost. The value is an integer that ranges from 0 to 4294967295.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-tag-value

Indicates the route tag. The value is an integer that ranges from 0 to 4294967295.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/local-preference

Indicates the local preference of the BGP route to be changed. The value is an integer that ranges from 0 to 32.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/none

Indicates that the original AS_Path list is cleared. Boolean type. The value is true.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/path/path-num

Indicates the number of the AS to be replaced or added. The value can be an integer that ranges from 1 to 4294967295 or in dotted notation with the format x.y, where x and y are integers. x ranges from 1 to 65535, and y ranges from 0 to 65535.

NOTE:
  • This object is valid only when the overwrite or additive object is set to true.
  • A maximum of 10 AS numbers can be specified in one command.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/path/overwrite

Indicates that a specified AS number is used to overwrite the original AS_Path list. Boolean type. The value is true.

NOTE:

This object takes effect only when the value of the none object is true.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/path/additive

Indicates that a specified AS number is added to the original AS_Path list. Boolean type. The value is true.

NOTE:

This object and the none object cannot take effect simultaneously.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/origin/origin-type

Indicates the type of the origin of BGP routes. The value is of the enumerated type, and can be igp, egp, and incomplete. The parameters are described as follows:

  • igp: sets the origin of BGP routes to IGP. BGP routes with the origin IGP have the highest priority. The origin of BGP routes obtained through IGP in the initial AS is IGP.
  • egp: sets the origin of BGP routes to EGP. BGP routes with the origin EGP have the second highest priority. The origin of BGP routes obtained using EGP is EGP.
  • incomplete: sets the origin of BGP routes to unknown. BGP routes with the origin Incomplete have the lowest priority. The origin of BGP routes learned by other means is Incomplete.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/origin/path

Indicates the AS number of external routes. The value can be an integer that ranges from 1 to 4294967295 or in dotted notation with the format x.y, where x and y are integers. x ranges from 1 to 65535, and y ranges from 0 to 65535.

NOTE:

This object takes effect only when the value of the origin-type object is egp.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-number

Indicates the community filter number.

  • The basic community filter number is an integer that ranges from 1 to 99.
  • The advanced community filter number is an integer that ranges from 100 to 199.

huawei-route-policy:route-policys/community-filters/community-filter/nodes/node/node-index

Indicates a community filter node index. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:route-policys/community-filters/community-filter/nodes/node/match-mode

Indicates the matching mode of a community filter, which can be:

  • deny
  • permit

huawei-route-policy:route-policys/community-filters/community-filter/nodes/node/community-member

Indicates the community ID. The value is an integer that ranges from 0 to 4294967295.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-cost

Indicates the action taken on the route cost:

  • add: increases the route cost.
    NOTE:

    If the MED of BGP routes or cost of non-BGP routes is greater than 4294967295 after the adjustment, the value 4294967295 takes effect.

  • sub: reduces the route cost.
    NOTE:

    If the MED of BGP routes or cost of non-BGP routes is less than the minimum value 0 after the adjustment, the value 0 takes effect.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/cost-value

Indicates the route cost. During route selection control, you can adjust the route cost to prevent routing loops. The route cost is an integer that ranges from 0 to 4294967295.

NOTE:

V300R003C10 and later versions support the objects listed below.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/vn-id/vn-id-value

Indicates an EVPN ID. The value is an integer that ranges from 1 to 16777215.

huawei-route-policy:community-filters/community-name-filter/community-filter-name

Indicates the name of a community filter. The value is a string of 1 to 51 case-sensitive characters. The string cannot contain only digits. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:community-filters/community-name-filter/community-type

Indicates the type of a community filter. The value is basic or advanced.

huawei-route-policy:community-filters/community-name-filter/nodes/node/node-index

Indicates the node index of a basic community filter. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:community-filters/community-name-filter/nodes/node/match-mode

Indicates the matching mode of a basic community filter, which can be:

  • deny
  • permit

huawei-route-policy:community-filters/community-name-filter/nodes/node/community-member

Indicates a basic community ID. The value is an integer that ranges from 0 to 4294967295.

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/node-index

Indicates the node index of an advanced community filter. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/match-mode

Indicates the matching mode of an advanced community filter, which can be:

  • deny
  • permit

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/advanced-parameter/regular-expression

Indicates the regular expression used to match community attributes. The value is a string of 1 to 255 case-sensitive characters, with spaces supported.

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-filter-name

Indicates the name of an extended community filter. The value is a string of 1 to 51 case-sensitive characters without spaces. The string cannot contain only digits. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-type

Indicates the type of an extended community filter. The value is basic or advanced.

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/node-index

Indicates the node index of a basic extended community filter. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/match-mode

Indicates the matching mode of a basic extended community filter, which can be:

  • deny
  • permit

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/extcommunity-rt-member

Indicates the community attribute value of the RT extended community filter, in the format xx:yy.

The value of xx is as follows:
  • If xx is a 2-byte AS number, xx is an integer that ranges from 0 to 65535.
  • If xx is a 4-byte AS number,
    • xx is an integer that ranges from 65536 to 4294967295.
    • xx is in the format a.b, where both a and b are an integer that ranges from 0 to 65535.
  • If xx is an IPv4 address, xx is in dotted decimal notation.

The value of yy is as follows:

  • If yy is a 2-byte AS number, yy is an integer that ranges from 0 to 4294967295.
  • If yy is a 4-byte AS number, yy is an integer that ranges from 0 to 65535.
  • If yy is an IPv4 address, yy is in an integer that ranges from 0 to 65535.

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/node-index

Indicates the node index of an advanced extended community filter. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/match-mode

Indicates the matching mode of an advanced extended community filter, which can be:

  • deny
  • permit

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/advanced-parameter/regular-expression

Indicates the regular expression used to match extended community attributes. The value is a string of 1 to 255 case-sensitive characters, with spaces supported.

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/color-list-name

Indicates the name of a color extended community filter. The value is a string of 1 to 51 case-sensitive characters without spaces. The string cannot contain only digits. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/extcommunity-color-type

Indicates the type of a color extended community filter. Currently, only the basic color extended community filter is supported.

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/node-index

Indicates the node index of a color extended community filter. The value is an integer that ranges from 0 to 65535.

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/match-mode

Indicates the matching mode of a color extended community filter, which can be:

  • deny
  • permit

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/extcommunity-color-member

Indicates the color extended community filter number. The value is an integer that ranges from 1 to 4294967295.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-numbers/community-filter-number/number

Indicates the community filter number.

  • The basic community filter number is an integer that ranges from 1 to 99.
  • The advanced community filter number is an integer that ranges from 100 to 199.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-numbers/community-filter-number/whole-match

Indicates full match. That is, all communities must be matched. Full match is valid only to basic community attribute filters. The value is of the Boolean type, and can be true or false. The default value is false.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-names/community-filter-name/name

Indicates the name of a community filter. The value is a string of 1 to 51 case-sensitive characters without spaces. The string cannot contain only digits. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-names/community-filter-name/whole-match

Indicates full match. That is, all communities must be matched. Full match is valid only to basic community attribute filters. The value is of the Boolean type, and can be true or false. The default value is false.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-filter-numbers/extcommunity-filter-number/number

Indicates the extended community filter number.

  • The basic extended community filter number is an integer that ranges from 1 to 199.
  • The advanced extended community filter number is an integer that ranges from 200 to 399.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-filter-names/extcommunity-filter-name/name

Indicates the name of an extended community filter. The value is a string of 1 to 51 case-sensitive characters without spaces. The string cannot contain only digits. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-color-list/name

Indicates the name of a color community filter. The value is a string of 1 to 51 case-sensitive characters without spaces. The string cannot contain only digits. If the string is enclosed in double quotation marks (" "), the string can contain spaces.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-rt-set/extcommunity-rt-member

Indicates the community attribute value of the RT extended community filter, in the format xx:yy.

The value of xx is as follows:
  • If xx is a 2-byte AS number, xx is an integer that ranges from 0 to 65535.
  • If xx is a 4-byte AS number,
    • xx is an integer that ranges from 65536 to 4294967295.
    • xx is in the format a.b, where both a and b are an integer that ranges from 0 to 65535.
  • If xx is an IPv4 address, xx is in dotted decimal notation.

The value of yy is as follows:

  • If yy is a 2-byte AS number, yy is an integer that ranges from 0 to 4294967295.
  • If yy is a 4-byte AS number, yy is an integer that ranges from 0 to 65535.
  • If yy is an IPv4 address, yy is in an integer that ranges from 0 to 65535.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-rt-set/additive

Indicates that existing RT community attributes can be added to routes. The value is of the Boolean type, and can be true or false. The default value is false.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-color-set/extcommunity-color-member

Indicates the community attribute value of the color extended community filter, in the format xx:yy.

  • xx: local priority. The value is an integer that ranges from 0 to 15.
  • yy: site ID. The value is an integer that ranges from 1 to 4294967295.

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-color-set/additive

Indicates that existing color community attributes can be added to routes. The value is of the Boolean type, and can be true or false. The default value is false.

Configuring a Routing Policy and Matching Rules

Creating a Routing Policy and Configuring Matching Rules

This section provides a sample of creating a routing policy and configuring matching rules.

Table 3-774 Creating a routing policy and configuring matching rules

Operation

XPATH

edit-config:default

/huawei-route-policy:route-policys/route-policy/nodes/node

Data Requirements
Table 3-775 Creating a routing policy and configuring matching rules

Item

Data

Description

Name of the routing policy

test

Create a routing policy named test and set the policy number to 21. Set the policy action to permit, configure GigabitEthernet0/0/3 as the matching interface in the policy, and set the ACLs for the destination IP address and the next-hop IPv4 address to 2222 and test, respectively.

Number of the routing policy

21

Routing policy action

permit

Matching interface

GigabitEthernet0/0/3

Name of the ACL for the destination IP address

2222

Name of the ACL for the next-hop IPv4 address

test

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy >
     <name>test</name>
     <nodes>
      <node>
       <node-index>21</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <interfaces>
         <interface>
          <if-name>GigabitEthernet0/0/3</if-name>
         </interface>
        </interfaces>
        <destination >
         <acl-name-or-num>2222</acl-name-or-num>
        </destination>
        <ipv4-nexthop>
         <acl-name-or-num>test</acl-name-or-num>
        </ipv4-nexthop>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Deleting the Routing Policy and Matching Rules

This section provides a sample of deleting a routing policy and the matching rules.

Table 3-776 Deleting the routing policy and matching rules

Operation

XPATH

edit-config:remove

/huawei-route-policy:route-policys/route-policy/nodes/node

Data Requirements
Table 3-777 Deleting the routing policy and matching rules

Item

Data

Description

Name of the routing policy

test

Delete the routing policy test of which the number is 21 and action is permit, and matching rules in the policy.

Number of the routing policy

21

Routing policy action

permit

Matching interface

GigabitEthernet0/0/3

Name of the ACL for the destination IP address

2222

Name of the ACL for the next-hop IPv4 address

test

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="remove">
     <name>test</name>
     <nodes>
      <node>
       <node-index>21</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <interfaces>
         <interface>
          <if-name>GigabitEthernet0/0/3</if-name>
         </interface>
        </interfaces>
        <destination >
         <acl-name-or-num>2222</acl-name-or-num>
        </destination>
        <ipv4-nexthop>
         <acl-name-or-num>test</acl-name-or-num>
        </ipv4-nexthop>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring a Routing Policy and the Policy Action

Creating a Routing Policy and Configuring the Policy Action

This section provides a sample of creating a routing policy and configuring the policy action.

Table 3-778 Creating a routing policy and configuring the policy action

Operation

XPATH

edit-config:default

/huawei-route-policy:route-policys/route-policy/nodes/node/apply-action

Data Requirements
Table 3-779 Creating a routing policy and configuring the policy action

Item

Data

Description

Name of the routing policy

test

Create a routing policy named test, and set the number of the policy to 22, the policy action to permit, and the next-hop address to 2.2.3.2.

Number of the routing policy

22

Routing policy action

permit

Next-hop IPv4 address of the route

2.2.3.2

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy>
     <name>test</name>
     <nodes>
      <node>
       <node-index>22</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-nexthop>
         <ipv4-nexthop>2.2.3.2</ipv4-nexthop>
        </apply-nexthop>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>  
Deleting the Routing Policy and Action Configuration

This section provides a sample of deleting a routing policy and the policy action configuration.

Table 3-780 Deleting the routing policy and action configuration

Operation

XPATH

edit-config:remove

/huawei-route-policy:route-policys/route-policy/nodes/node/apply-action

Data Requirements
Table 3-781 Deleting the routing policy and action configuration

Item

Data

Description

Name of the routing policy

test

Delete the routing policy test of which the number is 22 and action is permit, and matching rules in the policy.

Number of the routing policy

22

Routing policy action

permit

Next-hop IPv4 address of the route

2.2.3.2

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">
    <route-policy xc:operation="remove">
     <name>test</name>
     <nodes>
      <node>
       <node-index>22</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-nexthop>
         <ipv4-nexthop>2.2.3.2</ipv4-nexthop>
        </apply-nexthop>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>  

Configuring the Action for Changing the Route Cost in a Routing Policy

Configuring the Action for Changing the Route Cost in a Routing Policy

This section provides a sample of configuring the action for changing the route cost in a routing policy.

Table 3-782 Configuring the action for changing the route cost in a routing policy

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action

Data Requirements
Table 3-783 Configuring the action for changing the route cost in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Increase the route cost by 10 in the routing policy named policy1.

Node number of the routing policy

10

Action of the routing policy

permit

Action to be taken to the route cost

add

Route cost

10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-cost>
         <apply-choice>add</apply-choice>
         <cost-value>10</cost-value>
        </apply-cost>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the Action for Changing the Route Cost in a Routing Policy

This section provides a sample of deleting the action for changing the route cost in a routing policy.

Table 3-784 Deleting the action for changing the route cost in a routing policy

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action

Data Requirements
Table 3-785 Deleting the action for changing the route cost in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Delete the action for changing the route cost in a routing policy.

Node number of the routing policy

10

Action of the routing policy

permit

Action to be taken to the route cost

add

Route cost

10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-cost xc:operation="remove">
         <apply-choice>add</apply-choice>
         <cost-value>10</cost-value>
        </apply-cost>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the Action for Changing the Route Tag in a Routing Policy

Configuring the Action for Changing the Route Tag in a Routing Policy

This section provides a sample of configuring the action for changing the route tag in a routing policy.

Table 3-786 Configuring the action for changing the route tag in a routing policy

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-tag-value

Data Requirements
Table 3-787 Configuring the action for changing the route tag in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Set the route tag to 9 in the routing policy named policy1.

Node number of the routing policy

10

Action of the routing policy

permit

Route tag

9

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action xc:operation="merge">
        <apply-tag-value>9</apply-tag-value>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the Action for Changing the Route Tag in a Routing Policy

This section provides a sample of deleting the action for changing the route tag in a routing policy

Table 3-788 Deleting the action for changing the route tag in a routing policy

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-tag-value

Data Requirements
Table 3-789 Deleting the action for changing the route tag in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Delete the action for changing the route tag in a routing policy.

Node number of the routing policy

10

Action of the routing policy

permit

Route tag

9

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action xc:operation="remove">
        <apply-tag-value>9</apply-tag-value>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the Action for Changing the Local Preference of BGP Routes in a Routing Policy

Configuring the Action for Changing the Local Preference of BGP Routes in a Routing Policy

This section provides a sample of configuring the action for changing the local preference of BGP routes in a routing policy.

Table 3-790 Configuring the action for changing the local preference of BGP routes in a routing policy

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/local-preference

Data Requirements
Table 3-791 Configuring the action for changing the local preference of BGP routes in a routing policy

Item

Data

Description

Routing policy name

policy1

Set the local priority of the route in the routing policy named policy1 to 12.

Routing policy node

10

Routing policy action

permit

Local preference of the route

12

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <local-preference>12</local-preference>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the Action for Changing the Local Preference of BGP Routes in a Routing Policy

This section provides a sample of deleting the action for changing the local preference of BGP routes in a routing policy.

Table 3-792 Deleting the action for changing the local preference of BGP routes in a routing policy

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/local-preference

Data Requirements
Table 3-793 Deleting the action for changing the local preference of BGP routes in a routing policy

Item

Data

Description

Routing policy name

policy1

Delete the action for changing the local preference of BGP routes in a routing policy.

Routing policy node

10

Routing policy action

permit

Local preference of the route

12

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <local-preference xc:operation="remove">12</local-preference>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the Action for Changing the AS_Path Attribute of BGP Routes in a Routing Policy

Clearing the Original AS_Path List

This section provides a sample of clearing the original AS_Path list.

Table 3-794 Clearing the original AS_Path list

Operation

XPATH

edit-config:replace

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/none

Clearing the original AS_Path list
Table 3-795 Clearing the original AS_Path list

Item

Data

Description

Name of a routing policy

policy1

Clear the original AS_Path list.

Node number of the routing policy

10

Action of the routing policy

permit

Clearing the original AS_Path list

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <as-path xc:operation="replace">
         <none>true</none>
        </as-path>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Using a Specified AS Number to Overwrite the Original AS_Path List

This section provides a sample of using a specified AS number to overwrite the original AS_Path list.

Table 3-796 Using a specified AS number to overwrite the original AS_Path list

Operation

XPATH

edit-config:replace

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/path

Data Requirements
Table 3-797 Using a specified AS number to overwrite the original AS_Path list

Item

Data

Description

Name of a routing policy

policy1

Use the AS number 123 to overwrite the original AS_Path list.

Node number of the routing policy

10

Action of the routing policy

permit

AS number used to overwrite the original AS_Path list

123

Using a specified AS number to overwrite the original AS_Path list

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <as-path xc:operation="replace">
         <path>
          <path-num>123</path-num>
          <overwrite>true</overwrite>
         </path>
        </as-path>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Adding a Specified AS Number to the Original AS_Path List

This section provides a sample of adding a specified AS number to the original AS_Path list.

Table 3-798 Adding a specified AS number to the original AS_Path list

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/path

Data Requirements
Table 3-799 Adding a specified AS number to the original AS_Path list

Item

Data

Description

Name of a routing policy

policy1

Add the AS number 223 to the original AS_Path list.

Node number of the routing policy

10

Action of the routing policy

permit

AS number to be added

223

Adding a specified AS number to the original AS_Path list

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <as-path>
         <path>
          <path-num>223</path-num>
          <additive>true</additive>
         </path>
        </as-path>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the Action for Changing the AS_Path Attribute of BGP Routes in a Routing Policy

This section provides a sample of deleting the action for changing the AS_Path attribute of BGP routes in a routing policy.

Table 3-800 Deleting the action for changing the AS_Path attribute of BGP routes in a routing policy

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/as-path/path

Data Requirements
Table 3-801 Deleting the action for changing the AS_Path attribute of BGP routes in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Delete the action for changing the AS_Path attribute of BGP routes in a routing policy.

Node number of the routing policy

10

Action of the routing policy

permit

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <as-path xc:operation="remove">
        </as-path>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring the Action for Changing the Origin Attribute of BGP Routes in a Routing Policy

Configuring the Action for Changing the Origin Attribute of BGP Routes in a Routing Policy

This section provides a sample of configuring the action for changing the Origin attribute of BGP routes in a routing policy.

Table 3-802 Configuring the action for changing the Origin attribute of BGP routes in a routing policy

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/origin

Data Requirements
Table 3-803 Configuring the action for changing the Origin attribute of BGP routes in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Set the origin of routes to egp and the AS number of external routes to 123.

Node number of the routing policy

10

Action of the routing policy

permit

Changing the Origin attribute of BGP routes

egp

AS number of external routes

123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <origin>
         <origin-type>egp</origin-type>
         <path>123</path>
        </origin>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting the Action for Changing the Origin Attribute of BGP Routes in a Routing Policy

This section provides a sample of deleting the action for changing the Origin attribute of BGP routes in a routing policy.

Table 3-804 Deleting the action for changing the Origin attribute of BGP routes in a routing policy

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/origin

Data Requirements
Table 3-805 Deleting the action for changing the Origin attribute of BGP routes in a routing policy

Item

Data

Description

Name of a routing policy

policy1

Deleting the action for changing the Origin attribute of BGP routes in a routing policy.

Node number of the routing policy

10

Action of the routing policy

permit

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <origin xc:operation="remove">
        </origin>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Creating a Matching Rule Based on a Community Filter

Creating a Matching Rule Based on a Community Filter

This section provides a sample of creating a matching rule based on a community filter.

Table 3-806 Creating a Matching Rule Based on a Community Filter

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-number

Data Requirements
Table 3-807 Creating a Matching Rule Based on a Community Filter

Item

Data

Description

Community filter number

30

Create a matching rule based on the community filter 30.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=30">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <community-filter-number>30</community-filter-number>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>30</community-filter-number>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-number>30</community-number>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=30"> 
 <ok/> 
</rpc-reply> 
Deleting the Matching Rule Based on a Community Filter

This section provides a sample of deleting a matching rule based on a community filter.

Table 3-808 Deleting the Matching Rule Based on a Community Filter

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-number

Data Requirements
Table 3-809 Deleting the Matching Rule Based on a Community Filter

Item

Data

Description

Community filter number

30

Delete the matching rule based on the community filter 30.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_remove_community-filter-number=30">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <community-filter-number xc:operation="remove">30</community-filter-number>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>30</community-filter-number>
     <nodes>
      <node xc:operation="remove">
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-number>30</community-number>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_remove_community-filter-number=30"> 
 <ok/> 
</rpc-reply> 

Creating a Community Filter

Creating a Community Filter

This section provides a sample of creating a community filter.

Table 3-810 Creating a Community Filter

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/community-filters/community-filter/nodes/node

Data Requirements
Table 3-811 Creating a Community Filter

Item

Data

Description

Node index

100

Create a community filter whose node index is 100, matching mode is permit, and community ID is 60.

Matching mode of a community filter

permit

Community number

60

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-member=70_nodex-index=100_remove">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>10</community-filter-number>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member xc:operation="merge">60</community-member>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-member=70_nodex-index=100_remove"> 
 <ok/> 
</rpc-reply> 
Changing a Community Filter

This section provides a sample of changing a community filter.

Table 3-812 Changing a Community Filter

Operation

XPATH

edit-config:replace

huawei-route-policy:route-policys/community-filters/community-filter/nodes/node

Data Requirements
Table 3-813 Changing a Community Filter

Item

Data

Description

Node index

100

Change the community ID of the community filter whose node index is 100 and matching mode is permit to 70.

Matching mode of a community filter

permit

Community number

70

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-member=70_nodex-index=100_remove">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>10</community-filter-number>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member xc:operation="replace">70</community-member>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DDEVICECONFIG_community-member=70_nodex-index=100_remove"> 
 <ok/> 
</rpc-reply> 
Deleting a Specified Community Filter

This section provides a sample of deleting a specified community filter.

Table 3-814 Deleting a Specified Community Filter

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/community-filters/community-filter/nodes/node

Data Requirements
Table 3-815 Deleting a Specified Community Filter

Item

Data

Description

Node index

100

Delete the community filter whose node index is 100, matching mode is permit, and community ID is 70.

Matching mode of a community filter

permit

Community number

70

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-member=70_nodex-index=100_remove">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>10</community-filter-number>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member xc:operation="remove">70</community-member>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-member=70_nodex-index=100_remove"> 
 <ok/> 
</rpc-reply>

Configuring the Route Cost

Increasing the Route Cost

This section provides a sample of increasing the route cost.

Table 3-816 Increasing the Route Cost

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-cost

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/cost-value

Data Requirements
Table 3-817 Increasing the Route Cost

Item

Data

Description

Action taken on the route cost

add

Increase the route cost by 13.

Route cost

13

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-cost>
         <apply-choice>add</apply-choice>
         <cost-value>13</cost-value>
        </apply-cost>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Reducing the Route Cost

This section provides a sample of reducing the route cost.

Table 3-818 Reducing the Route Cost

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-cost

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/cost-value

Data Requirements
Table 3-819 Reducing the Route Cost

Item

Data

Description

Action taken on the route cost

sub

Reduce the route cost by 12.

Route cost

12

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-cost>
         <apply-choice>sub</apply-choice>
         <cost-value>12</cost-value>
        </apply-cost>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Restoring the Default RouteCost

This section provides a sample of restoring the default route cost.

Table 3-820 Restoring the default route cost

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/apply-cost

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/cost-value

Data Requirements
Table 3-821 Restoring the default route cost

Item

Data

Description

Action taken on the route cost

sub

Restore the default route cost.

Route cost

12

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <apply-cost xc:operation="remove">
         <apply-choice>sub</apply-choice>
         <cost-value>12</cost-value>
        </apply-cost>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring an EVPN ID

Configuring an EVPN ID

This section provides a sample of configuring an EVPN ID.

Table 3-822 Configuring an EVPN ID

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/vn-id/vn-id-value

Data Requirements
Table 3-823 Configuring an EVPN ID

Item

Data

Description

EVPN ID

12

Set the EVPN ID to 12.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <vn-id>
         <vn-id-value xc:operation="merge">12</vn-id-value>
        </vn-id>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc> 
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 
Deleting an EVPN ID

This section provides a sample of deleting an EVPN ID.

Table 3-824 Deleting an EVPN ID

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/vn-id/vn-id-value

Data Requirements
Table 3-825 Deleting an EVPN ID

Item

Data

Description

EVPN ID

12

Delete an EVPN ID.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <vn-id  xc:operation="remove">
         <vn-id-value>12</vn-id-value>
        </vn-id>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc> 
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply> 

Configuring a Basic Community Filter

Configuring a Basic Community Filter

This section provides a sample of configuring a basic community filter.

Table 3-826 Configuring a basic community filter

Operation

XPATH

edit-config:default

huawei-route-policy:community-filters/community-name-filter/community-filter-name

huawei-route-policy:community-filters/community-name-filter/community-type

huawei-route-policy:community-filters/community-name-filter/nodes/node/node-index

huawei-route-policy:community-filters/community-name-filter/nodes/node/match-mode

huawei-route-policy:community-filters/community-name-filter/nodes/node/community-member

Data Requirements
Table 3-827 Configuring a basic community filter

Item

Data

Description

Name of a community filter

abc

Configure a basic community filter.

Type of a community filter

basic

Node index of a community filter

100

Matching mode of a community filter

permit

Community ID

no-advertise

Community ID

12:22

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-name-filter>
     <community-filter-name>abc</community-filter-name>
     <community-type>basic</community-type>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member>no-advertise</community-member>
       <community-member>12:22</community-member>
      </node>
     </nodes>
    </community-name-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Deleting a Basic Community Filter

This section provides a sample of deleting a basic community filter.

Table 3-828 Deleting a basic community filter

Operation

XPATH

edit-config:remove

huawei-route-policy:community-filters/community-name-filter/community-filter-name

huawei-route-policy:community-filters/community-name-filter/community-type

huawei-route-policy:community-filters/community-name-filter/nodes/node/node-index

huawei-route-policy:community-filters/community-name-filter/nodes/node/match-mode

huawei-route-policy:community-filters/community-name-filter/nodes/node/community-member

Data Requirements
Table 3-829 Deleting a basic community filter

Item

Data

Description

Name of a community filter

abc

Delete a basic community filter.

Type of a community filter

basic

Node index of a community filter

100

Matching mode of a community filter

permit

Community ID

123

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-name-filter xc:operation="remove">
     <community-filter-name>abc</community-filter-name>
     <community-type>basic</community-type>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member>123</community-member>
      </node>
     </nodes>
    </community-name-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring an Advanced Community Filter

Configuring an Advanced Community Filter

This section provides a sample of configuring an advanced community filter.

Table 3-830 Configuring an advanced community filter

Operation

XPATH

edit-config:merge

huawei-route-policy:community-filters/community-name-filter/community-filter-name

huawei-route-policy:community-filters/community-name-filter/community-type

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/node-index

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/match-mode

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/advanced-parameter/regular-expression

Data Requirements
Table 3-831 Configuring an advanced community filter

Item

Data

Description

Name of a community filter

abc

Configure an advanced community filter.

Type of a community filter

advanced

Node index of a community filter

100

Matching mode of a community filter

permit

Regular expression used to match community attributes

regular

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-name-filter xc:operation="merge">
     <community-filter-name>abc</community-filter-name>
     <community-type>advanced</community-type>
     <advanced-nodes>
      <advanced-node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <advanced-parameter>
        <regular-expression>regular</regular-expression>
       </advanced-parameter>
      </advanced-node>
     </advanced-nodes>
    </community-name-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Deleting an Advanced Community Filter

This section provides a sample of deleting an advanced community filter.

Table 3-832 Deleting an advanced community filter

Operation

XPATH

edit-config:remove

huawei-route-policy:community-filters/community-name-filter/community-filter-name

huawei-route-policy:community-filters/community-name-filter/community-type

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/node-index

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/match-mode

huawei-route-policy:community-filters/community-name-filter/advanced-nodes/advanced-node/advanced-parameter/regular-expression

Data Requirements
Table 3-833 Deleting an advanced community filter

Item

Data

Description

Name of a community filter

abc

Delete an advanced community filter.

Type of a community filter

advanced

Node index of a community filter

100

Matching mode of a community filter

permit

Regular expression used to match community attributes

regular

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy" xc:operation="remove">   
    <community-name-filter xc:operation="remove">
     <community-filter-name>abc</community-filter-name>
     <community-type>advanced</community-type>
     <advanced-nodes>
      <advanced-node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <advanced-parameter>
        <regular-expression>regular</regular-expression>
       </advanced-parameter>
      </advanced-node>
     </advanced-nodes>
    </community-name-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring a Basic Extended Community Filter

Configuring a Basic Extended Community Filter

This section provides a sample of configuring a basic extended community filter.

Table 3-834 Configuring a basic extended community filter

Operation

XPATH

edit-config:merge

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-filter-name

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-type

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/node-index

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/match-mode

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/extcommunity-rt-member

Data Requirements
Table 3-835 Configuring a basic extended community filter

Item

Data

Description

Name of an extended community filter

ExtFiltName

Configure a basic extended community filter.

Type of an extended community filter

basic

Node index of an extended community filter

100

Matching mode of an extended community filter

permit

Extended community attribute value

200:200

Extended community attribute value

300:400

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <extcommunity-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy" xc:operation="merge">   
    <extcommunity-name-filter xc:operation="merge">
     <extcommunity-filter-name>ExtFiltName</extcommunity-filter-name>
     <extcommunity-type>basic</extcommunity-type >
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <extcommunity-rt-member>200:200</extcommunity-rt-member>
       <extcommunity-rt-member>300:400</extcommunity-rt-member>
      </node>
     </nodes>
    </extcommunity-name-filter>
   </extcommunity-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Deleting a Basic Extended Community Filter

This section provides a sample of deleting a basic extended community filter.

Table 3-836 Deleting a basic extended community filter

Operation

XPATH

edit-config:remove

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-filter-name

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-type

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/node-index

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/match-mode

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/nodes/node/extcommunity-rt-member

Data Requirements
Table 3-837 Deleting a basic extended community filter

Item

Data

Description

Name of an extended community filter

ExtFiltName

Delete a basic extended community filter.

Type of an extended community filter

basic

Node index of an extended community filter

100

Matching mode of an extended community filter

permit

Extended community attribute value

200:200

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <extcommunity-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <extcommunity-name-filter xc:operation="remove">
     <extcommunity-filter-name>ExtFiltName</extcommunity-filter-name>
     <extcommunity-type>basic</extcommunity-type >
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <extcommunity-rt-member>200:200</extcommunity-rt-member>
      </node>
     </nodes>
    </extcommunity-name-filter>
   </extcommunity-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring an Advanced Extended Community Filter

Configuring an Advanced Extended Community Filter

This section provides a sample of configuring an advanced extended community filter.

Table 3-838 Configuring an advanced extended community filter

Operation

XPATH

edit-config:merge

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-filter-name

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-type

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/node-index

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/match-mode

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/advanced-parameter/regular-expression

Data Requirements
Table 3-839 Configuring an advanced extended community filter

Item

Data

Description

Name of an extended community filter

ExtFiltName

Configure an advanced extended community filter.

Type of an extended community filter

advanced

Node index of an extended community filter

100

Matching mode of an extended community filter

permit

Regular expression used to match extended community attributes

abc

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <extcommunity-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <extcommunity-name-filter xc:operation="merge">
     <extcommunity-filter-name>ExtFiltName</extcommunity-filter-name>
     <extcommunity-type>advanced</extcommunity-type>
     <advanced-nodes>
      <advanced-node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <advanced-parameter>
        <regular-expression>abc</regular-expression>
       </advanced-parameter>
      </advanced-node>
     </advanced-nodes>
    </extcommunity-name-filter>
   </extcommunity-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Deleting an Advanced Extended Community Filter

This section provides a sample of deleting an advanced extended community filter.

Table 3-840 Deleting an advanced extended community filter

Operation

XPATH

edit-config:remove

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-filter-name

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/extcommunity-type

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/node-index

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/match-mode

huawei-route-policy:extcommunity-filters/extcommunity-name-filter/advanced-nodes/advanced-node/advanced-parameter/regular-expression

Data Requirements
Table 3-841 Deleting an advanced extended community filter

Item

Data

Description

Name of an extended community filter

ExtFiltName

Delete an advanced extended community filter.

Type of an extended community filter

advanced

Node index of an extended community filter

100

Matching mode of an extended community filter

permit

Regular expression used to match extended community attributes

abc

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>continue-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <extcommunity-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <extcommunity-name-filter xc:operation="remove">
     <extcommunity-filter-name>ExtFiltName</extcommunity-filter-name>
     <extcommunity-type>advanced</extcommunity-type>
     <advanced-nodes>
      <advanced-node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <advanced-parameter>
        <regular-expression>abc</regular-expression>
       </advanced-parameter>
      </advanced-node>
     </advanced-nodes>
    </extcommunity-name-filter>
   </extcommunity-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring a Basic Color Extended Community Filter

Configuring a Basic Color Extended Community Filter

This section provides a sample of configuring a basic color extended community filter.

Table 3-842 Configuring a basic color extended community filter

Operation

XPATH

edit-config:default

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/color-list-name

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/extcommunity-color-type

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/node-index

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/match-mode

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/extcommunity-color-member

Data Requirements
Table 3-843 Configuring a basic color extended community filter

Item

Data

Description

Name of a color extended community filter

color-list-name

Configure a basic color extended community filter.

Type of a color extended community filter

basic

Node index of a color extended community filter

123

Matching mode of a color extended community filter

permit

Color extended community filter number

456

Color extended community filter number

789

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <extcommunity-color-lists xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <extcommunity-color-list>
     <color-list-name>color-list-name</color-list-name>
     <extcommunity-color-type>basic</extcommunity-color-type>
     <nodes>
      <node>
       <node-index>123</node-index>
       <match-mode>permit</match-mode>
       <extcommunity-color-member>456</extcommunity-color-member>
       <extcommunity-color-member>789</extcommunity-color-member>
      </node>
     </nodes>
    </extcommunity-color-list>
   </extcommunity-color-lists>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>
Deleting a Basic Color Extended Community Filter

This section provides a sample of deleting a basic color extended community filter.

Table 3-844 Deleting a basic color extended community filter

Operation

XPATH

edit-config:remove

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/color-list-name

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/extcommunity-color-type

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/node-index

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/match-mode

huawei-route-policy:extcommunity-color-lists/extcommunity-color-list/nodes/node/extcommunity-color-member

Data Requirements
Table 3-845 Deleting a basic color extended community filter

Item

Data

Description

Name of a color extended community filter

color-list-name

Delete a basic color extended community filter.

Type of a color extended community filter

basic

Node index of a color extended community filter

123

Matching mode of a color extended community filter

permit

Color extended community filter number

456

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <extcommunity-color-lists xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <extcommunity-color-list xc:operation="remove">
     <color-list-name>color-list-name</color-list-name>
     <extcommunity-color-type>basic</extcommunity-color-type>
     <nodes>
      <node>
       <node-index>123</node-index>
       <match-mode>permit</match-mode>
       <extcommunity-color-member>456</extcommunity-color-member>
      </node>
     </nodes>
    </extcommunity-color-list>
   </extcommunity-color-lists>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring a Matching Rule Based on the Community Filter Number

Configuring a Matching Rule Based on the Community Filter Number

This section provides a sample of configuring a matching rule based on the community filter number.

Table 3-846 Configuring a matching rule based on the community filter number

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-numbers/community-filter-number/number

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-numbers/community-filter-number/whole-match

Data Requirements
Table 3-847 Configuring a matching rule based on the community filter number

Item

Data

Description

Community filter number

10

Configure a matching rule (full match) based on the community filter number 10.

Full match

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <community-filter-numbers>
         <community-filter-number>
          <number>10</number>
          <whole-match>true</whole-match>
         </community-filter-number>
        </community-filter-numbers>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>10</community-filter-number>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member>60</community-member>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting a Matching Rule Based on the Community Filter Number

This section provides a sample of deleting a matching rule based on the community filter number.

Table 3-848 Deleting a matching rule based on the community filter number

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-numbers/community-filter-number/number

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-numbers/community-filter-number/whole-match

Data Requirements
Table 3-849 Deleting a matching rule based on the community filter number

Item

Data

Description

Community filter number

10

Delete a matching rule based on the community filter number 10.

Full match

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="remove">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <community-filter-numbers>
         <community-filter-number>
          <number>10</number>
          <whole-match>true</whole-match>
         </community-filter-number>
        </community-filter-numbers>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-filter>
     <community-filter-number>10</community-filter-number>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member>60</community-member>
      </node>
     </nodes>
    </community-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>

Configuring a Matching Rule Based on the Community Filter Name

Configuring a Matching Rule Based on the Community Filter Name

This section provides a sample of configuring a matching rule based on the community filter name.

Table 3-850 Configuring a matching rule based on the community filter name

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-names/community-filter-name/number

Data Requirements
Table 3-851 Configuring a matching rule based on the community filter name

Item

Data

Description

Community filter name

abc

Configure a matching rule based on the community filter name abc.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <community-filter-names>
         <community-filter-name>
          <name>abc</name>
         </community-filter-name>
        </community-filter-names>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-name-filter>
     <community-filter-name>abc</community-filter-name>
     <community-type>basic</community-type>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member>no-advertise</community-member>
      </node>
     </nodes>
    </community-name-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting a Matching Rule Based on the Community Filter Name

This section provides a sample of deleting a matching rule based on the community filter name.

Table 3-852 Deleting a matching rule based on the community filter name

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/community-filter-names/community-filter-name/number

Data Requirements
Table 3-853 Deleting a matching rule based on the community filter name

Item

Data

Description

Community filter name

abc

Delete a matching rule based on the community filter name abc.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="remove">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <community-filter-names>
         <community-filter-name>
          <name>abc</name>
         </community-filter-name>
        </community-filter-names>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <community-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <community-name-filter>
     <community-filter-name>abc</community-filter-name>
     <community-type>basic</community-type>
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <community-member>no-advertise</community-member>
      </node>
     </nodes>
    </community-name-filter>
   </community-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring a Matching Rule Based on the Extended Community Filter Number

Configuring a Matching Rule Based on the Extended Community Filter Number

This section provides a sample of configuring a matching rule based on the extended community filter number.

Table 3-854 Configuring a matching rule based on the extended community filter number

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-filter-numbers/extcommunity-filter-number/number

Data Requirements
Table 3-855 Configuring a matching rule based on the extended community filter number

Item

Data

Description

Extended community filter number

10

Configure a matching rule based on the extended community filter number 10.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
       <extcommunity-filter-numbers>
        <extcommunity-filter-number>
         <number>10</number>
        </extcommunity-filter-number>
       </extcommunity-filter-numbers>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting a Matching Rule Based on the Extended Community Filter Number

This section provides a sample of deleting a matching rule based on the extended community filter number.

Table 3-856 Deleting a matching rule based on the extended community filter number

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-filter-numbers/extcommunity-filter-number/number

Data Requirements
Table 3-857 Deleting a matching rule based on the extended community filter number

Item

Data

Description

Extended community filter number

10

Delete a matching rule based on the extended community filter number 10.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="remove">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
       <extcommunity-filter-numbers>
        <extcommunity-filter-number>
         <number>10</number>
        </extcommunity-filter-number>
       </extcommunity-filter-numbers>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_08a6ff32d57a4684b7054a53b32042de"> 
 <ok/> 
</rpc-reply>

Configuring a Matching Rule Based on the Extended Community Filter Name

Configuring a Matching Rule Based on the Extended Community Filter Name

This section provides a sample of configuring a matching rule based on the extended community filter name.

Table 3-858 Configuring a matching rule based on the extended community filter name

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-filter-names/extcommunity-filter-name/name

Data Requirements
Table 3-859 Configuring a matching rule based on the extended community filter name

Item

Data

Description

Extended community filter name

ExtFiltName

Configure a matching rule based on the extended community filter name ExtFiltName.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <extcommunity-filter-names>
         <extcommunity-filter-name>
          <name>ExtFiltName</name>
         </extcommunity-filter-name>
        </extcommunity-filter-names>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting a Matching Rule Based on the Extended Community Filter Name

This section provides a sample of deleting a matching rule based on the extended community filter name.

Table 3-860 Deleting a matching rule based on the extended community filter name

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-filter-names/extcommunity-filter-name/name

Data Requirements
Table 3-861 Deleting a matching rule based on the extended community filter name

Item

Data

Description

Extended community filter name

ExtFiltName

Delete a matching rule based on the extended community filter name ExtFiltName.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="remove">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <extcommunity-filter-names>
         <extcommunity-filter-name>
          <name>ExtFiltName</name>
         </extcommunity-filter-name>
        </extcommunity-filter-names>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
   <extcommunity-filters xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <extcommunity-name-filter xc:operation="remove">
     <extcommunity-filter-name>ExtFiltName</extcommunity-filter-name>
     <extcommunity-type>basic</extcommunity-type >
     <nodes>
      <node>
       <node-index>100</node-index>
       <match-mode>permit</match-mode>
       <extcommunity-rt-member>200:200</extcommunity-rt-member>
      </node>
     </nodes>
    </extcommunity-name-filter>
   </extcommunity-filters>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>

Configuring a Matching Rule Based on the Color Extended Community Filter Name

Configuring a Matching Rule Based on the Color Extended Community Filter Name

This section provides a sample of configuring a matching rule based on the color extended community filter name.

Table 3-862 Configuring a matching rule based on the color extended community filter name

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-color-list/name

Data Requirements
Table 3-863 Configuring a matching rule based on the color extended community filter name

Item

Data

Description

Color community filter name

ExtFiltName

Configure a matching rule based on the color extended community filter name ExtFiltName.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <extcommunity-color-list>
         <name>ExtFiltName</name>
        </extcommunity-color-list>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting a Matching Rule Based on the Color Extended Community Filter Name

This section provides a sample of deleting a matching rule based on the color extended community filter name.

Table 3-864 Deleting a matching rule based on the color extended community filter name

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/match-condition/extcommunity-color-list/name

Data Requirements
Table 3-865 Deleting a matching rule based on the color extended community filter name

Item

Data

Description

Color community filter name

ExtFiltName

Delete a matching rule based on the color extended community filter name ExtFiltName.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="remove">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <match-condition>
        <extcommunity-color-list>
         <name>ExtFiltName</name>
        </extcommunity-color-list>
       </match-condition>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>

Changing the RT Extended Community Attribute of BGP Routes

Changing the RT Extended Community Attribute of BGP Routes

This section provides a sample of changing the RT extended community attribute of BGP routes.

Table 3-866 Changing the RT extended community attribute of BGP routes

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-rt-set/extcommunity-rt-member

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-rt-set/additive

Data Requirements
Table 3-867 Changing the RT extended community attribute of BGP routes

Item

Data

Description

RT community attribute value

11:22

Add 11:22 to the VPN RT extended community attribute of BGP routes.

Allowing adding existing community attributes to routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <extcommunity-rt-set>
         <extcommunity-rt-member>11:22</extcommunity-rt-member>
         <additive>true</additive>
        </extcommunity-rt-set>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting the RT Extended Community Attribute of BGP Routes

This section provides a sample of deleting the RT extended community attribute of BGP routes.

Table 3-868 Deleting the RT extended community attribute of BGP routes

Operation

XPATH

edit-config:merge

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-rt-set/extcommunity-rt-member

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-rt-set/additive

Data Requirements
Table 3-869 Deleting the RT extended community attribute of BGP routes

Item

Data

Description

RT community attribute value

11:22

Delete 11:22 and 10.1.1.1:22 from the VPN RT extended community attribute of BGP routes.

RT community attribute value

10.1.1.1:22

Allowing adding existing community attributes to routes

false

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <extcommunity-rt-set xc:operation="remove">
         <extcommunity-rt-member>11:22</extcommunity-rt-member>
         <extcommunity-rt-member>10.1.1.1:22</extcommunity-rt-member>
         <additive>false</additive>
        </extcommunity-rt-set>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>

Changing the Color Extended Community Attribute of BGP Routes

Changing the Color Extended Community Attribute of BGP Routes

This section provides a sample of changing the color extended community attribute of BGP routes.

Table 3-870 Changing the color extended community attribute of BGP routes

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-color-set/extcommunity-color-member

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-color-set/additive

Data Requirements
Table 3-871 Changing the color extended community attribute of BGP routes

Item

Data

Description

Color community attribute value

11:22

Add 11:22 to the color extended community attribute of BGP routes.

Allowing adding existing community attributes to routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
  <edit-config>
   <target>
    <running/>
   </target>
   <error-option>rollback-on-error</error-option>
   <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
    <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
     <route-policy xc:operation="merge">
      <name>policy1</name>
      <nodes>
       <node>
        <node-index>10</node-index>
        <match-mode>permit</match-mode>
        <apply-action>
         <extcommunity-color-set>
          <extcommunity-color-member>11:22</extcommunity-color-member>
          <additive>true</additive>
         </extcommunity-color-set>
        </apply-action>
       </node>
      </nodes>
     </route-policy>
    </route-policys>
   </config>
  </edit-config>
 </rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting the Color Extended Community Attribute of BGP Routes

This section provides a sample of deleting the color extended community attribute of BGP routes.

Table 3-872 Deleting the color extended community attribute of BGP routes

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-color-set/extcommunity-color-member

huawei-route-policy:route-policys/route-policy/nodes/node/apply-action/extcommunity-color-set/additive

Data Requirements
Table 3-873 Deleting the color extended community attribute of BGP routes

Item

Data

Description

Color community attribute value

11:22

Delete 11:22 and 11:23 from the color extended community attribute of BGP routes.

Color community attribute value

11:23

Allowing adding existing community attributes to routes

true

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy>
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <apply-action>
        <extcommunity-color-set  xc:operation="remove">
         <extcommunity-color-member>11:22</extcommunity-color-member>
         <extcommunity-color-member>11:23</extcommunity-color-member>
         <additive>false</additive>
        </extcommunity-color-set>
       </apply-action>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>

Matching Routes Against a Specified Node After the Routes Match the Current Node

Matching Routes Against a Specified Node After the Routes Match the Current Node

This section provides a sample of matching routes against a specified node after the routes match the current node.

Table 3-874 Matching routes against a specified node after the routes match the current node

Operation

XPATH

edit-config:default

huawei-route-policy:route-policys/route-policy/nodes/node/next-node/is-goto-next-node

huawei-route-policy:route-policys/route-policy/nodes/node/next-node/next-node-index

Data Requirements
Table 3-875 Matching routes against a specified node after the routes match the current node

Item

Data

Description

Routing policy name

policy1

Configure routes in the routing policy named policy1 to match route 100 against a specified node after the routes match the current node.

Routing policy node

10

Routing policy action

permit

Local preference of the route

12

Whether to match routes against a specified node after the routes match the current node

true

ID of a specified routing policy node

100

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <next-node>
        <is-goto-next-node>true</is-goto-next-node> 
        <next-node-index>100</next-node-index>
       </next-node>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Deleting the Configuration to Match Routes Against a Specified Node After the Routes Match the Current Node

This section provides a sample of deleting the configuration to match routes against a specified node after the routes match the current node.

Table 3-876 Deleting the configuration to match routes against a specified node after the routes match the current node

Operation

XPATH

edit-config:remove

huawei-route-policy:route-policys/route-policy/nodes/node/next-node/is-goto-next-node

huawei-route-policy:route-policys/route-policy/nodes/node/next-node/next-node-index

Data Requirements
Table 3-877 Deleting the configuration to match routes against a specified node after the routes match the current node

Item

Data

Description

Routing policy name

policy1

Delete routes in the routing policy named policy1 to match route 100 against a specified node after the routes match the current node.

Routing policy node

10

Routing policy action

permit

Local preference of the route.

12

Whether to match routes against a specified node after the routes match the current node

true

ID of a specified routing policy node

100

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <route-policys xmlns="urn:huawei:params:xml:ns:yang:huawei-route-policy">   
    <route-policy xc:operation="merge">
     <name>policy1</name>
     <nodes>
      <node>
       <node-index>10</node-index>
       <match-mode>permit</match-mode>
       <next-node xc:operation="remove">
        <is-goto-next-node>true</is-goto-next-node> 
        <next-node-index>100</next-node-index>
       </next-node>
      </node>
     </nodes>
    </route-policy>
   </route-policys>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="DEVICECONFIG_community-filter-number=10"> 
 <ok/> 
</rpc-reply>
Translation
Download
Updated: 2019-03-06

Document ID: EDOC1100022096

Views: 9580

Downloads: 69

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next