Re: [netmod] Question on schema-mount

Martin Bjorklund <> Thu, 08 February 2018 08:56 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 7F08712421A for <>; Thu, 8 Feb 2018 00:56:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id jFoxxiQArOWD for <>; Thu, 8 Feb 2018 00:56:20 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 3529E1204DA for <>; Thu, 8 Feb 2018 00:56:20 -0800 (PST)
Received: from localhost (unknown []) by (Postfix) with ESMTPSA id CDDB71AE046C; Thu, 8 Feb 2018 09:56:18 +0100 (CET)
Date: Thu, 08 Feb 2018 09:56:18 +0100 (CET)
Message-Id: <>
From: Martin Bjorklund <>
In-Reply-To: <>
References: <>
X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Archived-At: <>
Subject: Re: [netmod] Question on schema-mount
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Thu, 08 Feb 2018 08:56:22 -0000


"Bogaert, Bart (Nokia - BE/Antwerp)" <> wrote:
> Hi,
> We have a question w.r.t. deletion of entry in a list using mounted
> schema knowing that in NC/Y there is no such thing as a "cascading
> delete" (leafref constructions in many cases even makes it impossible
> to delete a resource if it is still referred).
> How does this apply to such a schema being mounted.  Using the example
> from the draft:
>      +--rw interfaces
>      |  +--rw interface* [name]
>      |     ...
>      +--rw logical-device* [name]
>         +--rw name
>         |   ...
>         +--rw interfaces
>           +--rw interface* [name]
>              ...
> Is it possible in this case to delete /logical-device[name='x'] and
> the server has to remove all the data associated with the mounted
> schema?  Or does the edit-config also explicitly has to delete the
> data related to the mounted schema?

This is not a generic schema mount question, but a question for the
model that provides the mount.

Suppose the model that defines logical-device also augments the
/interfaces list with an leaf to assign interfaces to logical-devices:

  augment /if:interfaces/if:interface {
    leaf assign-to-logical-device {
      type leafref {
        path /logical-device/name;

Then you wouldn't be able to delete the logical-device if it still has
an interface assigned to it.

Also, if you actually remove /logical-device[name='x'], schema mount
doesn't say anything about what really happens - will the server first
delete all config on the logical device and then delete the logical
device entry in the parent, or will the server just delete the entry
in the parent?  These are all questions for the specific model.  I
don't know if the LNE/NI documents specify this behaviour, but they
probably should.

> I could not find something in the draft that deals with this (or it is
> there, but then I did not understand that section very well).

Schema mount doesn't change anything in this regard; it doesn't add
any magical implicit delete or anything like that.