For Programmers: Free Programming Magazines  


Home > Archive > PERL Modules > May 2004 > New IP router storage module, Namespace questions









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author New IP router storage module, Namespace questions
Sam

2004-05-15, 7:30 am

Hello,

I am in the process of adding several modules into CPAN. The PAUSE FAQ
recommends to discuss the namespace on this list first.


What the modules do:
--------------------
The modules represent an IP router and store information regarding all
its features in the object.
The modules are commercially developed and it will be extended by
analyzer methods, which will, for example, build the router-internal
BGP topology informations. The important thing is that everything remains
vendor independent.

Also, there are parser functions which parse configuration
files (currently Juniper or Cisco) and store the informations in the
Router object; they are still not CPAN compatible, so I may throw them
into PAUSE later.

I am not sure which namespace should be used for this. I think the
most appropriate would be "Router::", but that may also be misleading
because the object is not actually a server that does really route IP
packets, but rather a storage holding informations regarding routers.

Also, I did not find an answer what to do with .pm files that are
/required/ but are not supposed to show up in the CPAN search. For
example, there is an IPv4.pm file, which contains methods that
unfortunately have no equivalent in CPAN's NetAddr::IP. Anyway, IPv4.pm
should not show up in the search.

I have appended a file overview below. The source code can also be browsed
online here:

http://sv.gnu.org/cgi-bin/viewcvs/i.../cfgparser/src/

Comments appreciated.

-Samuel Abels


Overview:
---------
src
|-- RouterBase.pm << Vendor independent base class -- RouterBase
| |-- BGP.pm
| |-- BGPNeighbor.pm
| |-- BGPVRF.pm
| |-- Card.pm
| |-- IPHost.pm
| |-- ISIS.pm
| |-- Interface.pm
| |-- LogicalInterface.pm
| |-- Module.pm
| |-- Prefixlist.pm
| |-- PrefixlistEntry.pm
| `-- StaticRoute.pm
|-- CiscoRouter.pm << Derives RouterBase -- CiscoRouter
| |-- Accesslist.pm
| |-- AccesslistEntry.pm
| |-- BGP.pm
| |-- BGPGroup.pm
| `-- Card.pm
|-- JuniperRouter.pm << Derives RouterBase -- JuniperRouter
`-- IPv4.pm


Add Later:
------------
src
|-- HWParserBase.pm << Parser for "show"-command output.
|-- CiscoHW12000Parser.pm << Derived from HWParserBase
|-- CiscoHW12000Parser
| `-- ShowDiag.pm
|-- CiscoHW7500Parser.pm << Derived from HWParserBase
|-- CiscoHW7500Parser
| `-- ShowDiag.pm
|-- CiscoParser.pm
|-- CiscoParser
| |-- Atom.pm
| |-- BGP.pm
| |-- Global.pm
| |-- ISIS.pm
| `-- Interface.pm
|-- JuniperParser.pm
|-- JuniperParser
| |-- Atom.pm
| `-- Global.pm
|-- Importer.pm << Import RouterBase into an SQL DB
|-- Importer
| |-- BGP.pm
| |-- BGPNeighbor.pm
| |-- BGPVRF.pm
| |-- Card.pm
| |-- IPHost.pm
| |-- Interface.pm
| |-- Module.pm
| `-- Router.pm
|-- ParserDispatcher.pm
|-- Classifier.pm << Determine file type from content.
|-- Database.pm << DB abstraction.
`-- FileForeach.pm << File abstraction.

--
------------------------------------------------------
| Samuel Abels | http://www.debain.org |
| spam ad debain dod org | knipknap ad jabber dod org |
------------------------------------------------------

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com