oft: use pyloxi version map
diff --git a/oft b/oft
index 36569f5..8dd5952 100755
--- a/oft
+++ b/oft
@@ -172,7 +172,7 @@
     group.add_option("--platform-dir", type="string", help="Directory containing platform modules")
     group.add_option("--interface", "-i", type="interface", dest="interfaces", metavar="INTERFACE", action="append",
                      help="Specify a OpenFlow port number and the dataplane interface to use. May be given multiple times. Example: 1@eth1")
-    group.add_option("--of-version", "-V", dest="openflow_version", choices=["1.0", "1.1", "1.2"],
+    group.add_option("--of-version", "-V", dest="openflow_version", choices=loxi.version_names.values(),
                      help="OpenFlow version to use")
     parser.add_option_group(group)
 
@@ -351,12 +351,8 @@
 logging.info("++++++++ " + time.asctime() + " ++++++++")
 
 # Pick an OpenFlow protocol module based on the configured version
-wire_versions = {
-    "1.0": 1,
-    "1.1": 2,
-    "1.2": 3,
-}
-sys.modules["ofp"] = loxi.protocol(wire_versions[config["openflow_version"]])
+name_to_version = dict((v,k) for k, v in loxi.version_names.iteritems())
+sys.modules["ofp"] = loxi.protocol(name_to_version[config["openflow_version"]])
 
 # HACK: testutils.py imports controller.py, which needs the ofp module
 import oftest.testutils