Fix AttributeError in RPC code for DVR

Fix the usage of call methods as per recent changes according to
drop-rpc-compat. These changes went overlooked and it broke DVR.

Tests will be done as follow-up.

Partial-bug: #1394848

Change-Id: I6e0584f8e54e606a76b87853b2371cc8e24eba69
This commit is contained in:
armando-migliaccio 2014-11-20 22:15:34 -08:00
parent 9d0be0aced
commit a8a0f59329
2 changed files with 14 additions and 25 deletions

View File

@ -30,32 +30,24 @@ class DVRServerRpcApiMixin(object):
@log.log @log.log
def get_dvr_mac_address_by_host(self, context, host): def get_dvr_mac_address_by_host(self, context, host):
return self.call(context, cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
self.make_msg('get_dvr_mac_address_by_host', return cctxt.call(context, 'get_dvr_mac_address_by_host', host=host)
host=host),
version=self.DVR_RPC_VERSION)
@log.log @log.log
def get_dvr_mac_address_list(self, context): def get_dvr_mac_address_list(self, context):
return self.call(context, cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
self.make_msg('get_dvr_mac_address_list'), return cctxt.call(context, 'get_dvr_mac_address_list')
version=self.DVR_RPC_VERSION)
@log.log @log.log
def get_ports_on_host_by_subnet(self, context, host, subnet): def get_ports_on_host_by_subnet(self, context, host, subnet):
return self.call(context, cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
self.make_msg( return cctxt.call(context, 'get_ports_on_host_by_subnet',
'get_ports_on_host_by_subnet', host=host, subnet=subnet)
host=host,
subnet=subnet),
version=self.DVR_RPC_VERSION)
@log.log @log.log
def get_subnet_for_dvr(self, context, subnet): def get_subnet_for_dvr(self, context, subnet):
return self.call(context, cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
self.make_msg('get_subnet_for_dvr', return cctxt.call(context, 'get_subnet_for_dvr', subnet=subnet)
subnet=subnet),
version=self.DVR_RPC_VERSION)
class DVRServerRpcCallback(object): class DVRServerRpcCallback(object):

View File

@ -38,18 +38,15 @@ class FWaaSL3PluginApi(api.FWaaSPluginApiMixin):
def get_firewalls_for_tenant(self, context, **kwargs): def get_firewalls_for_tenant(self, context, **kwargs):
"""Get the Firewalls with rules from the Plugin to send to driver.""" """Get the Firewalls with rules from the Plugin to send to driver."""
LOG.debug("Retrieve Firewall with rules from Plugin") LOG.debug("Retrieve Firewall with rules from Plugin")
cctxt = self.client.prepare()
return self.call(context, return cctxt.call(context, 'get_firewalls_for_tenant', host=self.host)
self.make_msg('get_firewalls_for_tenant',
host=self.host))
def get_tenants_with_firewalls(self, context, **kwargs): def get_tenants_with_firewalls(self, context, **kwargs):
"""Get all Tenants that have Firewalls configured from plugin.""" """Get all Tenants that have Firewalls configured from plugin."""
LOG.debug("Retrieve Tenants with Firewalls configured from Plugin") LOG.debug("Retrieve Tenants with Firewalls configured from Plugin")
cctxt = self.client.prepare()
return self.call(context, return cctxt.call(context,
self.make_msg('get_tenants_with_firewalls', 'get_tenants_with_firewalls', host=self.host)
host=self.host))
class FWaaSL3AgentRpcCallback(api.FWaaSAgentRpcCallbackMixin): class FWaaSL3AgentRpcCallback(api.FWaaSAgentRpcCallbackMixin):