From f3121bd4ab559117a3c62253e955a3695837b8c6 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 20 Oct 2011 12:08:19 -0400 Subject: [PATCH] added support for interfaces --- sfa/util/plxrn.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sfa/util/plxrn.py b/sfa/util/plxrn.py index dacdd514..5976f3ec 100644 --- a/sfa/util/plxrn.py +++ b/sfa/util/plxrn.py @@ -26,7 +26,7 @@ class PlXrn (Xrn): def site_hrn (auth, login_base): return '.'.join([auth,login_base]) - def __init__ (self, auth=None, hostname=None, slicename=None, email=None, **kwargs): + def __init__ (self, auth=None, hostname=None, slicename=None, email=None, interface=None, **kwargs): #def hostname_to_hrn(auth_hrn, login_base, hostname): if hostname is not None: self.type='node' @@ -48,6 +48,10 @@ class PlXrn (Xrn): # keep only the part before '@' and replace special chars into _ self.hrn='.'.join([auth,email.split('@')[0].replace(".", "_").replace("+", "_")]) self.hrn_to_urn() + elif interface is not None: + self.type = 'interface' + self.hrn = auth + '.' + interface + self.hrn_to_urn() else: Xrn.__init__ (self,**kwargs) -- 2.45.2