From: Tony Mack Date: Mon, 22 Aug 2011 12:22:23 +0000 (-0400) Subject: added urn_to_sliver_id() back X-Git-Tag: sfa-1.0-33~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c90201600fe2e94f432e81dec5a9b1817bc76ca5;p=sfa.git added urn_to_sliver_id() back --- diff --git a/sfa/util/xrn.py b/sfa/util/xrn.py index d5410ab2..75c4f32c 100644 --- a/sfa/util/xrn.py +++ b/sfa/util/xrn.py @@ -32,6 +32,9 @@ 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([urn, slice_id, node_id, index]) + class Xrn: ########## basic tools on HRNs