diff options
author | Ben Pfaff <blp@nicira.com> | 2011-10-18 09:29:54 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-10-18 13:36:20 -0700 |
commit | 2c84fdf286a0f74246c7d2f2b824ba6fb2811930 (patch) | |
tree | 80e59bb70a8f4be844883f81526fde9ef925e913 /ovsdb | |
parent | b1184a78452e7160db81e379783cd18937866382 (diff) |
ovsdb: Remove dead Python-related code.
Initial versions of commit 8cdf034974 "python: Implement write support in
Python IDL for OVSDB" converted the OVSDB schemas to Python code so that
their Python clients could just import them. The final version instead
read the schemas from a file, but I forgot to remove some code that
generated the Python schema modules. This commit removes that code.
Reported-by: Ethan Jackson <ethan@nicira.com>
Diffstat (limited to 'ovsdb')
-rw-r--r-- | ovsdb/automake.mk | 5 | ||||
-rwxr-xr-x | ovsdb/ovsdb-idlc.in | 18 |
2 files changed, 2 insertions, 21 deletions
diff --git a/ovsdb/automake.mk b/ovsdb/automake.mk index 5d0b6d7a..b0ee8c9d 100644 --- a/ovsdb/automake.mk +++ b/ovsdb/automake.mk @@ -67,7 +67,7 @@ EXTRA_DIST += \ ovsdb/ovsdb-idlc.in \ ovsdb/ovsdb-idlc.1 DISTCLEANFILES += ovsdb/ovsdb-idlc -SUFFIXES += .ovsidl .ovsschema .py +SUFFIXES += .ovsidl .ovsschema OVSDB_IDLC = $(run_python) $(srcdir)/ovsdb/ovsdb-idlc.in .ovsidl.c: $(OVSDB_IDLC) c-idl-source $< > $@.tmp @@ -75,9 +75,6 @@ OVSDB_IDLC = $(run_python) $(srcdir)/ovsdb/ovsdb-idlc.in .ovsidl.h: $(OVSDB_IDLC) c-idl-header $< > $@.tmp mv $@.tmp $@ -.ovsschema.py: - $(OVSDB_IDLC) python-module $< > $@.tmp - mv $@.tmp $@ EXTRA_DIST += $(OVSIDL_BUILT) BUILT_SOURCES += $(OVSIDL_BUILT) diff --git a/ovsdb/ovsdb-idlc.in b/ovsdb/ovsdb-idlc.in index 4e402888..d7115412 100755 --- a/ovsdb/ovsdb-idlc.in +++ b/ovsdb/ovsdb-idlc.in @@ -548,20 +548,6 @@ void print " %s_columns_init();" % structName print "}" -def print_python_module(schema_file): - schema = ovs.db.schema.DbSchema.from_json(ovs.json.from_file(schema_file)) - print """\ -# Generated automatically -- do not modify! -*- buffer-read-only: t -*- - -import ovs.db.schema -import ovs.json - -__schema_json = \"\"\" -%s -\"\"\" - -schema = ovs.db.schema.DbSchema.from_json(ovs.json.from_string(__schema_json)) -""" % ovs.json.to_string(schema.to_json(), pretty=True) def ovsdb_escape(string): def escape(match): @@ -593,7 +579,6 @@ The following commands are supported: annotate SCHEMA ANNOTATIONS print SCHEMA combined with ANNOTATIONS c-idl-header IDL print C header file for IDL c-idl-source IDL print C source file for IDL implementation - python-module IDL print Python module for IDL nroff IDL print schema documentation in nroff format The following options are also available: @@ -632,8 +617,7 @@ if __name__ == "__main__": commands = {"annotate": (annotateSchema, 2), "c-idl-header": (printCIDLHeader, 1), - "c-idl-source": (printCIDLSource, 1), - "python-module": (print_python_module, 1)} + "c-idl-source": (printCIDLSource, 1)} if not args[0] in commands: sys.stderr.write("%s: unknown command \"%s\" " |