-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5742 from telstra/test/improvement-switches-relat…
…ions-dump-verification [TEST]: Improvement: Verification of switches and relations dump after WFM restarting
- Loading branch information
Showing
3 changed files
with
126 additions
and
18 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
76 changes: 76 additions & 0 deletions
76
...nal-tests/src/main/groovy/org/openkilda/functionaltests/helpers/model/SwitchDbData.groovy
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
package org.openkilda.functionaltests.helpers.model | ||
|
||
import org.openkilda.model.Switch.SwitchData | ||
import org.openkilda.model.SwitchFeature | ||
import org.openkilda.model.SwitchId | ||
import org.openkilda.model.SwitchStatus | ||
|
||
import groovy.transform.EqualsAndHashCode | ||
import groovy.transform.ToString | ||
|
||
import java.time.Instant | ||
|
||
@ToString | ||
@EqualsAndHashCode(excludes = "timeModified") | ||
class SwitchDbData { | ||
|
||
SwitchId switchId | ||
SwitchStatus status | ||
IpSocketAddress socketAddress | ||
String hostname | ||
String controller | ||
String description | ||
String version | ||
String manufacturer | ||
String hardware | ||
String software | ||
String serialNumber | ||
String dataPath | ||
Set<SwitchFeature> features | ||
boolean underMaintenance | ||
Instant timeCreated | ||
Instant timeModified | ||
String pop | ||
double latitude | ||
double longitude | ||
String street | ||
String city | ||
String country | ||
|
||
SwitchDbData(SwitchData switchData) { | ||
this.switchId = switchData.switchId | ||
this.status = switchData.status | ||
this.socketAddress = new IpSocketAddress(switchData.socketAddress.address, switchData.socketAddress.port) | ||
this.hostname = switchData.hostname | ||
this.controller = switchData.controller | ||
this.description = switchData.description | ||
this.version = switchData.ofVersion | ||
this.manufacturer = switchData.ofDescriptionManufacturer | ||
this.hardware = switchData.ofDescriptionHardware | ||
this.software = switchData.ofDescriptionSoftware | ||
this.serialNumber = switchData.ofDescriptionSerialNumber | ||
this.dataPath = switchData.ofDescriptionDatapath | ||
this.features = switchData.features | ||
this.underMaintenance = switchData.underMaintenance | ||
this.timeCreated = switchData.timeCreate | ||
this.timeModified = switchData.timeModify | ||
this.pop = switchData.pop | ||
this.latitude = switchData.latitude | ||
this.longitude = switchData.longitude | ||
this.street = switchData.street | ||
this.city = switchData.city | ||
this.country = switchData.country | ||
} | ||
|
||
@ToString | ||
@EqualsAndHashCode(excludes = "port") | ||
class IpSocketAddress { | ||
String address | ||
int port | ||
|
||
IpSocketAddress(String address, int port) { | ||
this.address = address | ||
this.port = port | ||
} | ||
} | ||
} |
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