Subject: [netmod] mib to yang conversion: 2 more issues

From: David Reid <[email-masked]>
Date: Mon, 10 Oct 2011 17:26:30 -0400

Here are a couple more issues with the mib to yang conversion and proposed
solutions.

Problem:
If a table index is accessible-for-notify, it is not translated to yang.
For example, in MIP-MIB (RFC 2006), the object mipSecViolatorAddress is 
a table index and has a MAX-ACCESS of accessible-for-notify. According 
to the current conversion rules (section 8.1), mipSecViolatorAddress 
will be dropped. But since it is a table index, it must be preserved.

Proposed Solution: 
Add the following sentence as the second sentence in section 1.8: 
Additionally, columnar objects with a MAX-ACCESS of accessible-for-notify 
are translated to YANG leaf statements if that columnar object is part of 
the INDEX clause of the table containing that columnar object.

Problem:
RMON2-MIB (RFC 4502) has an INDEX clause in which the same object appears
twice. Specifically, alHostEntry's INDEX clause uses protocolDirLocalIndex
twice. Following the current conversion rules results in a translated
document that violates the YANG rule that a leaf identifier MUST NOT appear 
more than once in the key.

Proposed Solution:
Section 8.3 in the last bullet point on page 15, add a sentence somthing
like this: If the same object appears more than once in the INDEX
clause, append -<n> to the second and subsequent duplicate object names 
where <n> is a number representing the number of times that object has
appeared up to this point in the INDEX clause. [not sure I stated that
clearly. I'm trying to say that the key statement for alHostEntry should be
key "hlHostControlIndex alHostTimeMark protocolDirLocalIndex nlHostAddress protocolDirLocalIndex-2";]

-David Reid