On Fri, 4 Apr 2014 11:30:09 +0200 (CEST) rija.rasolo@univ-rouen.fr wrote:
Hi, I'm testing the latest NAV virtual machine. I've got problems adding some Extreme Networks SummitX-250 and Summit-X450. The error log show that entPhysicalDescr is empty.
That's strange...
2014-04-04 11:24:53,474 [DEBUG plugins.modules.modules] [inventory 2- a16-0-1.univ-rouen.fr] test :[{'entPhysicalSoftwareRev': '15.3.1.4', 'entPhysicalHardwareRev': '7.0', 'entPhysicalParentRelPos': 1, 0: 3, 'entPhysicalClass': 'module', 'entPhysicalName': '', 'entPhysicalContainedIn': 2, 'entPhysicalSerialNum': '0943G-80792', 'entPhysicalDescr': None, 'entPhysicalFirmwareRev': '1.0.3.5', 'entPhysicalIsFRU': True, 'entPhysicalModelName': '800190-00-07'}]
This line indicates you have an even more serious problem; the device does not present a name string for the module at all. This is what NAV would use to name the modules.
[snip]
File "/usr/lib/python2.7/dist-packages/nav/ipdevpoll/plugins/modules.py", line 109, in _module_from_entity module.description = ent['entPhysicalDescr'].strip() exceptions.AttributeError: 'NoneType' object has no attribute 'strip'
2014-04-04 11:24:53,480 [ERROR jobs.jobhandler] [inventory 2-a16-0-1.univ- rouen.fr] Job 'inventory' for 2-a16-0-1.univ-rouen.fr aborted: Job aborted due to plugin failure (cause=AttributeError("'NoneType' object has no attribute 'strip'",))
Anyone can help ?
Yes/no/maybe ;-)
The crash itself may be simple to fix - stop assuming that all devices are well-behaved and have actual values for this variables.
The harder question is: What do we do with a module that cannot be identified via name? Do we ignore it? Do we invent a fantasy name? Can we substitute the module's serial number?
I've hardly any experience with Extreme Networks; How do these Extreme Networks devices name or number their modules in real life?