[netmod] implemented vs imported modules - checking XPath expressions

Radek Krejčí <rkrejci@cesnet.cz> Tue, 08 November 2016 12:51 UTC

Return-Path: <rkrejci@cesnet.cz>
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 0D1C7129ABD for <netmod@ietfa.amsl.com>; Tue, 8 Nov 2016 04:51:55 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.497
X-Spam-Level:
X-Spam-Status: No, score=-3.497 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RP_MATCHES_RCVD=-1.497] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=cesnet.cz
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 8dbfMEWPYzab for <netmod@ietfa.amsl.com>; Tue, 8 Nov 2016 04:51:53 -0800 (PST)
Received: from office2.cesnet.cz (office2.cesnet.cz [IPv6:2001:718:1:101::144:244]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 256571295A4 for <netmod@ietf.org>; Tue, 8 Nov 2016 04:51:52 -0800 (PST)
Received: from [147.229.180.182] (dhcpe182.fit.vutbr.cz [147.229.180.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by office2.cesnet.cz (Postfix) with ESMTPSA id 05283200C9 for <netmod@ietf.org>; Tue, 8 Nov 2016 13:51:49 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cesnet.cz; s=office2; t=1478609510; bh=AmUJ4QpqDBGwG9xVSUB9K0wLnPSlQqVSidC8XqFyhPk=; h=From:To:Subject:Date; b=XG2y3YWQwDIKz0mir0RWRl7gEKNHeeBbO6k+uKIvi/s9aCgHSqx6CQNq3HRXPO0/o xqM8+/PUDRZL02kRfmJoFeXiNZyLikxBEit4ckEeRGFWJt2InqvJIDk8xEsCF4YBoZ vIqvVBoLUr/A3i2vyuvUFibc+UN+zOxUvWaEI0dU=
From: Radek Krejčí <rkrejci@cesnet.cz>
X-Enigmail-Draft-Status: N1110
Organization: CESNET, z.s.p.o.
To: netmod@ietf.org
Message-ID: <cd6d25f1-81aa-3c4b-216e-90d66c1b27c3@cesnet.cz>
Date: Tue, 08 Nov 2016 13:51:46 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-2"
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/netmod/9cNzYtDncee_tPpwFc227kWodEM>
Subject: [netmod] implemented vs imported modules - checking XPath expressions
X-BeenThere: netmod@ietf.org
X-Mailman-Version: 2.1.17
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: Tue, 08 Nov 2016 12:51:55 -0000

Hi,
I have the following 3 modules and only the module c is initially
implemented. Because the module a is targeted in c's augment, a must be
also implemented. Since the b is not targeted in any augment nor
leafref, it need not be implemented.

In such a case (a, c are implemented; b is imported), is the module c
valid? It refers leaf b in the must expression, but the target leaf does
not exists (module b is not implemented, so it does not augments data in
module a). Is there any way how the module c could specify that the
imported module b must be also implemented?

module a {
  ...
  container a {
    leaf a {
      type string;
    }
  }
}

module b {
  ...
  import a {
    prefix a;
  }

  augment /a:a {
    leaf b {
      type string;
    }
  }
}

module c {
  ...
  import a {
    prefix a;
  }
  import b {
    prefix b;
  }

  augment /a:a {
    leaf c {
      type string;
      must "/a:a/b:b";
    }
  }
}

Regards,
Radek Krejci