Skip to content

Juniper junos show system configuration database usage #2087

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

jnicholson56
Copy link
Contributor

Adding new file juniper_junos_show_system_configuration_database_usage.textfsm.

Send PR as draft for feedback before finalizing it.

@mjbear
Copy link
Collaborator

mjbear commented Mar 24, 2025

@jnicholson56
Should the megabyte (MB) unit abbreviation be captured?
Reworded: Should we also capture the megabyte (MB) unit abbreviation?

Are those units always in megabytes?
Could those ever be in gigabytes (GB)?
(Food for thought possibly.)

In the meanwhile, I do have some whitespace regex suggestions I'll start putting out there.

@jnicholson56
Copy link
Contributor Author

jnicholson56 commented Mar 24, 2025

@jnicholson56 Should the megabyte (MB) unit abbreviation be captured? Reworded: Should we also capture the megabyte (MB) unit abbreviation?

Are those units always in megabytes? Could those ever be in gigabytes (GB)? (Food for thought possibly.)

In the meanwhile, I do have some whitespace regex suggestions I'll start putting out there.

In all the examples I have on my network (100's), they are all labeled as MB. The output is the same on both Classic and EVO as well.

Thanks for the suggestions. I had a few mistakes that I have committed as well. Hopefully tests pass this time :D

@jnicholson56 jnicholson56 marked this pull request as ready for review March 24, 2025 23:47
@jnicholson56
Copy link
Contributor Author

This is ready to go unless there are more suggestions.

@mjbear
Copy link
Collaborator

mjbear commented Mar 24, 2025

In all the examples I have on my network (100's), they are all labeled as MB. The output is the same on both Classic and EVO as well.

And now that I look at the raw cli output again, I do notice some values are more than a thousand and are still in MB units.

All good. 😀 😅

@jnicholson56
Copy link
Contributor Author

Juniper is nothing if not inconsistent across the CLI :)

^\s*Actual\s+database\s+usage:\s+${ACTUAL_DB_SIZE}\s*
^\s*Available\s+database\s+space:\s+${AVAIL_DB_SPACE}\s* -> Record
^{(master|backup)}\s*$$
^\s*Cannot\s+proceed,\s+database\s+is\s+currently\s+being\s+modified -> Error
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnicholson56
Would you by chance add raw output to this PR for an instance where "cannot proceed" is present?

Please and thank you!

Copy link
Collaborator

@mjbear mjbear Apr 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jnicholson56
In hindsight this may will not work out well for the unit tests since this triggers the Error action.

As a suggestion, please test on your local machine with invoke first to make sure it's kosher before committing/pushing the changes up to GitHub. (This way you should be able to save yourself the hassle of having to revert the changes if this turns out to be a bad idea.)

Update: 👋
This was bothering me and I couldn't help myself so I staged this output up the best I could. Since that throws the Error action that output will fail to parse and thus also fail the unit tests so it doesn't appear to helpful.

Apologies for the silly suggestion before I fully considered the Error action on that line. 😮‍💨

@mjbear mjbear added the status: action required This issue requires additional information to be actionable label Apr 4, 2025
@jnicholson56
Copy link
Contributor Author

jnicholson56 commented Apr 4, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: action required This issue requires additional information to be actionable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants