Hi Jing,
you are right, this is confusing. I believe that the best answer you
can get in IETF NETCONF WG mailing list or directly from the RFC
authors :)
AFAIK, originally (in RFC 4741) the RPC (<rpc>) and Operations
(<edit-config>) level were both described using XML Schema,
because in that time there was no YANG language. Then the YANG came
to be used to write configuration data models. However, as part of
the YANG data models, you can define also new NETCONF operations
(e.g. <get-schema> in RFC 6022), so the WG (or RFC 6241
authors) decided to rewrite also NETCONF basic operations definition
into a form of a YANG data model. But the YANG has a limitation -
you are not able to define XML attributes. It is not important in
case of the configuration data, but in case of <edit-config>,
NETCONF uses "operation" attribute to distinguish what to do with
the given configuration data (as you mentioned in 2.). So the
definition of this attribute was kept together with the RPC level
definition in XML Schema.
Answer to you first question is generaly "yes", but I'm not sure
about the direct support of XML Schema defined data models in today
NETCONF tools (at least libnetconf and Netopeer doesn't support it,
they require data models in YIN format). However, you can use pyang
to convert your data model into various formats (hypertree, dsdl,
depend, xmi, yin, tree, jtox, capability, yang, xsd, uml, jstree,
jsonxsl).
I hope this will help you :)
Best regards,
Radek
Dne 28.7.2014 10:44, Jing Zhao
napsal(a):