Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert a local mib file to json. #64

Open
Aleksey-Surnov opened this issue Nov 6, 2020 · 1 comment
Open

Convert a local mib file to json. #64

Aleksey-Surnov opened this issue Nov 6, 2020 · 1 comment

Comments

@Aleksey-Surnov
Copy link

Aleksey-Surnov commented Nov 6, 2020

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

@DmitryZayats
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants