-
Notifications
You must be signed in to change notification settings - Fork 276
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow combination of filter and topology in exec command #1729
Conversation
We should maybe error out if neither topofile nor labels are provided?! |
mava@server01:~/projects/containerlab3$ sudo bin/containerlab exec --label clab-node-name=ext1 --cmd "ip link show dev eth1" the issue with the ext containers is, that we are always trying to load a topo file... |
I wonder if we should rather ditch |
To me the remark here #1728 was quite valid, handing in a topology file and a label for a certain kind shold limit to nodes within the topo that have a certain kind ... |
One could argue that external containers should proabably be handled outside of clab ... and we declare this now a nono use-case |
@steiler but don't we have enough labels to select both the topology name and node kind name? What I am thinking about is
to basically rely on labels to filter out the container to run exec on. Maybe for ext-containers this is more difficult as they might not even be tagged unless we load the topology and read those fake nodes into the nodes list |
I unblocked this PR, and made it to work with and without a topo file, which unblocked ext-container tests. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1729 +/- ##
==========================================
+ Coverage 51.62% 51.85% +0.23%
==========================================
Files 143 143
Lines 13810 13845 +35
==========================================
+ Hits 7129 7179 +50
+ Misses 5891 5866 -25
- Partials 790 800 +10
|
/lgtm |
close #1728