Re: [netmod] draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier

Sean Condon <sean.condon@microsemi.com> Thu, 28 September 2017 13:19 UTC

Return-Path: <sean.condon@microsemi.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 0F913133044; Thu, 28 Sep 2017 06:19:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.689
X-Spam-Level:
X-Spam-Status: No, score=-4.689 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001, T_KAM_HTML_FONT_INVALID=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mscc365.onmicrosoft.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 0-J3cAPecj7S; Thu, 28 Sep 2017 06:19:23 -0700 (PDT)
Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0064.outbound.protection.outlook.com [104.47.32.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C134A132193; Thu, 28 Sep 2017 06:19:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mscc365.onmicrosoft.com; s=selector1-microsemi-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=NQ8iWM117jr4Juh5JmGpd2XNwbcDRVz7uxzufHnb6Jw=; b=BabUZ8pvNPcSPBDi7Z/AhQlfqN9CFe9KqjsMRXL1nfs8s3mypEVBvLrpmPwNbff9ICfThtUxI3GI4zXQ3fE07o+ElMDbbSsWdzV1Ha+yw6auz6Ho9kXCveHYL2HDg2ZKdbvap0OwC2+6v4gF9zaHH11gg7fVjyTa8LyvtNYLy+w=
Received: from BLUPR0201CA0040.namprd02.prod.outlook.com (10.163.116.50) by BY2PR0201MB1496.namprd02.prod.outlook.com (10.163.153.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Thu, 28 Sep 2017 13:19:20 +0000
Received: from BL2FFO11FD030.protection.gbl (2a01:111:f400:7c09::121) by BLUPR0201CA0040.outlook.office365.com (2a01:111:e400:52e7::50) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 13:19:19 +0000
Authentication-Results: spf=pass (sender IP is 208.19.100.20) smtp.mailfrom=microsemi.com; huawei.com; dkim=none (message not signed) header.d=none;huawei.com; dmarc=bestguesspass action=none header.from=microsemi.com;
Received-SPF: Pass (protection.outlook.com: domain of microsemi.com designates 208.19.100.20 as permitted sender) receiver=protection.outlook.com; client-ip=208.19.100.20; helo=avsrvexchhts2.microsemi.net;
Received: from avsrvexchhts2.microsemi.net (208.19.100.20) by BL2FFO11FD030.mail.protection.outlook.com (10.173.161.40) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.20.56.11 via Frontend Transport; Thu, 28 Sep 2017 13:19:19 +0000
Received: from AVSRVEXCHMBX1.microsemi.net ([fe80::950f:17ba:a56d:40e6]) by avsrvexchhts2.microsemi.net ([::1]) with mapi id 14.03.0361.001; Thu, 28 Sep 2017 06:19:18 -0700
From: Sean Condon <sean.condon@microsemi.com>
To: Jiangyuanlong <jiangyuanlong@huawei.com>, "netmod@ietf.org" <netmod@ietf.org>
CC: "tictoc@ietf.org" <tictoc@ietf.org>, Rodney Cummings <rodney.cummings@ni.com>
Thread-Topic: draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier
Thread-Index: AdM20lxp4a4LJ64bREK66XJnd3gJawAF4nRwABKMRUAAEqGn9wA1hiAAAAHl76Y=
Date: Thu, 28 Sep 2017 13:19:17 +0000
Message-ID: <640F4C69F839A64C8949EF04FAAEE44679F2583E@avsrvexchmbx1.microsemi.net>
References: <640F4C69F839A64C8949EF04FAAEE44679F253DE@avsrvexchmbx1.microsemi.net> <DM2PR0401MB1389FDE1F4AEC72DF7B3B90C927B0@DM2PR0401MB1389.namprd04.prod.outlook.com>, <3B0A1BED22CAD649A1B3E97BE5DDD68BBB5C9C01@dggeml507-mbx.china.huawei.com> <640F4C69F839A64C8949EF04FAAEE44679F25561@avsrvexchmbx1.microsemi.net>, <3B0A1BED22CAD649A1B3E97BE5DDD68BBB5CB62E@dggeml507-mbx.china.huawei.com>
In-Reply-To: <3B0A1BED22CAD649A1B3E97BE5DDD68BBB5CB62E@dggeml507-mbx.china.huawei.com>
Accept-Language: en-GB, en-US
Content-Language: en-GB
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.100.34.31]
Content-Type: multipart/alternative; boundary="_000_640F4C69F839A64C8949EF04FAAEE44679F2583Eavsrvexchmbx1mi_"
MIME-Version: 1.0
X-EOPAttributedMessage: 0
X-MS-Office365-Filtering-HT: Tenant
X-Forefront-Antispam-Report: CIP:208.19.100.20; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(376002)(39860400002)(346002)(2980300002)(438002)(189002)(43784003)(51444003)(13464003)(199003)(377454003)(81166006)(53936002)(512874002)(53946003)(6306002)(7736002)(54896002)(6246003)(229853002)(93886005)(561944003)(9686003)(236005)(189998001)(104016004)(33656002)(49446005)(2501003)(4326008)(5890100001)(16200700003)(966005)(86362001)(69596002)(68736007)(6116002)(102836003)(53546010)(5660300001)(606006)(55846006)(2950100002)(316002)(16586007)(3846002)(97736004)(53416004)(7696004)(54906003)(5250100002)(110136005)(8676002)(81156014)(478600001)(345774005)(8936002)(76176999)(2900100001)(106466001)(84326002)(356003)(2906002)(2920100001)(50986999)(54356999)(230783001)(559001)(569006); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR0201MB1496; H:avsrvexchhts2.microsemi.net; FPR:; SPF:Pass; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en;
X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD030; 1:Ya2/Dd58/eX7w/v8S0mNSKB0sGdo6XlFvdnWsXK1Lya4UQymW1yrGErdMEXJKu3tjm7HL0UsS9J0QC/GoqylhaGMPgrqyex2+GgKAeYfvrDCbPTC2xlbxglRTjKb/dmO
X-MS-PublicTrafficType: Email
X-MS-Office365-Filtering-Correlation-Id: 49c55f96-2705-4b07-a895-08d5067386d1
X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(8251501002)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:BY2PR0201MB1496;
X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1496; 3:qGvi2SfXj8TS+5LrjX9qc8SnA0IEUI+kcvIOaeAGV/iYyRbU6YutpFcyBOY1cLcuXW/9Onvv6U7lBSMIZc7TT3j3gpLXZVjq5wnw8BsQaYIBBOQCqQilIgtl+DnkC1GfSWt64R/U7Royw+6N+BYPPeq+Lln18AF8r2gGqTPVZy2Qm/tsUpUXyM1FDT/PkD87+faAMStk2WD34212Rg5s91b+IVGHyaJ6pmu0P1PEj3Nt7N9hlITdzuYNXwcCFJdLlsLfs2CVgABtqw/lLYXI+pJN40mSO8d2kD2mJbw+8j7toAzUr7sgeA75XCkwmpCEBgkv4cCXDosndFRIA9Cz5Qe27oxIy1+LfPqCTGAPA3w=; 25:NfLRynIJVBtx3wFxO4Tpp/6qrX0041RcE2hHIshmJadvZ2j9sco9D+ZD2e/1jkc5ncU78rhf+h3QzZHJU4G3nj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n2umkRWX
X-Exchange-Antispam-Report-Test: UriScan:(10436049006162)(50582790962513)(72170198267865)(17755550239193);
X-Microsoft-Antispam-PRVS: <BY2PR0201MB1496EA774385FAD2721D9A04ED790@BY2PR0201MB1496.namprd02.prod.outlook.com>
X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(93004095)(3002001)(100000703101)(100105400095)(6055026)(6041248)(20161123555025)(20161123558100)(20161123564025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR0201MB1496; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR0201MB1496;
X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1496; 4:A1NgPTFpIxcemaNoQ42lr8TAurO8RVbFAM+aEqnHYgPihQsyP8v5t2hUeYPXEw9/gy/BTqWxTQTORq6UacrXbOysaXtTSTmMxfm1FN4dTs7hWGIps+lXhI0RspbiOIoUAIpTOUe9ot91KKBagrz/eo3tmB+CiafofF9Ycp+pSmKm56X4/DfqI+lWoX4LyZuLu4LDX8MjI9RdKBH5s/5v1Wgf61F3fcl7djkNJgpMMQKvLCoEj6vUD+UiLQ+Q2x5QTJMVI/K4DVx8cZdjQMM0U7U+Ml9/g+I3mopYOfsrI4vJtfHLYVumGhglPIXdG6VaH4h18WqR2eRGFF+IwqbUqI9mQ0yQMpCiYZuAo9pJAk+Ze1mKrbwpsIhgishHP99EDHdYYcJf2aUn9B0xjeiJjw==
X-Forefront-PRVS: 0444EB1997
X-Microsoft-Exchange-Diagnostics: 1; BY2PR0201MB1496; 23:bA0mbW1jAMkkwtpftJ8wQzQ5pX8hxPh+r29WQ73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3lCWROy6rC9YMicd/MSV+p9CqwDh+RE/JpZdg=; 7:nScn6wPEhhnzLr46uwdqDmKGAsHYquvBw00sYArAkHS0LaDyS5NmApvd/nR9oEus+cQ352uKEhXQGZMcUKqI8plOU/pUN8EDzcsz52WyBOWHYP/lSzhUETQWoAmlGPAY6kB0U3kynkQhriLGH24Kx3EL6FJp/uWkjiPWyw9d6eo19oECJSnMwALPgJUSvENQhjJC2BcoOIOfMR2h96j6biGMpxGI2ef5uPQv47Z5gIg=
SpamDiagnosticOutput: 1:99
SpamDiagnosticMetadata: NSPM
X-OriginatorOrg: microsemi.com
X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Sep 2017 13:19:19.1318 (UTC)
X-MS-Exchange-CrossTenant-Id: f267a5c8-86d8-4cc9-af71-1fd2c67c8fad
X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f267a5c8-86d8-4cc9-af71-1fd2c67c8fad; Ip=[208.19.100.20]; Helo=[avsrvexchhts2.microsemi.net]
X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0201MB1496
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/C2z2iCotjRY9QrRvRl8XWeGYTdE>
Subject: Re: [netmod] draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier
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, 28 Sep 2017 13:19:28 -0000

Thank you for your in depth consideration of this issue. Sean
________________________________
From: Jiangyuanlong [jiangyuanlong@huawei.com]
Sent: 28 September 2017 14:11
To: Sean Condon; netmod@ietf.org
Cc: tictoc@ietf.org; Rodney Cummings
Subject: RE: draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier

EXTERNAL EMAIL

Sean,

My personal opinion is that it can work, but I would like to ask for more opinions from our netmod experts;)

Hi netmod experts,
Considering the following sample module, my-list is a list, and it needs to use a leaf member "port-number" in my-port-container as a key.
We now have 3 options:
1.
  list my-list {
    key "port-number";
    leaf port-number {
       type uint16;
    }

    container my-port-container {
        leaf port-number {
          type uint16;
        }
         leaf other-leaf {
           ...
         }
    }
  }
But this does not work for there is compiling error.

2.
  list my-list {
    key "port-number";
    leaf port-number {
       type uint16;
    }
    container my-port-container {
        leaf port-number {
            type leafref{
              path "../../port-number";
            }
        }
         leaf other-leaf {
           ...
         }
    }
  }
Option 2 can parse, though leafref in a sub-module seems not very natural.

3.
  list my-list {
    key "port-number";
    leaf port-number {
       type leafref{
          path "../my-port-container/port-number";
       }
    }
    container my-port-container {
        leaf port-number {
          type uint16;
        }
         leaf other-leaf {
           ...
         }
    }
  }

Option 3 can also parse, though leafref seems not a very natural key. What is your favorite option? Or do you have any better schemes?
Your opinions are very important for our revision of this draft.

Thanks,
Yuanlong


From: Sean Condon [mailto:sean.condon@microsemi.com]
Sent: Wednesday, September 27, 2017 7:11 PM
To: Jiangyuanlong
Cc: tictoc@ietf.org; Rodney Cummings
Subject: RE: draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier

Thanks guys for your responses.

I accept your points to keep the structure as aligned to the IEEE 1588 standard as possible.

One alternate suggestion that I would make, is that the port-number currently defined as leafref should be made the real attribute (i.e. uint16) and that the port-number inside port-identity container should be made in to the leaf ref (and set to mandatory true).

The reason I say this is that

  1.  XML models are usually navigated and constructed root-to-leaf, and the way it's portrayed at the moment is that port-number leafref points to something that may not exist at the time it is being defined. This makes it difficult to implement.
  2.  Also port-identity/port-number is not "mandatory true" meaning that it could be left out altogether. It's not valid for it to have a default value either since every item in the list will need a different identifier.

With this suggestion the structure you require with port-identity still exists, but now the implementation is more straightforward, and the change will be transparent to an end user.


Best regards, Sean
=======================
Sean Condon
System & Software Architect
Frequency & Timing Division
Microsemi Inc.
sean.condon@microsemi.com<mailto:sean.condon@microsemi.com>

________________________________
From: Jiangyuanlong [jiangyuanlong@huawei.com]
Sent: 27 September 2017 08:05
To: Sean Condon
Cc: tictoc@ietf.org<mailto:tictoc@ietf.org>; Rodney Cummings
Subject: RE: draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier
EXTERNAL EMAIL

Dear Sean,



Thank you a lot for diving into the technical details of this module. Just as Rodney said, it is a challenge of 1588 info model to YANG, and we use the leafref of YANG to work around it.

I would like to provide a little more backgrounds on the tradeoff:



1. It says in Sec. 7.5.2.1 in IEEE 1588-2008: portIdentity is a member of the portDS data set. A portIdentity consists of two attributes, as

follows:

⎯ portIdentity.clockIdentity

⎯ portIdentity.portNumber

Furthermore, the "portDS.portIdentity" attribute is mentioned quite a few times in 1588-2008, especially in Table 17 and under Table 61, with a hint that assignment and comparison can be done on this member directly, thus it seems to me portIdentity is an important and well understood construct in the 1588 specification.



2. If we change portDS.portIdentity from a container to a grouping, then there is no portIdentity for portDS and transparentclockPortDS in the resulting tree diagram:



module: ietf-ptp-dataset

    +--rw instance-list* [instance-number]

    |  +--rw instance-number       uint16

    |  +--rw default-ds

    |  |  +--rw two-step-flag?    boolean

    |  |  +--rw clock-identity?   clock-identity-type

    |  |  +--rw number-ports?     uint16

    |  |  +--rw clock-quality

    |  |  |  +--rw clock-class?                  uint8

    |  |  |  +--rw clock-accuracy?               uint8

    |  |  |  +--rw offset-scaled-log-variance?   uint16

    |  |  +--rw priority1?        uint8

    |  |  +--rw priority2?        uint8

    |  |  +--rw domain-number?    uint8

    |  |  +--rw slave-only?       boolean

    |  +--rw current-ds

    |  |  +--rw steps-removed?        uint16

    |  |  +--rw offset-from-master?   time-interval-type

    |  |  +--rw mean-path-delay?      time-interval-type

    |  +--rw parent-ds

    |  |  +--rw parent-port-identity

    |  |  |  +--rw clock-identity?   clock-identity-type

    |  |  |  +--rw port-number?      uint16

    |  |  +--rw parent-stats?                                 boolean

    |  |  +--rw observed-parent-offset-scaled-log-variance?   uint16

    |  |  +--rw observed-parent-clock-phase-change-rate?      int32

    |  |  +--rw grandmaster-identity?                         binary

    |  |  +--rw grandmaster-clock-quality

    |  |  |  +--rw clock-class?                  uint8

    |  |  |  +--rw clock-accuracy?               uint8

    |  |  |  +--rw offset-scaled-log-variance?   uint16

    |  |  +--rw grandmaster-priority1?                        uint8

    |  |  +--rw grandmaster-priority2?                        uint8

    |  +--rw time-properties-ds

    |  |  +--rw current-utc-offset-valid?   boolean

    |  |  +--rw current-utc-offset?         int16

    |  |  +--rw leap59?                     boolean

    |  |  +--rw leap61?                     boolean

    |  |  +--rw time-traceable?             boolean

    |  |  +--rw frequency-traceable?        boolean

    |  |  +--rw ptp-timescale?              boolean

    |  |  +--rw time-source?                uint8

    |  +--rw port-ds-list* [port-number]

    |     +--rw clock-identity?                clock-identity-type

    |     +--rw port-number                    uint16

    |     +--rw port-state?                    port-state-enumeration

    |     +--rw underlying-interface?          if:interface-ref

    |     +--rw log-min-delay-req-interval?    int8

    |     +--rw peer-mean-path-delay?          time-interval-type

    |     +--rw log-announce-interval?         int8

    |     +--rw announce-receipt-timeout?      uint8

    |     +--rw log-sync-interval?             int8

    |     +--rw delay-mechanism?               delay-mechanism-enumeration

    |     +--rw log-min-pdelay-req-interval?   int8

    |     +--rw version-number?                uint8

    +--rw transparent-clock-default-ds

    |  +--rw clock-identity?    clock-identity-type

    |  +--rw number-ports?      uint16

    |  +--rw delay-mechanism?   delay-mechanism-enumeration

    |  +--rw primary-domain?    uint8

    +--rw transparent-clock-port-ds-list* [port-number]

       +--rw clock-identity?                clock-identity-type

       +--rw port-number                    uint16

       +--rw log-min-pdelay-req-interval?   int8

       +--rw faulty-flag?                   boolean

       +--rw peer-mean-path-delay?          time-interval-type



In contrast to the original 1588 YANG tree diagram:

   module: ietf-ptp-dataset

       +--rw instance-list* [instance-number]

       |  +--rw instance-number      uint16

       |  +--rw default-ds

       |  |  +--rw two-step-flag?    boolean

       |  |  +--rw clock-identity?   clock-identity-type

       |  |  +--rw number-ports?     uint16

       |  |  +--rw clock-quality

       |  |  |  +--rw clock-class?                  uint8

       |  |  |  +--rw clock-accuracy?               uint8

       |  |  |  +--rw offset-scaled-log-variance?   uint16

       |  |  +--rw priority1?        uint8

       |  |  +--rw priority2?        uint8

       |  |  +--rw domain-number?    uint8

       |  |  +--rw slave-only?       boolean

       |  +--rw current-ds

       |  |  +--rw steps-removed?       uint16

       |  |  +--rw offset-from-master?  time-interval-type

       |  |  +--rw mean-path-delay?     time-interval-type

       |  +--rw parent-ds

       |  |  +--rw parent-port-identity

       |  |  |  +--rw clock-identity?   clock-identity-type

       |  |  |  +--rw port-number?      uint16

       |  |  +--rw parent-stats?        boolean

       |  |  +--rw observed-parent-offset-scaled-log-variance? uint16

       |  |  +--rw observed-parent-clock-phase-change-rate?    int32

       |  |  +--rw grandmaster-identity?                       binary

       |  |  +--rw grandmaster-clock-quality

       |  |  |  +--rw clock-class?                  uint8

       |  |  |  +--rw clock-accuracy?               uint8

       |  |  |  +--rw offset-scaled-log-variance?   uint16

       |  |  +--rw grandmaster-priority1?           uint8

       |  |  +--rw grandmaster-priority2?           uint8

       |  +--rw time-properties-ds

       |  |  +--rw current-utc-offset-valid?   boolean

       |  |  +--rw current-utc-offset?         int16

       |  |  +--rw leap59?                     boolean

       |  |  +--rw leap61?                     boolean

       |  |  +--rw time-traceable?             boolean

       |  |  +--rw frequency-traceable?        boolean

       |  |  +--rw ptp-timescale?              boolean

       |  |  +--rw time-source?                uint8

       |  +--rw port-ds-list* [port-number]

       |     +--rw port-number        -> ../port-identity/port-number

       |     +--rw port-identity

       |     |  +--rw clock-identity?   clock-identity-type

       |     |  +--rw port-number?      uint16

       |     +--rw port-state?          port-state-enumeration

       |     +--rw underlying-interface? if:interface-ref

       |     +--rw log-min-delay-req-interval?    int8

       |     +--rw peer-mean-path-delay?          time-interval-type

       |     +--rw log-announce-interval?         int8

       |     +--rw announce-receipt-timeout?      uint8

       |     +--rw log-sync-interval?             int8

       |     +--rw delay-mechanism?     delay-mechanism-enumeration

       |     +--rw log-min-pdelay-req-interval?   int8

       |     +--rw version-number?                uint8

       +--rw transparent-clock-default-ds

       |  +--rw clock-identity?    clock-identity-type

       |  +--rw number-ports?      uint16

       |  +--rw delay-mechanism?   delay-mechanism-enumeration

       |  +--rw primary-domain?    uint8

       +--rw transparent-clock-port-ds-list* [port-number]

          +--rw port-number           -> ../port-identity/port-number

          +--rw port-identity

          |  +--rw clock-identity?   clock-identity-type

          |  +--rw port-number?      uint16

          +--rw log-min-pdelay-req-interval?   int8

          +--rw faulty-flag?                   boolean

          +--rw peer-mean-path-delay?         time-interval-type



I agree, assignment and comparison can still be done on clock-identity and port-number directly (without a portIdentity construct) . But people who are familiar with 1588-2008 may question where portIdentity is gone.



3. I think leafref is a very general semantics thing in YANG language, if any tools have problem with this feature, maybe we need to contact with the tool’s developer to support it.



Finally, more inputs from the WG are welcome.



Thanks again,

Yuanlong





-----Original Message-----
From: TICTOC [mailto:tictoc-bounces@ietf.org] On Behalf Of Rodney Cummings
Sent: Wednesday, September 27, 2017 1:24 AM
To: tictoc@ietf.org<mailto:tictoc@ietf.org>
Subject: Re: [TICTOC] draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier



Thanks Sean,



Regarding your other comment on TLD... I agree.



Regarding the comment below on port-identity, I agree that we need to do it for practical reasons.



In 1588-2008, there is a distinct dataset member for portDS.portIdentity, which 5.3.5 specifies as using type PortIdentity:

  struct PortIdentity {

    ClockIdentity clockIdentity;

    UInteger portNumber;

  }



If we interpret the 1588-2008 datasets as an information model, and apply that as directly as possible to a YANG data model, portDS.portIdentity is a container, which is what we have so far. That introduces a challenge, because we want to use portDS.portIdentity.portNumber as the key to the list of portDS's. We solved that challenge with a leafref, but I'd agree that is ugly.



Your proposal changes portDS.portIdentity from a container to a grouping, so that it portDS.portIdentity.portNumber can be used as the key without a leafref.



The downside is that if/when a YANG management client tries to "get" portDS.portIdentity, it doesn't work... there is no portIdentity to get.



Personally, I think that downside is worth it. One can argue that your proposal still conforms to the 1588-2008 information model for management, in that portDS.portIdentity still "exists" in a manner that makes sense for YANG.



Rodney







From: TICTOC [mailto:tictoc-bounces@ietf.org] On Behalf Of Sean Condon

Sent: Tuesday, September 26, 2017 10:38 AM

To: tictoc@ietf.org<mailto:tictoc@ietf.org>

Subject: [TICTOC] draft-ietf-tictoc-1588v2-yang-05 - Concern over port identifier



With reference to "YANG Data Model for IEEE 1588v2" https://urldefense.proofpoint.com/v2/url?u=https-3A__tools.ietf.org_html_draft-2Dietf-2Dtictoc-2D1588v2-2Dyang-2D05&d=DwMFAw&c=I_0YwoKy7z5LMTVdyO6YCiE2uzI1jjZZuIPelcSjixA&r=WA71sf2o7Dw7CbYhFt24DPjt3lJuupswWYdnboKbZ8k&m=jKHczVNLN-KuV2HRZkbEZY1SzlCD_AztkaWSccrqBI8&s=msh7A7_OgHZ1l65Dn6_LhiDIXkXpFeiLGmKbKxsqXWw&e=



I have a concern about the structure of the YANG, and how the lists port-ds-list and transparent-clock-port-ds-list are indexed with a leaf which is a leafref.



The structure seems unnecessarily complex - port-number is represented as a leaf directly beneath the list (to be used as key) and again under the port-identity container. It is structured in a way that I believe would make it difficult to work with some YANG tools in the market.



The purpose of port-identity container is not clear from the document - it would achieve the same purpose if it was left out of port-ds-entry and transparent-clock-port-ds-entry and instead the grouping port-identity-grouping included directly.



See the attached files as original, a modified version and as a patch file.



Sean Condon

=======================

Sean Condon

System & Software Architect

Frequency & Timing Division

Microsemi Inc.

mailto:sean.condon@microsemi.com



_______________________________________________

TICTOC mailing list

TICTOC@ietf.org<mailto:TICTOC@ietf.org>

https://www.ietf.org/mailman/listinfo/tictoc