def del_network(self, **kwargs):
"""
Deletes the network for the specified VNI.
Usage:
======= =====================
Method URI
======= =====================
DELETE /vtep/networks/{vni}
======= =====================
Request parameters:
================ ========================================
Attribute Description
================ ========================================
vni Virtual Network Identifier. (e.g. 10)
================ ========================================
Example::
$ curl -X DELETE http://localhost:8080/vtep/networks/10 |
python -m json.tool
::
{
"10": {
"EvpnNetwork": {
"ethernet_tag_id": 10,
"clients": [
{
"EvpnClient": {
"ip": "10.0.0.11",
"mac": "e2:b1:0c:ba:42:ed",
"port": 1
}
}
],
"route_dist": "65000:100",
"vni": 10
}
}
}
"""
try:
body = self.vtep_app.del_network(**kwargs)
except (BGPSpeakerNotFound, DatapathNotFound, VniNotFound) as e:
return e.to_response(status=404)
return Response(content_type='application/json',
body=json.dumps(body))
评论列表
文章目录