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
def get_dvr_mac_address_by_host(self, context, host):
return self.call(context,
self.make_msg('get_dvr_mac_address_by_host',
host=host),
version=self.DVR_RPC_VERSION)
cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
return cctxt.call(context, 'get_dvr_mac_address_by_host', host=host)
@log.log
def get_dvr_mac_address_list(self, context):
return self.call(context,
self.make_msg('get_dvr_mac_address_list'),
version=self.DVR_RPC_VERSION)
cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
return cctxt.call(context, 'get_dvr_mac_address_list')
@log.log
def get_ports_on_host_by_subnet(self, context, host, subnet):
return self.call(context,
self.make_msg(
'get_ports_on_host_by_subnet',
host=host,
subnet=subnet),
version=self.DVR_RPC_VERSION)
cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
return cctxt.call(context, 'get_ports_on_host_by_subnet',
host=host, subnet=subnet)
@log.log
def get_subnet_for_dvr(self, context, subnet):
return self.call(context,
self.make_msg('get_subnet_for_dvr',
subnet=subnet),
version=self.DVR_RPC_VERSION)
cctxt = self.client.prepare(version=self.DVR_RPC_VERSION)
return cctxt.call(context, 'get_subnet_for_dvr', subnet=subnet)
class DVRServerRpcCallback(object):

View File

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