Re: [netconf] Netconf Query

Martin Bjorklund <mbj@tail-f.com> Mon, 17 February 2020 14:57 UTC

Return-Path: <mbj@tail-f.com>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 2D51012084C for <netconf@ietfa.amsl.com>; Mon, 17 Feb 2020 06:57:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-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 RHIeDCWWHH4w for <netconf@ietfa.amsl.com>; Mon, 17 Feb 2020 06:57:56 -0800 (PST)
Received: from mail.tail-f.com (mail.tail-f.com [46.21.102.45]) by ietfa.amsl.com (Postfix) with ESMTP id D723312004C for <netconf@ietf.org>; Mon, 17 Feb 2020 06:57:55 -0800 (PST)
Received: from localhost (unknown [173.38.220.37]) by mail.tail-f.com (Postfix) with ESMTPSA id 0BD971AE018B; Mon, 17 Feb 2020 15:57:53 +0100 (CET)
Date: Mon, 17 Feb 2020 15:57:14 +0100
Message-Id: <20200217.155714.1030215278913591724.mbj@tail-f.com>
To: mgangaia@cisco.com
Cc: netconf@ietf.org
From: Martin Bjorklund <mbj@tail-f.com>
In-Reply-To: <BYAPR11MB370380D488CED13F37E8439BCB1B0@BYAPR11MB3703.namprd11.prod.outlook.com>
References: <BYAPR11MB370380D488CED13F37E8439BCB1B0@BYAPR11MB3703.namprd11.prod.outlook.com>
X-Mailer: Mew version 6.8 on Emacs 25.2
Mime-Version: 1.0
Content-Type: Text/Plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/j_RzWPgZA7dCHdHPEltFBThGJaA>
Subject: Re: [netconf] Netconf Query
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: NETCONF WG list <netconf.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/netconf>, <mailto:netconf-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/netconf/>
List-Post: <mailto:netconf@ietf.org>
List-Help: <mailto:netconf-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/netconf>, <mailto:netconf-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 17 Feb 2020 14:57:59 -0000

Hi,

"Mahendra Gangaiah (mgangaia)" <mgangaia@cisco.com> wrote:
> Hi all,
> 
> Can you please help me out with the below query.
> 
> The below netcon payload is intended to create a layer 2 trunk port
> and add allowed vlans 10 to 20 on that interface
> 
>   <edit-config>
>     <target>
>       <running/>
>     </target>
>     <config>
>       <interfaces >
>         <interface>
>           <name>eth1/10</name>
>           <ethernet>
>             <switched-vlan>
>               <config>
>                 <interface-mode>TRUNK</interface-mode>
>                 <trunk-vlans>10..20</trunk-vlans>
>               </config>
>             </switched-vlan>
>           </ethernet>
>         </interface>
>       </interfaces>
>     </config>
>   </edit-config>
> 
> 
> Based on the yang model definition, trunk-vlans is defined as below.
> 
> 
> leaf-list trunk-vlans {
>       when "../interface-mode = 'TRUNK'" {
>         description
>           "Allowed VLANs may be specified for trunk mode
>           interfaces.";
>       }
> 
> Question:
> ==========
> When the above payload is pushed using netconf,
> Does the expression in the when statement defined in the model for an
> object refers to data in the datastore context, or data in the request
> context or can be either.
> Can the netconf request include both the change to the configuration
> that satisfies the when expression and changes to elements that are
> enabled by that same when expression ?
> Should the above payload work ?

Yes it should work; the request sets the interface-mode to "TRUNK"
which makes 'trunk-vlans' valid.



/martin