def _handle_prs_updated(self, context):
     # Expecting either a PTG or EP context
     if (context.current['consumed_policy_rule_sets'] !=
             context.original['consumed_policy_rule_sets']):
         added, removed = utils.set_difference(
             context.current['consumed_policy_rule_sets'],
             context.original['consumed_policy_rule_sets'])
         if removed:
             for sci in self._get_chains_by_prs(context, removed):
                 chain_context = self._get_chain_admin_context(
                     context._plugin_context, instance_id=sci)
                 self._notify_sc_consumer_removed(
                     chain_context, context.current, sci)
         if added:
             for sci in self._get_chains_by_prs(context, added):
                 chain_context = self._get_chain_admin_context(
                     context._plugin_context, instance_id=sci)
                 self._notify_sc_consumer_removed(
                     chain_context, context.current, sci)
 def _handle_prs_updated(self, context):
     # Expecting either a PTG or EP context
     if (context.current['consumed_policy_rule_sets'] !=
             context.original['consumed_policy_rule_sets']):
         added, removed = utils.set_difference(
             context.current['consumed_policy_rule_sets'],
             context.original['consumed_policy_rule_sets'])
         if removed:
             for sci in self._get_chains_by_prs(context, removed):
                 chain_context = self._get_chain_admin_context(
                     context._plugin_context, instance_id=sci)
                 self._notify_sc_consumer_removed(
                     chain_context, context.current, sci)
         if added:
             for sci in self._get_chains_by_prs(context, added):
                 chain_context = self._get_chain_admin_context(
                     context._plugin_context, instance_id=sci)
                 self._notify_sc_consumer_removed(
                     chain_context, context.current, sci)