Re: [CCAMP] draft-ietf-ccamp-client-signal-yang references to bandwidth profiles, make it a leafref

Aihua Guo <aihuaguo.ietf@gmail.com> Mon, 15 June 2020 21:39 UTC

Return-Path: <aihuaguo.ietf@gmail.com>
X-Original-To: ccamp@ietfa.amsl.com
Delivered-To: ccamp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A056A3A12DE for <ccamp@ietfa.amsl.com>; Mon, 15 Jun 2020 14:39:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 7UY0XPVLcmvd for <ccamp@ietfa.amsl.com>; Mon, 15 Jun 2020 14:39:11 -0700 (PDT)
Received: from mail-oi1-x236.google.com (mail-oi1-x236.google.com [IPv6:2607:f8b0:4864:20::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 2EC783A12DC for <ccamp@ietf.org>; Mon, 15 Jun 2020 14:39:11 -0700 (PDT)
Received: by mail-oi1-x236.google.com with SMTP id k4so17333231oik.2 for <ccamp@ietf.org>; Mon, 15 Jun 2020 14:39:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=9xpATxKGRvlzG9w0WAhoin/ZGnwv5BV/+c7EvgaCb+Y=; b=j15WFOaSdSXVW61Sc10LtnBzIX7Ps7esaHFAZWIHzmHq53xTpE83rM44xWZnbChRoC VxPIdJV/VDBqUkKVKBUTuCrytqx1SmQJx2yR48Ji6aNjxtu3Txlers4OHI2Sm0FnRKsB waZ+xmsPDUY3hSGRvp6A495sdskR6y9BltN2XVkVOPbW2S+wMLnnBhDJ3hfPTs598G7r a8AUl9emsd0pSWUhRQGhj6M3TMQaWeIneAVTk7luwvh+VS5u9dVii9Ww6aSerLK3NlCm Qfn4BPZhr8TC1fAFuFcJz4f6w9q4PctHkMcb7SmqBmo7QpeSC9S26HvI25POtfmcdlYr lafw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=9xpATxKGRvlzG9w0WAhoin/ZGnwv5BV/+c7EvgaCb+Y=; b=F6O2xh/RR+KuPaRm6gsjIGG7rPlFKd3CGULP/zVwSGHGl8yLxieaecZqStBSyLX4aQ UayiFs0MDJpom6WDZ4uNb6s13g62FSg2N35toqSx1P1rgGGrcg4hB3RMyNYS/o19IkXS l6Z7hl22Xijq7xODOl0ji0/0PhffYlDvTIs3mMEB1SIsj5SKjujWtc+If2NSLUt/TxWD C03RfKB3lSDsnVfOlddO/4Ke6bRuXee3LTF4+eI3lVMWrN0d8MD6UhKNSmHqmoGCTfqv aFjVdIIjClKNvA7B9oXKlpkSGcAVKzpsqzQ832ykuVO6eekyPh21PMijUYiGSc6sLt4O ko2g==
X-Gm-Message-State: AOAM533GcH/pc3UiLapE979PRl0ZoRBYez8EKYxAY2odKHAh+moWS6pz 1MLVMeHUdy/EydFT1VNed48LQtjzMwjWZT4f3TizAA==
X-Google-Smtp-Source: ABdhPJz1WHWyIgH/o0cKVif15yJcyfjY2JUNRUUXe5/totkgYU0N5BGwlJE3J7v63zcW64u2PXaEPMK6WPtjK5lm/bc=
X-Received: by 2002:aca:fdc3:: with SMTP id b186mr1109937oii.82.1592257150393; Mon, 15 Jun 2020 14:39:10 -0700 (PDT)
MIME-Version: 1.0
References: <78319D17-A63B-4349-82C9-C564D25B21BB@cisco.com>
In-Reply-To: <78319D17-A63B-4349-82C9-C564D25B21BB@cisco.com>
From: Aihua Guo <aihuaguo.ietf@gmail.com>
Date: Mon, 15 Jun 2020 17:39:00 -0400
Message-ID: <CAFS+G6Tojv3sii7OdyepE+MPk-QmVqUacV-OSVEUD=tNf0yGCQ@mail.gmail.com>
To: "Roque Gagliano (rogaglia)" <rogaglia=40cisco.com@dmarc.ietf.org>
Cc: "ccamp@ietf.org" <ccamp@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d71ef205a8264158"
Archived-At: <https://mailarchive.ietf.org/arch/msg/ccamp/VGwg0iHB4XXvEvC6dvxWyVOrtvI>
Subject: Re: [CCAMP] draft-ietf-ccamp-client-signal-yang references to bandwidth profiles, make it a leafref
X-BeenThere: ccamp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Discussion list for the CCAMP working group <ccamp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/ccamp>, <mailto:ccamp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ccamp/>
List-Post: <mailto:ccamp@ietf.org>
List-Help: <mailto:ccamp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ccamp>, <mailto:ccamp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 15 Jun 2020 21:39:13 -0000

Hi Roque,

I agree with you. It should be a leafref to allow for YANG auto validation.
Thanks for the catch.

Aihua

On Mon, Jun 15, 2020 at 1:02 PM Roque Gagliano (rogaglia) <rogaglia=
40cisco.com@dmarc.ietf.org> wrote:

> Hi,
>
>
>
> I implemented the draft and I think the bandwidth-profile should be a
> leaf-ref and not a string (for both directions symmetrical and
> asymmetrical):
>
>
>
>           |  +--rw (direction)?
>
>           |  |  +--:(symmetrical)
>
>           |  |  |  +--rw ingress-egress-bandwidth-profile
>
>           |  |  |     +--rw (style)?
>
>           |  |  |        +--:(named)
>
>           |  |  |        |  +--rw bandwidth-profile-name?
>
>           |  |  |        |          string                    We need a
> leafref to the definition of the bandwidth-profile
>
>           |  |  |        +--:(value)
>
>
>
> In particular, I believe it should be:
>
> type leafref {
>
>                    path "/ethtsvc:etht-svc/ethtsvc:globals/ethtsvc:named-bandwidth-profiles/ethtsvc:bandwidth-profile-name";
>
>                }
>
>
>
> Why is this important? As an implementor, I need to understand the
> relationship between these nodes in order to select the right order of
> RESTCONF commands.
>
>
>
> If the leafref is not present, I would assume that the nodes are not
> related and I could try to delete a “named-bandwidth-profile” that is
> actually used in a service. Also, when I am trying to delete both a
> “named-bandwidth profile” and all its associated services, I would need to
> delete the service first and the profile later (when there Is not instance
> that reference it).
>
>
>
> For all of this to happen, as both nodes belong to different trees, I need
> to reference them to make the association explicit for a compiler.
>
>
>
> Regards,
>
> Roque
>
>
>
>
> _______________________________________________
> CCAMP mailing list
> CCAMP@ietf.org
> https://www.ietf.org/mailman/listinfo/ccamp
>