MCPcopy Create free account
hub / github.com/mininet/mininet / setup

Method setup

mininet/node.py:1117–1136  ·  view source on GitHub ↗

Make sure Open vSwitch is installed and working

( cls )

Source from the content-addressed store, hash-verified

1115
1116 @classmethod
1117 def setup( cls ):
1118 "Make sure Open vSwitch is installed and working"
1119 pathCheck( 'ovs-vsctl',
1120 moduleName='Open vSwitch (openvswitch.org)')
1121 # This should no longer be needed, and it breaks
1122 # with OVS 1.7 which has renamed the kernel module:
1123 # moduleDeps( subtract=OF_KMOD, add=OVS_KMOD )
1124 out, err, exitcode = errRun( 'ovs-vsctl -t 1 show' )
1125 if exitcode:
1126 error( out + err +
1127 'ovs-vsctl exited with code %d\n' % exitcode +
1128 '*** Error connecting to ovs-db with ovs-vsctl\n'
1129 'Make sure that Open vSwitch is installed, '
1130 'that ovsdb-server is running, and that\n'
1131 '"ovs-vsctl show" works correctly.\n'
1132 'You may wish to try '
1133 '"service openvswitch-switch start".\n' )
1134 exit( 1 )
1135 version = quietRun( 'ovs-vsctl --version' )
1136 cls.OVSVersion = findall( r'\d+\.\d+', version )[ 0 ]
1137
1138 @classmethod
1139 def isOldOVS( cls ):

Callers

nothing calls this directly

Calls 3

pathCheckFunction · 0.90
errRunFunction · 0.90
quietRunFunction · 0.90

Tested by

no test coverage detected