|
|
@@ -250,11 +250,14 @@ def endpoint_info():
|
|
|
def delete_endpoint():
|
|
|
req = request.get_json(force=True)
|
|
|
|
|
|
- bridge = net_bridge(req['NetworkID'])
|
|
|
if_host, _if_container = veth_pair(req['EndpointID'])
|
|
|
if_host = interface.GetInterface(LIBRARY, if_host)
|
|
|
|
|
|
- interface.DelPort(LIBRARY, bridge.ifname, if_host.ifname)
|
|
|
+ if library == 'NDB':
|
|
|
+ bridge = net_bridge(req['NetworkID'])
|
|
|
+ interface.DelPort(LIBRARY, bridge.ifname, if_host.ifname)
|
|
|
+ else:
|
|
|
+ interface.DelPort(LIBRARY, 'dummy0', if_host.ifname)
|
|
|
interface.RemoveInterface(LIBRARY, if_host.ifname)
|
|
|
|
|
|
return jsonify({})
|