def del_client(self, **kwargs):
"""
Registers a new client to the specified network.
Usage:
======= ===================================
Method URI
======= ===================================
DELETE /vtep/networks/{vni}/clients/{mac}
======= ===================================
Request parameters:
=========== ===============================================
Attribute Description
=========== ===============================================
vni Virtual Network Identifier. (e.g. 10)
mac Client MAC address to register.
=========== ===============================================
Example::
$ curl -X DELETE http://localhost:8080/vtep/networks/10/clients/aa:bb:cc:dd:ee:ff |
python -m json.tool
::
{
"10": {
"EvpnClient": {
"ip": "10.0.0.1",
"mac": "aa:bb:cc:dd:ee:ff",
"next_hop": "172.17.0.1",
"port": 1
}
}
}
"""
try:
body = self.vtep_app.del_client(**kwargs)
except (BGPSpeakerNotFound, DatapathNotFound,
VniNotFound, ClientNotFound, ClientNotLocal) as e:
return Response(body=str(e), status=500)
return Response(content_type='application/json',
body=json.dumps(body))
评论列表
文章目录