Change to switch initialization:
Making sure the interface is up after config by sending ifconfig up.
Otherwise If the interface had previously existed and brought down,
it never comes up and the test case will fail.
Change to switch tear down:
Make sure to list down interfaces when deleting bridges, by using ifconfig -a modifier.
Otherwise if the interface is down (due to previous ifconfig down) the bridge is not deleted.
Also removing blank lines to pass tox test.
Change-Id: Ief23ca02d9f3bd0d14155642b517695ef23dcbe1
Signed-off-by: Jesus Arechiga <jesus.arechiga@gmail.com>
@property
def cleanup_cmds(self):
- return ['/sbin/ifconfig | egrep \'^s\' | awk \'{print \"sudo ovs-vsctl del-br\",$1}\' | sh']
+ return ['/sbin/ifconfig -a | egrep \'^s\' | awk \'{print \"sudo ovs-vsctl del-br\",$1}\' | sh']
@property
def initialization_cmds(self):
def base_openflow_config(self):
return ['sudo ovs-vsctl add-br s1',
'sudo ovs-vsctl set bridge s1 protocols=OpenFlow13',
- 'sudo ovs-vsctl set-controller s1 tcp:' + self.of_controller_ip]
+ 'sudo ovs-vsctl set-controller s1 tcp:' + self.of_controller_ip,
+ 'sudo ifconfig s1 up']
@property
def openflow_validation_cmd(self):