summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/ovs/db/schema.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/python/ovs/db/schema.py b/python/ovs/db/schema.py
index b68c19e00..5f1f6c41a 100644
--- a/python/ovs/db/schema.py
+++ b/python/ovs/db/schema.py
@@ -125,24 +125,31 @@ class DbSchema(object):
class IdlSchema(DbSchema):
- def __init__(self, name, version, tables, idlPrefix, idlHeader):
+ def __init__(self, name, version, tables, idlPrefix, idlHeader,
+ cDecls, hDecls):
DbSchema.__init__(self, name, version, tables)
self.idlPrefix = idlPrefix
self.idlHeader = idlHeader
+ self.cDecls = cDecls
+ self.hDecls = hDecls
@staticmethod
def from_json(json):
parser = ovs.db.parser.Parser(json, "IDL schema")
idlPrefix = parser.get("idlPrefix", six.string_types)
idlHeader = parser.get("idlHeader", six.string_types)
+ cDecls = parser.get_optional("cDecls", six.string_types, "")
+ hDecls = parser.get_optional("hDecls", six.string_types, "")
subjson = dict(json)
del subjson["idlPrefix"]
del subjson["idlHeader"]
+ subjson.pop("cDecls", None)
+ subjson.pop("hDecls", None)
schema = DbSchema.from_json(subjson)
return IdlSchema(schema.name, schema.version, schema.tables,
- idlPrefix, idlHeader)
+ idlPrefix, idlHeader, cDecls, hDecls)
def column_set_from_json(json, columns):