Skip to content

Method not found 'ctx_stop_autotriggers' #1208

@damsolo

Description

@damsolo

Hi,
I`ve built trex and EMU from source (https://github.com/cisco-system-traffic-generator/trex-emu?tab=readme-ov-file#how-to-build) and have used EMUClient in Python:

import trex.emu.api as emu
....
emu_client = emu.EMUClient(server="localhost")
emu_client.connect()
emu_client.remove_all_clients_and_ns()

I got an error:

...
    emu_client.remove_all_clients_and_ns()
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/common/trex_api_annotators.py", line 51, in wrap2
    ret = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/emu/trex_emu_client.py", line 1425, in remove_all_clients_and_ns
    self.stop_autotriggers_ns(ns_key)
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/common/trex_api_annotators.py", line 51, in wrap2
    ret = f(*args, **kwargs)
          ^^^^^^^^^^^^^^^^^^
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/emu/trex_emu_client.py", line 1449, in stop_autotriggers_ns
    self._send_chunks(cmd = 'ctx_stop_autotriggers', data = data)
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/emu/trex_emu_client.py", line 396, in _send_chunks
    _check_rc(rc, response)
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/emu/trex_emu_client.py", line 361, in _check_rc
    self._err(rc.err())
  File "/opt/trex-core/scripts/automation/trex_control_plane/interactive/trex/emu/trex_emu_client.py", line 489, in _err
    raise TRexError(msg)
trex.common.trex_exceptions.TRexError: Method not found
...

I don't observe this error when I get trex and EMU in this way:
https://trex-tgn.cisco.com/trex/doc/trex_manual.html#_obtaining_the_trex_package
(where EMU binary is already in place).

In the EMU source code I don't see the ctx_stop_autotriggers RPC call registered https://github.com/cisco-system-traffic-generator/trex-emu/blob/master/src/emu/core/rpc_base_cmds.go#L588

but it was used here: 0119ec8

Am I missing something or the EMU version in the trex latest version (3.0.8) is different than the top of the master branch (https://github.com/cisco-system-traffic-generator/trex-emu)?

Thanks in advance
Damian

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions