Custom Search

Wednesday, August 10, 2016

neutron server to DHCP agent and DHCP agent to neutron server RPC call example

1)
DHCP agent Service
-----------
a)
client side API:
neutron.agent.dhcp.agent.DhcpPluginAPI
neutron/agent/dhcp/agent.py

b)
Server side API:
neutron.agent.dhcp.agent.DhcpAgent
neutron/agent/dhcp/agent.py

* Here client and server side API classes are defined in same file neutron/agent/dhcp/agent.py

2)
Neutron Server service
-----------
a)
Server side API:
neutron.api.rpc.handlers.dhcp_rpc.DhcpRpcCallback
neutron/api/rpc/handlers/dhcp_rpc.py

b)
client side API:
neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api.DhcpAgentNotifyApi
neutron/api/rpc/agentnotifiers/dhcp_rpc_agent_api.py

3)
Here:
1a (DhcpPluginAPI) make rpc call to 2a (DhcpRpcCallback)
2b (DhcpAgentNotifyApi) make rpc call to 1b (DhcpAgent).

* DHCP agent Service make rpc call to Neutron Server Service.
* Neutron Server also make rpc call to DHCP agent Service.

Neutron RPC APIs
================

As discussed before, RPC APIs are defined in two parts: a client side and a
server side.  Several of these pairs exist in the Neutron code base.  The code
base is being updated with documentation on every rpc interface implementation
that indicates where the corresponding server or client code is located.

Example: DHCP
-------------

The DHCP agent includes a client API, neutron.agent.dhcp.agent.DhcpPluginAPI.
The DHCP agent uses this class to call remote methods back in the Neutron
server.  The server side is defined in
neutron.api.rpc.handlers.dhcp_rpc.DhcpRpcCallback.  It is up to the Neutron
plugin in use to decide whether the DhcpRpcCallback interface should be
exposed.

Similarly, there is an RPC interface defined that allows the Neutron plugin to
remotely invoke methods in the DHCP agent.  The client side is defined in
neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api.DhcpAgentNotifyApi.  Th
server side of this interface that runs in the DHCP agent is
neutron.agent.dhcp.agent.DhcpAgent.

--------------



1 comment:

  1. BlueHost is definitely the best web-hosting company for any hosting plans you might need.

    ReplyDelete