예제 #1
0
 def __init__(self, env_desc, host_desc, temp_dir, base_filename):
     super(ConfigFixture, self).__init__()
     self.config = config_fixtures.ConfigDict()
     self.env_desc = env_desc
     self.host_desc = host_desc
     self.temp_dir = temp_dir
     self.base_filename = base_filename
예제 #2
0
 def callback(br_fixture):
     br_name = br_fixture.bridge.name
     conf = config_fixtures.ConfigDict()
     conf.update(
         {'LINUX_BRIDGE': {
             'bridge_mappings': 'physnet:%s' % br_name
         }})
     return conf
예제 #3
0
        def callback(br_fixture):
            # TODO(cbrandily): refactor net_helpers to avoid mocking it
            mock.patch.object(
                net_helpers, 'VETH0_PREFIX',
                new_callable=mock.PropertyMock(
                    return_value=constants.TAP_DEVICE_PREFIX + '0')).start()
            mock.patch.object(
                net_helpers, 'VETH1_PREFIX',
                new_callable=mock.PropertyMock(
                    return_value=constants.TAP_DEVICE_PREFIX + '1')).start()

            self.useFixture(
                tools.SafeCleanupFixture(
                    net_helpers.LinuxBridgePortFixture(
                        br_fixture.bridge, br_fixture.namespace)))
            return config_fixtures.ConfigDict()
예제 #4
0
 def __init__(self, env_desc, host_desc, temp_dir, base_filename):
     super(ConfigFixture, self).__init__(base_filename,
                                         config_fixtures.ConfigDict(),
                                         temp_dir)
     self.env_desc = env_desc
     self.host_desc = host_desc
예제 #5
0
파일: config.py 프로젝트: rolaya/neutron
 def __init__(self, env_desc, host_desc, temp_dir, base_filename):
     LOG.info('%s(): caller(): %s', log_utils.get_fname(1), log_utils.get_fname(2))
     super(ConfigFixture, self).__init__(
         base_filename, config_fixtures.ConfigDict(), temp_dir)
     self.env_desc = env_desc
     self.host_desc = host_desc
예제 #6
0
 def callback(br_fixture):
     return config_fixtures.ConfigDict()