Re: [netmod] yang-data-ext issues

Kent Watsen <kwatsen@juniper.net> Mon, 30 April 2018 17:34 UTC

Return-Path: <kwatsen@juniper.net>
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 CB8DE1201F8 for <netmod@ietfa.amsl.com>; Mon, 30 Apr 2018 10:34:28 -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, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=juniper.net
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 2jwggbS7Fw9k for <netmod@ietfa.amsl.com>; Mon, 30 Apr 2018 10:34:26 -0700 (PDT)
Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (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 DBEC31201F2 for <netmod@ietf.org>; Mon, 30 Apr 2018 10:34:26 -0700 (PDT)
Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3UHTqs7008143; Mon, 30 Apr 2018 10:34:26 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=PPS1017; bh=vyB2oHKHx1Aww6qc6HVcP3GZ6GV6HLZpicM+1wqFxl4=; b=EcDCe50K/s5CtN0CW+KI7Eo4Suy3OpffWzuZfpoBFAKJeUeM0X58/aiuSOIMFsCaT6GZ 179z0WKZRPOBuhKFDMUnH86Kq9Gputtjmhu9fT1m0txUVAFPo0VtaL716ViI1lVsDsGR lPeeI+D2Elnr3R1g9I5oPWP6X2OJ0ToCoK7sCkwI9e/+o+I6eW8yLGsFiXvqteq3hCp8 zNBAMfUOn6U75RmfIy05ljbocrReiebaVpwcdEvjc9rQOZReYmosrGgtyKrEQFSneZOJ g4MEvqbE5LGfEOFpOpQeUwb79uo8hFe7m5goZ83fV5Tk1ACu4ceGMFobt2QVY4d3oc3G vw==
Received: from nam03-co1-obe.outbound.protection.outlook.com (mail-co1nam03lp0016.outbound.protection.outlook.com [216.32.181.16]) by mx0a-00273201.pphosted.com with ESMTP id 2hp2p5gjbw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Mon, 30 Apr 2018 10:34:26 -0700
Received: from BYAPR05MB4230.namprd05.prod.outlook.com (52.135.200.153) by BYAPR05MB4389.namprd05.prod.outlook.com (52.135.202.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.735.6; Mon, 30 Apr 2018 17:34:24 +0000
Received: from BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::44ac:d4a9:49d0:101e]) by BYAPR05MB4230.namprd05.prod.outlook.com ([fe80::44ac:d4a9:49d0:101e%13]) with mapi id 15.20.0715.014; Mon, 30 Apr 2018 17:34:24 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: Martin Bjorklund <mbj@tail-f.com>
CC: "andy@yumaworks.com" <andy@yumaworks.com>, "netmod@ietf.org" <netmod@ietf.org>
Thread-Topic: [netmod] yang-data-ext issues
Thread-Index: AQHT1YJYRSnZmZlnhU6JIK4LoPfNTqQDdYgAgAAS9YCAAAZpAIAACwoAgAAFOICAAuemAIAAR8IAgAABIACAAAEwgIAHI10AgABILICAAAT7AIAAS8EAgABAMYCAAAJrgIAAAtqAgAGEfoD//9zuAIAA5miAgAhKboA=
Date: Mon, 30 Apr 2018 17:34:23 +0000
Message-ID: <C8D22DF2-0D04-4126-A749-4B4DDE5DEA42@juniper.net>
References: <20180423.220815.526647366558506966.mbj@tail-f.com> <CABCOCHTt3noQ5PcX57yGi5Cm7BxQA=GCB9KajrWS2WLnYM9THA@mail.gmail.com> <403C417C-4546-48FA-AEA5-6ABA3D5A3845@juniper.net> <20180425.085751.1552281751468645335.mbj@tail-f.com>
In-Reply-To: <20180425.085751.1552281751468645335.mbj@tail-f.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.20.0.170309
x-originating-ip: [66.129.241.14]
x-ms-publictraffictype: Email
x-microsoft-exchange-diagnostics: 1; BYAPR05MB4389; 7:unOCWESquyjbMFZdVauFa8BHrFRDOU4J3Qrpcvp6lfEiqgFLsOAEQ6+/2E7oC8IzDio1ggh0d364Z4mKAtybb9i/9RK7awZTHFCeA+YBCzBLE9nO8LLO9XpM/FCU/G2tGICSXPHnymG4s2V37KmKpnPgGMAJVRIx9qeBVWlzvHTWG2WgxBpSMtjNE+4lrUZ77phJ/rUQtWIjkV4XJc8UKbrSMHND3Xx2PtNyyVZSvVw9ojFdIQMLBoso5Tv2zZY5
x-ms-exchange-antispam-srfa-diagnostics: SOS;
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:BYAPR05MB4389;
x-ms-traffictypediagnostic: BYAPR05MB4389:
x-microsoft-antispam-prvs: <BYAPR05MB43894359D32EE9376D4AD597A5820@BYAPR05MB4389.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231254)(944501410)(52105095)(3002001)(10201501046)(93006095)(93001095)(6055026)(6041310)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:BYAPR05MB4389; BCL:0; PCL:0; RULEID:; SRVR:BYAPR05MB4389;
x-forefront-prvs: 0658BAF71F
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39380400002)(396003)(366004)(346002)(376002)(199004)(189003)(66066001)(476003)(446003)(99286004)(11346002)(2616005)(83716003)(105586002)(486006)(26005)(5660300001)(82746002)(102836004)(2900100001)(305945005)(76176011)(86362001)(7736002)(81156014)(81166006)(8936002)(478600001)(6506007)(8676002)(97736004)(25786009)(3660700001)(93886005)(6246003)(186003)(229853002)(6916009)(6486002)(3280700002)(53936002)(6436002)(36756003)(3846002)(106356001)(5250100002)(33656002)(2906002)(316002)(6116002)(14454004)(58126008)(6512007)(4326008)(68736007)(54906003); DIR:OUT; SFP:1102; SCL:1; SRVR:BYAPR05MB4389; H:BYAPR05MB4230.namprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
x-microsoft-antispam-message-info: frcovb/jdbIe0izugXaGpfNRWbOI4f7gDEdm6magdrtkxvjkJv5i1+JgEezjezHp8hb0QYBDVkKs1+rRHOIcZZF8d8BqSCW4vG3lvFM97GzgsgY9ulyyuTBCsbTu6W4/R63+I/TNQIoc5BnKz6sc3gocB/NXWkykzUYlgQ/D2p2mQhvyBDFp42MWGcaaYjUV
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: text/plain; charset="utf-8"
Content-ID: <4EADEB335671904F9686A10B66BA13B3@namprd05.prod.outlook.com>
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-MS-Office365-Filtering-Correlation-Id: 1b83b3ee-94a6-473f-8987-08d5aec09d6d
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-Network-Message-Id: 1b83b3ee-94a6-473f-8987-08d5aec09d6d
X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Apr 2018 17:34:24.0479 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB4389
X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-04-30_07:, , signatures=0
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=990 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804300168
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/fEHssZbugmMt6YR_GDQD5MKZCHg>
Subject: Re: [netmod] yang-data-ext issues
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: Mon, 30 Apr 2018 17:34:29 -0000


>Martin wrote before:
> No I was thinking along the lines of:
>
>  ydx:yang-data my-first-rpc-error-info {
>    ...
>  }
>
>  rpc my-first-rpc {
>    ...
>    opx:error-info-structure my-first-rpc-error-info;
>  }
>
> I.e., use yang-data to define a structure, and use another statement
> to tie them together.
>
> If we define special statements with inline structures, we probably
> also need special augment statements; with your example:
>
>
>  rpc my-first-rpc {
>    ...
>    opx:error-info-structure my-first-rpc-error-info {
>      ...
>    }
>  }
>
>
>  opx:augment-error-info-structure '/m:my-first-rpc'
>                                 + '/m:my-first-rpc-error-info {
>    ...
>  }
  


Can the definition be inlined, like this?

  module my-module {
    ...
    rpc my-first-rpc {
      input {
         ...
      }
      output {
         ...
      }
      opx:error-info-structure {
        leaf error-type {
          type enumeration {
            enum error-a;
            enum error-b;
            enum error-c;
          }
        }
        choice error-info {
          case error-a {
            ...
          }
          case error-b {
            ...
          }
          case error-c {
            ...
          }
        }     
      }
    }
  }



Kent // contributor