[Netconf] restconf and namespaces and unique module names.

Kent Watsen <kwatsen@juniper.net> Tue, 22 September 2015 13:41 UTC

Return-Path: <kwatsen@juniper.net>
X-Original-To: netconf@ietfa.amsl.com
Delivered-To: netconf@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 970571A86F3 for <netconf@ietfa.amsl.com>; Tue, 22 Sep 2015 06:41:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham
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 IOGeppcVVdlO for <netconf@ietfa.amsl.com>; Tue, 22 Sep 2015 06:41:43 -0700 (PDT)
Received: from na01-bl2-obe.outbound.protection.outlook.com (mail-bl2on0145.outbound.protection.outlook.com [65.55.169.145]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C1A621A8700 for <netconf@ietf.org>; Tue, 22 Sep 2015 06:41:42 -0700 (PDT)
Received: from CO1PR05MB458.namprd05.prod.outlook.com (10.141.72.140) by DM2PR05MB669.namprd05.prod.outlook.com (10.141.176.12) with Microsoft SMTP Server (TLS) id 15.1.274.16; Tue, 22 Sep 2015 13:41:39 +0000
Received: from CO1PR05MB458.namprd05.prod.outlook.com ([169.254.16.107]) by CO1PR05MB458.namprd05.prod.outlook.com ([169.254.16.107]) with mapi id 15.01.0274.009; Tue, 22 Sep 2015 13:41:39 +0000
From: Kent Watsen <kwatsen@juniper.net>
To: "netconf@ietf.org" <netconf@ietf.org>
Thread-Topic: restconf and namespaces and unique module names.
Thread-Index: AQHQ9TxoC3oHOgnCzEuVQkVIMGQ2VQ==
Date: Tue, 22 Sep 2015 13:41:39 +0000
Message-ID: <D226D2D0.DFA24%kwatsen@juniper.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.4.4.140807
authentication-results: spf=none (sender IP is ) smtp.mailfrom=kwatsen@juniper.net;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [66.129.239.11]
x-microsoft-exchange-diagnostics: 1; DM2PR05MB669; 5:uFnE8lxuHTvWxnUqvR3jw2t2buDl3HHWEQRCJY+HSlhsC/LAiR09eyWSNt3tMPXrgNlL/DL3BUlXMa57Jzemhi/Xh8r0ukjWmGMEyy75kcLJfCMaHtHNGZDcaIbszrh+vRA/H5BaCuBHNRJtbrHyEg==; 24:3dP7FBmg0fLw/toASDUhiIhuBcoPuUKyhu+wtV9Ksz46B+WT4nrrJq5eqxSaA9vSPz7UdaXmIg6SG9NM8gTvHdVl5mAZMOlajBgoFXPfd80=; 20:X6QCvTu8F3BRCDQ1vzxgSc+2ZXzyQ68agtkR7h464FVKwvWjS1H+hkw06jz8e1sLqmdioqIGCCWwA0yzYNtgqA==
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DM2PR05MB669;
x-microsoft-antispam-prvs: <DM2PR05MB669B9167ECF2E559EE2A7C6A5450@DM2PR05MB669.namprd05.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(5005006)(8121501046)(3002001); SRVR:DM2PR05MB669; BCL:0; PCL:0; RULEID:; SRVR:DM2PR05MB669;
x-forefront-prvs: 0707248B64
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(54094003)(199003)(57704003)(189002)(164054003)(68736005)(15975445007)(40100003)(189998001)(46102003)(83506001)(102836002)(122556002)(10400500002)(92566002)(86362001)(110136002)(5001960100002)(107886002)(87936001)(106116001)(5004730100002)(19580395003)(106356001)(11100500001)(101416001)(36756003)(5002640100001)(105586002)(66066001)(2351001)(81156007)(229853001)(4001350100001)(99286002)(97736004)(4001540100001)(2900100001)(5001830100001)(64706001)(5001860100001)(16601075003)(2501003)(50986999)(62966003)(77156002)(54356999)(5007970100001)(450100001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR05MB669; H:CO1PR05MB458.namprd05.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: juniper.net does not designate permitted sender hosts)
Content-Type: text/plain; charset="us-ascii"
Content-ID: <27B560FC233374499B6FEEE921BF6A80@namprd05.prod.outlook.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: juniper.net
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Sep 2015 13:41:39.2416 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: bea78b3c-4cdb-4130-854a-1d193232e5f4
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR05MB669
Archived-At: <http://mailarchive.ietf.org/arch/msg/netconf/433v5uojXPOfZsQ1g4fDxgT-eiQ>
Subject: [Netconf] restconf and namespaces and unique module names.
X-BeenThere: netconf@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Network Configuration WG mailing 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: Tue, 22 Sep 2015 13:41:45 -0000

My issue is with RESTCONF, but the concern extends to YANG and JSON
encoding as well.

YANG's namespace statement is intended to make module names unique.
While IETF-defined modules tend to have a unique namespace per module (why
is that?), this is not required and I wonder if it will interfere with our
module-structure aspirations.

But back to my concern, RESTCONF's URL-encoding uses module names (not
namespace) as a prefix to uniquely identify the module and yet there is no
guarantee that the module names are unique.  For instance:

  module system {
    namespace "http://vendor-foo.com";
    leaf hostname {
      type string;
    }
  }


  module system {
    namespace "http://openconfig.net";  <--- using OC just to make a point
    leaf hostname {
      type string;
    }
  }



And then we have the RESTCONF call:

  GET https://<server>/data/system:hostname HTTP/1.1


So which module is used?  Is this an error condition?  - do we need a
statement that no two modules can have the same name?  Should we use YANG
library to provide an alternate module-name (e.g., system-1) for when
collisions occur?


Thanks,
Kent