Fix bash cmd used in scenario trunk tests
In scenario trunk test test_subport_connectivity there
is bash command used to check name of base interface on
spawned vm (e.g. ens3 or eth0), configure vlan interface
with vlan_id used on trunk port (e.g. ens3.10),
make this vlan device up and run dhclient on this interface
if it's not running yet.
This command was broken and that cause failure of this test.
Change-Id: I4c0207f79cd6df2594f976b9509697209011edf2
Closes-Bug: #1766701
(cherry picked from commit 6bf840f0a73579804375dddd92b3a20acc57b877)
(cherry picked from commit c78b80becf
)
This commit is contained in:
parent
b9a2864cc9
commit
f9cf834749
|
@ -29,11 +29,11 @@ CONF = config.CONF
|
|||
LOG = logging.getLogger(__name__)
|
||||
|
||||
CONFIGURE_VLAN_INTERFACE_COMMANDS = (
|
||||
'IFACE=$(ip l | grep "^[0-9]*: e" | cut -d \: -f 2) && '
|
||||
'sudo su -c '
|
||||
'"ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d && '
|
||||
'ip l s up dev $IFACE.%(tag)d && '
|
||||
'dhclient $IFACE.%(tag)d"')
|
||||
'IFACE=$(PATH=$PATH:/usr/sbin ip l | grep "^[0-9]*: e"|cut -d \: -f 2) &&'
|
||||
'sudo ip l a link $IFACE name $IFACE.%(tag)d type vlan id %(tag)d &&'
|
||||
'sudo ip l s up dev $IFACE.%(tag)d && '
|
||||
'ps -ef | grep -q "[d]hclient .*$IFACE.%(tag)d" || '
|
||||
'sudo dhclient $IFACE.%(tag)d;')
|
||||
|
||||
|
||||
def get_next_subnet(cidr):
|
||||
|
|
Loading…
Reference in New Issue