From: Thierry Parmentelat Date: Tue, 8 Mar 2011 21:23:52 +0000 (+0100) Subject: AMs also expose their hrn in GetVersion X-Git-Tag: sfa-1.0-17~6 X-Git-Url: http://git.onelab.eu/?p=sfa.git;a=commitdiff_plain;h=676c77806a1a2fdde35c0161eb79056cc86cbea1 AMs also expose their hrn in GetVersion --- diff --git a/sfa/managers/aggregate_manager_pl.py b/sfa/managers/aggregate_manager_pl.py index 501f8ccb..6546c69f 100644 --- a/sfa/managers/aggregate_manager_pl.py +++ b/sfa/managers/aggregate_manager_pl.py @@ -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): """ diff --git a/sfa/managers/aggregate_manager_vini.py b/sfa/managers/aggregate_manager_vini.py index 7b0a28c0..227281a6 100644 --- a/sfa/managers/aggregate_manager_vini.py +++ b/sfa/managers/aggregate_manager_vini.py @@ -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)