class BgpConfig extends Config<ApplicationId> {

    public BgpSpeakerConfig getSpeakerFromPeer(IpAddress peerAddress) {
        for (BgpConfig.BgpSpeakerConfig speaker : bgpSpeakers()) {
            if (speaker.peers().contains(peerAddress)) {
                return speaker;
            }
        }
        return null;
    }

}