'error: unknown object identifier label' even though object is defined

I'm trying to separate concerns and create some modules in individual files. I have a 'registrations' file, the 'notifications' file and a 'conformance' file. I'm having an issue where I'm getting the following warning and error and I can't seem to find the issue. I think the warning might be causing the error, but I'm not sure. I've attached all three source files and would appreciate any input. The command I'm running to produce the following smilint output is:
smilint -p ./TEKNO-CONFORMANCE-MIB.txt ./TEKNO-REGISTRATIONS-MIB.txt ./ADMIN-ILM-MIB.txt
Here's a breakdown of my files:
TEKNO-CONFORMANCE-MIB.txt is my conformance objects I'm learning more about and trying to separate from the actual notification MIB TEKNO-REGISTRATIONS-MIB.txt is our high-level module that will describe our corporate product MIB trunks ADMIN-ILM-MIB.txt is an actual notifications MIB that imports the above files
Here is the warning and error msg I get when I run the above `smilint` command:
./TEKNO-REGISTRATIONS-MIB.txt:1: warning: module `TEKNO-REGISTRATIONS-MIB' is already loaded, aborting parser on this file ./ADMIN-ILM-MIB.txt:184: unknown object identifier label `teknoConformanceGroups'
Any input and feedback, even to the design of my MIB, would be welcome. Thank you!

On Thu, Aug 08, 2013 at 07:11:06AM -0500, James Gosnell wrote:
Here is the warning and error msg I get when I run the above `smilint` command:
./TEKNO-REGISTRATIONS-MIB.txt:1: warning: module `TEKNO-REGISTRATIONS-MIB' is already loaded, aborting parser on this file ./ADMIN-ILM-MIB.txt:184: unknown object identifier label `teknoConformanceGroups'
The ADMIN-ILM-MIB needs to import teknoConformanceGroups from the TEKNO-CONFORMANCE-MIB. If you change your command line a bit, you even get a clean smilint check:
$ smilint -p ./TEKNO-REGISTRATIONS-MIB.txt \ -p ./TEKNO-CONFORMANCE-MIB.txt \ ./ADMIN-ILM-MIB.txt
/js

Juergen, that worked wonderfully. I learned a bit from that as well, thank you!
On Thu, Aug 8, 2013 at 7:22 AM, Juergen Schoenwaelder < j.schoenwaelder@jacobs-university.de> wrote:
On Thu, Aug 08, 2013 at 07:11:06AM -0500, James Gosnell wrote:
Here is the warning and error msg I get when I run the above `smilint` command:
./TEKNO-REGISTRATIONS-MIB.txt:1: warning: module
`TEKNO-REGISTRATIONS-MIB'
is already loaded, aborting parser on this file ./ADMIN-ILM-MIB.txt:184: unknown object identifier label `teknoConformanceGroups'
The ADMIN-ILM-MIB needs to import teknoConformanceGroups from the TEKNO-CONFORMANCE-MIB. If you change your command line a bit, you even get a clean smilint check:
$ smilint -p ./TEKNO-REGISTRATIONS-MIB.txt \ -p ./TEKNO-CONFORMANCE-MIB.txt \ ./ADMIN-ILM-MIB.txt
/js
-- Juergen Schoenwaelder Jacobs University Bremen gGmbH Phone: +49 421 200 3587 Campus Ring 1, 28759 Bremen, Germany Fax: +49 421 200 3103 http://www.jacobs-university.de/

Hi,
I am trying to run libsmi version 0.4.2 in agent capabilities mib using "smilint -e -m -s" command but it creates the following errors: SYNTAX statement is not included in the a notification variation but smilint is complaining "SYNTAX is not allowed in a notification variation".
jnx-if-capability.mib:50: [2] {variation-syntax} SYNTAX is not allowed in a notification variation jnx-if-capability.mib:50: [2] {variation-writesyntax} WRITE-SYNTAX is not allowed in a notification variation jnx-if-capability.mib:50: [2] {variation-creation} CREATION-REQUIRES is not allowed in a notification variation jnx-if-capability.mib:50: [2] {variation-defval} default value is not allowed in a notification variation jnx-if-capability.mib:54: [2] {variation-syntax} SYNTAX is not allowed in a notification variation jnx-if-capability.mib:54: [2] {variation-writesyntax} WRITE-SYNTAX is not allowed in a notification variation jnx-if-capability.mib:54: [2] {variation-creation} CREATION-REQUIRES is not allowed in a notification variation jnx-if-capability.mib:54: [2] {variation-defval} default value is not allowed in a notification variation
Here is very simple agent capability mib to include only linkDown and linkUp notifications definitions to test smilint:
-- ***************************************************************** -- JNX-IF-CAPABILITY.mib: Juniper IF-MIB AGENT-CAPABILITIES -- -- Copyright (c) 2013, Juniper Networks, Inc. -- All rights reserved. -- -- *****************************************************************
JNX-IF-CAPABILITY DEFINITIONS ::= BEGIN
IMPORTS MODULE-IDENTITY FROM SNMPv2-SMI AGENT-CAPABILITIES FROM SNMPv2-CONF DisplayString, TruthValue FROM SNMPv2-TC jnxAgentCapability FROM JUNIPER-SMI;
jnxIfCapability MODULE-IDENTITY LAST-UPDATED "201306180000Z" ORGANIZATION "Juniper Networks, Inc." CONTACT-INFO "Juniper Technical Assistance Center Juniper Networks, Inc. 1194 N. Mathilda Avenue Sunnyvale, CA 94089 E-mail: support@juniper.net"
DESCRIPTION "Agent capabilities for IF-MIB (RFC2863)" ::= { jnxAgentCapability 1 }
jnxIfCapJunos AGENT-CAPABILITIES
PRODUCT-RELEASE "All JUNOS Version" STATUS current DESCRIPTION "IF MIB capabilities"
SUPPORTS IF-MIB INCLUDES { ifGeneralInformationGroup, ifStackGroup2, ifOldObjectsGroup, linkUpDownNotificationsGroup, ifVHCPacketGroup, ifCounterDiscontinuityGroup}
-- NOTIFICATION-TYPE VARIATION linkDown DESCRIPTION "LinkDown trap is supported."
-- NOTIFICATION-TYPE VARIATION linkUp DESCRIPTION "LinkUp trap is supported."
::= { jnxIfCapability 1 }
END
I looked at the rfc2580 and the format seemed correct:
NotificationVariation ::= "VARIATION" value(NotificationName) AccessPart "DESCRIPTION" Text AccessPart ::= "ACCESS" Access | empty
Thanks, Daniel

On Fri, Aug 09, 2013 at 12:55:56PM -0700, Daniel Chuang wrote:
Hi,
I am trying to run libsmi version 0.4.2 in agent capabilities mib using "smilint -e -m -s" command but it creates the following errors: SYNTAX statement is not included in the a notification variation but smilint is complaining "SYNTAX is not allowed in a notification variation".
[...]
I looked at the rfc2580 and the format seemed correct:
NotificationVariation ::= "VARIATION" value(NotificationName) AccessPart "DESCRIPTION" Text AccessPart ::= "ACCESS" Access | empty
Yep, I confirm this is broken in libsmi. Funny that nobody discovered this before. The parser apparently wrongly complains about things that are rightfully not there.
I tried to fix this in svn revision 1799. In general, the processing of agent capabilities has not seen much testing.
/js
participants (3)
-
Daniel Chuang
-
James Gosnell
-
Juergen Schoenwaelder