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

In which format are the MBR values encoded in the transaction log? #1647

Open
afuentesconwet opened this issue Apr 18, 2023 · 0 comments
Open

Comments

@afuentesconwet
Copy link

I have been testing the rollback process, with the objective to programatically rollback temporary changes on a network; I've found that I need to rollback all later changes prior to rollbacking the one I am interested in, and then applied the later ones in the same order as before. Because of that, (I do not know if there is other way, apparently is not from the response of the onos config command); I need to keep track of the values of the later changes; and I find that the MBR values are encoded in a format that I do not clearly identify, it does not seem to be base64 as fas as I can tell; which is quite common to encode arbitrary values in a network friendly format.

Here is a mapping that I needed to do to go from the string value to the numerical value of the bps of MBR in both uplink and downlink; so that, later on I can make REST API calls:

mbr_mapping = {
                "\017B@": 1000000, 
                "\036\204\200": 2000000, 
                "LK@": 5000000, 
                "\230\226\200": 10000000, 
                "\001}x@": 25000000, 
                "\002\372\360\200": 50000000, 
                "\005\365\341\000": 100000000, 
                "\035\315e\000": 500000000
}

Any help with this is highly appreciated, at this stage, I have the limitation to only support the MBRs that are encoded in the GUI, as it would take a lot of time to test the rest of values, I am looking forward knowing how to decode such values like "\017B@", "\036\204\200"... into their numerical forms: 1000000, 2000000...

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

No branches or pull requests

1 participant