Merge pull request #310 from rlane/ivs-verbose

IVSSwitch: add an option to control the --verbose flag
This commit is contained in:
lantz
2014-05-28 14:31:45 -07:00
+4 -2
View File
@@ -1090,8 +1090,9 @@ OVSKernelSwitch = OVSSwitch
class IVSSwitch(Switch): class IVSSwitch(Switch):
"""IVS virtual switch""" """IVS virtual switch"""
def __init__( self, name, **kwargs ): def __init__( self, name, verbose=True, **kwargs ):
Switch.__init__( self, name, **kwargs ) Switch.__init__( self, name, **kwargs )
self.verbose = verbose
@classmethod @classmethod
def setup( cls ): def setup( cls ):
@@ -1117,7 +1118,8 @@ class IVSSwitch(Switch):
args = ['ivs'] args = ['ivs']
args.extend( ['--name', self.name] ) args.extend( ['--name', self.name] )
args.extend( ['--dpid', self.dpid] ) args.extend( ['--dpid', self.dpid] )
args.extend( ['--verbose'] ) if self.verbose:
args.extend( ['--verbose'] )
for intf in self.intfs.values(): for intf in self.intfs.values():
if not intf.IP(): if not intf.IP():
args.extend( ['-i', intf.name] ) args.extend( ['-i', intf.name] )