Merge "Fix run docker error on the network with host route"
This commit is contained in:
commit
9824d94055
@ -18,6 +18,13 @@ SCHEMA = {
|
||||
"SUCCESS": {}
|
||||
}
|
||||
|
||||
# Routes are either given a RouteType of 0 and a value for NextHop;
|
||||
# or, a RouteType of 1 and no value for NextHop, meaning a connected route.
|
||||
ROUTE_TYPE = {
|
||||
"NEXTHOP": 0,
|
||||
"CONNECTED": 1
|
||||
}
|
||||
|
||||
DEVICE_OWNER = 'kuryr:container'
|
||||
NIC_NAME_LEN = 14
|
||||
VETH_PREFIX = 'tap'
|
||||
|
@ -851,10 +851,10 @@ def network_driver_join():
|
||||
'Destination': host_route['destination']
|
||||
}
|
||||
if host_route.get('nexthop', None):
|
||||
static_route['RouteType'] = const.TYPES['NEXTHOP']
|
||||
static_route['RouteType'] = const.ROUTE_TYPE['NEXTHOP']
|
||||
static_route['NextHop'] = host_route['nexthop']
|
||||
else:
|
||||
static_route['RouteType'] = const.TYPES['CONNECTED']
|
||||
static_route['RouteType'] = const.ROUTE_TYPE['CONNECTED']
|
||||
join_response['StaticRoutes'].append(static_route)
|
||||
|
||||
return flask.jsonify(join_response)
|
||||
|
Loading…
Reference in New Issue
Block a user