Pythonify shunt setup methods and integrate into tests#927
Pythonify shunt setup methods and integrate into tests#927anurag6 merged 16 commits intofaucetsdn:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #927 +/- ##
==========================================
- Coverage 82.24% 82.21% -0.03%
==========================================
Files 45 46 +1
Lines 5637 5774 +137
==========================================
+ Hits 4636 4747 +111
- Misses 1001 1027 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
shunt/shell_command_helper.py
Outdated
| while batch_start <= len(jobs): | ||
| batch_end = batch_start + batch_size | ||
| if batch_end > len(jobs): | ||
| batch_jobs = jobs[batch_start:] |
There was a problem hiding this comment.
this if is unnecessary. Python will slice the array correctly if batch_end > array length
There was a problem hiding this comment.
MAkes sense. Changed.
| capture: Prints out and captures stdout and stderr output of command | ||
| docker_container: Set if command needs to be run within a docker container | ||
| returns: | ||
| return code of command, stdout, stderr |
There was a problem hiding this comment.
Are the return values used anywhere? It looks like everywhere that calls run_cmd discard the return values.
There was a problem hiding this comment.
None so far, but it could be used for debugging/checking if the command went through. Bound to be useful in future dev work. It is derived from the ShellCommandHelper in Forch.
shunt/vxlan_over_ssh.py
Outdated
| def build_vxlan_ssh_conn(conn_params): | ||
| """ | ||
| Args: | ||
| conn_params: JSON. Format:{ |
There was a problem hiding this comment.
Not important but I think this can be a dataclass instead.
There was a problem hiding this comment.
I was planning to turn it into a proto in the future. Will add a TODO.
No description provided.