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

Ruckus fastiron parser #264

Merged
merged 34 commits into from Jul 3, 2023

Conversation

pato23arg
Copy link
Contributor

  • support for ruckus fastiron ICX switches

	new file:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_backup.txt
	new file:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_feature.py
	new file:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_intended.txt
	new file:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_received.json
…n_full_received.py

	new file:   tests/unit/mock/config/parser/base/ruckus_fastiron/fastiron_full_sent.txt
…on/fastiron_basic_backup.txt

	modified:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_intended.txt
	modified:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_received.json
	modified:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_backup.txt
	modified:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_intended.txt
	modified:   tests/unit/mock/config/compliance/compliance/ruckus_fastiron/fastiron_basic_received.json
netutils/config/parser.py Outdated Show resolved Hide resolved
netutils/config/parser.py Outdated Show resolved Hide resolved
config_line="+----------------+ WARNING RUCKUS SWITCH +---------------+\n.\n. Access to this system is limited to authorized\n. users and for official purposes only\n.\n. Your activities will be logged and abuse\n. will be reported!\n.\n+----------------+ WARNING RUCKUS SWITCH +---------------+$",
parents=("banner $",),
),
ConfigLine(config_line="+----------------+ WARNING RUCKUS SWITCH +---------------+", parents=()),
Copy link
Contributor

Choose a reason for hiding this comment

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

The seems like a regression, the prior one would be preferred.

This reverts commit a980bb7.

	modified:   netutils/config/parser.py
	modified:   tests/unit/mock/config/parser/base/ruckus_fastiron/fastiron_full_received.py
@pato23arg pato23arg requested a review from jeffkala May 2, 2023 12:48
@jeffkala
Copy link
Collaborator

jeffkala commented May 11, 2023

Just this should work. And then we could just overload the banner part.

class FastironConfigParser(IOSConfigParser):
    """Ruckus FastIron ICX config parser."""

    comment_chars: t.List[str] = ["!"]
    banner_start: t.List[str] = ["banner motd", "banner"]
    regex_banner = re.compile(r"^banner(\smotd)?\s+(?P<banner_delimiter>\S)")

@jeffkala jeffkala merged commit 3ff4799 into networktocode:develop Jul 3, 2023
17 checks passed
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

Successfully merging this pull request may close these issues.

None yet

3 participants