4 Commits

Author SHA1 Message Date
Paul Vinciguerra
e2ccdf0316 papi: add a per-call _timeout option
add the ability to override the default timeout value on a per-call
 basis.
 Use:
   rv = self.vapi.papi.cli_inband(cmd='wait 10', _timeout=15)

Type: feature

Change-Id: Ia90a58586a1f63e02118599a2a4b7141e5a0b90d
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-12-03 09:28:18 +00:00
Paul Vinciguerra
bfd7d294d0 vlib: add 'wait' cli command
When running exec scripts, there can be a need to wait between statements.

Type: feature

Change-Id: I2a45b390697e09fc222358c9354f28e3368a06ba
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2019-11-27 17:00:12 +00:00
Renato Botelho do Couto
ead1e536d6 misc: Fix python scripts shebang line
Type: fix

Since CentOS 8, RPM build script doesn't accept '#!/usr/bin/env python'
as a valid shebang line.  It requires scripts to explicitly chose
between python2 or python3.

Change all to use python3 as suggested by Paul Vinciguerra.

Depends-On: https://gerrit.fd.io/r/23170

Signed-off-by: Renato Botelho do Couto <renato@netgate.com>
Change-Id: Ie72af9f60fd0609e07f05b70f8d96e738b2754d1
2019-11-05 21:08:59 +00:00
Ole Troan
72d8758fdc cli: Add return value in cli_inband
Even when a CLI command called through the cli_inband API failed
the API would return 0 (SUCCESS). This patch fixes that,
but since most CLI handlers return error->code == 0,
in most failure cases it will return -1 (UNSPECIFIED ERROR).

Type: fix

Change-Id: Ic83f3b23e8e8954bb8aa211301baba24e8c20ef6
Signed-off-by: Ole Troan <ot@cisco.com>
2019-05-10 21:50:34 +00:00