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

ME60 V800R010C10SPC500 Feature Description - System Management 01

This is ME60 V800R010C10SPC500 Feature Description - System Management
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).
XPath

XPath

This capability indicates that the device can use XPath expressions in the <filter> element as query conditions. The <get> and <get-config> operations can query specified data through an XPath.

XPath is an XML Path language that uses path expressions for the addressing of parts of an XML file. Like the file path in the file management system, the most basic XPath syntax is similar to the file path in the file management system.

XPath syntax specifications are as follows:
  • An XPath can only be a basic absolute path. Steps are separated using slashes (/), such as /acl/aclGroups/aclGroup.
  • Only predicates in the [node name='value'] format (for example, [genre='Computer']) are supported. There can be multiple predicates in an AND relationship.
  • XPath supports multiple namespaces that are separated using colons.

If an XPath expression is used as a filter criterion, the value of the "type" attribute in the <filter> element is "xpath" and the "select" attribute must exist. The value of the "select" attribute is the XPath expression.

<filter type="xpath" xmlns:t="http://www.huawei.com/netconf/vrp/huawei-acl" select="/t:acl/t:aclGroups/t:aclGroup[t:aclNumOrName='2000']"/>

Capability ID

<capability>urn:ietf:params:netconf:capability:xpath:1.0</capability>
NOTE:
XPath expressions cannot be used as filter criteria for notifications, full synchronization, incremental synchronization, and copy-config operations.

XPath expressions support the following operations:

  • Use the specified XPath as a filter criterion to query information about all nodes in the XPath.

    For example, query information about all nodes in the /netconf/authorization/taskGroupRules/taskGroupRule XPath of the <running/> configuration database.

    • RPC request

      <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
        <get-config>
          <source>
            <running/>
          </source>
          <filter type ="xpath" xmlns:t='http://www.huawei.com/netconf/vrp/huawei-netconf' select="/t:netconf/t:authorization/t:taskGroupRules/t:taskGroupRule"/>
        </get-config>
      </rpc>
    • RPC reply

      <rpc-reply message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
        <data>
          <netconf xmlns="http://www.huawei.com/netconf/vrp/huawei-netconf">
            <authorization>
              <taskGroupRules>
                <taskGroupRule>
                  <taskGroupName>tg1</taskGroupName>
                  <ruleName>rule1</ruleName>
                  <ruleType>operationRule</ruleType>
                </taskGroupRule>
                <taskGroupRule>
                  <taskGroupName>tg2</taskGroupName>
                  <ruleName>rule2</ruleName>
                  <ruleType>operationRule</ruleType>
                </taskGroupRule>
                <taskGroupRule>
                  <taskGroupName>tg3</taskGroupName>
                  <ruleName>rule3</ruleName>
                  <ruleType>operationRule</ruleType>
                </taskGroupRule>
              </taskGroupRules>
            </authorization>
          </netconf>
        </data>
      </rpc-reply>
  • Use the value of a node in the specified XPath as a filter criterion to query information about the node that matches this value in the XPath.

    For example, query information about the node for which "aclNumOrName" is set to 2000 in the /acl/aclGroups/aclGroup XPath of the <running/> configuration database.

    • RPC request

      <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
        <get-config>
          <source>
            <running/>
          </source>
          <filter type="xpath" xmlns:t="http://www.huawei.com/netconf/vrp/huawei-acl" select="/t:acl/t:aclGroups/t:aclGroup[t:aclNumOrName='2000']"/>
        </get-config>
      </rpc>
    • RPC reply

      <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1">
        <data>
          <acl xmlns="http://www.huawei.com/netconf/vrp/huawei-acl">
            <aclGroups>
              <aclGroup>
                <aclNumOrName>2000</aclNumOrName>
                <aclMatchOrder>Config</aclMatchOrder>
                <aclStep>5</aclStep>
                <aclType>Basic</aclType>
                <aclRuleBas4s>
                  <aclRuleBas4>
                    <aclRuleName>basicAcl</aclRuleName>
                    <aclRuleID>5</aclRuleID>
                    <aclAction>permit</aclAction>
                    <aclSourceIp>0.0.0.0</aclSourceIp>
                    <aclSrcWild>255.255.255.255</aclSrcWild>
                    <vrfName>_public_</vrfName>
                    <vrfAny>false</vrfAny>
                    <aclRuleDescription>basicAcl2000</aclRuleDescription>
                  </aclRuleBas4>
                </aclRuleBas4s>
              </aclGroup>
            </aclGroups>
          </acl>
        </data>
      </rpc-reply>
Translation
Download
Updated: 2019-01-04

Document ID: EDOC1100059466

Views: 10311

Downloads: 6

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