pysmi
pysmi copied to clipboard
Convert a local mib file to json.
Hello friends. I need to convert a local file MIB to the format json. How can I do this using pysmi? I didn't quite understand the example commands. The file that needs to be translated is attached. The file of MIB is located in the python script folder. The result json file must be in the python script folder. Please give an example of the command for mibdump.py or example of a program that will do this for my MIB file.
IDE Pycharm MIB file you can download here https://www.shtyl.ru/support/download/software/mib-fajl-dlya-ustanovok-ehlektropitaniya/ Just in case, I also attach the MIB Shtyl_MIB_18_v367.zip
Rename downloaded file to Shtyl-MIB.mib
mv Shtyl_MIB_18_v367.mib Shtyl-MIB.mib
Then let's assume you have it in $HOME/Downloads
cd ~/Downloads
mibdump.py --generate-mib-texts --destination-format json --mib-source . Shtyl-MIB
This will convert it to json and you will have file Shtyl-MIB.json
under your ~/Downloads
dir