def mk_action(self, action_info): action = openolt_pb2.Action() if POP_VLAN in action_info: action.o_vid = action_info[VLAN_VID] action.cmd.remove_outer_tag = True elif PUSH_VLAN in action_info: action.o_vid = action_info[VLAN_VID] action.cmd.add_outer_tag = True elif TRAP_TO_HOST in action_info: action.cmd.trap_to_host = True else: self.log.info('Invalid-action-field', action_info=action_info) return return action
def mk_action(self, action_info): action = openolt_pb2.Action() if 'pop_vlan' in action_info: action.o_vid = action_info['vlan_vid'] action.cmd.remove_outer_tag = True elif 'push_vlan' in action_info: action.o_vid = action_info['vlan_vid'] action.cmd.add_outer_tag = True elif 'trap_to_host' in action_info: action.cmd.trap_to_host = True else: self.log.info('Invalid-action-field') return return action