Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TEST]: Improvement: Switch: New interaction approach #5759

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

yuliiamir
Copy link
Collaborator

In the scope of Global refactoring: Replace helpers with business models, new changes have been added. All interactions with a switch are available through the SwitchExtended business model. To not overload SwitchExtended by methods, it was decided to have separate modules for rules, meters, and lag interactions (reused existing entities SwitchRules and SwitchMeters).

@yuliiamir yuliiamir requested a review from pkazlenka December 12, 2024 09:10
Copy link
Collaborator

@pkazlenka pkazlenka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, but some improvements are needed.

logicalPortNumber == lagPort
name == "novi_lport" + lagPort.toString()
portNumbers.sort() == portsArrayCreate.sort()
type == LogicalPortType.LAG
}

and: "Switch is valid"
!switchHelper.synchronizeAndCollectFixedDiscrepancies(sw.dpId).isPresent()
!switchToInteract.validateAndCollectFoundDiscrepancies().isPresent()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

replaced with the validation call as sync doesn't check lag/group(the same below)

country: initConf.location.country ?: "",
street: initConf.location.street ?: ""
]] as SwitchPatchDto)})
def response = northboundV2.partialSwitchUpdate(sw.dpId, updateRequest)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

partialUpdate method has a rollback to the initial config(cleanupManger action)

@yuliiamir yuliiamir force-pushed the test/improvement-switch-interaction branch from 5dc4fe8 to 8275508 Compare December 30, 2024 12:30
def "Unable decrease bandwidth on LAG port lower than connected flows bandwidth sum"() {
given: "Flows on a LAG port with switch ports"
def switchPair = switchPairs.all().random()
def testPorts = topology.getAllowedPortsForSwitch(switchPair.src).takeRight(2).sort()
def switchPair = switchPairs.all().withoutWBSwitch().random()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flaky test: excluded WB switch due to the difference in ports speed

@yuliiamir yuliiamir force-pushed the test/improvement-switch-interaction branch from 8275508 to 2ff4775 Compare December 30, 2024 15:21
@yuliiamir yuliiamir requested a review from pkazlenka December 30, 2024 15:21
@yuliiamir yuliiamir force-pushed the test/improvement-switch-interaction branch 5 times, most recently from c5758c8 to a65ed7b Compare January 17, 2025 11:15
@yuliiamir yuliiamir force-pushed the test/improvement-switch-interaction branch 2 times, most recently from dfbaf49 to cd9c42b Compare January 27, 2025 10:38
@@ -0,0 +1,33 @@
/* Copyright 2021 Telstra Open Source
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, update copyright

@yuliiamir yuliiamir force-pushed the test/improvement-switch-interaction branch from cd9c42b to ce481bb Compare January 29, 2025 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants