git://git.onelab.eu
/
sfa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9d461c
)
added urn_to_sliver_id() back
author
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 22 Aug 2011 12:22:23 +0000
(08:22 -0400)
committer
Tony Mack
<tmack@paris.CS.Princeton.EDU>
Mon, 22 Aug 2011 12:22:23 +0000
(08:22 -0400)
sfa/util/xrn.py
patch
|
blob
|
history
diff --git
a/sfa/util/xrn.py
b/sfa/util/xrn.py
index
d5410ab
..
75c4f32
100644
(file)
--- 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
\r
def hrn_authfor_hrn(parenthrn, hrn): return Xrn.hrn_is_auth_for_hrn(parenthrn, hrn)
\r
\r
+def urn_to_sliver_id(urn, slice_id, node_id, index=0):
\r
+ return ":".join([urn, slice_id, node_id, index])
\r
+
\r
class Xrn:
\r
\r
########## basic tools on HRNs
\r