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

RE: Ambiguity



I wrote:

>> I'm still concerned about ambiguity in the approach described by the Enns
>> draft.  

Rob Enns wrote:

> In a message to the list on 5/15 Phil talked about fixing this by 
> introducing a replace="replace" attribute on the element to be 
> replaced (this is how it is handled in JUNOScript).

> Would that address the concern?

Sorry, I forgot about this suggestion.  When I first read it I considered it
a bit of a kluge that went part of the way towards the "operation as
attrribute" but stopped short.

I think that it would work, but I'm not sure I like it all the same.  It
seems that this attribute would only be valid in an edit-config message with
a <write-operation> element having a value of "replace".  Otherwise, I'm
guessing it would be ignored?

The way I'm thinking about the protocol is that if you kind of zone out and
let your eyes unfocus (this happens to me most days around 3:00pm) you will
see that XML code has a tendendency to "wander" back and forth to the right
and left as you scan down a file, due to recursively indenting the contained
elements.  So, a "get" operation would be defined to work on only the very
rightmost indented line(s) of the included XML snippet, retrieving values
for only the very rightmost line(s) but including any necessary containing
XML to satisfy the schema.  A "merge" operation would be defined to work on
the whole included XML snippet to insert all of it into the existing XML
code, creating and replacing code where necessary to accomplish this.   A
"replace" operation would be defined to replace the element(s) of the
snippet marked with the replace="replace" attribute, and any elements
contained by those elements, for the matching XML code in the device.

Will this really be easier to implement and use than a protocol that
identifies the part of the existing XML you want to operate on with a
clearly defined attribute?

Keith Allen
SBC Labs
9505 Arboretum Blvd.
Austin, TX 78759
(512) 372-5741
kallen@tri.sbc.com
 


-----Original Message-----
From: Rob Enns [mailto:rpe@juniper.net] 
Sent: Tuesday, May 27, 2003 2:43 PM
To: Allen, Keith
Cc: netconf@ops.ietf.org
Subject: Re: Ambiguity

Yes, there's a definite problem with specifying the target
of a replace operation--the draft version 00 provides no way 
to do it.

In a message to the list on 5/15 Phil talked about fixing this by 
introducing a replace="replace" attribute on the element to be 
replaced (this is how it is handled in JUNOScript).

Would that address the concern?

thanks,
 Rob

On Tue, May 27, 2003 at 02:12:02PM -0500, Allen, Keith wrote:
> I'm still concerned about ambiguity in the approach described by the Enns
> draft.  I've read what Phil and Rob have said about it, and I appreciate
the
> "assume it's always the innermost element(s) that are being operated upon"
> argument, but I'm still not convinced that solves the ambiguity problem.
> 
> Consider if a device has a 1000 line XML configuration file, and I want to
> change the IP address of one of the interfaces.  The Enns draft would have
> me send an edit-config message with the following contents.  Presumably,
> this would change only 2 lines out of those 1000 lines.
> 
> 
>      <rpc id="102" xmlns="http://ietf.org/xmlconf/1.0/base";>
>          <edit-config>
>            <target>
>              <running></running>
>            </target>
>            <test-option>test-then-set</test-option>
>            <write-option>replace</write-option>
>            <error-option>stop-on-error</error-option>
>            <config xmlns="http://example.com/schema/1.2/config";>
>              <interface name="Ethernet0/0">
>                 <address>
>                    <ipv4>1.2.3.4</ipv4>
>                    <ipv4-mask>255.0.0.0</ipv4-mask>
>                 </address>
>              </interface>
>            </config>
>          </edit-config>
>        </rpc>
> 
> Now, here's my question.  What if I want to instead replace the entire
1000
> lines of data with the following 6 lines?  
> 
>              <interface name="Ethernet0/0">
>                 <address>
>                    <ipv4>1.2.3.4</ipv4>
>                    <ipv4-mask>255.0.0.0</ipv4-mask>
>                 </address>
>              </interface>
> 
> How would I do that?  If it's with the same message as above, then I think
> there is an ambiguity problem.  I guess as an operator I should be
concerned
> that by trying to change only 2 lines of data I end up wiping out 994
lines
> of data, but I don't think equipment suppliers would really let this
happen.
> Instead, I'm more concerned that equipment suppliers will find that
> preventing this from happening will be burdensome to the point that the
> protocol is difficult to implement.
> 
> If instead of using the same message, your answer to "How would I do
that?"
> is "You can't," then I'm concerned about what else the protocol won't let
me
> do.
> 
> Does anybody else see a problem here?
> 
> 
> Keith Allen
> SBC Labs
> 9505 Arboretum Blvd.
> Austin, TX 78759
> (512) 372-5741
> kallen@tri.sbc.com
>  
> 
> 
> --
> 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/>