blob: 562809210b01fa1462e20c2ef15e5f7171917f81 [file] [log] [blame]
Rich Lane2d6d4822013-01-08 10:49:16 -08001"""
2Eth platform
3
4This platform uses the --interface command line option to choose the ethernet interfaces.
5"""
6
7def platform_config_update(config):
8 """
9 Update configuration for the local platform
10
11 @param config The configuration dictionary to use/update
12 """
13
14 port_map = {}
15
16 for (ofport, interface) in config["interfaces"]:
17 port_map[ofport] = interface
18
19 # Default to a veth configuration compatible with the reference switch
20 if not port_map:
21 port_map = {
22 1: 'veth1',
23 2: 'veth3',
24 3: 'veth5',
25 4: 'veth7',
26 }
27
28 config['port_map'] = port_map