Re: [netmod] Question on schema-mount

Martin Bjorklund <mbj@tail-f.com> Thu, 08 February 2018 08:56 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netmod@ietfa.amsl.com
Delivered-To: netmod@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7F08712421A for <netmod@ietfa.amsl.com>; Thu, 8 Feb 2018 00:56:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
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 mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jFoxxiQArOWD for <netmod@ietfa.amsl.com>; Thu, 8 Feb 2018 00:56:20 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id 3529E1204DA for <netmod@ietf.org>; Thu, 8 Feb 2018 00:56:20 -0800 (PST)
Received: from localhost (unknown [173.38.220.45]) by mail.tail-f.com (Postfix) with ESMTPSA id CDDB71AE046C; Thu, 8 Feb 2018 09:56:18 +0100 (CET)
Date: Thu, 08 Feb 2018 09:56:18 +0100
Message-Id: <20180208.095618.615736342809160042.mbj@tail-f.com>
To: bart.bogaert@nokia.com
Cc: netmod@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <VI1PR07MB17259C46D65AA5A94EE58FF294F30@VI1PR07MB1725.eurprd07.prod.outlook.com>
References: <VI1PR07MB17259C46D65AA5A94EE58FF294F30@VI1PR07MB1725.eurprd07.prod.outlook.com>
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: <https://mailarchive.ietf.org/arch/msg/netmod/8vrg9p7k-eFNdtUJgFT171KwYB4>
Subject: Re: [netmod] Question on schema-mount
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: NETMOD WG list <netmod.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netmod>, <mailto:netmod-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netmod/>
List-Post: <mailto:netmod@ietf.org>
List-Help: <mailto:netmod-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netmod>, <mailto:netmod-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 08 Feb 2018 08:56:22 -0000

Hi,

"Bogaert, Bart (Nokia - BE/Antwerp)" <bart.bogaert@nokia.com> 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.


/martin