def populate_local_cache(self):
fw_dict = self.get_all_fw_db()<EOL>LOG.info("<STR_LIT>")<EOL>for fw_id in fw_dict:<EOL><INDENT>fw_data = fw_dict.get(fw_id)<EOL>tenant_id = fw_data.get('<STR_LIT>')<EOL>rule_dict = fw_data.get('<STR_LIT>').get('<STR_LIT>')<EOL>policy_id = fw_data.get('<STR_LIT>').get('<STR_LIT>')<EOL>for rule in rule_dict:<EOL><INDENT>fw_evt_data = self.convert_fwdb_event_msg(rule_dict.get(rule),<EOL>tenant_id, rule,<EOL>policy_id)<EOL>LOG.info("<STR_LIT>", tenant_id)<EOL>self.fw_rule_create(fw_evt_data, cache=True)<EOL><DEDENT>fw_os_data = self.os_helper.get_fw(fw_id)<EOL>if fw_os_data is None:<EOL><INDENT>fw_os_data = self.convert_fwdb(tenant_id, fw_data.get('<STR_LIT:name>'),<EOL>policy_id, fw_id)<EOL><DEDENT>LOG.info("<STR_LIT>", tenant_id)<EOL>self.fw_create(fw_os_data, cache=True)<EOL>if fw_data.get('<STR_LIT>') == '<STR_LIT>':<EOL><INDENT>self.fwid_attr[tenant_id].fw_drvr_created(True)<EOL><DEDENT>else:<EOL><INDENT>self.fwid_attr[tenant_id].fw_drvr_created(False)<EOL><DEDENT><DEDENT>return fw_dict<EOL>
This populates the local cache after reading the Database.

        It calls the appropriate rule create, fw create routines.
        It doesn't actually call the routine to prepare the fabric or cfg the
        device since it will be handled by retry module.