def map(self, softPkg): dict = PullComponentGenerator.map(self, softPkg) dict['hasHwLoadRequestProp'] = False dict['hasHwLoadStatusProp'] = False for prop in dict['properties']: if prop.has_key('structdef'): if str(prop['structdef']['pyclass']) == "HwLoadRequest": dict['hasHwLoadRequestProp'] = True if str(prop['structdef']['pyclass']) == "HwLoadStatus": dict['hasHwLoadStatusProp'] = True return dict
def map(self, softPkg): dict = PullComponentGenerator.map(self, softPkg) dict['hasHwLoadRequestProp'] = False dict['hasHwLoadStatusProp'] = False for prop in dict['properties']: if prop.has_key('structdef'): if str(prop['structdef']['pyclass']) == "HwLoadRequest": dict['hasHwLoadRequestProp'] = True if str(prop['structdef']['pyclass']) == "HwLoadStatus": dict['hasHwLoadStatusProp'] = True return dict
def templates(self, component): templates = PullComponentGenerator.templates(self, component) templates.append(PythonTemplate('persona_base.py', component['personaclass']['file'])) return templates