Skip to content

Invalid behaviour when adding link type for the command line #1242

@GaliMouette

Description

@GaliMouette

While using Mininet release 2.3.1b4

Consider a file custom.py containing the following code :

from mininet.link import Link

class CustomLink(Link):
    pass

links = { 'custom_link' : CustomLink }

Running the following command :

sudo mn --custom custom.py --link custom_link

The output is :

*** No default OpenFlow controller found for default switch!
*** Falling back to OVS Bridge
--------------------------------------------------------------------------------
Caught exception. Cleaning up...

Exception: error: custom_link is unknown - please specify one of dict_keys(['default', 'tc', 'tcu', 'ovs'])
--------------------------------------------------------------------------------
...

I think the issue arise from a missing comma between at the end of the line 202 bellow :

mininet/bin/mn

Lines 202 to 203 in 6eb8973

if name in ( 'topos', 'switches', 'hosts', 'controllers', 'links'
'testnames', 'tests' ):

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions