def _check_create_fw(self, tenant_id, drvr_name):
if self.fwid_attr[tenant_id].is_fw_drvr_create_needed():<EOL><INDENT>fw_dict = self.fwid_attr[tenant_id].get_fw_dict()<EOL>try:<EOL><INDENT>with self.fwid_attr[tenant_id].mutex_lock:<EOL><INDENT>ret = self.add_fw_db(fw_dict.get('<STR_LIT>'), fw_dict,<EOL>fw_constants.RESULT_FW_CREATE_INIT)<EOL>if not ret:<EOL><INDENT>LOG.error("<STR_LIT>",<EOL>tenant_id)<EOL>return<EOL><DEDENT>self._create_fw_fab_dev(tenant_id, drvr_name, fw_dict)<EOL><DEDENT><DEDENT>except Exception as exc:<EOL><INDENT>LOG.error("<STR_LIT>", str(exc))<EOL><DEDENT><DEDENT>
Creates the Firewall, if all conditions are met.

        This function first checks if all the configuration are done
        for a FW to be launched. After that it creates the FW entry in the
        DB. After that, it calls the routine to prepare the fabric and
        configure the device.