Subject: [netmod] I suggest add 'abstract' statement as 'identity''s sub statement

From: "fengchong (C)" <[email-masked]>
Date: Mon, 19 Oct 2015 03:13:06 +0000

Hi all,

    I notice an identity named 'interface-type' was defined in RFC 7223 (
A YANG Data Model for Interface Management). This identity is an abstract identity, vendors can define their real
Identity based it. But it's lack of a means to identify this identity 'interface-type' is abstract, so 'interface-type' can be accepted as
valid value of the leaf based this identity.
   So I suggest add 'abstract' statement as 'identity's sub statement in YANG1.1. This statement is optional, default value is false.
If abstract identity is defined, 'abstract true' MUST be defined, and this identity's name cannot be accepted as valid value of the leaf
based this identity .
For example:

     identity interface-type {

       abstract true;

       description

         "Base identity from which specific interface types are

          derived.";

     }

---

From: Xiang Li <[email-masked]>
Date: Sun, 18 Oct 2015 22:27:21 -0500

On 10/18/2015 10:13 PM, fengchong (C) wrote:
>
> Hi all,
>
>     I notice an identity named ‘interface-type’ was defined in RFC 7223 (**
>
> *A YANG Data Model for Interface Management*). This identity is an 
> abstract identity, vendors can define their real
>
> Identity based it. But it’s lack of a means to identify this identity 
> ‘interface-type’ is abstract, so ‘interface-type’ can be accepted as
>

You can use the fact this identity does not have a "base":

rfc6030: 7.16.2

If no "base" statement is present, the identity is defined from scratch.

However note an identity can also be defined based on another "derived" 
identity,
not just the identity defined from scratch!

-Xiang Li

---

From: "fengchong (C)" <[email-masked]>
Date: Mon, 19 Oct 2015 03:32:54 +0000

Do you mean an identity with no ‘base’ is abstract identity?

It’s not defined in RFC 6020. In some cases, an identity without ‘base’ might make sense.

发件人: netmod [mailto:[email-masked]] 代表 Xiang Li
发送时间: 2015年10月19日 11:27
收件人: [email-masked]
主题: Re: [netmod] I suggest add 'abstract' statement as 'identity''s sub statement

    I notice an identity named ‘interface-type’ was defined in RFC 7223 (
A YANG Data Model for Interface Management). This identity is an abstract identity, vendors can define their real
Identity based it. But it’s lack of a means to identify this identity ‘interface-type’ is abstract, so ‘interface-type’ can be accepted as
valid value of the leaf based this identity.

rfc6030: 7.16.2

However note an identity can also be defined based on another "derived" identity,
not just the identity defined from scratch!

-Xiang Li

---

From: Xiang Li <[email-masked]>
Date: Sun, 18 Oct 2015 22:37:24 -0500

> Do you mean an identity with no ‘base’ is abstract identity?

Not exactly. Note any identity is said to be defined as "abstract", 
"unique", and "untyped". See rfc6020 7.16:

      7.16 <https://tools.ietf.org/html/rfc6020#section-7.16>. The
      identity Statement

    The "identity" statement is used to define a new globally unique,
    abstract, and untyped identity.  Its only purpose is to denote its
    name, semantics, and existence.  An identity can either be defined
    from scratch or derived from a base identity.

> It’s not defined in RFC 6020. In some cases, an identity without 

RFC6020 does define this.

        7.16.2 <https://tools.ietf.org/html/rfc6020#section-7.16.2>. The
        base Statement

    The "base" statement, which is optional, takes as an argument a
    string that is the name of an existing identity, from which the new
    identity is derived.  If no "base" statement is present, the identity
    is defined from scratch.

-Xiang Li

> *发件人:*netmod [mailto:[email-masked]] *代表 *Xiang Li
> *发送时间:*2015年10月19日11:27
> *收件人:[email-masked]
> *主题:*Re: [netmod] I suggest add 'abstract' statement as 'identity''s 
> sub statement
>
>         I notice an identity named ‘interface-type’was defined in RFC 7223 (
>
>     Identity based it. But it’s lack of a means to identify this
>     identity ‘interface-type’ is abstract, so ‘interface-type’ can be
>     accepted as
>

---

From: "fengchong (C)" <[email-masked]>
Date: Mon, 19 Oct 2015 05:40:25 +0000

No.  The ‘abstract’ defined in RFC6020 is not the same meaning with my ‘abstract’.

My abstract identity means its name is not a valid value of the leaf based this identity.

发件人: Xiang Li [mailto:[email-masked]]
发送时间: 2015年10月19日 11:37
收件人: fengchong (C); [email-masked]
主题: Re: 答复: [netmod] I suggest add 'abstract' statement as 'identity''s sub statement

Not exactly. Note any identity is said to be defined as "abstract", "unique", and "untyped". See rfc6020 7.16:

7.16<https://tools.ietf.org/html/rfc6020#section-7.16>.  The identity Statement

<https://tools.ietf.org/html/rfc6020#section-7.16.2>
7.16.2<https://tools.ietf.org/html/rfc6020#section-7.16.2>.  The base Statement

   is defined from scratch.

-Xiang Li

发件人: netmod [mailto:[email-masked]] 代表 Xiang Li
发送时间: 2015年10月19日 11:27
收件人: [email-masked]<mailto:[email-masked]>
主题: Re: [netmod] I suggest add 'abstract' statement as 'identity''s sub statement

rfc6030: 7.16.2

-Xiang Li

---

From: Ladislav Lhotka <[email-masked]>
Date: Mon, 19 Oct 2015 13:13:31 +0200

"fengchong (C)" <[email-masked]> writes:

> Hi all,
>
>     I notice an identity named 'interface-type' was defined in RFC
> 7223 ( A YANG Data Model for Interface Management). This identity is
> an abstract identity, vendors can define their real Identity based
> it. But it's lack of a means to identify this identity
> 'interface-type' is abstract, so 'interface-type' can be accepted as

In fact, the identity that's specified as "base" in an "identityref"
type is NOT a valid value, so the base identity is abstract.

This wasn't clear in the original RFC 6020 so it was clarified in this erratum:

https://www.rfc-editor.org/errata_search.php?rfc=6020&eid=3470

Section 7.18.2 in draft-ietf-netmod-rfc6020bis-07 has this text:

   The derivation of identities has the following properties:

   o  It is irreflexive, which means that an identity is not derived
      from itself.

   …

In XPath expressions, it is possible to treat an identity as being
abstract or not by using either derived-from() or derived-from-or-self()
function.

Lada

> _______________________________________________
> netmod mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netmod

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C