Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you want to get the "<config>" nodes only where the frequency is 0 isĀ 194750000 and the line-port is oe1:

Code Block
languagexml
linenumberstrue
<?xml version="1.0"?>
<get><get xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <filter>
    <components xmlns="http://openconfig.net/yang/platform">
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <line-port>oe1</line-port>
            <frequency>0<<frequency>194750000</frequency>
          </config>
        </optical-channel>
      </component>
    </components>
  </filter>
</get>
</get>

The output is:

Code Block
languagexml
linenumberstrue
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:190d45b0-29e8-44a7-8b6a-71f87c35f740">
  <data>
    <components xmlns="http://openconfig.net/yang/platform">
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>0</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe1</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>0</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe1</line-port>
          </config>
        </optical-channel>
      </component>
    </components>
  </data>
</rpc-reply>

...