def setUp(self):
        super(TestKeepalivedStateChange, self).setUp()
        self.conf_fixture = self.useFixture(fixture_config.Config())
        self.conf_fixture.register_opt(
            cfg.StrOpt('metadata_proxy_socket',
                       default='$state_path/metadata_proxy',
                       help=_('Location of Metadata Proxy UNIX domain '
                              'socket')))

        self.router_id = uuidutils.generate_uuid()
        self.conf_dir = self.get_default_temp_dir().path
        self.cidr = '169.254.128.1/24'
        self.interface_name = 'interface'
        self.monitor = keepalived_state_change.MonitorDaemon(
            self.get_temp_file_path('monitor.pid'),
            self.router_id,
            1,
            2,
            'namespace',
            self.conf_dir,
            self.interface_name,
            self.cidr)
        mock.patch.object(self.monitor, 'notify_agent').start()
        self.line = '1: %s    inet %s' % (self.interface_name, self.cidr)
dataset/ETHPy150Open openstack/neutron/neutron/tests/functional/agent/l3/test_keepalived_state_change.py/TestKeepalivedStateChange.setUp/original