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

Using YANG list with multiple keys #1215

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

raj2569
Copy link

@raj2569 raj2569 commented Aug 28, 2017

Hi,

My YANG config has a container defined as:

  container test_list  {
    list entry {
      key "ip01 port01";
      leaf ip01    { type inet:ipv4-address; mandatory true; }
      leaf port01  { type uint16; mandatory true; }
      leaf ip02    { type inet:ipv4-address; mandatory true; }
      leaf port02  { type uint16; mandatory true; }
    }
  }

with configuration file entries as:

test_list {
  entry{ip01 192.168.1.195; port01 22; ip02 192.168.11.229; port02 22; }
  entry{ip01 192.168.1.194; port01 80; ip02 192.168.11.230; port02 80; }
} 

The config file gets compiled in as a ctable, but I am not sure how to use them. specifically, how to define key and values which can be used to lookup in the ctable.

The test program can be run as sudo ./snabb test_yang program/test_yang/test_yang.json

dpino pushed a commit to dpino/snabb that referenced this pull request Apr 3, 2019
Refactor "snabb packetblaster lwaftr" to re-use base apps
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.

1 participant