pl_slicename() strips sliver_id
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 1 Dec 2011 21:45:30 +0000 (16:45 -0500)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Thu, 1 Dec 2011 21:45:30 +0000 (16:45 -0500)
sfa/util/plxrn.py

index f292823..17d0c15 100644 (file)
@@ -59,8 +59,10 @@ class PlXrn (Xrn):
     def pl_slicename (self):
         self._normalize()
         leaf = self.leaf
-        leaf = re.sub('[^a-zA-Z0-9_]', '', leaf)
-        return self.pl_login_base() + '_' + leaf
+        sliver_id_parts = leaf.split(':')
+        name = sliver_id_parts[0]
+        name = re.sub('[^a-zA-Z0-9_]', '', name)
+        return self.pl_login_base() + '_' + name
 
     #def hrn_to_pl_authname(hrn):
     def pl_authname (self):