Skip to content

Commit

Permalink
Merge pull request #2445 from telstra/fix/revert-rules-validate
Browse files Browse the repository at this point in the history
Revert rules validate to use old code
  • Loading branch information
sergii-iakovenko committed Jun 4, 2019
2 parents 04e8857 + 7318e98 commit 33e60c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -76,6 +76,8 @@ default SwitchDto toSwitchDto(SwitchInfoData data) {
@Mapping(source = "rules.proper", target = "properRules")
RulesValidationResult toRulesValidationResult(SwitchValidationResponse response);

RulesValidationResult toRulesValidationResult(SyncRulesResponse response);

RulesValidationDto toRulesValidationResult(RulesValidationEntry data);

MetersValidationDto toMetersValidationResult(MetersValidationEntry data);
Expand Down
Expand Up @@ -30,6 +30,7 @@
import org.openkilda.messaging.command.switches.SwitchRulesDeleteRequest;
import org.openkilda.messaging.command.switches.SwitchRulesInstallRequest;
import org.openkilda.messaging.command.switches.SwitchValidateRequest;
import org.openkilda.messaging.command.switches.ValidateRulesRequest;
import org.openkilda.messaging.info.event.SwitchInfoData;
import org.openkilda.messaging.info.meter.SwitchMeterEntries;
import org.openkilda.messaging.info.rule.FlowEntry;
Expand Down Expand Up @@ -212,10 +213,10 @@ public CompletableFuture<RulesValidationResult> validateRules(SwitchId switchId)
final String correlationId = RequestCorrelationId.getId();

CommandMessage validateCommandMessage = new CommandMessage(
new SwitchValidateRequest(switchId, false), System.currentTimeMillis(), correlationId);
new ValidateRulesRequest(switchId), System.currentTimeMillis(), correlationId);

return messagingChannel.sendAndGet(switchManagerTopic, validateCommandMessage)
.thenApply(SwitchValidationResponse.class::cast)
return messagingChannel.sendAndGet(floodlightTopic, validateCommandMessage)
.thenApply(SyncRulesResponse.class::cast)
.thenApply(switchMapper::toRulesValidationResult);
}

Expand Down

0 comments on commit 33e60c2

Please sign in to comment.