'Configure and initialize OVS agent.
:param config_opts_agent: a dict with options to override the
default values for the AGENT group.'

def _build_agent(self, **config_opts_agent):

    bridge_classes = {'br_int': self.mock_int_bridge_cls, 'br_phys': self.mock_phys_bridge_cls, 'br_tun': self.mock_tun_bridge_cls}
    cfg.CONF.set_override('integration_bridge', self.INT_BRIDGE, 'OVS')
    cfg.CONF.set_override('tunnel_bridge', self.TUN_BRIDGE, 'OVS')
    cfg.CONF.set_override('local_ip', '10.0.0.1', 'OVS')
    cfg.CONF.set_override('bridge_mappings', self.NET_MAPPING, 'OVS')
    cfg.CONF.set_override('polling_interval', 2, 'AGENT')
    cfg.CONF.set_override('tunnel_types', ['gre'], 'AGENT')
    cfg.CONF.set_override('veth_mtu', self.VETH_MTU, 'AGENT')
    cfg.CONF.set_override('minimize_polling', False, 'AGENT')
    cfg.CONF.set_override('use_veth_interconnection', self.USE_VETH_INTERCONNECTION, 'OVS')
    for (k, v) in config_opts_agent.items():
        cfg.CONF.set_override(k, v, 'AGENT')
    return self.mod_agent.OVSNeutronAgent(bridge_classes, cfg.CONF)
