Versions Compared

Key

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

...

If you want to get only the "<optical-channel>" of "<component>", the content of get-components-op-channel is:

Code Block
languagexml
linenumberstrue
<?xml version="1.0"?>
<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" />
      </component>
    </components>
  </filter>
</get>

The output is out-get-components-op-channel:

Code Block
languagexml
linenumberstrue
collapsetrue
<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:c9220366-76bd-43ba-ad3c-13e1b7014e21">
  <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>0.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>194700000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe2</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>oe2</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>oe3</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>oe3</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194700000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe4</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe4</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194700000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe5</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe5</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194700000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe6</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe6</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194700000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe7</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe7</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194700000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe8</line-port>
          </config>
        </optical-channel>
      </component>
      <component>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-10.0</target-output-power>
            <line-port>oe8</line-port>
          </config>
        </optical-channel>
      </component>
    </components>
  </data>
</rpc-reply>

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

Code Block
languagexml
linenumberstrue
<?xml version="1.0"?>
<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>194750000</frequency>
          </config>
        </optical-channel>
      </component>
    </components>
  </filter>
</get>
</get>

The output is is out-get-config-nodes:

Code Block
languagexml
linenumberstrue
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:703f18cc-512f-411c-8b8d-f07a87b4797f">
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <components xmlns="http://openconfig.net/yang/platform">
      <component>
        <name>oe1/2</name>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>-5.1</target-output-power>
            <line-port>oe1</line-port>
          </config>
        </optical-channel>
      </component>
    </components>
  </data>
</nc:rpc-reply>

...

If you want to change the target-output-power value as 0dBm  instead of the default -5.1 dBm  where "<name>" ID is "oe1/2", the content of file is set-target-output-power :

Code Block
languagexml
linenumberstrue
<?xml version="1.0"?>
<edit-config xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <target><running/></target>
  <config>
    <components xmlns="http://openconfig.net/yang/platform">
      <component>
        <name>oe1/2</name>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <target-output-power>0</target-output-power>
          </config>
        </optical-channel>
      </component>
    </components>
  </config>
</edit-config>

...

Then we request the "<config>" nodes again to check this operation, where the frequency is 194750000 and the line-port is oe1 . The output is changed:using  get-config-nodes:

As you the following output illustrates, the target-output-power is changed from -5.1 to 0.

Code Block
languagexml
linenumberstrue
<nc:rpc-reply xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ca069e53-020a-4201-a9d3-53f4e5534bec">
  <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
    <components xmlns="http://openconfig.net/yang/platform">
      <component>
        <name>oe1/2</name>
        <optical-channel xmlns="http://openconfig.net/yang/terminal-device">
          <config>
            <frequency>194750000</frequency>
            <target-output-power>0.0</target-output-power>
            <line-port>oe1</line-port>
          </config>
        </optical-channel>
      </component>
    </components>
  </data>
</nc:rpc-reply>