{"action":"created","issue":{"url":"https://api.github.com/repos/Igalia/snabb/issues/539","repository_url":"https://api.github.com/repos/Igalia/snabb","labels_url":"https://api.github.com/repos/Igalia/snabb/issues/539/labels{/name}","comments_url":"https://api.github.com/repos/Igalia/snabb/issues/539/comments","events_url":"https://api.github.com/repos/Igalia/snabb/issues/539/events","html_url":"https://github.com/Igalia/snabb/pull/539","id":187650940,"number":539,"title":"[WIP] Adapt lwAFTR to use YANG configuration","user":{"login":"wingo","id":1745903,"avatar_url":"https://avatars.githubusercontent.com/u/1745903?v=3","gravatar_id":"","url":"https://api.github.com/users/wingo","html_url":"https://github.com/wingo","followers_url":"https://api.github.com/users/wingo/followers","following_url":"https://api.github.com/users/wingo/following{/other_user}","gists_url":"https://api.github.com/users/wingo/gists{/gist_id}","starred_url":"https://api.github.com/users/wingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingo/subscriptions","organizations_url":"https://api.github.com/users/wingo/orgs","repos_url":"https://api.github.com/users/wingo/repos","events_url":"https://api.github.com/users/wingo/events{/privacy}","received_events_url":"https://api.github.com/users/wingo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-07T08:27:42Z","updated_at":"2016-11-07T09:27:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Igalia/snabb/pulls/539","html_url":"https://github.com/Igalia/snabb/pull/539","diff_url":"https://github.com/Igalia/snabb/pull/539.diff","patch_url":"https://github.com/Igalia/snabb/pull/539.patch"},"body":"This PR will adapt the lwAFTR application to use a `lib.yang` configuration.  In doing so it will join together what is currently kept in two separate files, the configuration file and the binding table, into one unified configuration file.  As is currently the case with the binding table, the new unified configuration file will be compiled to an efficient binary format so that the data plane can load it directly.\r\n\r\nTo-do items:\r\n\r\n- [x] Add ability to serialize a configuration as text, to implement the `dump-config` command\r\n\r\n- [x] Rework YANG model from draft to something that models current configuration\r\n\r\n- [ ] Add a migration utility to take a current conf+binding-table and print a new configuration.  There's so many of these damn things that I don't want to do it by hand, and this way users can also benefit\r\n\r\n- [ ] Change lwAFTR to load configuration from new config but into old data structure\r\n\r\n- [ ] Change lwAFTR to use new data structure directly"},"comment":{"url":"https://api.github.com/repos/Igalia/snabb/issues/comments/258785837","html_url":"https://github.com/Igalia/snabb/pull/539#issuecomment-258785837","issue_url":"https://api.github.com/repos/Igalia/snabb/issues/539","id":258785837,"user":{"login":"wingo","id":1745903,"avatar_url":"https://avatars.githubusercontent.com/u/1745903?v=3","gravatar_id":"","url":"https://api.github.com/users/wingo","html_url":"https://github.com/wingo","followers_url":"https://api.github.com/users/wingo/followers","following_url":"https://api.github.com/users/wingo/following{/other_user}","gists_url":"https://api.github.com/users/wingo/gists{/gist_id}","starred_url":"https://api.github.com/users/wingo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wingo/subscriptions","organizations_url":"https://api.github.com/users/wingo/orgs","repos_url":"https://api.github.com/users/wingo/repos","events_url":"https://api.github.com/users/wingo/events{/privacy}","received_events_url":"https://api.github.com/users/wingo/received_events","type":"User","site_admin":false},"created_at":"2016-11-07T09:27:45Z","updated_at":"2016-11-07T09:27:45Z","body":"As far as I can tell this YANG schema corresponds to configs like this:\r\n\r\n```\r\nexternal-interface {\r\n  ip 1.2.3.4;\r\n  mac 0:0:0:0:0:0;\r\n  [mtu 1460;]\r\n  [ingress-filter str;]\r\n  [egress-filter str;]\r\n  [allow-incoming-icmp bool;]\r\n  [generate-icmp-errors bool;]\r\n  [vlan-tag 4444;]\r\n  next-hop {\r\n    [ip 2.3.4.5;]\r\n    [mac 1:1:1:1:1:1;]\r\n  }\r\n}\r\ninternal-interface {\r\n  ip 8:9:a:b:c:d:e:f;\r\n  mac 2:2:2:2:2:2;\r\n  [mtu 1500;]\r\n  [ingress-filter str;]\r\n  [egress-filter str;]\r\n  [allow-incoming-icmp bool;]\r\n  [generate-icmp-errors bool;]\r\n  [vlan-tag 6666;]\r\n  next-hop {\r\n    [ip 7:8:9:a:b:c:d:e;]\r\n    [mac 3:3:3:3:3:3;]\r\n  }\r\n}\r\nerror-rate-limiting {\r\n  [packets 100000;]\r\n  [period 2;]\r\n}\r\nbinding-table {\r\n  psid-map {\r\n    addr 1.2.3.4; //key\r\n    [end-addr 4.5.6.7;]\r\n    psid-length 10;\r\n    [shift 6;]\r\n    [reserved-ports-bit-count 0;]\r\n  }...\r\n  br-address 0:1:2:3:4:4:6:7;...\r\n  softwire {\r\n    ipv4-address 10.10.10.10;\r\n    psid 42;\r\n    br 0;\r\n    ipv6-address 2:3:4:5:6:7:8:9;\r\n  }...\r\n}\r\n```"}}
{"actor":{"display_login":"wingo"}}