X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=a21b10c02d1b29f72f2d2fbfe0ea9296e2af6562;hb=3d51e29695f79b143974f5cf7b2e104d89626ba4;hp=26795129f3da501a8d211b96b6ceb0c121df3649;hpb=013d9db0fd63345c1d24b2b15b59d3dc5036bc18;p=sfa.git diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 26795129..a21b10c0 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -33,7 +33,7 @@ def hrn_to_urn(hrn,type): return Xrn(hrn, type=type).urn def hrn_authfor_hrn(parenthrn, hrn): return Xrn.hrn_is_auth_for_hrn(parenthrn, hrn) def urn_to_sliver_id(urn, slice_id, node_id, index=0): - return ":".join(map(str, [urn, slice_id, node_id, index])) + return Xrn(urn).get_sliver_id(slice_id, node_id, index) class Xrn: @@ -133,6 +133,13 @@ class Xrn: # if not type: # debug_logger.debug("type-less Xrn's are not safe") + def __repr__ (self): + result="