mirror of
https://github.com/ipnet-mesh/meshcore-hub.git
synced 2026-03-28 17:42:56 +01:00
Add node tag import functionality to collector
- Add tag_import.py module with JSON file parsing and database upsert - Convert collector CLI to group with subcommands for extensibility - Add 'import-tags' command to import tags from JSON file - Update docker-compose.yml.example with separated data directories: - data/collector for tags.json - data/web for members.json - Add import-tags Docker service for easy containerized imports - Add example data files in example/data/collector and example/data/web - Add comprehensive test coverage (20 tests) for tag import
This commit is contained in:
28
example/data/collector/tags.json
Normal file
28
example/data/collector/tags.json
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"tags": [
|
||||
{
|
||||
"public_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
||||
"key": "location",
|
||||
"value": "San Francisco, CA",
|
||||
"value_type": "string"
|
||||
},
|
||||
{
|
||||
"public_key": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
|
||||
"key": "role",
|
||||
"value": "gateway",
|
||||
"value_type": "string"
|
||||
},
|
||||
{
|
||||
"public_key": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
|
||||
"key": "location",
|
||||
"value": "Oakland, CA",
|
||||
"value_type": "string"
|
||||
},
|
||||
{
|
||||
"public_key": "fedcba9876543210fedcba9876543210fedcba9876543210fedcba9876543210",
|
||||
"key": "altitude",
|
||||
"value": "150",
|
||||
"value_type": "number"
|
||||
}
|
||||
]
|
||||
}
|
||||
10
example/data/web/members.json
Normal file
10
example/data/web/members.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"members": [
|
||||
{
|
||||
"name": "Example Member",
|
||||
"callsign": "N0CALL",
|
||||
"role": "Network Operator",
|
||||
"description": "Example member entry"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user