Subject: [netconf] Query regarding rfc6241 - 7.2

From: aruna potti <[email-masked]>
Date: Tue, 14 Jan 2020 08:13:45 -0800

Hi,

I have a question in section 7.2 of rfc6241.

If the <edit-config> operation contains multiple sub-operations
      that apply to the same conceptual node in the underlying data
      model, then the result of the operation is undefined (i.e.,
      outside the scope of the NETCONF protocol).

As per the description I would like understand if my below query
response is defined or not.

If my request is not valid, please suggest how we can break it into
multiple valid edit-configs?

<nc:rpc
xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"
nc:message-id="FJ0883">

  <nc:edit-config>
    <nc:target>
      <nc:running/> </nc:target>
    <nc:config>
      <org-openroadm-device xmlns="http://org/openroadm/device">
        <interface>
          <name>odu-1-11-42/1.1.1</name>
          <type
xmlns:openROADM-if="http://org/openroadm/interfaces">openROADM-if:otnOdu</type>

          <administrative-state>outOfService</administrative-state>
          <odu xmlns="http://org/openroadm/otn-odu-interfaces"/>
</interface>
        <interface>
          <name>odu-1-11-2/1</name>
          <type
xmlns:openROADM-if="http://org/openroadm/interfaces">openROADM-if:otnOdu</type>

          <administrative-state>outOfService</administrative-state>
          <odu xmlns="http://org/openroadm/otn-odu-interfaces"/>
</interface>
        <interface>
          <name>eth-1-11-2/1</name>
          <type
xmlns:openROADM-if="http://org/openroadm/interfaces">openROADM-if:ethernetCsmacd</type>

          <administrative-state>outOfService</administrative-state>
        </interface>
        <interface nc:operation="delete">
          <name>odu-1-11-42/1.1.1</name>
          <type
xmlns:openROADM-if="http://org/openroadm/interfaces">openROADM-if:otnOdu</type>

        </interface>
        <interface nc:operation="delete">
          <name>odu-1-11-2/1</name>
          <type
xmlns:openROADM-if="http://org/openroadm/interfaces">openROADM-if:otnOdu</type>

        </interface>
        <interface nc:operation="delete">
          <name>eth-1-11-2/1</name>
          <type
xmlns:openROADM-if="http://org/openroadm/interfaces">openROADM-if:ethernetCsmacd</type>

        </interface>
        <odu-connection nc:operation="delete">
          <connection-name>odu-1-11-42_1.1.1_odu-1-11-2_1</connection-name>
        </odu-connection>
      </org-openroadm-device>
    </nc:config>
  </nc:edit-config>
</nc:rpc>

Thanks,

Aruna.

---

From: Martin Bjorklund <[email-masked]>
Date: Wed, 15 Jan 2020 13:00:46 +0100 (CET)

Hi,

It seems you are setting the administrative-state to 'outOfService' on
a set of interfaces, and at the same time you delete these
interfaces.  So instead you should simply just delete them.

Alternatively, fist send one edit-config that sets the
administrative-state, and then a second edit-config with the deletes.

/martin