Skip to content

Commit

Permalink
external: remove usbstick and hawkbit
Browse files Browse the repository at this point in the history
These are currently neither used nor tested and should rather be
integrated into labgridhelper. Remove them from the labgrid repository.

Fixes #430

Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
  • Loading branch information
Emantor committed Feb 3, 2020
1 parent 69bf4bd commit f8f4a3c
Show file tree
Hide file tree
Showing 8 changed files with 1 addition and 417 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Expand Up @@ -45,6 +45,7 @@ Breaking changes in 0.3.0
setup the cleanup job.
- ``@attr.s(cmp=False)`` is deprecated and all classes have been moved to
``@attr.s(eq=False)``, this release requires attrs version 19.2.0
- The ``HawkbitTestClient`` and ``USBStick`` classes have been removed

Release 0.2.0 (released Jan 4, 2019)
------------------------------------
Expand Down
44 changes: 0 additions & 44 deletions doc/usage.rst
Expand Up @@ -625,47 +625,3 @@ labgrid contains some command line tools which are used for remote access to
resources.
See :doc:`man/client`, :doc:`man/device-config` and :doc:`man/exporter` for
more information.

USB stick emulation
--------------------
labgrid makes it posible to use a target as an emulated USB stick, allowing
upload, modification, plug and unplug events.
To use a target as an emulated USB stick, several requirements have to be met:

- OTG support on one of the device USB ports
- losetup from util-linux
- mount from util-linux
- A kernel build with `CONFIG_USB_GADGETFS=m`
- A network connection to the target to use the :ref:`SSHDriver <conf-sshdriver>` for file uploads

To use USB stick emulation, import :any:`USBStick` from `labgrid.external` and bind
it to the desired target:

.. code-block:: python
from labgrid.external import USBStick
stick = USBStick(target, '/home/')
The above code block creates the stick and uses the `/home` directory to store
the device images. USBStick images can now be uploaded using the `upload_image`
method. Once an image is selected, files can be uploaded and retrived using the
`put_file` and `get_file` methods. The `plug_in` and `plug_out` functions plug
the emulated USB stick in and out.

hawkBit management API
----------------------

labgrid provides an interface to the hawkbit management API.
This allows a labgrid test to create targets, rollouts and manage deployments.

::

from labgrid.external import HawkbitTestClient

client = HawkbitTestClient('local', '8080', 'admin', 'admin')


The above code connects to a running hawkbit instance on the local computer and
uses the default credentials to log in. The :any:`HawkbitTestClient` provides various
helper functions to add targets, define distribution sets and assign targets.
2 changes: 0 additions & 2 deletions labgrid/external/__init__.py

This file was deleted.

205 changes: 0 additions & 205 deletions labgrid/external/hawkbit.py

This file was deleted.

0 comments on commit f8f4a3c

Please sign in to comment.