-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[l2][unittest] Fix: RemoveSelfIP.revert is missing critical info
When RemoveSelfIP.revert restores a deleted SelfIP on the device, it relies on store['existing_selfips'] for the needed information. store['existing_selfips'] is a list of port objects, retrieved via GetExistingSelfIPsForVLAN. However, these port objects contain only the port ID. But when RemoveSelfIP is rolled back, it needs to know more than the port ID, e.g. the subnet, which is retrieved from the port's first fixed IP. Since the port only has an ID, the SelfIP cannot be restored on the BigIP. This commit fixes GetExistingSelfIPsForVLAN to return a list of the SelfIP dictionaries retrieved from the device, instead of a list of port objects. This way, all the necessary information to restore a SelfIP on the device is present. For ease of use GetExistingSelfIPsForVLAN adds another key to the SelfIP dictionaries: port_id. This way we only have to extract it from the SelfIP name once. This commit also fixes the corresponding flow/task tests to construct store['existing_selfips'] correctly.
- Loading branch information
1 parent
f1645d4
commit 9ef836b
Showing
4 changed files
with
51 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters