hil icon indicating copy to clipboard operation
hil copied to clipboard

Refactor some of the switch driver code

Open naved001 opened this issue 8 years ago • 2 comments

I think there's some stuff that can be refactored in our driver code to reduce copypasta. At the moment I think modify_port should be pushed to the top. It's almost the same for every switch.

While going through the code, I came across this line. And then there's a note in the brocade where we are unable to do this; and we do some filterting. Can someone tell my why are we doing this in the first place?

As far as I know, we don't use those Port objects anywhere, we always ever use the port name (Port.label). The deployment tests ran just fine without getting those Port objects.

naved001 avatar Sep 18 '17 19:09 naved001

ah, looks like we needed it to get the port ID so that we can remove native vlans in our console based drivers.

naved001 avatar Sep 18 '17 20:09 naved001

Here's a WIP

naved001 avatar Sep 18 '17 20:09 naved001