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).
NetStream

NetStream

Data Model

The data model file matching the NetStream is huawei-netstream.yang.

Table 3-2051 NetStream

Object

Description

netstream

Indicates that the object of requesting an operation (creating, deleting, and modifying) is the NetStream configuration. It is a root object, which is only used to contain sub-objects.

/huawei-netstream:netstream-policy/export-host/ip

Indicates the destination IP address.The value is in dotted decimal notation.

/huawei-netstream:netstream-policy/export-host/export-host-info/port

Indicates the destination port number.The value is an integer that ranges from 0 to 65535.

/huawei-netstream:netstream-policy/export-host/export-host-info/vpn-instance-name

Indicates the VPN instance name.The VPN instance has been created on the device.

/huawei-netstream:netstream-policy/export-source/ip

Indicates the source IP address.The value is in dotted decimal notation.

/huawei-netstream:netstream-policy/export-source/port

Indicates the source port number.The value is an integer that ranges from 0 to 65535.

/huawei-netstream:netstream-policy/export-version

Indicates the version of the exported packets.The value of version is set to 5, 9 or 10. The default is 5.

/huawei-netstream:netstream-policy/export-index-switch

Indicates the digit of the interface index.The value is 16 or 32. The default value is 16.

/huawei-netstream:netstream-policy/pre-classify-flag

Indicates the type of the pre-extract function.

/huawei-netstream:netstream-policy/tcp-flag

Indicates the type of the aging function.

/huawei-netstream:netstream-policy/sample-rule/name

Indicates the profile name.

/huawei-netstream:netstream-policy/sample-rule/record-info/match-field-bits

Indicates the IPv4 aggregation keywords.

/huawei-netstream:netstream-policy/sample-rule/record-info/collect-field-bits

Indicates the statistics.The parameter is optional.

/huawei-netstream:netstream-policy/sample-rule/record-info/collect-field-bits

Indicates the interface information.The parameter is optional.

/huawei-netstream:netstream-policy/sample-rule/record-info/collect-field-bits

Indicates the application statistics.The parameter is optional.

/huawei-netstream:netstream-policy/sample-rule/record-info/collect-field-bits

Indicates the VNI statistics keywords.The parameter is optional.

/huawei-netstream:netstream-policy/export-timeout/active-timeout

Indicates the active aging time.The value is an integer that ranges from 1 to 60, in minutes. The default is 30.

/huawei-netstream:netstream-policy/export-timeout/inactive-timeout

Indicates the inactive aging time.The value is an integer that ranges from 10 to 600, in minutes. The default is 30.

/huawei-netstream:netstream-apply/interface/sample-rule-name

Indicates the profile name of flexible flow.The value is a string of 1 to 20.case-sensitive characters without spaces. The name of the flexible flow statistics template cannot contain special characters such as \, /, :, <, >, |, @, ', % or *.

/huawei-netstream:netstream-apply/interface/ns-sample/direction

Indicates the outbound interface.

/huawei-netstream:netstream-apply/interface/ns-sample/sample/fix-packets/packets-number

Indicates the number of packets.The value is an integer that ranges from 1 to 65535.

/huawei-netstream:netstream-apply/interface/ns-sample/sample/fix-time/time

Indicates the interval.

/huawei-netstream:netstream-apply/interface/ns-sample/sample/random-packets/packets-number

Specifies the number of packets between two sampled packets in the packet-based random sampling.The value is an integer that ranges from 1 to 65535.

/huawei-netstream:netstream-apply/interface/ns-sample/sample/random-time/random-time

Specifies the sampling interval in time-based random sampling.

/huawei-netstream:netstream-apply/interface/ns-enable/direction

Indicates that the interface direction for statistics is enabled.

/huawei-netstream:netstream-apply/interface/ns-enable/multicast

Indicates that the multicast is enabled.

/huawei-netstream:netstream-apply/interface/ns-enable/rpf-failure

Indicates that the RPF check failure statistics is enabled.

/huawei-netstream:reset-netstream/reset-bits

Indicates the operation of deleting NetStream statistics.

/huawei-netstream:netstream-policy/aggregation/aggregation-type

Indicates the aggregation mode, including AS aggregation, AS-ToS aggregation, destination-prefix aggregation, destination-prefix-ToS aggregation, prefix aggregation, prefix-ToS aggregation, protocol-port aggregation, protocol-port-ToS aggregation, source-prefix aggregation, and source-prefix-ToS aggregation.

/huawei-netstream:netstream-policy/aggregation/enable

Enables the aggregation function in the aggregation view.

/huawei-netstream:netstream-policy/aggregation/aggregation-export-source/ip

Indicates the source IP address of the exported packets carrying aggregation flow statistics. The value is in dotted decimal notation.

/huawei-netstream:netstream-policy/aggregation/aggregation-export-source/port

Indicates the source port of the exported packets carrying aggregation flow statistics. The value is an integer that ranges from 0 to 65535.

/huawei-netstream:netstream-policy/aggregation/aggregation-export-host/ip

Indicates the destination IP address of the exported packets carrying aggregation flow statistics. The value is in dotted decimal notation.

/huawei-netstream:netstream-policy/aggregation/aggregation-export-host/export-host-info/port

Indicates the destination port of the exported packets carrying aggregation flow statistics. The value is an integer that ranges from 0 to 65535.

/huawei-netstream:netstream-policy/aggregation/aggregation-export-host/export-host-info/vpn-instance-name

Specifies a VPN instance name for the exported packets carrying aggregation flow statistics. It must be an existing VPN instance on the switch.

/huawei-netstream:netstream-policy/aggregation/aggregation-export-version

Indicates the version of the exported packets carrying aggregation flow statistics. The value can be 8,9, or 10. The default value is 8.

Creating the NetStream Configuration

This section provides a sample of creating the NetStream configuration.

Table 3-2052 Creating the NetStream configuration

Operation

XPATH

edit-config:replace

/huawei-netstream:netstream-policy/

/huawei-netstream:netstream-apply/

/huawei-netstream:reset-netstream/

Data Requirements
Table 3-2053 Creating the NetStream configuration

Item

Data

Description

Destination IP address

20.1.1.1

Configure the destination IP address, destination port number, source IP address, source port number, version, VPN instance name, digit of the interface index, profile name, IPv4 aggregation keywords, and statistics. Enable the pre-extract and aging functions.

Destination port number

222

VPN instance name

vpna

Source IP address

10.1.1.2

Source port number

222

Version number

9

Digit of the interface index

32

Pre-extract

TRUE

Aging

TRUE

IPv4 aggregation keywords

destination-address source-address

Statistics

bytes packets

Interface information

input output

Application statistics

app-name app-desc category-name

VNI statistics keywords

vni

Active aging time

20

Inactive aging time

40

Profile name of flexible flow

abc1

Direction of the interface that is used for fixed packet sampling

inbound

Direction of the interface that is used for random packet sampling

inbound

Number of packets between two sampled packets in packet-based random sampling

100

Direction of the interface enabled with the statistics function

inbound

Multicast

empty

RPF check failure statistics

empty

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
    <vlan>
    <id>10</id>
    <enabled>true</enabled>
    </vlan>
   </vlans>
  <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
   <interface>
   <name>vlanif10</name>
   <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
   </interface>
  </interfaces>
  <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">
    <export-host>
     <ip>20.1.1.1</ip>
     <export-host-info>
      <port>222</port>
      <vpn-instance-name>vpna</vpn-instance-name>
     </export-host-info>
    </export-host>
    <export-source xc:operation="replace">
     <ip>10.1.1.2</ip>
     <port>222</port>
    </export-source>
    <export-version>9</export-version>
    <export-index-switch>32</export-index-switch>
    <pre-classify-flag>true</pre-classify-flag>
    <tcp-flag>true</tcp-flag>
    <sample-rule>
     <name>abc1</name>
     <record-info>
      <match-field-bits>destination-address source-address</match-field-bits>
      <collect-field-bits>bytes packets input output app-name app-desc category-name vni</collect-field-bits>
    </record-info>
    </sample-rule>
    <export-timeout>
     <active-timeout>20</active-timeout>
     <inactive-timeout>40</inactive-timeout>
    </export-timeout>
   </netstream-policy>
   <netstream-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">
    <interface>
     <name>vlanif10</name>
     <ns-enable>
      <direction>inbound</direction>
      <multicast/>
      <rpf-failure/>
     </ns-enable>
     <sample-rule-name>abc1</sample-rule-name>
     <ns-sample>
      <direction>inbound</direction>
      <sample>
       <fix-packets>
        <packets-number>100</packets-number>
       </fix-packets>
      </sample>
     </ns-sample>
    </interface>
   </netstream-apply>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96"> 
  <ok/> 
</rpc-reply>

Modifying the NetStream Configuration

This section provides a sample of modifying the NetStream configuration.

Table 3-2054 Modifying the NetStream configuration

Operation

XPATH

edit-config:replace

/huawei-netstream:netstream-policy/

/huawei-netstream:netstream-apply/

/huawei-netstream:reset-netstream/

Data Requirements
Table 3-2055 Modifying the NetStream configuration

Item

Data

Description

Destination IP address

20.1.1.1

Modify the destination IP address, destination port number, source IP address, source port number, version, VPN instance name, digit of the interface index, profile name, IPv4 aggregation keywords, and statistics. Enable the pre-extract and aging functions.

Destination port number

223

VPN instance name

vpnb

Source IP address

10.1.1.2

Source port number

222

Version number

10

Digit of the interface index

16

Pre-extract

FALSE

Aging

FALSE

IPv4 aggregation keywords

destination-port source-port protocol tos

Active aging time

40

Inactive aging time

50

Profile name of flexible flow

abc1

Direction of the interface that is used for fixed packet sampling

inbound

Number of packets between two sampled packets in packet-based fixed sampling

20

Direction of the interface that is used for random packet sampling

inbound

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
 <vlans xmlns="urn:huawei:params:xml:ns:yang:huawei-vlan">
  <vlan>
   <id>10</id>
   <enabled>true</enabled>
  </vlan>
 </vlans>
 <interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces">
  <interface>
   <name>vlanif10</name>
 <type xmlns:x="urn:ietf:params:xml:ns:yang:iana-if-type">x:ethernetCsmacd</type>
  </interface>
 </interfaces>
 <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="replace">
    <vpn-instance>
     <vpn-instance-name>vpnb</vpn-instance-name>
     <ipv4-family>
      <route-distinguisher>200:3</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">
    <export-version xc:operation="replace">10</export-version>
    <export-index-switch xc:operation="replace">16</export-index-switch>
    <pre-classify-flag>false</pre-classify-flag>
    <tcp-flag xc:operation="replace">false</tcp-flag>
    <export-source xc:operation="replace">
     <ip>10.1.1.2</ip>
     <port>222</port>
    </export-source>
    <export-host xc:operation="replace">
     <ip>20.1.1.1</ip>
     <export-host-info>
      <port>223</port>
     </export-host-info>
    </export-host>
    <sample-rule>
     <name>abc1</name>
     <record-info>
      <match-field-bits>destination-port source-port protocol tos</match-field-bits>
     </record-info>
    </sample-rule>
    <export-timeout>
     <active-timeout>40</active-timeout>
     <inactive-timeout>50</inactive-timeout>
    </export-timeout>
   </netstream-policy>
   <netstream-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">
    <interface>
     <name>vlanif10</name>
     <sample-rule-name>abc1</sample-rule-name>
     <ns-sample>
      <direction>inbound</direction>
      <sample>
       <fix-packets>
        <packets-number>20</packets-number>
       </fix-packets>
      </sample>
     </ns-sample>
    </interface>
   </netstream-apply>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96"> 
  <ok/> 
</rpc-reply>

Deleting the NetStream Configuration

This section provides a sample of deleting the NetStream configuration.

Table 3-2056 Deleting the NetStream configuration

Operation

XPATH

edit-config:remove

/huawei-netstream:netstream-policy/

/huawei-netstream:netstream-apply/

/huawei-netstream:reset-netstream/

Data Requirements
Table 3-2057 Deleting the NetStream configuration

Item

Data

Description

Destination IP address

20.1.1.1

Delete the destination IP address, destination port number, source IP address, source port number, version, VPN instance name, digit of the interface index, profile name, IPv4 aggregation keywords, and statistics. Enable the pre-extract and aging functions.

Destination port number

223

VPN instance name

vpnb

Source IP address

10.1.1.2

Source port number

222

Version number

10

Digit of the interface index

32

Pre-extract

TRUE

Aging

TRUE

IPv4 aggregation keywords

destination-port source-port protocol tos

Statistics

bytes packets

Interface information

input output

Application statistics

app-name app-desc category-name

VNI statistics keywords

vni

Active aging time

40

Inactive aging time

50

Profile name of flexible flow

abc1

Direction of the interface that is used for fixed packet sampling

inbound

Number of packets between two sampled packets in packet-based fixed sampling

20

Direction of the interface that is used for random packet sampling

inbound

Direction of the interface enabled with the statistics function

inbound

Multicast

empty

RPF check failure statistics

empty

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96">
 <edit-config>
  <target>
   <running/>
  </target>
  <error-option>rollback-on-error</error-option>
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">
   <netstream-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">
    <interface xc:operation="remove">
     <name>vlanif10</name>
     <sample-rule-name>abc1</sample-rule-name>
     <ns-sample xc:operation="remove">
      <direction>inbound</direction>
      <sample>
       <fix-packets>
        <packets-number>20</packets-number>
       </fix-packets>
      </sample>
     </ns-sample>
     <ns-enable xc:operation="remove">
      <direction>inbound</direction>
      <multicast xc:operation="remove"/>
      <rpf-failure xc:operation="remove"/>
     </ns-enable>
    </interface>
   </netstream-apply>
   <vpn-instances xmlns="urn:huawei:params:xml:ns:yang:huawei-l3vpn" xc:operation="remove">
    <vpn-instance>
     <vpn-instance-name>vpnb</vpn-instance-name>
     <ipv4-family>
      <route-distinguisher>200:3</route-distinguisher>
     </ipv4-family>
    </vpn-instance>
   </vpn-instances>
   <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">
    <export-timeout>
     <active-timeout xc:operation="remove">40</active-timeout>
     <inactive-timeout xc:operation="remove">50</inactive-timeout>
    </export-timeout>
    <sample-rule xc:operation="remove">
     <name>abc1</name>
     <record-info>
      <match-field-bits xc:operation="remove">destination-port source-port protocol tos</match-field-bits>
      <collect-field-bits xc:operation="remove">bytes packets input output app-name app-desc category-name vni</collect-field-bits>
     </record-info>
    </sample-rule>
    <export-index-switch xc:operation="replace">16</export-index-switch>
    <pre-classify-flag xc:operation="remove">true</pre-classify-flag>
    <tcp-flag xc:operation="remove">true</tcp-flag>
    <export-version xc:operation="replace">10</export-version>
    <export-source xc:operation="remove">
     <ip>10.1.1.2</ip>
     <port>222</port>
    </export-source>
    <export-host xc:operation="remove">
     <ip>20.1.1.1</ip>
     <export-host-info>
      <port>223</port>
     </export-host-info>
    </export-host>
   </netstream-policy>
  </config>
 </edit-config>
</rpc>
Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="l2vpn-2102114484P0F5000013-c02d58d2-7a3c-40f3-8be8-b71d47919e96"> 
  <ok/>
</rpc-reply>

Configuring NetStream Aggregation Traffic

This section provides a sample of configuring NetStream aggregation traffic.

Table 3-2058 Configuring NetStream aggregation traffic

Operation

XPATH

edit-config:replace

/huawei-netstream:netstream-policy/aggregation

Data Requirements
Table 3-2059 Configuring NetStream aggregation traffic

Item

Data

Description

Aggregation mode

protocol-port

Enable aggregation, and configure parameters of the exported packets carrying aggregation flow statistics, including the aggregation mode, source and destination IP addresses and ports, VPN instance name, and version.

Enabling aggregation

Empty

Source port of the exported packets carrying aggregation flow statistics

111

Destination IP address of the exported packets carrying aggregation flow statistics

20.1.1.1

Destination port of the exported packets carrying aggregation flow statistics

222

VPN instance exporting the packets carrying aggregation flow statistics

vpna

Version of the exported packets carrying aggregation flow statistics

9

Source IP address of the exported packets carrying aggregation flow statistics

10.1.1.1

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="netstream-policy"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream"> 
    <aggregation xc:operation="replace"> 
     <aggregation-type>protocol-port</aggregation-type> 
     <enable/> 
     <aggregation-export-source> 
      <ip>10.1.1.1</ip> 
      <port>111</port> 
     </aggregation-export-source> 
     <aggregation-export-host> 
      <ip>20.1.1.1</ip> 
      <export-host-info> 
       <port>222</port> 
       <vpn-instance-name>vpna</vpn-instance-name> 
      </export-host-info> 
     </aggregation-export-host> 
     <aggregation-export-version>9</aggregation-export-version> 
         </aggregation> 
   </netstream-policy> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

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

Modifying the Configuration of NetStream Aggregation Traffic

This section provides a sample of modifying the configuration of NetStream aggregation traffic.

Table 3-2060 Modifying the configuration of NetStream aggregation traffic

Operation

XPATH

edit-config:replace

/huawei-netstream:netstream-policy/aggregation

Data Requirements
Table 3-2061 Modifying the configuration of NetStream aggregation traffic

Item

Data

Description

Aggregation mode

protocol-port

Modify the configuration of parameters of the exported packets carrying aggregation flow statistics, including the aggregation mode, source and destination IP addresses and ports, VPN instance name, and version.

Source IP address of the exported packets carrying aggregation flow statistics

10.2.2.1

Source port of the exported packets carrying aggregation flow statistics

100

Destination IP address of the exported packets carrying aggregation flow statistics

20.2.2.1

Destination port of the exported packets carrying aggregation flow statistics

200

VPN instance exporting the packets carrying aggregation flow statistics

vpnb

Version of the exported packets carrying aggregation flow statistics

10

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="netstream-policy"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream"> 
    <aggregation xc:operation="replace"> 
     <aggregation-type>protocol-port</aggregation-type> 
     <aggregation-export-source> 
      <ip>10.2.2.1</ip> 
      <port>100</port> 
     </aggregation-export-source> 
     <aggregation-export-host> 
      <ip>20.2.2.1</ip> 
      <export-host-info> 
       <port>200</port> 
       <vpn-instance-name>vpnb</vpn-instance-name> 
      </export-host-info> 
     </aggregation-export-host> 
     <aggregation-export-version>10</aggregation-export-version> 
    </aggregation> 
   </netstream-policy> 
  </config> 
 </edit-config> 
</rpc>

Response Example

Sample of successful response

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

Deleting the Configuration of NetStream Aggregation Traffic

This section provides a sample of deleting the configuration of NetStream aggregation traffic.

Table 3-2062 Deleting the configuration of NetStream aggregation traffic

Operation

XPATH

edit-config:remove

/huawei-netstream:netstream-policy/aggregation

Data Requirements
Table 3-2063 Deleting the configuration of NetStream aggregation traffic

Item

Data

Description

Aggregation mode

protocol-port

Delete the configuration of aggregation traffic.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="netstream-policy"> 
 <edit-config> 
  <target> 
   <running/> 
  </target> 
  <error-option>rollback-on-error</error-option> 
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> 
   <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream"> 
    <aggregation xc:operation="remove"> 
     <aggregation-type>protocol-port</aggregation-type> 
    </aggregation> 
   </netstream-policy> 
  </config> 
 </edit-config> 
</rpc>
Response Example

Sample of successful response

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

Configuring a NetStream Policy After TM Is Enabled Globally

This section describes how to configure a NetStream policy after Traffic Management (TM) is enabled globally.

Table 3-2064 Configuring a NetStream policy after TM is enabled globally

Operation

XPATH

edit-config:default

/huawei-netstream:netstream-policy

Data Requirements
Table 3-2065 Configuring a NetStream policy after TM is enabled globally

Item

Data

Description

Whether TM is enabled (tm-after)

true

Configure a NetStream policy after TM is enabled globally.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_08a16e3140434ca39a1fa4b40d005e49">  
 <edit-config>  
  <target>  
 <running/>  
  </target>  
  <error-option>rollback-on-error</error-option>  
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">  
 <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">  
    <sample-rule>  
     <name>nameTunnel</name>  
      <record-info>  
       <match-field-bits>destination-address source-address destination-port source-port protocol </match-field-bits>  
       <collect-field-bits>bytes packets input output app-name </collect-field-bits>  
      </record-info>  
    </sample-rule>  
    <export-timeout>  
     <inactive-timeout>60</inactive-timeout>  
     <active-timeout>1</active-timeout>  
    </export-timeout>  
    <tm-after>true</tm-after>  
 </netstream-policy>  
 <netstream-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">  
  <interface>  
     <name>Tunnel0/0/0</name>  
     <sample-rule-name>nameTunnel</sample-rule-name>  
     <ns-enable>  
      <direction>inbound</direction>  
     </ns-enable>  
     <ns-enable>  
      <direction>outbound</direction>  
     </ns-enable>  
     <ns-sample>  
      <direction>inbound</direction>  
      <sample>  
       <fix-packets>  
        <packets-number>1</packets-number>  
       </fix-packets>  
      </sample>  
     </ns-sample>  
     <ns-sample>  
      <direction>outbound</direction>  
      <sample>  
       <fix-packets>  
        <packets-number>1</packets-number>  
       </fix-packets>  
      </sample>  
     </ns-sample>  
    </interface>  
 </netstream-apply>  
  </config>  
 </edit-config>  
</rpc>
Response Example

Sample of successful response

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

Deleting a NetStream Policy After TM Is Enabled Globally

This section describes how to delete a NetStream policy after TM is enabled globally.

Table 3-2066 Deleting a NetStream policy after TM is enabled globally

Operation

XPATH

edit-config:remove

/huawei-netstream:netstream-policy

Data Requirements
Table 3-2067 Deleting a NetStream policy after TM is enabled globally

Item

Data

Description

Whether TM is enabled (tm-after)

true

Delete a NetStream policy after TM is enabled globally.

Request Example
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="NETCONFIG_08a16e3140434ca39a1fa4b40d005e49">  
 <edit-config>  
  <target>  
 <running/>  
  </target>  
  <error-option>rollback-on-error</error-option>  
  <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0">  
 <netstream-policy xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">  
  <sample-rule>  
     <name>nameTunnel</name>  
     <record-info>  
      <match-field-bits>destination-address source-address destination-port source-port protocol </match-field-bits>  
      <collect-field-bits>bytes packets input output app-name </collect-field-bits>  
     </record-info>  
    </sample-rule>  
    <export-timeout>  
     <inactive-timeout>60</inactive-timeout>  
     <active-timeout>1</active-timeout>  
    </export-timeout>  
    <tm-after xc:operation="remove">true</tm-after>  
 </netstream-policy>  
 <netstream-apply xmlns="urn:huawei:params:xml:ns:yang:huawei-netstream">  
    <interface>  
     <name>Tunnel0/0/0</name>  
     <sample-rule-name>nameTunnel</sample-rule-name>  
     <ns-enable>  
      <direction>inbound</direction>  
     </ns-enable>  
     <ns-enable>  
      <direction>outbound</direction>  
     </ns-enable>  
     <ns-sample>  
      <direction>inbound</direction>  
      <sample>  
       <fix-packets>  
        <packets-number>1</packets-number>  
       </fix-packets>  
      </sample>  
     </ns-sample>  
     <ns-sample>  
      <direction>outbound</direction>  
      <sample>  
       <fix-packets>  
        <packets-number>1</packets-number>  
       </fix-packets>  
      </sample>  
     </ns-sample>  
    </interface>  
 </netstream-apply>  
  </config>  
 </edit-config>  
</rpc>
Response Example

Sample of successful response

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

Document ID: EDOC1100022096

Views: 8160

Downloads: 69

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