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

question: lldp #167

Open
jedelman8 opened this issue Sep 9, 2016 · 1 comment
Open

question: lldp #167

jedelman8 opened this issue Sep 9, 2016 · 1 comment
Assignees
Labels

Comments

@jedelman8
Copy link

I'm finding it very hard to get started. Are there any examples to test for the following:

  • Ensure the quantity of neighbors are the same pre and post change
  • Verify each neighbor found should be there - so fxp0 should have 3 neighbors and they should be r1, r3, r5, ge-0/0/01 should have 1 neighbor, i.e. r1, etc.

Any help or improvement with the docs would be greaet.

@vnitinv
Copy link
Contributor

vnitinv commented Sep 21, 2016

@jedelman8 For your first query, we can do

check_lldp:
- command: show lldp neighbors
- iterate:
     xpath: //lldp-neighbors-information/lldp-neighbor-information
     id: lldp-local-port-id
     tests:
       - list-not-less: lldp-local-port-id
         err: "Test FAILED!! The post snapshot has less LLDP neighbors
than the pre snapshot"
         info: "Test SUCCEEDED!! The pre and post snapshots have the
same number of LLDP neighbors"
       - list-not-more: lldp-local-port-id
         err: "Test FAILED!! The post snapshot has additional LLDP
neighbors than the pre snapshot"
         info: "Test SUCCEEDED!! The pre and post snapshots have the
same number of LLDP neighbors"

For 2nd query, we can do this using module/script where depending on our first result, we can generate next set of test cases at run time using say jinja template and run those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants