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:
d72c0aa
)
string replace doesn't modify the string in-place
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Tue, 5 Oct 2010 14:52:20 +0000
(16:52 +0200)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Tue, 5 Oct 2010 14:52:20 +0000
(16:52 +0200)
sfa/util/namespace.py
patch
|
blob
|
history
diff --git
a/sfa/util/namespace.py
b/sfa/util/namespace.py
index
fcc65ba
..
b920f00
100644
(file)
--- a/
sfa/util/namespace.py
+++ b/
sfa/util/namespace.py
@@
-20,21
+20,21
@@
def hrn_to_pl_slicename(hrn):
# remove any escaped no alpah numeric characters
#hrn = re.sub('\\\[^a-zA-Z0-9]', '', hrn)
# remove any escaped '.' (i.e. '\.')
# remove any escaped no alpah numeric characters
#hrn = re.sub('\\\[^a-zA-Z0-9]', '', hrn)
# remove any escaped '.' (i.e. '\.')
- hrn.replace('\\.', '')
+ hrn
= hrn
.replace('\\.', '')
parts = hrn.split(".")
return parts[-2] + "_" + parts[-1]
# assuming hrn is the hrn of an authority, return the plc authority name
def hrn_to_pl_authname(hrn):
# remove any escaped '.' (i.e. '\.')
parts = hrn.split(".")
return parts[-2] + "_" + parts[-1]
# assuming hrn is the hrn of an authority, return the plc authority name
def hrn_to_pl_authname(hrn):
# remove any escaped '.' (i.e. '\.')
- hrn.replace('\\.', '')
+ hrn
= hrn
.replace('\\.', '')
parts = hrn.split(".")
return parts[-1]
# assuming hrn is the hrn of an authority, return the plc login_base
def hrn_to_pl_login_base(hrn):
# remove any escaped '.' (i.e. '\.')
parts = hrn.split(".")
return parts[-1]
# assuming hrn is the hrn of an authority, return the plc login_base
def hrn_to_pl_login_base(hrn):
# remove any escaped '.' (i.e. '\.')
- hrn.replace('\\.', '')
+ hrn
= hrn
.replace('\\.', '')
return hrn_to_pl_authname(hrn)
def hostname_to_hrn(auth_hrn, login_base, hostname):
return hrn_to_pl_authname(hrn)
def hostname_to_hrn(auth_hrn, login_base, hostname):