added geni_api_versions
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Wed, 8 Aug 2012 14:08:25 +0000 (10:08 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 16 Aug 2012 19:35:04 +0000 (15:35 -0400)
sfa/util/version.py.in

index 82537f3..794d428 100644 (file)
@@ -2,12 +2,17 @@
 version_tag="@VERSIONTAG@"
 scm_url="@SCMURL@"
 import socket
+
+from sfa.util.config import Config
  
 def version_core (more={}):
+    config = Config()
+    hostname = socket.gethostname()
     core = { 'code_tag' : version_tag,
              'code_url' : scm_url,
-             'hostname' : socket.gethostname(),
+             'hostname' : hostname,
              'geni_api': 3,
+             'geni_api_versions': {'3': "%s:%s" % (hostname, config.sfa_aggregate_port)}, 
              }
     core.update(more)
     return core