Merge pull request #395 from cdburkard/patches/vlan_fail_output

check for vlan dependency
This commit is contained in:
lantz
2014-09-29 18:33:38 -07:00
+7
View File
@@ -26,6 +26,8 @@ Usage (example uses VLAN ID=1000):
from mininet.node import Host
from mininet.topo import Topo
from mininet.util import quietRun
from mininet.log import error
class VLANHost( Host ):
@@ -107,6 +109,11 @@ if __name__ == '__main__':
setLogLevel( 'info' )
if not quietRun( 'which vconfig' ):
error( "Cannot find command 'vconfig'\nThe packge",
"'vlan' is required in Ubuntu or Debian,",
"or 'vconfig' in Fedora\n" )
exit()
try:
vlan = int( sys.argv[ 1 ] )
except Exception: