Merge branch '13-support' of git://github.com/jonstout/loxigen
diff --git a/.gitignore b/.gitignore
index 921eb25..8b36dd4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,5 @@
local
.loxi_ts.*
.loxi_gen_files
+loxi_output
+loxigen.log
diff --git a/lang_python.py b/lang_python.py
index 7c4a0e3..4d64e8d 100644
--- a/lang_python.py
+++ b/lang_python.py
@@ -63,6 +63,9 @@
versions = {
1: "of10",
+ 2: "of11",
+ 3: "of12",
+ 4: "of13"
}
prefix = 'pyloxi/loxi'
diff --git a/py_gen/templates/const.py b/py_gen/templates/const.py
index c5a0e93..93418a1 100644
--- a/py_gen/templates/const.py
+++ b/py_gen/templates/const.py
@@ -37,7 +37,7 @@
OFP_VERSION = ${version}
:: for (group, idents) in sorted(groups.items()):
-:: idents.sort(key=lambda (ident, value): eval(value))
+:: idents.sort(key=lambda (ident, value): eval(value) if value != 'OFPVID_NONE' else 0)
# Identifiers from group ${group}
:: for (ident, value) in idents:
:: if version == 1 and ident.startswith('OFPP_'):
diff --git a/py_gen/templates/toplevel_init.py b/py_gen/templates/toplevel_init.py
index c990aa3..3151404 100644
--- a/py_gen/templates/toplevel_init.py
+++ b/py_gen/templates/toplevel_init.py
@@ -36,6 +36,15 @@
if ver == 1:
import of10
return of10
+ elif ver == 2:
+ import of11
+ return of11
+ elif ver == 3:
+ import of12
+ return of12
+ elif ver == 4:
+ import of13
+ return of13
else:
raise ValueError