Search in sources :

Example 1 with SwitchValidationExtendedResult

use of org.openkilda.testing.service.northbound.payloads.SwitchValidationExtendedResult in project open-kilda by telstra.

the class NorthboundServiceImpl method validateSwitch.

@Override
public SwitchValidationExtendedResult validateSwitch(SwitchId switchId) {
    log.debug("Switch validating '{}'", switchId);
    SwitchValidationResult result = Objects.requireNonNull(restTemplate.exchange("/api/v1/switches/{switch_id}/validate", HttpMethod.GET, new HttpEntity(buildHeadersWithCorrelationId()), SwitchValidationResult.class, switchId).getBody());
    return new SwitchValidationExtendedResult(switchId, result);
}
Also used : HttpEntity(org.springframework.http.HttpEntity) SwitchValidationExtendedResult(org.openkilda.testing.service.northbound.payloads.SwitchValidationExtendedResult) SwitchValidationResult(org.openkilda.northbound.dto.v1.switches.SwitchValidationResult)

Aggregations

SwitchValidationResult (org.openkilda.northbound.dto.v1.switches.SwitchValidationResult)1 SwitchValidationExtendedResult (org.openkilda.testing.service.northbound.payloads.SwitchValidationExtendedResult)1 HttpEntity (org.springframework.http.HttpEntity)1