@@ -548,7 +548,7 @@ class Switch( Node ):
548
548
549
549
portBase = SWITCH_PORT_BASE # 0 for OF < 1.0, 1 for OF >= 1.0
550
550
551
- def __init__ ( self , name , prefix = 's' , opts = '' , listenPort = None , dpid = None , ** kwargs ):
551
+ def __init__ ( self , name , prefix = 's' , opts = '' , listenPort = None , dpid = None , defVendor = False , ** kwargs ):
552
552
Node .__init__ ( self , name , prefix = prefix , ** kwargs )
553
553
self .opts = opts
554
554
self .listenPort = listenPort
@@ -560,6 +560,7 @@ def __init__( self, name, prefix = 's', opts='', listenPort=None, dpid=None, **k
560
560
self .dpid = "00:00:" + self .defaultMAC
561
561
else :
562
562
self .dpid = None
563
+ self .defVendor = defVendor
563
564
564
565
def defaultIntf ( self ):
565
566
"Return interface for HIGHEST port"
@@ -775,8 +776,6 @@ def __init__( self, name, dp=None, **kwargs ):
775
776
self .dp = 'mn-dp%i' % dp
776
777
self .intf = self .dp
777
778
OVSKernelSwitchNew .numSwitch += 1
778
- # Mark the switch so controller will send LLDP/BDDP on all ports
779
- self .opts += ' --mfr-desc="big switch networks" --dp-desc="bigtest datapath" '
780
779
if self .inNamespace :
781
780
error ( "OVSKernelSwitch currently only works"
782
781
" in the root namespace.\n " )
@@ -921,8 +920,6 @@ def __init__( self, name, dp=None, **kwargs ):
921
920
Switch .__init__ ( self , name , ** kwargs )
922
921
self .dp = 'dp%i' % dp
923
922
self .intf = self .dp
924
- # Mark the switch so controller will send LLDP/BDDP on all ports
925
- self .opts += ' --mfr-desc="big switch networks" --dp-desc="bigtest datapath" '
926
923
if self .inNamespace :
927
924
error ( "OVSKernelSwitch currently only works"
928
925
" in the root namespace.\n " )
@@ -956,6 +953,9 @@ def start( self, controllers ):
956
953
intfs = [ self .intfs [ port ] for port in ports ]
957
954
self .cmd ( 'ovs-dpctl' , 'add-if' , self .dp , ' ' .join ( intfs ) )
958
955
# Run protocol daemon
956
+ if not self .defVendor :
957
+ # Mark the switch so controller will send LLDP/BDDP on all ports
958
+ self .opts += ' --mfr-desc="big switch networks" --dp-desc="bigtest datapath" '
959
959
self .cmd ( 'ovs-openflowd ' + self .dp +
960
960
' ' .join ( [ ' tcp:%s:%d' % ( c .IP (), c .port ) \
961
961
for c in controllers ] ) +
0 commit comments