Can't get requested routers from kwarg in def sync_routers

asked 2015-01-28 12:37:07 -0600

Alexander Chadin gravatar image

updated 2015-01-30 05:01:07 -0600

smaffulli gravatar image

Good day everyone. I ran into some problem: when i'm trying to send sync_routers via rpc(RabbitMQ as backend) with list of requested router_ids, i get None trying to extract kwarg in def sync_routers. Any thoughts?

Here is attached code:

l3_agent.py

class L3PluginApi(n_rpc.RpcProxy): 
    def get_routers(self, context, router_ids=None): 
        """Make a remote process call to retrieve the sync data for routers.""" 
        return self.call(context, self.make_msg('sync_routers', host=self.host, router_ids=router_ids))

l3_rpc.py

class L3RpcCallback(n_rpc.RpcCallback):
    def sync_routers(self, context, **kwargs):
        """Sync routers according to filters to a specific agent.

        @param context: contain user information
        @param kwargs: host, router_ids
        @return: a list of routers
                 with their interfaces and floating_ips
        """
        router_ids = kwargs.get('router_ids')
edit retag flag offensive close merge delete