pktgen_ixia: fix a issue taking ownership failed
Commit Message
DTS has to take ownership of an ixia port, then can operate it.
If the port is owned by other user, DTS has to take ownership forcedly.
It seems DTS intend to do above but with wrong code implement.
Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
framework/pktgen_ixia.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
Comments
> DTS has to take ownership of an ixia port, then can operate it.
> If the port is owned by other user, DTS has to take ownership forcedly.
> It seems DTS intend to do above but with wrong code implement.
>
> Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
Applied
@@ -610,13 +610,13 @@ class Ixia(SSHConnection):
for item in self.ports]),
"% ", 10)
if out.strip()[-1] != '0':
- return False
- out = self.send_expect("ixTakeOwnership [list %s] force" % ' '.join(
+ self.logger.info("Force to take ownership:")
+ out = self.send_expect("ixTakeOwnership [list %s] force" % ' '.join(
['[list %d %d %d]' % (self.chasId, item['card'], item['port'])
for item in self.ports]),
"% ", 10)
- if out.strip()[-1] != '0':
- return False
+ if out.strip()[-1] != '0':
+ return False
return True