2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-01 06:45:17 +00:00

ofp-errors: Rename "OF" to "OF1.0+", "NX" to "NX1.0+".

This seems like a more reasonable way to do things given that we will soon
need "OpenFlow 1.1 and later" and "OpenFlow 1.1 only" keywords.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Reviewed-by: Simon Horman <horms@verge.net.au>
This commit is contained in:
Ben Pfaff
2012-03-26 11:22:42 -07:00
parent e792ba50dd
commit 4000658b1a
2 changed files with 44 additions and 42 deletions

View File

@@ -194,7 +194,7 @@ def extract_ofp_errors(filenames):
names.append(enum)
for dst in dsts.split(', '):
m = re.match(r'([A-Z0-9.]+)\((\d+)(?:,(\d+))?\)$', dst)
m = re.match(r'([A-Z0-9.+]+)\((\d+)(?:,(\d+))?\)$', dst)
if not m:
fatal("%s: syntax error in destination" % dst)
targets = m.group(1)
@@ -204,12 +204,13 @@ def extract_ofp_errors(filenames):
else:
code = None
target_map = {"OF": ("OF1.0", "OF1.1"),
"OF1.0": ("OF1.0",),
"OF1.1": ("OF1.1",),
"NX": ("OF1.0", "OF1.1"),
"NX1.0": ("OF1.0",),
"NX1.1": ("OF1.1",)}
target_map = {"OF1.0+": ("OF1.0", "OF1.1"),
"OF1.1+": ("OF1.1",),
"OF1.0": ("OF1.0",),
"OF1.1": ("OF1.1",),
"NX1.0+": ("OF1.0", "OF1.1"),
"NX1.0": ("OF1.0",),
"NX1.1": ("OF1.1",)}
if targets not in target_map:
fatal("%s: unknown error domain" % targets)
for target in target_map[targets]: