pyveth - veth driver for Docker Engine written in Python
Jacek Kowalski
yesterday 5687c6c38c48c23d03073b45e065aeb9b36873ae
lib/NetworkDriver.py
@@ -15,7 +15,7 @@
    return ''.join([random.choice(chars) for _ in range(size)])
def create_interface(endpoint, network) -> str:
def create_interface(endpoint, network) -> tuple[str, str]:
    ifname0 = 'veth{}'.format(genid())
    ifname1 = 'veth{}'.format(genid())
@@ -163,14 +163,14 @@
        result['Gateway'] = gw4.ip.compressed
    if gw6 is not None:
        result['GatewayIPv6'] = gw6.ip.compressed
    gw4 = endpoint.Options.get("gw4", None)
    gw4 = endpoint.Options.get("gw4", network.Options.get("gw4", None))
    if gw4 is not None:
        result['StaticRoutes'].append({
            'Destination': gw4 + '/32',
            'RouteType': 1,
        })
        result['Gateway'] = gw4
    gw6 = endpoint.Options.get("gw6", None)
    gw6 = endpoint.Options.get("gw6", network.Options.get("gw6", None))
    if gw6 is not None:
        result['StaticRoutes'].append({
            'Destination': gw6 + '/128',