Skip to content

Commit

Permalink
Merge branch 'master' into release-1.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier authored Nov 20, 2024
2 parents 0dc6af1 + 392d4c8 commit 29fb682
Show file tree
Hide file tree
Showing 51 changed files with 1,787 additions and 103 deletions.
14 changes: 14 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# These are supported funding model platforms
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: ["https://openwisp.org/sponsorship/"]
32 changes: 32 additions & 0 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish Python Package to Pypi.org

on:
release:
types: [published, edited]

permissions:
id-token: write

jobs:
pypi-publish:
name: Release Python Package on Pypi.org
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/openwisp-controller
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
pip install -U pip
pip install build
- name: Build package
run: python -m build
- name: Publish package distributions to PyPI
uses: pypa/[email protected]
49 changes: 49 additions & 0 deletions docs/developer/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,55 @@ object are changed, but only on ``post_add`` or ``post_remove`` actions,
``post_clear`` is ignored for the same reason explained in the previous
section.

``config_deactivating``
~~~~~~~~~~~~~~~~~~~~~~~

**Path**: ``openwisp_controller.config.signals.config_deactivating``

**Arguments**:

- ``instance``: instance of the object being deactivated
- ``previous_status``: previous status of the object before deactivation

This signal is emitted when a configuration status of device is set to
``deactivating``.

``config_deactivated``
~~~~~~~~~~~~~~~~~~~~~~

**Path**: ``openwisp_controller.config.signals.config_deactivated``

**Arguments**:

- ``instance``: instance of the object being deactivated
- ``previous_status``: previous status of the object before deactivation

This signal is emitted when a configuration status of device is set to
``deactivated``.

``device_deactivated``
~~~~~~~~~~~~~~~~~~~~~~

**Path**: ``openwisp_controller.config.signals.device_deactivated``

**Arguments**:

- ``instance``: instance of the device being deactivated

This signal is emitted when a device is flagged for deactivation.

``device_activated``
~~~~~~~~~~~~~~~~~~~~

**Path**: ``openwisp_controller.config.signals.device_activated``

**Arguments**:

- ``instance``: instance of the device being activated

This signal is emitted when a device is flagged for activation (after
deactivation).

.. _config_backend_changed:

``config_backend_changed``
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ the OpenWISP architecture.
:maxdepth: 1

user/intro.rst
user/device-config-status.rst
user/templates.rst
user/variables.rst
user/device-groups.rst
Expand Down
38 changes: 38 additions & 0 deletions docs/user/device-config-status.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Device Configuration Status
===========================

The device's configuration status (`Device.config.status`) indicates the
current state of the configuration as managed by OpenWISP. The possible
statuses and their meanings are explained below.

``modified``
------------

The device configuration has been updated in OpenWISP, but these changes
have not yet been applied to the device. The device is pending an update.

``applied``
-----------

The device has successfully applied the configuration changes made in
OpenWISP. The current configuration on the device matches the latest
changes.

``error``
---------

An issue occurred while applying the configuration to the device, causing
the device to revert to its previous working configuration.

``deactivating``
----------------

The device is in the process of being deactivated. The configuration is
scheduled to be removed from the device.

``deactivated``
---------------

The device has been deactivated. The configuration applied through
OpenWISP has been removed, and any other operation to manage the device
will be prevented or rejected.
19 changes: 19 additions & 0 deletions docs/user/rest-api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,29 @@ from the config of a device,
Delete Device
~~~~~~~~~~~~~

.. note::

A device must be deactivated before it can be deleted. Otherwise, an
``HTTP 403 Forbidden`` response will be returned.

.. code-block:: text
DELETE /api/v1/controller/device/{id}/
Deactivate Device
~~~~~~~~~~~~~~~~~

.. code-block:: text
POST /api/v1/controller/device/{id}/deactivate/
Activate Device
~~~~~~~~~~~~~~~

.. code-block:: text
POST /api/v1/controller/device/{id}/activate/
List Device Connections
~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
8 changes: 6 additions & 2 deletions docs/user/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ways in which OpenWISP can connect to devices in order to launch commands.
``OPENWISP_UPDATE_STRATEGIES``
------------------------------

============ ============================================================================
============ ==============================================================================
**type**: ``tuple``
**default**: .. code-block:: python

Expand All @@ -85,8 +85,12 @@ ways in which OpenWISP can connect to devices in order to launch commands.
"openwisp_controller.connection.connectors.openwrt.ssh.OpenWrt",
"OpenWRT SSH",
),
(
"openwisp_controller.connection.connectors.openwrt.ssh.OpenWisp1",
"OpenWISP 1.x SSH",
),
)
============ ============================================================================
============ ==============================================================================

Available update strategies. An update strategy is a subclass of a
connector class which defines an ``update_config`` method which is in
Expand Down
Loading

0 comments on commit 29fb682

Please sign in to comment.