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

Re: Explicit and unique naming of configuration target





Phil Shafer wrote:
Larry Menten writes:
  
<target>
 <protocols/>
</target>
    
<config>
  
 <ospf name="1">
   <area name="0">
      <interface name="135.104.57.3">
         <md5 name="3">
             ...
         </md5>
      </interface>
   </area>
 </ospf>
</config>
    

Pros:
- "you have a safety net in case you made a mistake" for a certain
  class of errors

Cons:
- The contents of <config> no longer match a simple schema, since
  they are now an element subhierarchy.
- The target and contents are two distinct elements, so if the client
  were generating them from one source, I'd need buffer output or
  two passes. Consider the pain of doing this is xslt.
- The server needs to remember the target while processing the content.
- Multiple operations (targets) are no longer possible.
- If you are talking about returning config in this form, then
  the configuration losses its lineage. If not, then the results
  of get-config cannot be feed directly back to set-config.

None of these are really insurmountable (except the lack of schemas),
but I just don't see this as a win. As I said before, if you want
to merely test for must-exist, you could do this with attribute-based
operations with less trouble.
  

I would prefer attribute-based operations as well.  The two examples become:
<config>
 <ospf name="1" op="add">
   <area name="0">
      <interface name="135.104.57.3">
         <md5 name="3">
             ...
         </md5>
      </interface>
   </area>
 </ospf>
</config>

To create the ospf instance, area, interface, etc., and:
<config>
 <ospf name="1">
   <area name="0">
      <interface name="135.104.57.3">
         <md5 name="3" op="add">
             ...
         </md5>
      </interface>
   </area>
 </ospf>
</config>

If the intention is just to create the Md5 key.

The XPath subset has real advantages in symmetry
when get-config is considered.  The result of a get-config
operation is a child that can be provided directly
as the child of a set-config.

Thanks,

Larry




Thanks,
 Phil
  

-- 
Larry Menten               Lucent Technologies/Bell Laboratories
Phone: 908 582-4467        600 Mountain Avenue, Murray Hill, NJ  07974 USA