use of org.openkilda.messaging.model.SpeakerSwitchDescription in project open-kilda by telstra.
the class SwitchFsm method persistSwitchData.
private void persistSwitchData(SpeakerSwitchView speakerSwitchView, SwitchAvailabilityData availabilityData) {
Switch sw = lookupSwitchCreateIfMissing();
IpSocketAddress socketAddress = speakerSwitchView.getSwitchSocketAddress();
sw.setSocketAddress(socketAddress);
sw.setHostname(speakerSwitchView.getHostname());
SpeakerSwitchDescription description = speakerSwitchView.getDescription();
sw.setDescription(String.format("%s %s %s", description.getManufacturer(), speakerSwitchView.getOfVersion(), description.getSoftware()));
sw.setOfVersion(speakerSwitchView.getOfVersion());
sw.setOfDescriptionManufacturer(description.getManufacturer());
sw.setOfDescriptionHardware(description.getHardware());
sw.setOfDescriptionSoftware(description.getSoftware());
sw.setOfDescriptionSerialNumber(description.getSerialNumber());
sw.setOfDescriptionDatapath(description.getDatapath());
sw.setStatus(SwitchStatus.INACTIVE);
sw.setFeatures(speakerSwitchView.getFeatures());
persistSwitchProperties(sw);
persistSwitchConnections(sw, availabilityData);
}
Aggregations