Subject: [netmod] conformance & features in netconf <hello>

From: "Sterne, Jason (Jason)" <[email-masked]>
Date: Mon, 22 Sep 2014 17:49:49 +0000

The discussion about Y16 triggered another question that I've never been clear on.

In theory when a server advertises a <capability> in the <hello> it is supposed to include a list of features in the hello.   From section 5.6.4 of RFC 6020:
      feature-parameter   = "features=" feature *( "," feature )

NETCONF itself seems to be somewhat of an exception.   RFC 6241 has module ietf-netconf that is advertised in a hello like this:
       <capability>
         urn:ietf:params:netconf:base:1.1
       </capability>

But the RFC says that to advertise, for example, support for the startup datastore a server is supposed to advertise another capability (urn:ietf:params:netconf:capability:startup:1.0).    But the yang module has 'startup' as a feature so doesn't that simply mean advertising the following ?
       <capability>
         urn:ietf:params:netconf:base:1.1?features=startup
       </capability>

Are we supposed to do both ?   Maybe this is just for historical reasons (YANG came after NETCONF)...

Regards,
Jason

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Mon, 22 Sep 2014 20:19:33 +0200

> Are we supposed to do both ?   Maybe this is just for historical reasons (YANG came after NETCONF)...

Yes, historical reasons.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1, 28759 Bremen, Germany
Fax:   +49 421 200 3103         <http://www.jacobs-university.de/>

---

From: "Sterne, Jason (Jason)" <[email-masked]>
Date: Mon, 22 Sep 2014 19:20:51 +0000

Thx.

I just noticed that the namespace defined in the RFC 6241 ietf-netconf module is base:1.0.   I didn't expect that.   I'm a little puzzled as to the advertisement that should be made in the hello in an example where a server supports both 1.0 and 1.1 and both validate:1.0 and 1.1 for example.   Is the following correct ?

In theory there is no module called ietf-netconf with a namespace base:1.1 so it looks somewhat strange to have that combination and a revision and features listed against it.

<capability>
urn:ietf:params:netconf:base:1.0?module=ietf-netconf&amp;revision=2011-06-01&amp;features=writable-running,validate
</capability>
<capability>
urn:ietf:params:netconf:base:1.1?module=ietf-netconf&amp;revision=2011-06-01&amp;features=writable-running,validate
</capability>
<capability>
urn:ietf:params:netconf:capability:validate:1.1
</capability>
<capability>
urn:ietf:params:netconf:capability:validate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:startup:1.0
</capability>

Jason

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Monday, September 22, 2014 2:20 PM
To: Sterne, Jason (Jason)
Cc: [email-masked]
Subject: Re: [netmod] conformance & features in netconf <hello>

Yes, historical reasons.

/js

---

From: "Sterne, Jason (Jason)" <[email-masked]>
Date: Mon, 22 Sep 2014 19:24:55 +0000

I meant 'writeable-running' in that last capability instead of 'startup'.

-----Original Message-----
From: netmod [mailto:[email-masked]] On Behalf Of Sterne, Jason (Jason)
Sent: Monday, September 22, 2014 3:21 PM
To: Juergen Schoenwaelder
Cc: [email-masked]
Subject: Re: [netmod] conformance & features in netconf <hello>

Thx.

<capability>

Jason

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Monday, September 22, 2014 2:20 PM
To: Sterne, Jason (Jason)
Cc: [email-masked]
Subject: Re: [netmod] conformance & features in netconf <hello>

Yes, historical reasons.

/js

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

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Mon, 22 Sep 2014 22:21:54 +0200

Do not confuse protcol capabilities, data model announcements and
namespaces. Since the namespace is parsed before any protocol
capabilities, it turns out we will never change the base:1.0 in the
namespace. Hence, for protocol version negotiation, the announced
protocol capability matters.

/js

---

From: "Sterne, Jason (Jason)" <[email-masked]>
Date: Mon, 22 Sep 2014 20:48:10 +0000

Hi Juergen,

Yep - I am mixing those together but they seem mixed in the RFCs (at least for base:1.0). 

RFC 6020 says supported yang modules (which I'm assuming includes ietf-netconf) are supposed to have their namespace listed in a <capabililty> in the <hello>, along with 'features=', revision=', etc.   

At the same time RFC 6241 says to list base:1.x as <capability> entries.   

But the base:1.0 URN (used to indicate a protocol version) is the same URN as the ietf-netconf namespace (used to indicate a data model).

Sorry if I'm being dense here.   Maybe if you could let me know how the hello in my example should look (if I have it wrong) I'll understand what you mean.   Should I be completely separating the protocol version capabilities from the ietf-netconf module support like this ?  (strange to have the base:1.0 URN listed twice though):

<capability>
urn:ietf:params:netconf:base:1.0     
</capability>
<capability>
urn:ietf:params:netconf:base:1.1
</capability>
<capability>
urn:ietf:params:netconf:capability:validate:1.1
</capability>
<capability>
urn:ietf:params:netconf:capability:validate:1.0
</capability>
<capability>
urn:ietf:params:netconf:capability:writable-running:1.0
</capability>
<capability>
urn:ietf:params:netconf:base:1.0?module=ietf-netconf&amp;revision=2011-06-01&amp;features=writable-running,validate
</capability>

Regards,
Jason

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Monday, September 22, 2014 4:22 PM
To: Sterne, Jason (Jason)
Cc: [email-masked]
Subject: Re: [netmod] conformance & features in netconf <hello>

Do not confuse protcol capabilities, data model announcements and namespaces. Since the namespace is parsed before any protocol capabilities, it turns out we will never change the base:1.0 in the namespace. Hence, for protocol version negotiation, the announced protocol capability matters.

/js

On Mon, Sep 22, 2014 at 07:20:51PM +0000, Sterne, Jason (Jason) wrote:
> urn:ietf:params:netconf:base:1.0?module=ietf-netconf&amp;revision=2011
> -06-01&amp;features=writable-running,validate
> </capability>
> <capability>
> urn:ietf:params:netconf:base:1.1?module=ietf-netconf&amp;revision=2011
> -06-01&amp;features=writable-running,validate
> </capability>
> <capability>
> From: Juergen Schoenwaelder 
> [mailto:[email-masked]]

---

From: Juergen Schoenwaelder <[email-masked]>
Date: Tue, 23 Sep 2014 09:00:33 +0200

On Mon, Sep 22, 2014 at 08:48:10PM +0000, Sterne, Jason (Jason) wrote:
> 
> Sorry if I'm being dense here.  Maybe if you could let me know how
> the hello in my example should look (if I have it wrong) I'll
> understand what you mean.  Should I be completely separating the
> protocol version capabilities from the ietf-netconf module support
> like this ?  (strange to have the base:1.0 URN listed twice though):
> 
> <capability>urn:ietf:params:netconf:base:1.0</capability>
> <capability>urn:ietf:params:netconf:base:1.1</capability>
> <capability>urn:ietf:params:netconf:capability:validate:1.1</capability>
> <capability>urn:ietf:params:netconf:capability:validate:1.0</capability>
> <capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability>
> <capability>urn:ietf:params:netconf:base:1.0?module=ietf-netconf&amp;revision=2011-06-01&amp;features=writable-running,validate</capability>
> 

I think the last should use "urn:ietf:params:xml:ns:netconf:base:1.0"
instead of "urn:ietf:params:netconf:base:1.0" since this is the value
of the namespace statement in ietf-netconf.yang.

Note that NETCONF was designed before there was YANG and NETCONF even
today in principle may be used with other data modeling languages.
Note that the last capability line above is a YANG module announcement
and defined in RFC 6020. So plain NETCONF would not have it. Yes, this
will likely be not relevant in many implementations but there are
reasons why we ended up with this (mainly NETCONF simply predates
YANG).

/js

---

From: "Sterne, Jason (Jason)" <[email-masked]>
Date: Tue, 23 Sep 2014 12:59:04 +0000

Thanks Juergen.  That is clear now.  I had not noticed the difference in the middle of the urns for the ietf-netconf yang module namespace vs the netconf protocol capability.   I thought they were the same and that was causing my confusion about what to advertise.   I agree that the last should use urn:ietf:params:xml:ns:netconf:base:1.0.

Regards,
Jason

-----Original Message-----
From: Juergen Schoenwaelder [mailto:[email-masked]] 
Sent: Tuesday, September 23, 2014 3:01 AM
To: Sterne, Jason (Jason)
Cc: [email-masked]
Subject: Re: [netmod] conformance & features in netconf <hello>

On Mon, Sep 22, 2014 at 08:48:10PM +0000, Sterne, Jason (Jason) wrote:
> 
> Sorry if I'm being dense here.  Maybe if you could let me know how the 
> hello in my example should look (if I have it wrong) I'll understand 
> what you mean.  Should I be completely separating the protocol version 
> capabilities from the ietf-netconf module support like this ?  
> (strange to have the base:1.0 URN listed twice though):
> 
> <capability>urn:ietf:params:netconf:base:1.0?module=ietf-netconf&amp;r
> evision=2011-06-01&amp;features=writable-running,validate</capability>
> 

I think the last should use "urn:ietf:params:xml:ns:netconf:base:1.0"
instead of "urn:ietf:params:netconf:base:1.0" since this is the value of the namespace statement in ietf-netconf.yang.

Note that NETCONF was designed before there was YANG and NETCONF even today in principle may be used with other data modeling languages.
Note that the last capability line above is a YANG module announcement and defined in RFC 6020. So plain NETCONF would not have it. Yes, this will likely be not relevant in many implementations but there are reasons why we ended up with this (mainly NETCONF simply predates YANG).

/js