Subject: Re: [netmod] yang-00, ordered-by statement

From: Martin Bjorklund <[email-masked]>
Date: Mon, 02 Jun 2008 10:59:11 +0200 (CEST)

Hi,

Andy Bierman <[email-masked]> wrote:
> What does 'ordered-by user;' mean for read-only data or
> RPC input or notification content?

I think this is similar to the discussion about what 'mandatory' means
in these contexts, and we must make sure we address this.  ordered-by
user means that the order carries information, and I think it makes
sense also for read-only data.

/martin

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

---

From: Andy Bierman <[email-masked]>
Date: Mon, 02 Jun 2008 07:37:08 -0700

> sense also for read-only data.

I don't see how the manager can ever specify the order for
read-only data.  My code is going to reject any <edit-config>
operation (other than 'none' implied by default-operation)
on read-only data.  Are you suggesting the 'key' and 'insert'
attributes would be used in a <get> operation somehow?

IMO, data presentation order is a manager station problem.
The agent should not be burdened with sortable read-only tables.
User ordering exists because it makes sense for some configuration
data, like the DNS example in the draft.

> /martin

Andy

---

From: Andy Bierman <[email-masked]>
Date: Mon, 02 Jun 2008 10:00:14 -0700

Martin Bjorklund wrote:
>....
> in these contexts, and we must make sure we address this.  

IMO, the real issue here is reuse of groupings, because that
is where this sort of 'no-op' statement really shows up.

Should 'uses' be a special case, where the 'no-op' statements
are ignored as the grouping contents replace the uses node
within a notification or RPC i/o?  (Current implementations do this)

The other real issue here is 'leafref' and 'noderef'.
Should notifications (and RPC i/o) use some sort of pointer
mechanism instead of including data that is intended for
the configuration database?  This could mean a lot of
cut-and-paste, which would be bad.  The upside is that
it is better to be precise about the data definitions.
Something more constrained than 'anyxml' which means
"this node is a read-only copy of that container or list
over there".

 >...

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 03 Jun 2008 09:34:34 +0200 (CEST)

Hi,

> attributes would be used in a <get> operation somehow?

No, I'm suggesting that the concept of an order with semantic meaning
might be useful also for read-only data.  However, 'ordered-by user'
is a bad description for this.

/martin

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 03 Jun 2008 09:49:09 +0200 (CEST)

> within a notification or RPC i/o?  (Current implementations do this)

I think 'uses' will have to do this, otherwise we will see N versions
of each grouping, each version differing in the combination of
'config', 'ordered-by', 'mandatory' statements:

   grouping address {
     leaf ip { 
       mandatory true;
     }
     leaf port;
   }

   grouping address-no-mandatory {
     leaf ip;
     leaf port;
   }

This is clearly not optimal.

But the question is if these statements are ignored only in 'uses',
but errors if they are specified inline? 

  container foo {
     config false;
     leaf bar {
        mandatory true; // error or not?
     }

I think that the spec can say that these statements are ignored, and
let the tools give warnings to the user if they want to.

> "this node is a read-only copy of that container or list

If you just want a ref, you can always use an instance-identifier.
But if you want to include the data in the notification, you currently
have to do some copy-and-paste in the data model.  Is this something
we should try to find a solution for?

/martin