<commit_before>.. index:: MultiNode API

.. _multinode_api:

MultiNode API
=============

The LAVA MultiNode API provides a simple way to pass messages using the serial
port connection which is already available through LAVA. The API is not
intended for transfers of large amounts of data. Test definitions which need to
transfer files, long messages or other large amounts of data need to set up
their own network configuration, access and download methods and do the
transfer in the test definition.

Guidance in using the API
-------------------------

It is recommended to avoid doing a lot of calculation within the calls to the
API. There are times when a script is needed to retrieve data from the test
shell but resist the temptation to run that script in the call to the API.
**Always** check the output of the script (e.g. with ``lava-test-case``) and/or
run the script separately in the test definition run steps so that the output
appears in the test job logs. Preparing and outputting the data before sending
it with the API will aid in debugging the test definition.

.. note:: Debugging of complex test definitions does **not** only happen during
   the initial development. Retain enough structure in your test definitions to
   be able to debug problems later **without** needing to resubmit the
   MultiNode test job.

.. note:: It is not recommended to use ``lava-test-case`` command in
          conjunction with the MultiNode API calls. The first reason is that
          any errors that might occur withing the API will be ignored by the
          lava-test-case and it will be seen as successful by
          ``lava-test-shell``. The second reason is that the job will end up with
          duplicate test cases for each API call (one from ``lava-test-case``
          and the other one from API command).

.. seealso:: :ref:`Limitations of hacking sessions <hacking_session_limitations>`

.. index:: lava-self

.. _lava_self:

lava-self
---------

Prints the hostname of the current device.

.. note:: The LAVA hostname of a device is the name of the device within LAVA -
   as visible via the web frontend. The same name is used whether the device
   itself has a network connection or not. There is no requirement that the
   LAVA hostname matches anything related to any network connection or network
   service. This means that the LAVA hostname is always available via
   ``lava-group`` and ``lava-self``.
<commit_msg>Fix typo in multinode api documentation.<commit_after>.. index:: MultiNode API

.. _multinode_api:

MultiNode API
=============

The LAVA MultiNode API provides a simple way to pass messages using the serial
port connection which is already available through LAVA. The API is not
intended for transfers of large amounts of data. Test definitions which need to
transfer files, long messages or other large amounts of data need to set up
their own network configuration, access and download methods and do the
transfer in the test definition.

Guidance in using the API
-------------------------

It is recommended to avoid doing a lot of calculation within the calls to the
API. There are times when a script is needed to retrieve data from the test
shell but resist the temptation to run that script in the call to the API.
**Always** check the output of the script (e.g. with ``lava-test-case``) and/or
run the script separately in the test definition run steps so that the output
appears in the test job logs. Preparing and outputting the data before sending
it with the API will aid in debugging the test definition.

.. note:: Debugging of complex test definitions does **not** only happen during
   the initial development. Retain enough structure in your test definitions to
   be able to debug problems later **without** needing to resubmit the
   MultiNode test job.

.. note:: It is not recommended to use ``lava-test-case`` command in
          conjunction with the MultiNode API calls. The first reason is that
          any errors that might occur within the API will be ignored by the
          lava-test-case and it will be seen as successful by
          ``lava-test-shell``. The second reason is that the job will end up with
          duplicate test cases for each API call (one from ``lava-test-case``
          and the other one from API command).

.. seealso:: :ref:`Limitations of hacking sessions <hacking_session_limitations>`

.. index:: lava-self

.. _lava_self:

lava-self
---------

Prints the hostname of the current device.

.. note:: The LAVA hostname of a device is the name of the device within LAVA -
   as visible via the web frontend. The same name is used whether the device
   itself has a network connection or not. There is no requirement that the
   LAVA hostname matches anything related to any network connection or network
   service. This means that the LAVA hostname is always available via
   ``lava-group`` and ``lava-self``.

{'fraction_non_alphanumeric': 0.06646341463414634, 'fraction_numerical': 0.0, 'mean_word_length': 3.3664596273291925, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1037123', 'n_tokens_mistral': 1225, 'n_tokens_neox': 1196, 'n_words': 739}