Conversation
|
Still need to add the robot tests and documentation... @steiler I have some functions to be shared between sshx and gotty, is cmd/common/tools.go a "good" place or should it be in utils? |
|
You might want to take a look at this Line 226 in 0f03a98 Parts of what you're trying here is already implemented here GetOwner I think is more of a utils function ... it always depends... is it general util usefull in general or not. |
cmd/common/tools.go
Outdated
| var err error | ||
|
|
||
| // If lab name is provided directly, use it | ||
| if toolLabName != "" { |
There was a problem hiding this comment.
why don't you rename the function var name to labName then you can spare this if
cmd/common/tools.go
Outdated
| } | ||
|
|
||
| // If topo file is provided or discovered | ||
| if Topo == "" && labName == "" { |
There was a problem hiding this comment.
there is a WithTopoPath option, that should handle all of this.
Line 211 in 0f03a98
cmd/common/tools.go
Outdated
| } | ||
|
|
||
| // If we have lab name but no topo file, try to find it from containers | ||
| if labName != "" && Topo == "" { |
There was a problem hiding this comment.
Thinking about it, this should probably also become a ClabOption itself, then it would by a single switch that initializes one or the other ClabOption.
|
@steiler I tried to solve your remarks. From my side this is ready |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2583 +/- ##
==========================================
+ Coverage 54.38% 54.91% +0.53%
==========================================
Files 181 184 +3
Lines 19695 20149 +454
==========================================
+ Hits 10711 11065 +354
- Misses 7874 7944 +70
- Partials 1110 1140 +30
🚀 New features to boost your workflow:
|
Similar to containerlab tools sshx, this as add a web ui, but instead of web, this is fully local with password protection.