Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
fe10e73
Implement test orchestrator (#4)
jhughesoti Apr 25, 2023
6f3a7fe
Add issue report templates (#7)
jboddey Apr 26, 2023
e05c383
Discover devices on the network (#5)
jboddey Apr 26, 2023
823709e
Test run sync (#8)
jhughesoti Apr 28, 2023
ba6afc4
Quick refactor (#9)
jboddey Apr 28, 2023
c87a976
Fix duplicate sleep calls
jhughesoti Apr 28, 2023
34ce211
Add net orc (#11)
jhughesoti May 2, 2023
ceba453
Add the DNS test module (#12)
jhughesoti May 4, 2023
0837a9c
Add baseline and pylint tests (#25)
noursaidi May 16, 2023
4171e5f
Discover devices on the network (#22)
jboddey May 16, 2023
be829a3
Build dependencies first (#21)
jboddey May 16, 2023
84d9ff9
Port scan test module (#23)
jhughesoti May 17, 2023
07432ee
Fix device configs
jboddey May 17, 2023
7b27e23
Remove unecessary files
jhughesoti May 17, 2023
5ac8726
Cleanup duplicate properties
jhughesoti May 17, 2023
2c4efe8
Cleanup install script
jhughesoti May 17, 2023
25fd8a5
Formatting (#26)
jhughesoti May 22, 2023
41aaaf7
Test results (#27)
jhughesoti May 23, 2023
ea60b41
Test results (#28)
jhughesoti May 25, 2023
b6a6cdc
Fix pylint test and skip internet tests so CI passes (#29)
noursaidi May 25, 2023
3d53ecb
Increase pylint score (#31)
jboddey May 25, 2023
b91fff5
Pylint (#32)
jhughesoti May 30, 2023
b84a026
Add license header (#36)
jhughesoti May 30, 2023
622b12d
merge main
jhughesoti May 31, 2023
38d71aa
Ovs (#35)
jhughesoti May 31, 2023
00be9cb
remove ovs files added back in during merge
jhughesoti May 31, 2023
f331239
Nmap (#38)
jhughesoti Jun 5, 2023
2a68fba
Create startup capture (#37)
jboddey Jun 5, 2023
8e8e154
Connection (#40)
jhughesoti Jun 7, 2023
6ff220b
Conn mac oui (#42)
jhughesoti Jun 8, 2023
4ca8f44
Con mac address (#43)
jhughesoti Jun 8, 2023
ff04f43
Dns (#44)
jhughesoti Jun 8, 2023
752f701
File permissions (#45)
jhughesoti Jun 9, 2023
f6e4e93
Add connection single ip test (#47)
jhughesoti Jun 12, 2023
bca0db8
Nmap results (#49)
jhughesoti Jun 15, 2023
5b56a79
Framework restructure (#50)
jboddey Jun 15, 2023
7bb9366
Ip control (#51)
jhughesoti Jun 20, 2023
b0d14c2
Move config to /local (#52)
jboddey Jun 23, 2023
94e937f
Add documentation (#53)
jboddey Jun 23, 2023
098de20
Sync dev to main (#56)
jboddey Jun 28, 2023
f185bb1
Fix missing results on udp tests when tcp ports are also defined (#59)
jhughesoti Jun 29, 2023
355c838
Add licence header (#61)
jboddey Jul 3, 2023
d374640
Resolve merge conflicts
jboddey Jul 3, 2023
8d65386
Resolve merge conflict
jboddey Jul 3, 2023
26f8c5b
Add network docs (#63)
jboddey Jul 4, 2023
4a5c1ea
Dhcp (#64)
jhughesoti Jul 5, 2023
af8367c
Dhcp (#67)
jhughesoti Jul 6, 2023
7dd5772
Add connection.dhcp_address test (#68)
jhughesoti Jul 6, 2023
9ef0d4f
Add NTP tests (#60)
jboddey Jul 12, 2023
2ae337d
Add ipv6 tests (#65)
jboddey Jul 12, 2023
59ab65f
Merge branch 'main' into dev
jboddey Jul 12, 2023
fe4bf43
Connection private address (#71)
jhughesoti Jul 13, 2023
0c550c8
fix windows line ending
jhughesoti Jul 13, 2023
2df6b4a
Fix python import
jboddey Jul 13, 2023
bfae1e0
move isc-dhcp service commands to their own class
jhughesoti Jul 13, 2023
4bdacf3
fix dhcp1
jhughesoti Jul 13, 2023
a57393b
Merge branch 'main' into dev
jboddey Jul 14, 2023
d376655
Initial CI testing for tests (#72)
noursaidi Jul 14, 2023
01761dd
Fix radvd conf
jboddey Jul 14, 2023
c23f258
Fix individual test disable
jhughesoti Jul 14, 2023
97c4c65
Merge branch 'dev' of https://github.com/auto-iot/test-run into dev
jhughesoti Jul 14, 2023
5d24497
Add NTP Pass CI test (#76)
noursaidi Jul 17, 2023
006aa11
add shared address test (#75)
jhughesoti Jul 17, 2023
153de19
Fix single ip test (#58)
jhughesoti Jul 17, 2023
e2c934e
Merge API into dev (#70)
jboddey Jul 24, 2023
0023003
Dhcp tests (#81)
jhughesoti Aug 2, 2023
4b1d69c
Merge tls tests into dev (#80)
jboddey Aug 2, 2023
4ce26a1
Test output restructure (#79)
jhughesoti Aug 3, 2023
c78f2de
Keep test results in memory (#82)
jboddey Aug 3, 2023
11c9740
Result descriptions (#92)
jhughesoti Aug 11, 2023
9046ffd
Misc cleanup (#93)
jhughesoti Aug 11, 2023
fca08ce
Resolve merge conflicts
jboddey Aug 15, 2023
5c9c7cc
Allow CORS (#91)
jboddey Aug 16, 2023
29242c4
Add /history and device config endpoints (#88)
jboddey Aug 16, 2023
290ba50
Re-enable actions, fix conn module (#89)
jboddey Aug 16, 2023
38792e8
Add required result to module configs (#95)
jboddey Aug 16, 2023
6afd9ea
Fix DNS test name (#110)
jboddey Aug 31, 2023
2cbc343
Clear runtime folder on start (#111)
jboddey Aug 31, 2023
f98ea18
Initial work on pdf report output and format via html (#103)
jhughesoti Sep 1, 2023
8d7c6f7
Add user interface (#98)
jboddey Sep 1, 2023
13ec5b8
Add some documentation
jboddey Sep 4, 2023
702147c
Save test modules (#115)
jboddey Sep 9, 2023
5d41edb
Expand testing to include API and more testing (#96)
noursaidi Sep 11, 2023
b4dd440
Create Testrun package (#114)
jboddey Sep 12, 2023
87367ab
Merge conflicts
jboddey Sep 12, 2023
78e2d92
Remove merge conflicts
jboddey Sep 12, 2023
30baa40
Add extra validation (#118)
jboddey Sep 14, 2023
e7c2906
Refactor nmap module (#102)
jboddey Sep 14, 2023
a57080e
Add protocol module (#107)
jhughesoti Sep 15, 2023
3c10ba1
Hotfix
jboddey Sep 15, 2023
1d1719f
bug fixes (#119)
jboddey Sep 18, 2023
b42b31d
Chronyd (#116)
jhughesoti Sep 18, 2023
6bad0dd
Test fixes (#123)
jhughesoti Sep 21, 2023
62c95e1
Update README.md
jboddey Sep 21, 2023
0472605
Resolve 2 bugs (#121)
jboddey Sep 26, 2023
9975341
Bug/test count nmap check (#124)
jboddey Sep 26, 2023
9746a13
Report styling (#122)
jhughesoti Sep 26, 2023
129870b
Update UI (#125)
jboddey Sep 26, 2023
fe4275d
Test fixes (#127)
jhughesoti Sep 27, 2023
1be60c3
Add docs, disable network validation by default (#126)
jboddey Sep 28, 2023
61a184d
Implement delete device endpoint (#129)
jboddey Oct 2, 2023
b3242d9
Sync dev with main (#156)
jboddey Oct 16, 2023
b4afc7d
Delete report (#157)
jboddey Oct 16, 2023
da9f771
Ipv6 updates (#131)
jhughesoti Oct 20, 2023
b652479
Update UI
jboddey Oct 24, 2023
d5888a2
Bug fixes (#166)
jhughesoti Oct 27, 2023
74cf624
Merge main hotfix into dev (#165)
jboddey Oct 31, 2023
9b38941
Conn test fixes (#167)
jhughesoti Nov 6, 2023
982c1b9
Add workflow for UI test (#177)
jboddey Nov 9, 2023
8445bbb
Fix duplicate port number (#175)
jboddey Nov 10, 2023
0104bb5
Check all packet captures for SLAAC address (#173)
jboddey Nov 13, 2023
c6bcda4
Remove interfaces which should not be chosen (#161)
jboddey Nov 13, 2023
31b2c36
Fix device search issue (#176)
jboddey Nov 13, 2023
86a1d1f
Add hotfix to dev (#181)
jboddey Nov 13, 2023
9fa6f03
Bug fixes
jboddey Nov 13, 2023
811a623
Increase connection timeout to 30 minutes (#185)
jhughesoti Dec 1, 2023
9d327bc
Add new testrun statuses (#195)
jboddey Dec 3, 2023
aa5edc5
Resolve some bugs (#193)
jboddey Dec 3, 2023
d463e5e
Check that Docker is installed (#178)
jboddey Dec 3, 2023
a1d5e8c
Add version endpoint (#196)
jboddey Dec 3, 2023
357fc49
Fix bugs and update UI (#198)
jboddey Dec 8, 2023
905be03
Update UI and API to allow for remote connections (#202)
jhughesoti Dec 8, 2023
4de04da
Add device configuration to PDF report (#203)
jboddey Dec 9, 2023
c8a78ba
Add separate error message if config not completed (#197)
jboddey Dec 9, 2023
0ffef4a
Resolve merge conflicts with main (#208)
jboddey Dec 14, 2023
bf14ce8
Add instruction for local CA cert (#204)
jboddey Dec 14, 2023
d36c0d0
Add UI and update README (#207)
jboddey Dec 14, 2023
19d044a
Fix remote ui (#205)
jhughesoti Dec 14, 2023
bc1830a
Resolve merge conflicts
jboddey Dec 15, 2023
5ef25aa
Remove unused docker file
jboddey Dec 15, 2023
5526c9f
Change buffer option in network and test module capture files so pack…
jhughesoti Jan 2, 2024
fe4769c
Remove unnecessary OUI.txt downloads (#217)
jboddey Jan 4, 2024
e16d6bb
Set permissions of workflows (#218)
jboddey Jan 4, 2024
e876e03
Add check before launching UI (#216)
jboddey Jan 4, 2024
0eefd21
Set owner of config file during install (#211)
jboddey Jan 5, 2024
0ec1036
Add NTP server network captures to NTP traffic scan (#222)
jhughesoti Jan 8, 2024
5abd7c5
Implement PR223 for clean merge into release (#225)
jhughesoti Jan 11, 2024
2a5d127
Add guide to identify network interfaces (#214)
jboddey Jan 16, 2024
ac51109
Add edit device endpoint (#227)
jboddey Jan 17, 2024
3b429bc
Resolve merge conflicts with main
jboddey Jan 18, 2024
51e2fb4
Fix merge conflict and fix pylint
jboddey Jan 18, 2024
27d5064
Add error handling to version check (#230)
jboddey Jan 22, 2024
bf9d00c
Add report to session (#234)
jboddey Jan 25, 2024
be0b55d
Update UI: (#240)
sofyakurilova Jan 25, 2024
a43ebde
Merge branch 'main' into release/v1.1.1
jboddey Jan 25, 2024
5eda0bb
322476587: (fix) change to set default selected value on close panel …
OlgaMardvilko Jan 26, 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
32 changes: 19 additions & 13 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ on:

jobs:
testrun_baseline:
permissions: {}
name: Baseline
runs-on: ubuntu-20.04
timeout-minutes: 20
steps:
- name: Checkout source
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4.1.1
- name: Install dependencies
shell: bash {0}
run: cmd/prepare
Expand All @@ -28,13 +29,14 @@ jobs:
run: testing/baseline/test_baseline

testrun_tests:
permissions: {}
name: Tests
runs-on: ubuntu-20.04
needs: testrun_baseline
timeout-minutes: 45
steps:
- name: Checkout source
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4.1.1
- name: Install dependencies
shell: bash {0}
run: cmd/prepare
Expand All @@ -51,20 +53,21 @@ jobs:
if: ${{ always() }}
run: sudo tar --exclude-vcs -czf runtime.tgz /usr/local/testrun/runtime/
- name: Upload runtime results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
if-no-files-found: error
name: runtime_${{ github.workflow }}_${{ github.run_id }}
name: runtime_tests_${{ github.run_id }}
path: runtime.tgz

testrun_api:
permissions: {}
name: API
runs-on: ubuntu-20.04
timeout-minutes: 40
steps:
- name: Checkout source
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4.1.1
- name: Install dependencies
shell: bash {0}
run: cmd/prepare
Expand All @@ -82,47 +85,50 @@ jobs:
if: ${{ always() }}
run: sudo tar --exclude-vcs -czf runtime.tgz /usr/local/testrun/runtime/ /usr/local/testrun/local/
- name: Upload runtime results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
if-no-files-found: error
name: runtime_${{ github.workflow }}_${{ github.run_id }}
name: runtime_api_${{ github.run_id }}
path: runtime.tgz

pylint:
permissions: {}
name: Pylint
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout source
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4.1.1
- name: Run pylint
shell: bash {0}
run: testing/pylint/test_pylint

testrun_package:
permissions: {}
name: Package
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: Checkout source
uses: actions/checkout@v2.3.4
uses: actions/checkout@v4.1.1
- name: Package Testrun
shell: bash {0}
run: cmd/package
- name: Archive package
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Testrun Installer
name: testrun_installer
path: testrun*.deb

testrun_ui:
permissions: {}
name: UI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.1
- name: Install Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18.10.0
- name: Install Chromium Browser
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ pylint.out
__pycache__/
build/
testing/unit_test/temp/
*.deb
*.deb

make/DEBIAN/postinst
7 changes: 7 additions & 0 deletions cmd/install
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ pip3 install -r framework/requirements.txt
# Copy the default configuration
cp -n local/system.json.example local/system.json

# Set file permissions
# This does not work on GitHub actions
if logname ; then
USER_NAME=$(logname)
sudo chown "$USER_NAME" local/system.json
fi

deactivate

# Build docker images
Expand Down
2 changes: 1 addition & 1 deletion cmd/package
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ cp -r {framework,modules} $MAKE_SRC_DIR/usr/local/testrun
dpkg-deb --build --root-owner-group make

# Rename the .deb file
mv make.deb testrun_1-1_amd64.deb
mv make.deb testrun_1-1-1_amd64.deb
7 changes: 4 additions & 3 deletions docs/get_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,10 @@ However, to achieve a compliant test outcome, your device must be configured cor
- Connect one USB Ethernet adapter to the internet source (e.g., router or switch) using an ethernet cable.
- Connect the other USB Ethernet adapter directly to the IoT device you want to test using an ethernet cable.

**NOTE: The device under test should be powered off until prompted**

**NOTE: Both adapters should be disabled in the host system (IPv4, IPv6 and general). You can do this by going to Settings > Network**
Some things to remember:
- The device under test should be powered off until prompted
- Both adapters should be disabled in the host system (IPv4, IPv6 and general). You can do this by going to Settings > Network
- Struggling to identify the correct interfaces? See [this guide](network/identify_interfaces.md).

2. Start Testrun.

Expand Down
5 changes: 3 additions & 2 deletions docs/network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

## Table of Contents
1) Network Overview (this page)
2) [Addresses](addresses.md)
3) [Add a new network service](add_new_service.md)
2) [How to identify network interfaces](identify_interfaces.md)
3) [Addresses](addresses.md)
4) [Add a new network service](add_new_service.md)

Test Run provides several built-in network services that can be utilized for testing purposes. These services are already available and can be used without any additional configuration.

Expand Down
18 changes: 18 additions & 0 deletions docs/network/identify_interfaces.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Identifying network interfaces

For Testrun to operate correctly, you must select the correct network interfaces within the settings panel of the user interface. There are 2 methods to identify the correct network interfaces:

A) Find the printed MAC address on your interface

Some USB network interfaces will have the MAC address printed on the interface itself. This will look something like: ```00:e0:4c:02:0f:a8```.

Compare this printed MAC address against the MAC address provided in the settings panel in the user interface.

B) Connect your interfaces one at a time

1) Ensure both interfaces are disconnected from your PC and open the settings panel in the user interface.

2) Connect your internet interface to your PC and refresh the settings panel. One interface, which was not previously present, should now be visibile.

3) Repeat the previous step for the devices interface.

142 changes: 112 additions & 30 deletions framework/python/src/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Provides Testrun data via REST API."""
from fastapi import FastAPI, APIRouter, Response, Request, status
from fastapi.responses import FileResponse
from fastapi.middleware.cors import CORSMiddleware
Expand All @@ -37,7 +37,8 @@
DEVICES_PATH = "/usr/local/testrun/local/devices"
DEFAULT_DEVICE_INTF = "enx123456789123"

LATEST_RELEASE_CHECK = "https://api.github.com/repos/google/testrun/releases/latest"
LATEST_RELEASE_CHECK = ("https://api.github.com/repos/google/" +
"testrun/releases/latest")

class Api:
"""Provide REST endpoints to manage Testrun"""
Expand Down Expand Up @@ -77,6 +78,9 @@ def __init__(self, test_run):
self.delete_device,
methods=["DELETE"])
self._router.add_api_route("/device", self.save_device, methods=["POST"])
self._router.add_api_route("/device/edit",
self.edit_device,
methods=["POST"])

# Allow all origins to access the API
origins = ["*"]
Expand Down Expand Up @@ -111,14 +115,17 @@ def stop(self):

async def get_sys_interfaces(self):
addrs = psutil.net_if_addrs()
ifaces = []
for iface in addrs:
ifaces = {}

# pylint: disable=consider-using-dict-items
for key in addrs.keys():
nic = addrs[key]

# Ignore any interfaces that are not ethernet
if not (iface.startswith("en") or iface.startswith("eth")):
if not (key.startswith("en") or key.startswith("eth")):
continue

ifaces.append(iface)
ifaces[key] = nic[0].address

return ifaces

Expand Down Expand Up @@ -240,32 +247,38 @@ async def get_version(self, response: Response):
json_response["installed_version"] = "v" + current_version

# Check latest version number from GitHub API
version_check = requests.get(LATEST_RELEASE_CHECK, timeout=5)
try:
version_check = requests.get(LATEST_RELEASE_CHECK, timeout=5)

# Check OK response was received
if version_check.status_code != 200:
response.status_code = 500
LOGGER.error(version_check.content)
return self._generate_msg(False, "Failed to fetch latest version")

# Extract version number from response, removing the leading 'v'
latest_version_no = version_check.json()["name"].strip("v")
LOGGER.debug(f"Latest version available is {latest_version_no}")

# Craft JSON response
json_response["latest_version"] = "v" + latest_version_no
json_response["latest_version_url"] = version_check.json()["html_url"]

# String comparison between current and latest version
if latest_version_no > current_version:
json_response["update_available"] = True
LOGGER.debug("An update is available")
else:
json_response["update_available"] = False
LOGGER.debug("The latest version is installed")

# Check OK response was received
if version_check.status_code != 200:
return json_response
except Exception as e:
response.status_code = 500
LOGGER.error(version_check.content)
LOGGER.error("Failed to fetch latest version")
LOGGER.debug(e)
return self._generate_msg(False, "Failed to fetch latest version")

# Extract version number from response, removing the leading 'v'
latest_version_no = version_check.json()["name"].strip("v")
LOGGER.debug(f"Latest version available is {latest_version_no}")

# Craft JSON response
json_response["latest_version"] = "v" + latest_version_no
json_response["latest_version_url"] = version_check.json()["html_url"]

# String comparison between current and latest version
if latest_version_no > current_version:
json_response["update_available"] = True
LOGGER.debug("An update is available")
else:
json_response["update_available"] = False
LOGGER.debug("The latest version is installed")

return json_response

async def get_reports(self, request: Request):
LOGGER.debug("Received reports list request")
# Resolve the server IP from the request so we
Expand Down Expand Up @@ -389,8 +402,76 @@ async def save_device(self, request: Request, response: Response):

else:

self._test_run.save_device(device, device_json)
response.status_code = status.HTTP_200_OK
response.status_code = status.HTTP_409_CONFLICT
return self._generate_msg(False, "A device with that " +
"MAC address already exists")

return device.to_config_json()

# Catch JSON Decode error etc
except JSONDecodeError:
response.status_code = status.HTTP_400_BAD_REQUEST
return self._generate_msg(False, "Invalid JSON received")

async def edit_device(self, request: Request, response: Response):

LOGGER.debug("Received device edit request")

try:
req_raw = (await request.body()).decode("UTF-8")
req_json = json.loads(req_raw)

# Validate top level fields
if not (DEVICE_MAC_ADDR_KEY in req_json and
"device" in req_json):
response.status_code = status.HTTP_400_BAD_REQUEST
return self._generate_msg(False, "Invalid request received")

# Extract device information from request
device_json = req_json.get("device")

if not self._validate_device_json(device_json):
response.status_code = status.HTTP_400_BAD_REQUEST
return self._generate_msg(False, "Invalid request received")

# Get device from old MAC address
device = self._session.get_device(req_json.get(DEVICE_MAC_ADDR_KEY))

# Check if device exists
if device is None:
response.status_code = status.HTTP_404_NOT_FOUND
return self._generate_msg(False,
"A device with that MAC " +
"address could not be found")

if (self._session.get_target_device() == device and
self._session.get_status() not in [
"Cancelled",
"Compliant",
"Non-Compliant"]):
response.status_code = 403
return self._generate_msg(False, "Cannot edit this device whilst " +
"it is being tested")

# Check if a device exists with the new MAC address
check_new_device = self._session.get_device(
device_json.get(DEVICE_MAC_ADDR_KEY))

if not check_new_device is None and (device.mac_addr
!= check_new_device.mac_addr):
response.status_code = status.HTTP_409_CONFLICT
return self._generate_msg(False,
"A device with that MAC address " +
"already exists")

# Update the device
device.mac_addr = device_json.get(DEVICE_MAC_ADDR_KEY).lower()
device.manufacturer = device_json.get(DEVICE_MANUFACTURER_KEY)
device.model = device_json.get(DEVICE_MODEL_KEY)
device.test_modules = device_json.get(DEVICE_TEST_MODULES_KEY)

self._test_run.save_device(device, device_json)
response.status_code = status.HTTP_200_OK

return device.to_config_json()

Expand All @@ -399,6 +480,7 @@ async def save_device(self, request: Request, response: Response):
response.status_code = status.HTTP_400_BAD_REQUEST
return self._generate_msg(False, "Invalid JSON received")


async def get_report(self, response: Response,
device_name, timestamp):

Expand Down
Loading