def _prepare_fabric_fw_internal(self, tenant_id, fw_dict, is_fw_virt,
                                    result):
        """Internal routine to prepare the fabric.

        This creates an entry in FW DB and runs the SM.
        """
        if not self.auto_nwk_create:
            LOG.info("Auto network creation disabled")
            return False
        try:
            tenant_name = fw_dict.get('tenant_name')
            fw_id = fw_dict.get('fw_id')
            fw_name = fw_dict.get('fw_name')
            # TODO(padkrish) More than 1 FW per tenant not supported.
            if tenant_id in self.service_attr and (
               result == fw_const.RESULT_FW_CREATE_DONE):
                LOG.error("Fabric already prepared for tenant %(tenant)s,"
                          " %(name)s",
                          {'tenant': tenant_id, 'name': tenant_name})
                return True
            if tenant_id not in self.service_attr:
                self.create_serv_obj(tenant_id)
            self.service_attr[tenant_id].create_fw_db(fw_id, fw_name,
                                                      tenant_id)
            ret = self.run_create_sm(tenant_id, fw_dict, is_fw_virt)
            if ret:
                LOG.info("SM create returned True for Tenant Name "
                         "%(tenant)s FW %(fw)s",
                         {'tenant': tenant_name, 'fw': fw_name})
                self.service_attr[tenant_id].set_fabric_create(True)
            else:
                LOG.error("SM create returned False for Tenant Name "
                          "%(tenant)s FW %(fw)s",
                          {'tenant': tenant_name, 'fw': fw_name})
        except Exception as exc:
            LOG.error("Exception raised in create fabric int %s",
                      str(exc))
            return False
        return ret
Internal routine to prepare the fabric.

        This creates an entry in FW DB and runs the SM.