def dump_to_p4_P4ActionProfile(self, hlir, program_version=0): optional_attributes = {} print '=================================004, program_version=', program_version if program_version == TestingVersion: print 'DBG|HLIR|frontend|Dumper|rename action profile:', self.name, '--->', self.name + _ShadowFlag_ self.name = self.name + _ShadowFlag_ for action in self.action_spec: print 'type of action in action_spec:', action # note: the type of action in self.action_spec is P4RefExpression actions = [ action.dump_to_p4(hlir, program_version=program_version) for action in self.action_spec ] print 'actions:', actions if self.size is not None: optional_attributes["size"] = self.size.dump_to_p4(hlir) if self.selector is not None: optional_attributes["selector"] = self.selector.dump_to_p4(hlir) g_action_profile = p4_action_profile(hlir, self.name, filename=self.filename, lineno=self.lineno, actions=actions, **optional_attributes) g_action_profile._pragmas = self._pragmas.copy()
def dump_to_p4_P4ActionProfile(self, hlir): optional_attributes = {} actions = [action.dump_to_p4(hlir) for action in self.action_spec] if self.size is not None: optional_attributes["size"] = self.size.dump_to_p4(hlir) if self.selector is not None: optional_attributes["selector"] = self.selector.dump_to_p4(hlir) g_action_profile = p4_action_profile( hlir, self.name, filename=self.filename, lineno=self.lineno, actions=actions, **optional_attributes ) g_action_profile._pragmas = self._pragmas.copy()
def dump_to_p4_P4ActionProfile(self, hlir): optional_attributes = {} actions = [action.dump_to_p4(hlir) for action in self.action_spec] if self.size is not None: optional_attributes["size"] = self.size.dump_to_p4(hlir) if self.selector is not None: optional_attributes["selector"] = self.selector.dump_to_p4(hlir) g_action_profile = p4_action_profile(hlir, self.name, filename=self.filename, lineno=self.lineno, actions=actions, **optional_attributes) g_action_profile._pragmas = self._pragmas.copy()