On 18 December 2012 03:30, pal snmp <pals...@gmail.com> wrote:
> I have a requirement to extend an existing table to have an additional
> index. This new table will exactly have the same columnar objects as the
> first table.
> Can this be done using SMIv2 MIB modeling without writing explicitly
> creating those columnar objects (without renaming)?

Will you continue to use the existing table (with the original indexing),
or is this new table intended to completely replace the first one?

If you need to support both tables, then the answer is simple - you will
need to define new column objects for your new table.   You can reuse
the existing index objects (by simply listing them in the INDEX clause,
along with the additional index object - the old indexes don't need to be
re-defined), but the new table will need a new definition, including the
new index object, together with  new definitions for any accessible column
objects.

If the original table is a standard one, and you basically want to extend
the indexing for your own purposes, then the same answer applies.
You will need to define a new table, with a new index and new column objects.

If the original table is a purely vendor-specific one, which you need to
replace with a re-indexed version, then strictly speaking, the same answer
applies again.   You will need a new table, with new index & column objects.

If this is purely internal MIB, and has never been released to external
customers, then you might be able to get away with amending the
definition of the existing table to simply add the new index object
(both defining the object, and adding it to the INDEX clause),
and leave everything else the same.
   But this is not really a valid amendment to the MIB file, and you
would need to be *certain* than you'd updated everything that was
trying to use that table.   If there's any doubt in your mind, then define
a new table.
   (And if there's not, then there probably should be, so define a new
table anyway!)


> Let me provide an example:
>
> First table:
> index1     col1   col2   col3   col4
>
> Second table:
> newIndex  index1  col1  col2  col3  col4
>
> My question is can SMIv2 support re-using col1, col2, col3 and col4 without
> having to rename them?

If the second table is defined in a different MIB module, then you should
be able to copy-and-paste the repeated column definitions, without having
to change the names.   I'm not convinced it's a good idea - the potential
for confusion is too great - but it is strictly legal.
   If the two tables are defined in the same MIB module, then all the object
names need to be unique - end of story.


Dave

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to