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

Update sample graph for unit test against minigraph misconfig leaking into config_db.json #1725

Closed
wants to merge 8 commits into from

Conversation

wendani
Copy link
Contributor

@wendani wendani commented May 17, 2018

- What I did

  1. Update test cases to consider misconfig in minigraph.xml
  • PortChannelInterfaces that can leak into PORTCHANNEL in config_db.json
  • EthernetInterface that can leak into PORT in config_db.json
  • portchannel IPInterface that can leak into PORTCHANNEL_INTERFACE in config_db.json
  • DeviceInterfaceLinks that can leak into DEVICE_NEIGHBOR and PORT in config_db.json
  1. Add one test case to assert that DEVICE_NEIGHBOR does not have non-port_config.ini port

  2. Disallow non-port_config.ini port to get into PORT list even if it has non-zero Bandwidth attribute in DeviceInterfaceLink

  3. remove non-port_config.ini port from PORTCHANNEL, PORTCHANNEL_INTERFACE, and DEVICE_NEIGHBOR

- How I did it

- How to verify it

  1. pytest tests/test_cfggen.py

  2. load minigraph.py on DUT and confirm that config_db.json generated from a misconfig minigraph.xml does not have the false config.

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Copy link
Contributor

@yxieca yxieca left a comment

Choose a reason for hiding this comment

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

Thanks for adding the test. But if you don't add fix at the same time, the PR test will fail and you won't be able to check-in.

Am I missing something?

port_config.ini but contraining non-zero Bandwidth attribute

Add noice config in simple-sample-graph.xml to capture the case that
such a port is leaked into config_db.json

Signed-off-by: Wenda <[email protected]>
…raph.xml as it is in PortChannel1001

Signed-off-by: Wenda <[email protected]>
@wendani
Copy link
Contributor Author

wendani commented May 18, 2018

You fully catch it.

@qiluo-msft
Copy link
Collaborator

Could you reformat your comment on this page with markdown syntax?

@wendani wendani closed this May 18, 2018
@wendani wendani deleted the sample_graph_master branch May 18, 2018 19:39
abdosi added a commit that referenced this pull request Aug 6, 2021
97d971372fac773b98d46bb8f800df7b845e518e (HEAD -> 201911, origin/201911) [sfpshow] Gracefully handle improper 'specification_compliance' field (#1594) (#1729)
2099c73cea81ff4524e680b6f9335c0b0f13b94e [CLI] Implement null_route_helper script (#1740)
b56659175986fe0e5b82c6bd6b3dde163164777b [minigraph][port_config] Consume port_config.json while reloading minigraph (#1725)
e840c42da2a40db2bf993672271f6b75c51c426f Change the method name to align with master, reduce diverge issue (#1703)

Signed-off-by: Abhishek Dosi <[email protected]>
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.

3 participants