# Path: networking_sfc/services/sfc/drivers/ovs/rpc_topics.py
# AGENT = 'q-agent-notifier'
# SFC_PLUGIN = 'q-sfc-plugin'
# SFC_AGENT = 'q-sfc-agent'
# SFC_FLOW = 'q-sfc-flow'
# PORTFLOW = 'portflowrule'


import abc
import oslo_messaging
from neutron.agent import rpc as agent_rpc
from neutron import manager
from neutron_lib.agent import l2_extension
from neutron_lib.agent import topics
from neutron_lib import rpc as n_rpc
from oslo_config import cfg
from oslo_log import log as logging
from networking_sfc.services.sfc.drivers.ovs import rpc_topics as sfc_topics

            if flowrules:
                self.sfc_driver.update_flow_rules(
                    flowrules, flowrule_status)
        except Exception as e:
            LOG.exception(e)
            LOG.error("update_flow_rules failed")

        if flowrule_status:
            self.sfc_plugin_rpc.update_flowrules_status(
                context, flowrule_status)

    def delete_flow_rules(self, context, **kwargs):
        flowrule_status = []
        try:
            flowrules = kwargs['flowrule_entries']
            LOG.debug("delete_flow_rules received,  flowrules= %s", flowrules)
            if flowrules:
                self.sfc_driver.delete_flow_rule(
                    flowrules, flowrule_status)
        except Exception as e:
            LOG.exception(e)
            LOG.error("delete_flow_rules failed")

        if flowrule_status:
            self.sfc_plugin_rpc.update_flowrules_status(
                context, flowrule_status)

    def _sfc_setup_rpc(self):
        self.sfc_plugin_rpc = SfcPluginApi(

# Path: networking_sfc/services/sfc/drivers/ovs/rpc_topics.py
# AGENT = 'q-agent-notifier'
# SFC_PLUGIN = 'q-sfc-plugin'
# SFC_AGENT = 'q-sfc-agent'
# SFC_FLOW = 'q-sfc-flow'
# PORTFLOW = 'portflowrule'


# Path: networking_sfc/services/sfc/agent/extensions/sfc.py
import abc
import oslo_messaging
from neutron.agent import rpc as agent_rpc
from neutron import manager
from neutron_lib.agent import l2_extension
from neutron_lib.agent import topics
from neutron_lib import rpc as n_rpc
from oslo_config import cfg
from oslo_log import log as logging
from networking_sfc.services.sfc.drivers.ovs import rpc_topics as sfc_topics


            if flowrules:
                self.sfc_driver.update_flow_rules(
                    flowrules, flowrule_status)
        except Exception as e:
            LOG.exception(e)
            LOG.error("update_flow_rules failed")

        if flowrule_status:
            self.sfc_plugin_rpc.update_flowrules_status(
                context, flowrule_status)

    def delete_flow_rules(self, context, **kwargs):
        flowrule_status = []
        try:
            flowrules = kwargs['flowrule_entries']
            LOG.debug("delete_flow_rules received,  flowrules= %s", flowrules)
            if flowrules:
                self.sfc_driver.delete_flow_rule(
                    flowrules, flowrule_status)
        except Exception as e:
            LOG.exception(e)
            LOG.error("delete_flow_rules failed")

        if flowrule_status:
            self.sfc_plugin_rpc.update_flowrules_status(
                context, flowrule_status)

    def _sfc_setup_rpc(self):
        self.sfc_plugin_rpc = SfcPluginApi(

            sfc_topics.SFC_PLUGIN, cfg.CONF.host)