X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fserver%2Finterface.py;fp=sfa%2Fserver%2Finterface.py;h=e923057fa2a66df4ff6d0679e40da72a21c89d0a;hb=0bb4d5593e4736ecb2c2dd4162a8feeaa2ef6f38;hp=0804fc1d8535abad1c3541e7dd1acb9b0bb03df7;hpb=59c2ee6282736e99f9519589df226cbff8df2b0a;p=sfa.git diff --git a/sfa/server/interface.py b/sfa/server/interface.py index 0804fc1d..e923057f 100644 --- a/sfa/server/interface.py +++ b/sfa/server/interface.py @@ -60,8 +60,12 @@ class Interfaces(dict): interfaces = [self.interfaces] # set the url and urn for interface in interfaces: + # port is appended onto the domain, before the path. Should look like: + # http://domain:port/path hrn, address, port = interface['hrn'], interface['addr'], interface['port'] - url = 'http://%(address)s:%(port)s' % locals() + address_parts = address.split('/') + address_parts[0] = address_parts[0] + ":" + str(port) + url = "http://%s" % "/".join(address_parts) interface['url'] = url interface['urn'] = hrn_to_urn(hrn, 'authority')