Skip to content

Add Huawei VRP display license verbose #2127

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

brian-s-cao
Copy link
Contributor

No description provided.

@mjbear
Copy link
Collaborator

mjbear commented May 8, 2025

@brian-s-cao
From what it looks, this output has a couple distinct sections.

  • license
  • product
  • feature/sale

Would it make sense to cascade the license and product data into later dictionaries?

So the license and product info would be present in product and feature/sale dictionaries.

Or possibly we create different states to organize the output a bit -- the several Record lines were a bit unique.

If you're welcome to suggestions, I'll work something up in a branch so we can visualize it.
Once it's ready from there I can submit those changes to your branch/PR.

@mjbear mjbear added the question label May 8, 2025
@brian-s-cao
Copy link
Contributor Author

Hi @mjbear,

Thanks for the thoughtful suggestions!

Yes, the current TextFSM template produces a flat dictionary structure, and I agree it would be more organized to cascade the license and product data into each feature/sale entry.

I'm definitely open to your idea of reorganizing the output with distinct states or nested dictionaries.
If you’d like to work something up in a branch, that would be great — happy to review and integrate your changes into the PR.

Thanks again!

@mjbear mjbear self-assigned this May 9, 2025
@mjbear
Copy link
Collaborator

mjbear commented May 9, 2025

Thanks for the thoughtful suggestions!

😀 You're welcome.

Yes, the current TextFSM template produces a flat dictionary structure, and I agree it would be more organized to cascade the license and product data into each feature/sale entry.

I'm definitely open to your idea of reorganizing the output with distinct states or nested dictionaries. If you’d like to work something up in a branch, that would be great — happy to review and integrate your changes into the PR.

Ironically I worked up the state transitions first and realized this isn't quite complex enough to benefit much. Basically a couple of lines had to be duplicated so it didn't make sense for two additional States. That was a bit of work ... just to figure out we wouldn't use it, heh.

@brian-s-cao
Here's a PR brian-s-cao#1 against your "license" branch.
This way it can be reviewed prior to being pushed to your branch (and thus this 2127 PR).

If you approve and merge my PR into your branch then will show up on this PR. Cool stuff, eh? haha

A pretty big takeaway is the 5->3 dictionary reduction!

Thanks again!

😁 👍

(While not obligated, there's a buymeacoffee link on my profile if you want to fuel me up, haha.)

@mjbear mjbear added the WIP Work in Progress label May 9, 2025
Enhance and reduce resulting dict count
@brian-s-cao
Copy link
Contributor Author

@mjbear
Thanks for putting together the changes — just reviewed and merged your PR into my branch!

The 5-to-3 dictionary reduction definitely makes the structure cleaner and easier to work with. Really appreciate the effort and thought you put into this.

I saw your BuyMeACoffee link — unfortunately, I don’t have access to international payment methods at the moment. But if you happen to use WeChat Pay or Alipay, I’d be happy to support you that way instead.

Thanks again!

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

Successfully merging this pull request may close these issues.

2 participants