AMs also expose their hrn in GetVersion
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 8 Mar 2011 21:23:52 +0000 (22:23 +0100)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 8 Mar 2011 21:23:52 +0000 (22:23 +0100)
sfa/managers/aggregate_manager_pl.py
sfa/managers/aggregate_manager_vini.py

index 501f8cc..6546c69 100644 (file)
@@ -24,8 +24,11 @@ from sfa.util.version import version_core
 from sfa.util.sfatime import utcparse
 
 def GetVersion(api):
+    xrn=Xrn(api.hrn)
     return version_core({'interface':'aggregate',
-                         'testbed':'myplc'})
+                         'testbed':'myplc',
+                         'hrn':xrn.get_hrn(),
+                         })
 
 def __get_registry_objects(slice_xrn, creds, users):
     """
index 7b0a28c..227281a 100644 (file)
@@ -4,7 +4,7 @@ import traceback
 import sys
 
 from types import StringTypes
-from sfa.util.xrn import urn_to_hrn
+from sfa.util.xrn import urn_to_hrn, Xrn
 from sfa.util.plxrn import hrn_to_pl_slicename
 from sfa.util.rspec import *
 from sfa.util.specdict import *
@@ -29,8 +29,11 @@ start_slice, stop_slice, renew_slice, reset_slice, get_slices, get_ticket, slice
 
 
 def GetVersion(api):
+    xrn=Xrn(api.hrn)
     return version_core({'interface':'aggregate',
-                         'testbed':'myplc.vini'})
+                         'testbed':'myplc.vini',
+                         'hrn':xrn.get_hrn(),
+                         })
 
 def delete_slice(api, xrn, creds):
     hrn, type = urn_to_hrn(xrn)