Re: [netconf] [netmod] Query RFC-8348 hardware model

Andy Bierman <andy@yumaworks.com> Thu, 01 June 2023 20:59 UTC

Return-Path: <andy@yumaworks.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 B2ECEC15109F for <netconf@ietfa.amsl.com>; Thu, 1 Jun 2023 13:59:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.096
X-Spam-Level:
X-Spam-Status: No, score=-7.096 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id snT7lU_y5sFo for <netconf@ietfa.amsl.com>; Thu, 1 Jun 2023 13:59:54 -0700 (PDT)
Received: from mail-lj1-x232.google.com (mail-lj1-x232.google.com [IPv6:2a00:1450:4864:20::232]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D6811C15154C for <netconf@ietf.org>; Thu, 1 Jun 2023 13:59:53 -0700 (PDT)
Received: by mail-lj1-x232.google.com with SMTP id 38308e7fff4ca-2af316b4515so19190711fa.1 for <netconf@ietf.org>; Thu, 01 Jun 2023 13:59:53 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks.com; s=google; t=1685653192; x=1688245192; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lzcvbXBmJg33xkMSwlH0eeyQii9ZpuPcqBD99fFtq9w=; b=vQYjpni50cU/geCzXn5UUSdW5oBOIzmZhFypJp9hsX4yysY6k8ftLmxEdWw6VFLxV9 48dl2fM8K84xeCAPt9gbXoFkjWpxzskshvHk3GIFV36biF5/VB1/mmRdbd1wRKeNwXYH 7gPREiLfIWmnKkDxqnZJMQwwwyaX7cSF2HEfxb7D3GQ8j5pImGdtxtUalPKjGrSoAO3X UcwdZb4Z34BadBGBSX782G+miWOP7S5lUcL9vHL4K1m6pkRupxFXsIb3ZavOhh/Adj7I m4MEfguGH/YkFUOahl2MtjFAaGCVM6mW+M2//r/qZqkWr0fPT+ngaVb20BSUgdS1Lxzc ZsyA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685653192; x=1688245192; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lzcvbXBmJg33xkMSwlH0eeyQii9ZpuPcqBD99fFtq9w=; b=BKh9vc52OIl+AvLECdO0LtWm3P8CeSYoeiJKGh+ZfIKq9w/I0sj6eq+rYNJ6isXuCe ZKS1kloXKkq37StIl9mLLZLbPut5c2nuB+esgyZqsoKh5gJsIK1F0jJN6tJPqm7En/lk CAv9X6FA/nqBArTyG/6RncZn7fCX0OgLBzCHYOOc3UEHE2wfS09pee0Y4XPaSb6hJCWg d1FmQIKeAB6Nx/M/PWHidK4QXdut30B6DVbOgONdRGMyx3kLBAliFJ1oqoKrGCQ8rroK R4udJoEeZ1eeFCE0whl4vUH9pAnq/waaxdkiQIzdtW7vbVBQp2ozUUGDuZf7lCU94sBE 7viQ==
X-Gm-Message-State: AC+VfDzLdsebmL3Bi/awtpa73uh07oMuS3A9JOaKOXoc5eC+0d0xV6M+ SPNIa9byif26+12QOVKO5tjmZbMY0TSSuQk9Vy8sBQ==
X-Google-Smtp-Source: ACHHUZ56q95PYVxAmR7RmHCAf8hiB5eC1JX9Iv2JSAxuE5z6BvRtS+b4L8LELtAEwFs8osMwk7ncYOkfbE6PfeTJguo=
X-Received: by 2002:a05:651c:14d:b0:2ad:dab5:fe88 with SMTP id c13-20020a05651c014d00b002addab5fe88mr368017ljd.42.1685653191753; Thu, 01 Jun 2023 13:59:51 -0700 (PDT)
MIME-Version: 1.0
References: <DU2PR07MB83461C73AC6EB6EC0AB7402099729@DU2PR07MB8346.eurprd07.prod.outlook.com> <DU2PR07MB8346C435CC04F344FCA8B4C1994B9@DU2PR07MB8346.eurprd07.prod.outlook.com> <0100018878973a61-644d36bd-1048-410d-ae78-394e48ac8449-000000@email.amazonses.com>
In-Reply-To: <0100018878973a61-644d36bd-1048-410d-ae78-394e48ac8449-000000@email.amazonses.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Thu, 01 Jun 2023 13:59:40 -0700
Message-ID: <CABCOCHTrfF2-Zz9sMVYfPppDBw8_X-4gR_LUOqyFwXKeCznvpA@mail.gmail.com>
To: Kent Watsen <kent+ietf@watsen.net>
Cc: Martin Björklund <mbj+ietf@4668.se>, jie.dong@huawei.com, dromasca@gmail.com, "netmod@ietf.org" <netmod@ietf.org>, "Vanapatla Ramana (Nokia)" <vanapatla.ramana@nokia.com>, "Ludwig Pauwels (Nokia)" <ludwig.pauwels@nokia.com>, "netconf@ietf.org" <netconf@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000b598de05fd17b7f6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/netconf/V6RHQA7nvjfjO42rQNmQvN-Dg2U>
Subject: Re: [netconf] [netmod] Query RFC-8348 hardware model
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.39
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: Thu, 01 Jun 2023 20:59:57 -0000

Hi,

No changes are needed.
The notification definition says each leaf will be set to a value that
matches an instance of the leafref path.

The 'current()' linkage in your example links the sibling 'ifname' leaf to
select a matching instance.
That is not relevant to this notification example.

Andy


On Thu, Jun 1, 2023 at 1:12 PM Kent Watsen <kent+ietf@watsen.net> wrote:

> Forwarding to the authors of the RFC.
>
> K.
>
>
> On May 30, 2023, at 3:47 AM, Vanapatla Ramana (Nokia) <
> vanapatla.ramana@nokia.com> wrote:
>
> Hello Team,
>
>
>
> Gentle remainder on the below query.
>
>
>
> Regards,
>
> Ramana
>
>
>
> *From:* Vanapatla Ramana (Nokia)
> *Sent:* Friday, May 5, 2023 8:05 PM
> *To:* draft-ietf-netmod-entity@ietf.org; netmod@ietf.org
> *Cc:* Bart Bogaert (Nokia) <bart.bogaert@nokia.com>; Ludwig Pauwels
> (Nokia) <ludwig.pauwels@nokia.com>; Yves Beauville (Nokia) <
> yves.beauville@nokia.com>
> *Subject:* Query RFC-8348 hardware model
>
>
>
> Hello
>
>
>
> notification ‘hardware-state-oper-enabled’, notification
> ‘hardware-state-oper-disabled’ contains leaf admin-state, alarm-state
>  referring to path "/hardware/component/state/admin-state" ,
> "/hardware/component/state/alarm-state" but not specifying instance of
> hardware component
>
> Should this be changed to "/hardware/component[name =
> current()/../name]/state/admin-state","/hardware/component[name =
> current()/../name]/state/alarm-state" so that it is in-line with the
> notation shown in  RFC7950 examples?
>
>
>
> RFC-8348   Example
>
> notification hardware-state-oper-disabled {
>
>     leaf name {
>
>         type leafref {
>
>           path "/hardware/component/name";
>
>         }
>
>     leaf admin-state {
>
>         type leafref {
>
>           path "/hardware/component/state/admin-state";
>
>         }
>
>     leaf alarm-state {
>
>         type leafref {
>
>           path "/hardware/component/state/alarm-state";
>
>         }
>
> }
>
> RFC7950 indicates to refer instance in page 162, 160
>
> Page 162
>
> The following notification defines two leafrefs to refer to an existing
> admin-status:
>
>      notification link-failure {
>
>        leaf if-name {
>
>          type leafref {
>
>            path "/interface/name";
>
>          }
>
>        }
>
>        leaf admin-status {
>
>          type leafref {
>
>            path "/interface[name = current()/../if-name]"
>
>               + "/admin-status";
>
>          }
>
>        }
>
>
>
> Page 160
>
> The following leafrefs refer to an existing address of an interface:
>
> container default-address {
>
>    leaf ifname {
>
>      type leafref {
>
>        path "../../interface/name";
>
>      }
>
>    }
>
>    leaf address {
>
>      type leafref {
>
>        path "../../interface[name = current()/../ifname]"
>
>           + "/address/ip";
>
>      }
>
>    }
>
> }
>
>
>
> Regards,
>
> Ramana
> _______________________________________________
> netmod mailing list
> netmod@ietf.org
> https://www.ietf.org/mailman/listinfo/netmod
>
>
>