{"action":"created","issue":{"url":"https://api.github.com/repos/Igalia/snabb/issues/510","repository_url":"https://api.github.com/repos/Igalia/snabb","labels_url":"https://api.github.com/repos/Igalia/snabb/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/Igalia/snabb/issues/510/comments","events_url":"https://api.github.com/repos/Igalia/snabb/issues/510/events","html_url":"https://github.com/Igalia/snabb/issues/510","id":184513275,"number":510,"title":"Migrate lwAFTR to 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":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-21T15:24:31Z","updated_at":"2016-12-06T19:22:26Z","closed_at":"2016-11-18T10:44:38Z","body":"With the `yang` branch we will be migrating the lwaftr to YANG configuration, using the schema that currently lives at `src/apps/lwaftr/snabb-softwire.yang`.  Here is a random quick braindump of things to do.\r\n- [x] Define a place for all yang schemas in the snabb source tree\r\n- [x] Compile yang schemas into snabb binary\r\n- [x] Allow yang schemas to be required by name via \"require('yang.module.ietf-softwire') or something.  Perhaps that would load the text of the yang module, perhaps some compiled representation, probably the text tho which would then be parsed.\r\n- [x] Tweak the yang module so that parsing produces a fresh data object\r\n~~- [ ] Maintain a cache of loaded yang modules by name (?)~~ (trivial to do, will do if needed)\r\n- [x] Add ability for a \"compile\" step that happens after validation.  Implement by require('yang.compile.ietf-softwire') which loads Lua code.  If no compile module, no problem.  For lwaftr this will compile \"binding-entry\" subtree to binding table.\r\n- [x] Add binary serialize capability that writes out a validated, compiled configuration to a single file.  This is what we will use to cache compiled lwaftr configurations to speed up lwaftr startup, and as the configuration format passed between config and worker processes when workers need to do a full config reload.  A serialized configuration will embed the yang module, its version, and a version for the serializer, so that if anything is out of date, the cache won't be used.\r\n- [x] Update snabb-softwire yang spec to match #519.\r\n- [x] Add deserialize capability that will produce a YANG format configuration given a serialized file.  In this way also a running Snabb process will always be able to tell you the running in source format, or potentially a subtree of the configuration.\r\n- [x] Add bridge to lwAFTR configuration from a data tree that has been compiled.  Trivial.\r\n- [x] Switch configuration format of lwAFTR to compiled data tree\r\n"},"comment":{"url":"https://api.github.com/repos/Igalia/snabb/issues/comments/265245867","html_url":"https://github.com/Igalia/snabb/issues/510#issuecomment-265245867","issue_url":"https://api.github.com/repos/Igalia/snabb/issues/510","id":265245867,"user":{"login":"calvincheng8","id":20169816,"avatar_url":"https://avatars.githubusercontent.com/u/20169816?v=3","gravatar_id":"","url":"https://api.github.com/users/calvincheng8","html_url":"https://github.com/calvincheng8","followers_url":"https://api.github.com/users/calvincheng8/followers","following_url":"https://api.github.com/users/calvincheng8/following{/other_user}","gists_url":"https://api.github.com/users/calvincheng8/gists{/gist_id}","starred_url":"https://api.github.com/users/calvincheng8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calvincheng8/subscriptions","organizations_url":"https://api.github.com/users/calvincheng8/orgs","repos_url":"https://api.github.com/users/calvincheng8/repos","events_url":"https://api.github.com/users/calvincheng8/events{/privacy}","received_events_url":"https://api.github.com/users/calvincheng8/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T19:22:26Z","updated_at":"2016-12-06T19:22:26Z","body":"Regarding the problem with \"range 0..0;\", you could simply replace it with \"range 0;\""}}
{"actor":{"display_login":"calvincheng8"}}