Bringing up the bf_switchd process drops the caller into the Barefoot Shell (bfshell). There is an option (bfrt_python) at the top-level context to access Barefoot Runtime commands via Python.
An attempt to enter this mode results in the following error:
bfshell> bfrt_python
Traceback (most recent call last):
File "/usr/lib/python3.4/bfrtcli.py", line 3, in <module>
from traitlets.config import Config
File "/usr/lib/python3.4/traitlets/__init__.py", line 1, in <module>
from .traitlets import *
File "/usr/lib/python3.4/traitlets/traitlets.py", line 57, in <module>
import six
File "/usr/lib/python3.4/six.py", line 631, in <module>
import struct
File "/usr/lib/python3.4/struct.py", line 13, in <module>
from _struct import *
ImportError: No module named '_struct'
Failed to load bfrtcli python library
bfrt_cli_cmd:197 could not initialize bf_rt for the cli. err: 1
Bringing up the
bf_switchd
process drops the caller into the Barefoot Shell (bfshell
). There is an option (bfrt_python
) at the top-level context to access Barefoot Runtime commands via Python.An attempt to enter this mode results in the following error: