aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/scripts/topo_reservation.py
diff options
context:
space:
mode:
authorpmikus <peter.mikus@protonmail.ch>2022-11-24 13:27:53 +0000
committerPeter Mikus <peter.mikus@protonmail.ch>2022-12-06 07:03:47 +0000
commitbfbdfaedb044b7643b81f47e76285baedfee9e25 (patch)
tree2b37abee55771074daea09a7f3f973352cc2ce48 /resources/tools/scripts/topo_reservation.py
parentc0cbaf897aa00152c4ce21987b6eb2ec371be6b0 (diff)
feat(model): Cleanup and introduce telemetry
- Due to divergence from original design path the RAW was never consumed. It adds too much code complexity and requires processing on both storage and compute. Removing entirely to make modeling efficient. - log (apparently SSH) section will never be consumed in the way it is coded in model. This section is also not part of model schema itself due to the point above. - Introducing telemetry section that is going to carry telemetry items required for CDash. Signed-off-by: pmikus <peter.mikus@protonmail.ch> Change-Id: I7e0256c6c9715de8ee559eed29dce96329aac97d
Diffstat (limited to 'resources/tools/scripts/topo_reservation.py')
-rwxr-xr-xresources/tools/scripts/topo_reservation.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/resources/tools/scripts/topo_reservation.py b/resources/tools/scripts/topo_reservation.py
index 0016ebc0cc..f2d18bcafd 100755
--- a/resources/tools/scripts/topo_reservation.py
+++ b/resources/tools/scripts/topo_reservation.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
-# Copyright (c) 2021 Cisco and/or its affiliates.
+# Copyright (c) 2022 Cisco and/or its affiliates.
# 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:
@@ -24,30 +24,13 @@ import argparse
import sys
import yaml
-from resources.libraries.python.ssh import exec_cmd as _exec_cmd
+from resources.libraries.python.ssh import exec_cmd
RESERVATION_DIR = u"/tmp/reservation_dir"
RESERVATION_NODE = u"TG"
-def exec_cmd(node, cmd):
- """A wrapper around ssh.exec_cmd with disabled JSON export.
-
- Using this, maintainers can use "exec_cmd" without worrying
- about interaction with json export.
-
- TODO: Instead this, divide ssh module into reusable and robot-bound parts.
-
- :param node: Node object as parsed from topology file to execute cmd on.
- :param cmd: Command to execute.
- :type node: dict
- :type cmd: str
- :returns: RC, Stdout, Stderr.
- :rtype: Tuple[int, str, str]
- """
- return _exec_cmd(node, cmd, export=False)
-
def diag_cmd(node, cmd):
"""Execute cmd, print cmd and stdout, ignore stderr and rc; return None.