[AGENT++] AgenPro: exclude MIBs from code generation with the CLI
Benjamin Frottier
bfrottier at verimatrix.com
Tue Mar 22 08:55:55 CET 2016
Hello,
I am having a problem while using CLI of AgenPro. I want to exclude some MIBs from the generation of my code. If I understood correctly, it is done by using the option -e.
Extracted from the help:
-e specifies one or more MIB module names that should be excluded from
the code generation.
In my case, I have a directory with 3 MIBs:
sh$ tree MIBs
MIBs
├── A
├── B
└── C
0 directories, 3 files
There is a dependency between the 3 files, but there was no issue with the GUI to generate the code with only A for example.
If I want to remove A from the generation for example, I should do:
sh$ java -Djava.awt.headless=true -jar agenpro4.jar -l <license> <licenseKey> -m MIBs -e A <myprojectfile>
Instead of a well generated code without A, I am getting:
AgenPro 4.0.4 - Code Generator for SNMP.
Copyright © 2002-2016, Frank Fock. All rights reserved.
Reading config from '/home/bfrottier/AgenPro4.cf'... ok
MIBs/A compiled: [A]
MIBs/B compiled: [B]
MIBs/C compiled: [C]
Exception in thread "main" java.lang.UnsupportedOperationException
at java.util.AbstractList.remove(AbstractList.java:161)
at java.util.AbstractList$Itr.remove(AbstractList.java:374)
at java.util.AbstractCollection.removeAll(AbstractCollection.java:376)
at com.agentpp.agenpro.AgenPro.main(Unknown Source)
Am I misunderstanding or missing something?
Thanks for you help,
--
Benjamin Frottier
More information about the AGENTPP
mailing list