Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mdk/add client tests #67

Draft
wants to merge 51 commits into
base: dev
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
66fe38f
start of runcommand refactor
Oct 25, 2024
1f82960
Refactored run_command usage and added tests
MichaelKetchel Oct 25, 2024
ea17a88
Refactored runcommand_error.py to use standard values
MichaelKetchel Oct 25, 2024
9845c78
Fix tests
MichaelKetchel Oct 25, 2024
b11e18a
Improve command parsing using shlex and add docblocks
MichaelKetchel Oct 25, 2024
e578a77
Start a constants file
MichaelKetchel Oct 26, 2024
6cecf23
Add more util methods from other repos, and tests
MichaelKetchel Oct 26, 2024
3f28a72
Refactor util api to use runcommand
MichaelKetchel Oct 26, 2024
b514219
Refactor subprocess usage out of utils service
MichaelKetchel Oct 26, 2024
6e8395c
Refactor subprocess usage out of network service
MichaelKetchel Oct 26, 2024
d46ea8c
heavy-handed pass at consolidating all our global constants into cons…
MichaelKetchel Oct 26, 2024
1f08bd5
API port hardening release v1.0.5-1 (#52)
joshschmelzle Oct 27, 2024
7232d0c
Convert bluetooth_service.py
Oct 28, 2024
d0f0756
Complete refactoring out of helpers.py
Oct 28, 2024
5c76ac2
Completed refactoring of subprocess usage
Oct 29, 2024
c6a5b30
Merge branch 'WLAN-Pi:dev' into dev
MichaelKetchel Oct 29, 2024
fb57c2a
Refactor unittests to pytest
Oct 29, 2024
e393087
Merge remote-tracking branch 'origin/dev' into dev
Oct 29, 2024
ecf9aa1
Format Cleanups
Oct 29, 2024
0254570
Remove todo item
Oct 30, 2024
ccfbc71
Major refactor of wireless control
Nov 4, 2024
bf84f1f
Multiple adapter control should work now.
Nov 5, 2024
8cc892b
More improvements
Nov 5, 2024
89ae0a4
Formatted and linted
Nov 5, 2024
f017c8c
Merge branch 'main' into mdk/enhance_wlan_support
MichaelKetchel Nov 5, 2024
00cdf8a
Formatted and linted again
Nov 5, 2024
439fcbc
Merge branch 'dev' into mdk/enhance_wlan_support
Nov 5, 2024
1b80d9b
Formatted and linted again
Nov 5, 2024
a91f081
fixes https://github.com/WLAN-Pi/wlanpi-core/issues/14
Nov 5, 2024
92f7882
Fix remnant of wlan0 service
Nov 5, 2024
bdb4410
Improve error response of wlan endpoints when a non-existent interfac…
Nov 5, 2024
9308302
Fixed formatting
Nov 5, 2024
cc45c05
Draft of ap radio info stuff
Nov 6, 2024
7958b67
fixed a tyoi
Nov 6, 2024
5767c3b
Cleanup commit, plus more data!
Nov 7, 2024
d984279
bump changelog
Nov 7, 2024
24a47cd
fix imports and duplicate defs
Nov 7, 2024
24a1997
Fix formatting
Nov 7, 2024
abbf8e2
More cleanup, and armored up the network API against command injectio…
Nov 7, 2024
a7dc3ca
Version bump
Nov 7, 2024
f220072
Version bump and format
Nov 11, 2024
d71c40d
Version bump and format
Nov 13, 2024
406d885
Fix some auto gateway config quirks
Nov 13, 2024
e1cbb91
Add iw link endpoint
Nov 14, 2024
bcb6630
Relocate iw link endpoint code
Nov 14, 2024
31bf87e
implement ping and speed test services
Nov 14, 2024
e98c4bf
Add reboot command
Nov 14, 2024
c5e99b2
Add timeout support to runcommand
Nov 14, 2024
5f83ee0
Add DHCP test, Dig, and traceroute, as well as some other optimizations
Nov 15, 2024
c2d03d4
Add a sleep to give enough time for lease data to appear.
Nov 17, 2024
4380da1
version bump to trigger new upload
Nov 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
wlanpi-core (1.0.5-8.2) UNRELEASED; urgency=medium

[ Michael Ketchel ]
* Draft build of new wlan control features
* Fixed an api definition typo
* More tweaks, and a version bump to fire dev package deploy
* Increased resistance to injection attacks
* Version bump for build
* Add automatic default gateway configuration for wlan api
* Fix some auto gateway config quirks
* implement ping and speed test services
* add reboot command
* Add DHCP test, Dig, and traceroute, as well as some other
optimizations

[ _ ]
* Add a sleep to give enough time for lease data to appear.

[ Michael Ketchel ]
* Add a sleep to give enough time for lease data to appear.

-- Michael Ketchel <[email protected]> Tue, 19 Nov 2024 15:28:31 +0000

wlanpi-core (1.0.5-1) unstable; urgency=high

* API hardening by blocking iptables rule added by pi-gen
Expand Down
1 change: 0 additions & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ SDIST_DIR=debian/$(PACKAGE)-$(VERSION)

# ensure that the systemd services are handled by systemd.
override_dh_installsystemd:
dh_installsystemd --name=wpa_supplicant@wlan0 [email protected]
dh_installsystemd wlanpi-core.service
dh_installsystemd wlanpi-core.socket

Expand Down
3 changes: 1 addition & 2 deletions debian/wlanpi-core.install
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/install/etc/wlanpi-core/nginx/nginx-sample.conf /etc/wlanpi-core/nginx
/install/etc/wlanpi-core/nginx/wlanpi_core.conf /etc/wlanpi-core/nginx/sites-enabled
/install/etc/wlanpi-core/nginx/link.sh /etc/wlanpi-core/scripts
/install/etc/wlanpi-core/nginx/unlink.sh /etc/wlanpi-core/scripts
/install/etc/wpa_supplicant/wpa_supplicant-wlan0.conf /etc/wpa_supplicant
/install/etc/wlanpi-core/nginx/unlink.sh /etc/wlanpi-core/scripts
20 changes: 0 additions & 20 deletions debian/[email protected]

This file was deleted.

64 changes: 0 additions & 64 deletions install/etc/wpa_supplicant/wpa_supplicant-wlan0.conf

This file was deleted.

8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@


def parse_requires(_list):
requires = list()
require_list = list()
trims = ["#", "piwheels.org"]
for require in _list:
if any(match in require for match in trims):
continue
requires.append(require)
requires = list(filter(None, requires)) # remove "" from list
return requires
require_list.append(require)
require_list = list(filter(None, require_list)) # remove "" from list
return require_list


# important to collect various modules in the package directory
Expand Down
5 changes: 3 additions & 2 deletions wlanpi_core/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import os
import platform
import sys
from typing import Union

# third party imports
import uvicorn
Expand All @@ -26,7 +27,7 @@
from .__version__ import __version__


def port(port) -> int:
def check_port(port: Union[int, str]) -> int:
"""Check if the provided port is valid"""
try:
# make sure port is an int
Expand All @@ -52,7 +53,7 @@ def setup_parser() -> argparse.ArgumentParser:
parser.add_argument(
"--reload", dest="livereload", action="store_true", default=False
)
parser.add_argument("--port", "-p", dest="port", type=port, default=8000)
parser.add_argument("--port", "-p", dest="port", type=check_port, default=8000)

parser.add_argument(
"--version", "-V", "-v", action="version", version=f"{__version__}"
Expand Down
Loading