Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ test_db_creation.lock
.sha_information
test_collections/matter/sdk_tests/sdk_checkout
performance-logs
output_logs/
test_collections/matter/sdk_tests/custom_python_tests_info.json
test_collections/matter/sdk_tests/python_tests_info.json
14 changes: 14 additions & 0 deletions app/api/api_v1/endpoints/test_run_executions.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
selected_tests_from_execution,
)
from app.version import version_information
from test_collections.matter.sdk_tests.support.chip.chip_server import ChipServer
from test_collections.matter.sdk_tests.support.performance_tests.utils import (
create_summary_report,
)
Expand Down Expand Up @@ -264,6 +265,19 @@ def get_test_runner_status() -> dict[str, Any]:
return status


@router.get("/chip-server/info", response_model=schemas.ChipServerInfo)
def get_chip_server_info() -> schemas.ChipServerInfo:
"""
Retrieve ChipServer node ID information.

Returns:
ChipServerInfo: Contains node_id (int) and node_id_hex (str) values.
"""
chip_server = ChipServer()
node_id = chip_server.node_id
Comment thread
antonio-amjr marked this conversation as resolved.
return schemas.ChipServerInfo(node_id=node_id, node_id_hex=hex(node_id))


@router.get("/{id}", response_model=schemas.TestRunExecutionWithChildren)
def read_test_run_execution(
*,
Expand Down
3 changes: 2 additions & 1 deletion app/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2023 Project CHIP Authors
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .chip_server_info import ChipServerInfo
from .grouped_test_run_execution_logs import GroupedTestRunExecutionLogs
from .mock import Mock
from .msg import Msg
Expand Down
31 changes: 31 additions & 0 deletions app/schemas/chip_server_info.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright (c) 2025 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# 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.
#
from pydantic import BaseModel


class ChipServerInfo(BaseModel):
"""Schema for ChipServer information."""

node_id: int
node_id_hex: str

class Config:
schema_extra = {
"example": {
"node_id": 1234567890,
"node_id_hex": "0x499602d2",
Comment thread
antonio-amjr marked this conversation as resolved.
}
}
Loading