Skip to content

Conversation

@wenovus
Copy link
Contributor

@wenovus wenovus commented Dec 23, 2020

Sample output:

line 118: type "ocinet:ip-prefix" rejected valid pattern: "192.0.2.1/32"
line 120: type "ocinet:ip-prefix" rejected valid pattern: "FE80::CAFE/128"
line 125: type "ocinet:domain-name" rejected valid pattern: "ambroseesorbma"
line 127: type "ocinet:domain-name" rejected valid pattern: "claire."
line 130: type "ocinet:domain-name" rejected valid pattern: "012345678901234567890123456789012345678901234567890123456789012."
line 135: type "oc-pkt-match-types:port-num-range" rejected valid pattern: "0..0"
line 136: type "oc-pkt-match-types:port-num-range" rejected valid pattern: "00000..00000"
line 137: type "oc-pkt-match-types:port-num-range" rejected valid pattern: "00..00"
line 138: type "oc-pkt-match-types:port-num-range" rejected valid pattern: "01..01"

It's possible to improve it even more by outputting to a textproto for unmarshalling, but I feel this is 80% of the way there.

@wenovus
Copy link
Contributor Author

wenovus commented Dec 23, 2020

Optimistically merging: see sample output at https://gist.github.com/OpenConfigBot/b4486f4ca61fe5111778f5e3da267fd4

@wenovus wenovus merged commit a63cca1 into main Dec 23, 2020
@wenovus wenovus deleted the improve-python-output branch December 23, 2020 21:47
@robshakir
Copy link
Member

Please don't merge code that hasn't been reviewed. I'll change this repo to require code reviews, I'd like to keep a consistent strategy here -- we should only force merge when there is a key requirement to do so.

@wenovus
Copy link
Contributor Author

wenovus commented Jan 6, 2021

OK got it.

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.

2 participants