netmod-wg / yang-next

Feature requests for future versions of YANG
6 stars 0 forks source link

Changing an identity base #122

Open italobusi opened 1 year ago

italobusi commented 1 year ago

Since, as explained in section 7.18.2 of RFC7950, the derivation of identities is transitive, replacing a "base" statement with new "base" statement which is derived from the previous one is also a BC change.

See Netmod WG discussion thread: https://mailarchive.ietf.org/arch/msg/netmod/weIxTUX4bDmWMpVNxcZJkgOYjaY/

abierman commented 1 week ago

Not sure if any text needs clarification. Adding another base to an identity is a BC change.

Maybe this is related to some issues in #107

base-stmt

Close

italobusi commented 1 week ago

There is more explanation in the referenced mail thread on Netmod WG mailing list

The issue is that NEW (A) is BC according to RFC7950 rules, while NEW (B), which is equivalent to NEW (A), seems not BC according to RFC7950:

OLD

identity foo {}

identity bar {
  base foo;
}

NEW (A)

identity foo {}

identity baz {
  base foo
}

identity bar {
  base foo;
  base baz;
}

NEW (B)

identity foo {}

identity baz {
  base foo
}

identity bar {
  base baz;
}

I think the issue is different from #107

abierman commented 1 week ago

You are right.

The extremely picky update rules do not mention replacing the base.

   o  A "base" statement may be added to an "identity" statement.

   o  A "base" statement may be removed from an "identityref" type,
      provided there is at least one "base" statement left.

The problem is that identities are used differently in different places