I have a container that has 2 ethernet links inside it. Lets call the container C1 and the ethernet links as EL1, EL2. So C1 has EL1 and EL2.
I represent the relationship as C1 -> EL1, EL2
Now the Ethernet links can pass through more than just one container. For example EL2 can pass through C1 and C2 containers.
EL2 -> C1, C2
C2 can have other Ethernet links inside that as well. For example,
C2 -> EL2, EL3
The same goes for EL3 as well..........
Now when some Ethernet links fails, I need find the related containers and Ethernet links. For example if EL2 fails I have to group C1 and C2, since they are immediate parents to EL2. Then in the same group I will add EL1 and EL3 as well since they are children of C1 and C2. If EL3 has more containers related to it, I need to group that as well.
It looks like an endless chain to me. Since I am new to computer science, I wonder if this is an already existing problem faced in the field of computing or programming. So that is what I am asking in this question as well. If it is indeed, is there a name for that, so that I can study about that.
I hope I am clear enough what I meant in the description.
I think you can represent your Ethernet links and Containers as an undirected graph network. Then given a failed Ethernet link you can traverse this graph (for e.g a DFS traversal) to find all nodes reachable from the failed link node. This should give you all the containers and ethernet links connected to the failed link. Your above example shown as an undirected graph below-