def NCSVPNBackend(network_name, nrm_ports, parent_requester, cfg): 

    name = network_name % 'NCS VPN %s'
    nrm_map  = dict( [ (p.name, p) for p in nrm_ports ] ) # for the generic backend
    port_map = dict( [ (p.name, p.interface) for p in nrm_ports ] ) # for the nrm backend

    # extract config items
    ncs_services_url = str(cfg[config.NCS_SERVICES_URL]) # convert from unicode
    user             = cfg[config.NCS_USER]
    password         = cfg[config.NCS_PASSWORD]

    cm = NCSVPNConnectionManager(ncs_services_url, user, password, port_map, name)
    return genericbackend.GenericBackend(network_name, nrm_map, cm, parent_requester, name)
dataset/ETHPy150Open NORDUnet/opennsa/opennsa/backends/ncsvpn.py/NCSVPNBackend/swapped operands of `%`