Subject: [netmod] empty deviation and deviate stmts

From: Andy Bierman <[email-masked]>
Date: Tue, 16 Dec 2008 10:39:30 -0800

Hi,

The ABNF for deviation-stmt may require empty curly braces,
since all its contents are optional.

Options:

   1) let deviation-stmt be empty with the usual semi-colon,
      even though it means nothing:

         deviation /does/nothing;

   2) add text that at least 1 clause must be entered;
      cannot easily represent this in the ABNF

         deviation /at/least/one {
           description | reference | deviate ...
         }

   3) require at least 1 deviate-stmt

      change *(deviate-stmt stmtsep) to 1*(deviate-stmt stmtsep)

         deviation /does/something {
           deviate replace { max-elements 42; }
         }

The same issue exists for the deviate-stmt, since all of its
contents are optional, and only some are even available,
based on the target object type.

I think the ABNF is supposed to support this, but it doesn't:

         deviation /leaf/too/hard {
           deviate not-supported;
         }

The must-stmt and unique-stmt deviations are confusing,
except for 'add'.  They do not have names, so 'delete'
and 'replace' make no sense.  Not-supported makes no
sense for any of the sub-clauses, and only the form above
seems relevant.

BTW, it is not clear whether the description and reference
are meant to replace to those clauses in the target, or if
they are meant for the deviation-stmt itself.

Andy

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

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 16 Dec 2008 23:33:13 +0100 (CET)

> since all its contents are optional.

[...]

> sense for any of the sub-clauses, and only the form above

I think I covered your issues in the new grammar I just sent in the
other thread.

> they are meant for the deviation-stmt itself.

They are meant for the deviation-stmt.   Otherwise they would have
been within a deviate add/replace.

/martin