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

RE: Multiple "Running" configurations



> From: Faye Ly [mailto:faye@pedestalnetworks.com]
> Yes, this will work with most of the configuration.  How about file
> upload (backup) or download (restore)?  How do I say, download
> 'chassis1.cfg' file to chassis 1? Without affecting everything else?
> 
> Thanks.
> 
> -faye
>

I think this is a key question.  In the current draft of the protocol, the
"copy" message is used to move entire configuration files around.  You
specify both a source and a destination, and either can be one of the
"special" XML tags ("running," "startup," or "candidate"), a "named
configuration" file stored on the device, or a URL.  

I believe that the protocol would support what Faye is suggesting not
through the use of the "copy" operation but through the use of the
"edit-config" operation.  Basically, what you would do is perform an
"edit-config" operation on the "<running>" target.  The argument you would
provide to this operation would be a "snippet" (probably fairly long in this
case) of XML that basically said "I want to overwrite the portion of the
running configuration that begins with the XML tag <chassis id=1> (or
something similar - this will depend on the device's data model) and ends
with the matching tag </chassis> with the contents of this argument."

Just to help you envision it, some pseudo code for this operation might look
like:

	xmlString = '<chassis id="1" op="overwrite">' // device specific!
	xmlString += chassis1.cfg;	// append contents of chassis1.cfg
	xmlString += "</chassis>";	// append ending tag - device
specific

	error = device.editConfig(<running>, xmlString);

Another option would be to use the "copy" operation to download an entire
new configuration to the device in which only the configuration for chassis
1 differed from what was currently on the box.

If neither of these is acceptable we have an issue to work out.

As I mentioned in my first email, edit-config and get-config (and get-all or
get-state or whatever we end up with) are the only operations that work on
portions of a device's configuration.  You can't use copy or validate or
lock unless you use it on an entire configuration.

The problem is, when you try to get fancy with copy, lock, and validate, you
end up making the operations dependent on the capabilities of individual
devices.  You might want to be able to download configurations to a chassis,
but the next person wants to download to individual cards in the chassis.
Where do you draw the line?  More importantly, how can a simple script use
the protocol if it has to know that your box supports <running
file=filename> and somebody else's supports <running chassis=id board=id>
and somebody else's supports only <running>?

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


> -----Original Message-----
> From: Faye Ly [mailto:faye@pedestalnetworks.com]
> Sent: Monday, September 15, 2003 3:34 PM
> To: Phil Shafer
> Cc: Allen, Keith; netconf@ops.ietf.org
> Subject: RE: Multiple "Running" configurations
> 
> Phil,
> 
> Yes, this will work with most of the configuration.  How about file
> upload (backup) or download (restore)?  How do I say, download
> 'chassis1.cfg' file to chassis 1? Without affecting everything else?
> 
> Thanks.
> 
> -faye
> 
> -----Original Message-----
> From: Phil Shafer [mailto:phil@juniper.net]
> Sent: Monday, September 15, 2003 12:16 PM
> To: Faye Ly
> Cc: Allen, Keith; netconf@ops.ietf.org
> Subject: Re: Multiple "Running" configurations
> 
> "Faye Ly" writes:
> >Partial configuration and separate configuration file have different
> >naming?  Unless you can somehow make the naming smart enough for both?
> 
> A simple example would be:
> 
> <configuration>
>   <system>
>     <login>
>       <message>Get off my box!</message>
>       <users>
>         <user>
>           <name>phil</name>
>           <uid>-1</uid>
>           <full-name>Phil Shafer</full-name>
>         </user>
>       </users>
>     </login>
>   </system>
> </configuration>
> 
> We toss system/login/message into /etc/motd and system/login/users
> into /etc/master.passwd.  The user need not know these are different
> files.
> 
> Thanks,
>  Phil

--
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/>