16 package org.openkilda.testing.config;
20 import com.fasterxml.jackson.databind.MapperFeature;
21 import com.fasterxml.jackson.databind.ObjectMapper;
22 import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
23 import org.springframework.beans.factory.annotation.Value;
24 import org.springframework.context.annotation.Bean;
25 import org.springframework.context.annotation.Configuration;
26 import org.springframework.context.annotation.Profile;
27 import org.springframework.core.io.Resource;
29 import java.io.IOException;
35 @Value(
"file:${topology.definition.file:topology.yaml}")
36 private Resource topologyDefinitionFile;
40 ObjectMapper mapper =
new ObjectMapper(
new YAMLFactory());
41 mapper.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS);
43 return mapper.readValue(topologyDefinitionFile.getInputStream(),
TopologyDefinition.class);
TopologyDefinition topologyDefinition()