summaryrefslogtreecommitdiff
path: root/src/services/api/rest/models.py
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-11-07 17:46:27 +0000
committerGitHub <noreply@github.com>2024-11-07 17:46:27 +0000
commit3eb66e36b81c835f802900c4bc2e973e2657fa31 (patch)
tree39e8061bcd16155b80b6ab1747b27aa68b43f9ad /src/services/api/rest/models.py
parentc97980d18610d8d48a726986139fed29ad03137a (diff)
parent18a9cec3deb6cc2dc49020a89208dc70defe9822 (diff)
downloadvyos-1x-3eb66e36b81c835f802900c4bc2e973e2657fa31.tar.gz
vyos-1x-3eb66e36b81c835f802900c4bc2e973e2657fa31.zip
Merge pull request #4151 from natali-rs1985/T6695HEADcurrent
T6695: Machine-readable operational mode support for traceroute
Diffstat (limited to 'src/services/api/rest/models.py')
-rw-r--r--src/services/api/rest/models.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/services/api/rest/models.py b/src/services/api/rest/models.py
index 23ae9be9d..27d9fb5ee 100644
--- a/src/services/api/rest/models.py
+++ b/src/services/api/rest/models.py
@@ -279,6 +279,20 @@ class PoweroffModel(ApiModel):
}
+class TracerouteModel(ApiModel):
+ op: StrictStr
+ host: StrictStr
+
+ class Config:
+ schema_extra = {
+ 'example': {
+ 'key': 'id_key',
+ 'op': 'traceroute',
+ 'host': 'host',
+ }
+ }
+
+
class Success(BaseModel):
success: bool
data: Union[str, bool, Dict]