-
Notifications
You must be signed in to change notification settings - Fork 557
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
IOS driver get_network_instances fix #1095
IOS driver get_network_instances fix #1095
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I'll familiarise myself and have a look. |
FYI: we are planning to release NAPALM 3.0.0 soon. If you'd like your patch to be included in this version, please address the comments above. Thanks! |
@chonty were you going to revisit this? Thanks! |
closing it was the boot up the arse I needed. Tests added and an unhandled error when no VRFs present was fixed. Can you re-open and review please? |
Sure thing, @chonty. I'll reopen, then you can push your changes. Cheers! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, and the tests are passing. I only have one suggestion, then this should be good to go.
@@ -1,17 +1,17 @@ | |||
Load for five secs: 0%/0%; one minute: 1%; five minutes: 1% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd ask you to refrain from changing the existing test-cases, but just add new ones (as you already did). In other words, please keep the no_vrf
case and revert the changes under normal
. Of course, if there's anything incorrect with the existing data, please clarify here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I just re-read the PR description and the test data I threw together was irrelevant anyway. New test cases incoming.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant test cases added and I dirty reverted the originals by copying them and pushing them again with 4dff67c. Hopefully that's not a problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made a dog's breakfast out of that. The normal test case is now failing in a way I don't understand:
AssertionError: Expected result varies on some keys
{
"default": {
"interfaces": {
"interface": {
"GigabitEthernet0": {
"result": null,
"expected": {}
}
}
}
},
"Mgmt-intf": {
"interfaces": {
"interface": {
"Gi0": {
"result": null,
"expected": {}
},
"GigabitEthernet0": {
"result": {},
"expected": null
}
}
}
}
}
and the data is actually invalid. GigabitEthernet0 appears in both default and Mgmt-intf instances which this PR corrects.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem at all, I don't mind what method you use as long as we get to there ;)
Looks like the tests are failing on the normal
test case now, I think you can just copy the content from https://github.com/napalm-automation/napalm/tree/develop/test/ios/mocked_data/test_get_network_instances/normal and should be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests were failing with https://github.com/napalm-automation/napalm/tree/develop/test/ios/mocked_data/test_get_network_instances/normal for some reason and the data was invalid anyway because Gi0 in Mgmt-intf unwraps to GigabitEthernet0 which also appears in the default instance. Replaced the test case with my new one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, makes sense
Corrects the IOS driver's get_network_instances output.
Problems addressed:
example of error covered in point 3:
Vl666 expands to VLAN666 and VLAN666 != Vlan666: