Re: [Taps] YANG updates

"Holland, Jake" <jholland@akamai.com> Wed, 25 September 2019 21:34 UTC

Return-Path: <jholland@akamai.com>
X-Original-To: taps@ietfa.amsl.com
Delivered-To: taps@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 376B112004E for <taps@ietfa.amsl.com>; Wed, 25 Sep 2019 14:34:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level:
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=akamai.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 8_NW-JgB2ftl for <taps@ietfa.amsl.com>; Wed, 25 Sep 2019 14:34:51 -0700 (PDT)
Received: from mx0b-00190b01.pphosted.com (mx0b-00190b01.pphosted.com [IPv6:2620:100:9005:57f::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 13078120026 for <taps@ietf.org>; Wed, 25 Sep 2019 14:34:50 -0700 (PDT)
Received: from pps.filterd (m0050096.ppops.net [127.0.0.1]) by m0050096.ppops.net-00190b01. (8.16.0.42/8.16.0.42) with SMTP id x8PLR3qV009865; Wed, 25 Sep 2019 22:34:44 +0100
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akamai.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=jan2016.eng; bh=P+hHe6S0Id35nQbIE13MuwQY8WU2EE4j1nbzkE8R6mQ=; b=hOFqmYcg7dB59NaOuqZToyg3qPZyCPKMiVgzcUBh327ZQb/2kVY4GnOady2Xae3RPEgo dGuJ6WfCyc4wJXfkQv9FB4oz0+Rq6K5jjbhprk5HXpv+ebQaOXyAKPT0mdl1JlPANgOf YIBABPzZtqWupjESAPbxiH/Woi8qXr3vrf4Z+a91m2+8kgQ7G0ocEE2uRDjFKC9F6LF8 uWJDTH0SPavB5P7x2OcgVaEFJ4h3VZFD2rF91Mas9IfV4urIyZJj9C8usI7J8gzYR/t/ 7GYYX78qRTZN61mrRhooDRpN+5J21fX8faL5qrutycCLI+e3T1iFSFe6Lf+TTAnR6ccC 6g==
Received: from prod-mail-ppoint8 (prod-mail-ppoint8.akamai.com [96.6.114.122] (may be forged)) by m0050096.ppops.net-00190b01. with ESMTP id 2v73qb1v6u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 25 Sep 2019 22:34:44 +0100
Received: from pps.filterd (prod-mail-ppoint8.akamai.com [127.0.0.1]) by prod-mail-ppoint8.akamai.com (8.16.0.27/8.16.0.27) with SMTP id x8PLWCf3022489; Wed, 25 Sep 2019 17:34:44 -0400
Received: from email.msg.corp.akamai.com ([172.27.25.31]) by prod-mail-ppoint8.akamai.com with ESMTP id 2v73vqd4hn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 25 Sep 2019 17:34:43 -0400
Received: from USTX2EX-DAG1MB4.msg.corp.akamai.com (172.27.27.104) by ustx2ex-dag1mb4.msg.corp.akamai.com (172.27.27.104) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 25 Sep 2019 16:34:43 -0500
Received: from USTX2EX-DAG1MB4.msg.corp.akamai.com ([172.27.6.134]) by ustx2ex-dag1mb4.msg.corp.akamai.com ([172.27.6.134]) with mapi id 15.00.1473.005; Wed, 25 Sep 2019 16:34:43 -0500
From: "Holland, Jake" <jholland@akamai.com>
To: Theresa Enghardt <theresa@inet.tu-berlin.de>, "taps@ietf.org" <taps@ietf.org>
Thread-Topic: [Taps] YANG updates
Thread-Index: AQHVcjKsERfqI9tViU2VYiHjV9QgGac81RGA///3FoA=
Date: Wed, 25 Sep 2019 21:34:42 +0000
Message-ID: <328533CE-2215-4377-9A9A-2D37384783C7@akamai.com>
References: <BB19AC36-ED37-4B6F-B732-A1DB78B8F777@akamai.com> <2305183c-5383-f08b-c464-06512ee7e527@inet.tu-berlin.de>
In-Reply-To: <2305183c-5383-f08b-c464-06512ee7e527@inet.tu-berlin.de>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/10.1d.0.190908
x-ms-exchange-messagesentrepresentingtype: 1
x-ms-exchange-transport-fromentityheader: Hosted
x-originating-ip: [172.19.112.162]
Content-Type: text/plain; charset="utf-8"
Content-ID: <00CE3EE505EAB14ABDB538FED5EE1D15@akamai.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-09-25_10:, , signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1909250174
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.95,1.0.8 definitions=2019-09-25_10:2019-09-25,2019-09-25 signatures=0
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 clxscore=1015 mlxlogscore=999 priorityscore=1501 bulkscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 suspectscore=0 phishscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1908290000 definitions=main-1909250173
Archived-At: <https://mailarchive.ietf.org/arch/msg/taps/wQ77K7plQ9fIYVpcjoQzbPaW-qI>
Subject: Re: [Taps] YANG updates
X-BeenThere: taps@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "IETF Transport Services \(TAPS\) Working Group" <taps.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/taps>, <mailto:taps-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/taps/>
List-Post: <mailto:taps@ietf.org>
List-Help: <mailto:taps-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/taps>, <mailto:taps-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Sep 2019 21:34:53 -0000

Hi Theresa,

Thanks for taking a look.

> By default, when I build the draft, it still reads the .yang and then
> dumps the XML and the tree structure, but it does not validate the
> model, right?

Yes, exactly.

> To test, I changed an identifier in the model, and the tool did complain
> about an unknown identifier -- but it still built the draft as .txt and
> .html. That's the intended behavior, right?
...
> "make" works for me, but "make yanglint" doesn't. It complains that
> there's no target called "yanglint".

This isn't what I expect, no.  This behavior sounds like the lib/ directory
is not hooked up--if you built it before, the old lib/ would still be there
(nothing auto-updates it).  That would probably explain what you're seeing.

To check whether that's right, something like this is expected if you start
from a clean ietf-taps-yang directory now (one without a lib/), after
running any kind of make (it does pull the lib/, but only if it's missing,
I think):

~~~
jake-lap:ietf-taps-yang jholland$ cd lib
jake-lap:lib jholland$ git status
On branch yang-support
Your branch is up to date with 'origin/yang-support'.

nothing to commit, working tree clean
jake-lap:lib jholland$ git remote -v
origin	https://github.com/GrumpyOldTroll/i-d-template (fetch)
origin	https://github.com/GrumpyOldTroll/i-d-template (push)
~~~

If that's not what you see (if it's on master instead of yang-support,
for instance), maybe try moving the lib/ directory away and then doing
a make again, or 'git pull; git checkout yang-support'.

What I expect if lib/ is on the right branch, and an error has been
introduced (e.g. by changing an identifier in an example):
- if you type 'make yanglint' it'll report the error
- regardless of whether you make yanglint, if you
  'export VALIDATE_YANG=1; make', it will NOT build a .txt/.html, and will
  report the same error as 'make yanglint'.
- if you unset VALIDATE_YANG or never used it and just 'make',
  you'll see no error*, and it'll build a .txt that contains the error.

* you might still see an error if you don't have pyang installed.  You
might also get warnings about missing imports if you haven't done a make
yanglint, which fetches them.  But it turns out those aren't required for
the tree-building, and won't stop the build from completing.

HTH.

Best,
Jake