Hi, All: Recently, I try to use RESTCONF to support some functions. But I get one issue. Maybe somebody can help me to make it clear.
It is about how to use the "augment", there is one example in RFC6020, and it is clear. But maybe there is a little confused in RESTCONF draft. >From the example in RFC6020, the namespace >http://example.com/schema/interfaces, container interfaces { list ifEntry { key "ifIndex"; leaf ifIndex { type uint32; } leaf ifDescr { type string; } leaf ifType { type iana:IfType; } leaf ifMtu { type int32; } } } Then, in namespace http://example.com/schema/ds0, we have: import interface-module { prefix "if"; } augment "/if:interfaces/if:ifEntry" { when "if:ifType='ds0'"; leaf ds0ChannelNumber { type ChannelNumber; } } A corresponding netconf XML instance example: <interfaces xmlns="http://example.com/schema/interfaces" xmlns:ds0="http://example.com/schema/ds0"> <ifEntry> <ifIndex>1</ifIndex> <ifDescr>Flintstone Inc Ethernet A562</ifDescr> <ifType>ethernetCsmacd</ifType> <ifMtu>1500</ifMtu> </ifEntry> <ifEntry> <ifIndex>2</ifIndex> <ifDescr>Flintstone Inc DS0</ifDescr> <ifType>ds0</ifType> <ds0:ds0ChannelNumber>1</ds0:ds0ChannelNumber> </ifEntry> </interfaces> About the RESTCONF, my problems are: 1. In the GET operation, how to support it, we have download the GET two times? To get "http://example.com/schema/interfaces" and "http://example.com/schema/ds0" separately? Or something I missed to get all information in one request. 2. In the PUT operation. The question is same, how to set the namespace, may I change the MTU and ChannelNumber together? Maybe I miss some important operation, can somebody provide a example? Thanks Yangang. _______________________________________________ netmod mailing list [email protected] https://www.ietf.org/mailman/listinfo/netmod
