Subject: [netmod] identityref with multiple base statements

From: Joey Boyd <[email-masked]>
Date: Wed, 29 Jul 2020 18:22:02 +0000

Hi,

I am looking for some clarification regarding RFC 7950 section 9.10.2, specifically this statement.

Valid values for an identityref are any identities derived from all the identityref's base identities.

Example:

identity base-1 {
  description
    "Base identity #1.";
}

identity base-2 {
  description
    "Base identity #2.";
}

identity a {
  base base-1;
  description
    "Identity A.";
}

identity b {
  base base-1;
  base base-2;
  description
    "Identity B.";
}

identity c {
  base base-2;
  description
    "Identity C.";
}

leaf reference {
  type identityref {
    base base-1;
    base base-2;
  }
  description
    "Reference to an identity.";
}

The question is how to determine the value space for this identityref.

Option #1:
The value space is any identity which is derived from both base identities. This means the only valid value in the example would be 'b'.

Option #2:
The value space is any identity which is derived from either base identity. This means the valid values are 'a', 'b' and 'c'.

The phrasing "...derived from all the identityref's base identities." tends to point to Option #1 but I would like clarification on the intent.

Best regards,
Joey