[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [YANG] import statement
Ladislav Lhotka wrote:
> Juergen Schoenwaelder píše v So 03. 05. 2008 v 18:58 +0200:
>> On Sat, May 03, 2008 at 05:31:03PM +0200, Ladislav Lhotka wrote:
>>> Juergen Schoenwaelder p????e v So 03. 05. 2008 v 16:32 +0200:
>>>
>>>> There are also examples. An augment of foo-cont simply sticks nodes
>>>> into the foo-cont container; there is no new instantiation of
>>>> foo-cont.
>>>>
>>> Example on pages 82 and 83 contradicts what you are saying: the augment
>>> statement in namespace http://example.com/schema/ds0 takes the schema
>>> subtree defined by "container interfaces" in namespace
>>> http://example.com/schema/interfaces, augments it and effectively places
>>> the result at the spot of the augment statement in the
>>> http://example.com/schema/ds0 namespace.
>> I don't see the contradiction.
>>
>> augment "/if:interfaces/if:ifEntry" {
>> when "if:ifType='ds0'";
>> leaf ds0ChannelNumber {
>> type ChannelNumber;
>> }
>> }
>>
>> This augment introduces a leaf ds0:ds0ChannelNumber that appears under
>> /if:interfaces/if:ifEntry and this is what the example shows. There
>> is no new instantiation of /if:interfaces/if:ifEntry.
>
> Assume a device that supports the data model as in the XML snippet on
> page 83. Which of the two namespace URIs will it advertise in the hello
> message?
Both namespaces.
Maybe it is easier to visualize in XML (NETCONF edit-config PDU):
<rpc message-id="101"
xmlns="netconf-base-URI"
xmlns:nc="netconf-base-URI"
xmlns:if="IF-MIB-URI"
xmlns:ds0="DS0-MIB-URI">
<edit-config>
<target><running/></target>
<default-operation>none</default-operation>
<test-option>test-then-set</test-option>
<error-option>rollback-on-error</error-option>
<config>
<if:interfaces>
<if:ifEntry>
<if:ifIndex>17</if:ifIndex>
<ds0:ds0ChannelNumber nc:operation="replace">
1
</ds0:ds0ChannelNumber>
</if:ifEntry>
</if:interfaces>
</config>
</edit-config>
</rpc>
I assume it is http://example.com/schema/ds0. Where is the
> <interfaces> block then instantiated if the import statement just makes
> the identifiers from http://example.com/schema/interfaces accessible and
> the augment statement doesn't do it?
>
> Lada
>
>> /js
>>
Andy
_______________________________________________
YANG mailing list
YANG at ietf.org
https://www.ietf.org/mailman/listinfo/yang