def populate_model(self, delta_ifc_key, delta_ifc_cfg_value): 'Override the default implementation because the IFC model does not directly map to self.children' DMObject.populate_model(self, delta_ifc_key, delta_ifc_cfg_value) 'Let PolicyMap share the configuration with this translator' policy_map = self.children.values()[0] policy_map.populate_model(delta_ifc_key, delta_ifc_cfg_value) 'If the this configuration for this object is destroyed, destroy its ServicePolicy child as well' if self.delta_ifc_cfg_value['state'] != State.DESTROY: return service_policy = self.children.values()[1] service_policy.populate_model((Type.PARAM, service_policy.ifc_key,''), {'state': State.DESTROY})
def populate_model(self, delta_ifc_key, delta_ifc_cfg_value): ''' Populate model ''' DMObject.populate_model(self, delta_ifc_key, delta_ifc_cfg_value) self.state = delta_ifc_cfg_value['state']