CCI-MOC / hil

Hardware Isolation Layer, formerly Hardware as a Service
Apache License 2.0
24 stars 54 forks source link

Refactor some of the switch driver code #877

Open naved001 opened 7 years ago

naved001 commented 7 years ago

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 commented 7 years ago

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

naved001 commented 7 years ago

Here's a WIP