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

Fix sinitized bug for Junos #1414

Merged
merged 3 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion napalm/junos/junos.py
Original file line number Diff line number Diff line change
Expand Up @@ -2369,7 +2369,7 @@ def get_config(self, retrieve="all", full=False, sanitized=False):

options = {"format": "text", "database": "candidate"}
sanitize_strings = {
r"^(\s+community\s+)\w+(\s+{.*)$": r"\1<removed>\2",
r"^(\s+community\s+)\w+(;.*|\s+{.*)$": r"\1<removed>\2",
r'^(.*)"\$\d\$\S+"(;.*)$': r"\1<removed>\2",
}
if retrieve in ("candidate", "all"):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"startup": "",
"running": "\nversion 18.1;\nsystem {\n host-name some-switch;\n domain-name example.com;\n time-zone UTC;\n authentication-order [ password radius ];\n root-authentication {\n encrypted-password <removed>;\n }\n radius-server {\n 10.0.0.1 {\n secret <removed>;\n timeout 3;\n retry 1;\n }\n }\n login {\n user test-user {\n uid 1717;\n class admin;\n authentication {\n encrypted-password <removed>;\n }\n }\n }\n }\n services {\n ssh {\n protocol-version v2;\n }\n netconf {\n ssh;\n }\n }\n ntp {\n server 10.17.0.1;\n }\n}\nsnmp {\n location napalm;\n contact \"contact@napalm-automation.net\";\n community <removed> {\n authorization read-only;\n }\n}\n",
"candidate": "\nversion 18.1;\nsystem {\n host-name some-switch;\n domain-name example.com;\n time-zone UTC;\n authentication-order [ password radius ];\n root-authentication {\n encrypted-password <removed>;\n }\n radius-server {\n 10.0.0.1 {\n secret <removed>;\n timeout 3;\n retry 1;\n }\n }\n login {\n user test-user {\n uid 1717;\n class admin;\n authentication {\n encrypted-password <removed>;\n }\n }\n }\n }\n services {\n ssh {\n protocol-version v2;\n }\n netconf {\n ssh;\n }\n }\n ntp {\n server 10.17.0.1;\n }\n}\nsnmp {\n location napalm;\n contact \"contact@napalm-automation.net\";\n community <removed> {\n authorization read-only;\n }\n}\n"
"running": "\nversion 18.1;\nsystem {\n host-name some-switch;\n domain-name example.com;\n time-zone UTC;\n authentication-order [ password radius ];\n root-authentication {\n encrypted-password <removed>;\n }\n radius-server {\n 10.0.0.1 {\n secret <removed>;\n timeout 3;\n retry 1;\n }\n }\n login {\n user test-user {\n uid 1717;\n class admin;\n authentication {\n encrypted-password <removed>;\n }\n }\n }\n }\n services {\n ssh {\n protocol-version v2;\n }\n netconf {\n ssh;\n }\n }\n ntp {\n server 10.17.0.1;\n }\n}\nsnmp {\n location napalm;\n contact \"contact@napalm-automation.net\";\n community <removed>;\n community <removed> {\n authorization read-only;\n }\n}\n",
"candidate": "\nversion 18.1;\nsystem {\n host-name some-switch;\n domain-name example.com;\n time-zone UTC;\n authentication-order [ password radius ];\n root-authentication {\n encrypted-password <removed>;\n }\n radius-server {\n 10.0.0.1 {\n secret <removed>;\n timeout 3;\n retry 1;\n }\n }\n login {\n user test-user {\n uid 1717;\n class admin;\n authentication {\n encrypted-password <removed>;\n }\n }\n }\n }\n services {\n ssh {\n protocol-version v2;\n }\n netconf {\n ssh;\n }\n }\n ntp {\n server 10.17.0.1;\n }\n}\nsnmp {\n location napalm;\n contact \"contact@napalm-automation.net\";\n community <removed>;\n community <removed> {\n authorization read-only;\n }\n}\n"
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ system {
snmp {
location napalm;
contact "contact@napalm-automation.net";
community public;
community secure {
authorization read-only;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ system {
snmp {
location napalm;
contact "contact@napalm-automation.net";
community public;
community secure {
authorization read-only;
}
Expand Down