X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Futil%2Fxrn.py;h=ac394f70acfdbb269c12a1aacedbe4eaf4316868;hb=b47e82ba386c944c888970cc254b09d80ac112a7;hp=26795129f3da501a8d211b96b6ceb0c121df3649;hpb=02a4a59a4a49183ec8c631cc03243b97f4602d50;p=sfa.git diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index 26795129..ac394f70 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -32,8 +32,8 @@ def urn_to_hrn(urn): xrn=Xrn(urn); return (xrn.hrn, xrn.type) 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])) +def urn_to_sliver_id(urn, slice_id, node_id, index=0, authority=None): + return Xrn(urn).get_sliver_id(slice_id, node_id, index, authority) 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="