kytos icon indicating copy to clipboard operation
kytos copied to clipboard

Create update_or_create_interface method on Switch class

Open ajoaoff opened this issue 6 years ago • 1 comments

The method update_interface always set the interface argument to be the interface value associated with the given port number. In fact, it is creating a new interface if it does not exist, or replacing an existing one. The idea now is to create a new method update_or_create_interface so it is clear that this method also creates an interface. Also, when the interface already exists, it must be updated, not replaced by another instance.

ajoaoff avatar Jan 18 '19 14:01 ajoaoff

@ajoaoff FYI, it's been fixed here: https://github.com/kytos/kytos/pull/840/files.

viniarck avatar Jan 18 '19 20:01 viniarck