[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: schema discovery



Hi Martin ,

I spoke to Mark after the meeting asking a similar thing.
We need a directory listing of all schemas the box has, plus, we need a
way
to get a specific schema out of the box if the box has the schema
definition.
Should we allow the get of multiple schemas at the same time ?
Why isn't the namespace of the schema definition of the module we are
interested 
sufficient ? I would have thought the namespace would have been globally
unique enough.

James.

> -----Original Message-----
> From: owner-netconf@ops.ietf.org 
> [mailto:owner-netconf@ops.ietf.org] On Behalf Of Martin Bjorklund
> Sent: Tuesday, 11 December 2007 4:52 AM
> To: netconf@ops.ietf.org
> Subject: schema discovery
> 
> Hi,
> 
> I prefer the <get> based approach for schema discovery.  But I would
> also like to see a mechanism to retrieve the actual schema over
> NETCONF.  The data model below supports those two concepts.  It is
> also extensible so that new schema formats can be added without
> modifying this module.
> 
> Usage example (namespace-simplified):
> 
>   <rpc>
>     <get>
>       <filter>
>         <schemas/>
>       </filter>
>     <get/>
>   </rpc>
> 
>   <rpc-reply>
>     <data>
>       <schemas>
>         <schema>
>           <identifier>netconf-schema</identifier>
>           <version>2007-12-11</version>
>           <type>
>             <yang/>
>           </type>
>           <location>http://foo/netconf-schema.yang</location>
>           <location>netconf</location>
>         </schema>
>         <schema>
>           ...
>         </schema>
>       </schemas>
>     <data>
>   </rpc-reply>
> 
> 
> Since one location was 'netconf', we can use the new rpc to get it:
> 
>   <rpc>
>     <get-schema>
>       <identifier>netconf-schema</identifier>
>       <version>2007-12-11</version>
>       <type>
>         <yang/>
>       </type>
>     </get-schema>
>   </rpc>      
> 
>   <rpc-reply>
>     <data>
>       <schema>
> 
> 
> module netconf-schema {
>   namespace urn:ietf:params:xml:ns:netconf:schema;
>   prefix schema;
> 
>   import yang-types { prefix yang; }
> 
>   organization
>     "NETCONF WG, IETF";
> 
>   description
>     "NETCONF Schema Discovery.";
> 
>   revision "2007-12-11" {
>     description "Initial revision.";
>   }
> 
>   grouping schema-type {
>     description
>       "Reusable, extensible schema type definition.";
>     container type {
>       choice format {
>         leaf xsd  { type empty; }
>         leaf yang { type empty; }
>       }
>     }
>   }
> 
>   container schemas {
>     config false;
>     list schema {
>       leaf identifier {
>         type string;  // should this be the model's namespace instead?
>       }
>       leaf version {
>         type string;
>       }
>       uses schema-type;
>       leaf-list location {
>         type union {
>           type enumeration {
>             enum "netconf" {
>               description
>                 "indicates that the schema can be retrieved
>                  using the get-schema rpc.";
>             }
>           }
>           type yang:uri;
>         }
>       }
>     }
>   }
>   
>   rpc get-schema {
>     description
>       "RPC operation to get a schema over NETCONF.";
>     input {
>       leaf identifier { type string; }
>       leaf version { type string; } // should this really be here??
>       uses schema-type;
>     }
>     output {
>       leaf schema { type string; }
>     }
>   }
> }
> 
> 
> 
>       </schema>
>     </data>
>   <rpc-reply>
> 
> 
> 
> /martin
>       
> 
> --
> to unsubscribe send a message to netconf-request@ops.ietf.org with
> the word 'unsubscribe' in a single line as the message text body.
> archive: <http://ops.ietf.org/lists/netconf/>
> 

--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>