Re: [yang-doctors] Defaults and abstract types

Andy Bierman <andy@yumaworks.com> Mon, 07 May 2018 22:22 UTC

Return-Path: <andy@yumaworks.com>
X-Original-To: yang-doctors@ietfa.amsl.com
Delivered-To: yang-doctors@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A2961126C19 for <yang-doctors@ietfa.amsl.com>; Mon, 7 May 2018 15:22:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Level:
X-Spam-Status: No, score=-1.91 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, SPF_PASS=-0.001, T_DKIMWL_WL_MED=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=yumaworks-com.20150623.gappssmtp.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 A6vhekV_q8Pf for <yang-doctors@ietfa.amsl.com>; Mon, 7 May 2018 15:22:13 -0700 (PDT)
Received: from mail-lf0-x231.google.com (mail-lf0-x231.google.com [IPv6:2a00:1450:4010:c07::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 67038124239 for <yang-doctors@ietf.org>; Mon, 7 May 2018 15:22:13 -0700 (PDT)
Received: by mail-lf0-x231.google.com with SMTP id t129-v6so3615516lff.3 for <yang-doctors@ietf.org>; Mon, 07 May 2018 15:22:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yumaworks-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Gv95cFWenlh/YpBn8RZMHFtFEOkKJoGfOu7NJbNFEco=; b=u5N8QzhOs07mMw+bvlsAy7rMEYkzqmCsyui5nPGA2aO1J+Vq3xRbHlhKCS/ZHIciUC 7ZH6SW706bxtlj2xobndxowYjtKWLXc4fVfujbEy0yvTgfSk90RkuaaCrVZyYzxrSX4d DQMEKiLl8UregXI5D10xskqzT8pr2gCDeyOMgvJyStOqzTQUfpjla5II+gVLm8AxGRpv fqjkkiT9ZV8/8pv2Y86sZT+VV6U+MIYM9RCyFclflSmQNkrAUhczP1mz8vem7X3eFFIf S/x4oZxaCBuysuBW/LP3tMfmXYgt0gPzsn56WOm+IV7pjU0g3zqqIpyHibDLcHcs+gqH DN8w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Gv95cFWenlh/YpBn8RZMHFtFEOkKJoGfOu7NJbNFEco=; b=nXcMG+7wMNzg/qY2ThQUEznPRl/I03BccOqr94ab3XELo3u0XdDRcRe8EkDLRQ7o/a X0uXMX9vhZdtzbRG0BvADL8ShvQBFKg0qjJEBRFmtCA75tXKtnaNse6+07CEh/15h8UA X5vCzSFtvs2m/5x9kFb7t463XYMP6AeDo2NK3HztBdLSNhNHbH0LHQvtUa8xohCmyYwr LN7e3T5XeUF+jkKLTXCbgN+f5ybDXftEOusVP4wQqPulXV4kqumKTqsix3dugkfQZ3HH jo9dRogOZ2kr/QK7pJ/iza3xwawoit6a4kRqFQllKZWN4QriiNBjFPm2//4QEZPdQlFV BPLg==
X-Gm-Message-State: ALQs6tARwiyjFyz8J10SNzO9RBy9RdURd0kvEq91R3f546hiGion4CCu 4zUCGfoHef0AYEct0oUilIciYkHMgKxc4+vdXA002w==
X-Google-Smtp-Source: AB8JxZremM0f2FYvjtDQZkg4EMNsQ92VfgbejRqX6N34fbN8ZpsKWcDROg8XovsxnnBA+S/JA2qKM9HdtXByUhGiqLU=
X-Received: by 2002:a2e:97d6:: with SMTP id m22-v6mr27014118ljj.102.1525731731657; Mon, 07 May 2018 15:22:11 -0700 (PDT)
MIME-Version: 1.0
Received: by 2002:a19:d8c6:0:0:0:0:0 with HTTP; Mon, 7 May 2018 15:22:10 -0700 (PDT)
In-Reply-To: <3DD3D6B4-E440-4FD0-97BA-B2151D7F4CAB@cisco.com>
References: <3DD3D6B4-E440-4FD0-97BA-B2151D7F4CAB@cisco.com>
From: Andy Bierman <andy@yumaworks.com>
Date: Mon, 07 May 2018 15:22:10 -0700
Message-ID: <CABCOCHQ8ZjaGNP7eCS6=uFD+TYRB_LsVA=TYy0DdaAvo+z+G9g@mail.gmail.com>
To: "Acee Lindem (acee)" <acee@cisco.com>
Cc: YANG Doctors <yang-doctors@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000e38a10056ba51991"
Archived-At: <https://mailarchive.ietf.org/arch/msg/yang-doctors/3UG5VWaMox84ViQeYWDS47opSRo>
Subject: Re: [yang-doctors] Defaults and abstract types
X-BeenThere: yang-doctors@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Email list of the yang-doctors directorate <yang-doctors.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/yang-doctors/>
List-Post: <mailto:yang-doctors@ietf.org>
List-Help: <mailto:yang-doctors-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/yang-doctors>, <mailto:yang-doctors-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 07 May 2018 22:22:16 -0000

On Mon, May 7, 2018 at 3:02 PM, Acee Lindem (acee) <acee@cisco.com> wrote:

> Surgeons of Schema,
>
>
>
> Is it possible to have default a “type empty” leaf to default to full? If
> so, how is it specified?
>
>
>


no. There is no "full" value.
There is only present or not present.
You have to use boolean if you want a default for this purpose.


Similarly, is it possible to default a “presence” container as present?
> Again, if so, how is it specified?
>
>
>


no -- the point of the P-con is that the client must provide a value.



> Thanks,
>
> Acee
>


Andy


>
> _______________________________________________
> yang-doctors mailing list
> yang-doctors@ietf.org
> https://www.ietf.org/mailman/listinfo/yang-doctors
>
>