Subject: Re: [netmod] syslog-model-03: list of syslog-selectors vs grouping used in-line

From: "Clyde Wildes (cwildes)" <[email-masked]>
Date: Thu, 9 Apr 2015 19:48:39 +0000

Jason,

I passed your proposal by one of my YANG doctor friends and I have added his response inline below…

From: <Sterne>, "Jason (Jason)"
Date: Thursday, March 26, 2015 at 5:26 PM
To: "[email-masked]<mailto:[email-masked]>"
Subject: [netmod] syslog-model-03: list of syslog-selectors vs grouping used in-line

Hi all,

The current model uses the syslog-selector 'in-line' inside each distributor/action object. Some implementations have a list of selector policies and then the distributors/actions reference a selector policy. It would be good if the model can somehow accommodate the latter. Here is a proposal:

Rename the grouping syslog-selector grouping to syslog-selector-parms.

Create a new grouping on top of the current syslog-selector:
    grouping syslog-selector {
        choice profile-or-inline {
            case inline {
                uses syslog-selector-parms;
            }
            case profile {
                ...leafref to a syslog-selector-profile...
            }
        }
    }

Add a syslog selector list:
    list syslog-selector-profile {
        key "syslog-sel-id";
        leaf syslog-sel-id {type uint16;}
        uses syslog-selector-parms;
    }

Having a list of syslog selectors is also nice for augmentations. You can't directly augment a grouping in YANG - you must augment an instance of where the grouping is used. When the grouping is inline in each syslog distributor/action you'd have to augment in each of those places to add something to the selector logic.

"With a choice like that, the *operator* can choose if he wants to use profile or inline style. Conforming *implementations* would have to implement both. I don’t think that was the intent. If Jason wants to allow some implementations to support additional functionality, if-feature is the statement to use. There probably is no really nice way to express what Jason is looking for with an if-feature without making deeper modifications to the model. (why would you want a *number* as profile id?)".

I believe that this would work but it makes the model more complicated. Create a new grouping on top of the current syslog-selector as above but always require a syslog-selector-profile:

    grouping syslog-selector {
      ...leafref to a syslog-selector-profile...
    }

    list syslog-selector-profile {
        key "syslog-sel-id";
        leaf syslog-sel-id {type string;}
        uses syslog-selector-parms;
    }

Please comment.

Thanks,

Clyde

Regards,
Jason