def _check_create_fw(self, tenant_id, drvr_name):
        """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.
        """
        if self.fwid_attr[tenant_id].is_fw_drvr_create_needed():
            fw_dict = self.fwid_attr[tenant_id].get_fw_dict()
            try:
                with self.fwid_attr[tenant_id].mutex_lock:
                    ret = self.add_fw_db(fw_dict.get('fw_id'), fw_dict,
                                         fw_constants.RESULT_FW_CREATE_INIT)
                    if not ret:
                        LOG.error("Adding FW DB failed for tenant %s",
                                  tenant_id)
                        return
                    self._create_fw_fab_dev(tenant_id, drvr_name, fw_dict)
            except Exception as exc:
                LOG.error("Exception raised in create fw %s", str(exc))
def _check_create_fw ( self , tenant_id , drvr_name ) : if self . fwid_attr [ tenant_id ] . is_fw_drvr_create_needed ( ) : fw_dict = self . fwid_attr [ tenant_id ] . get_fw_dict ( ) try : with self . fwid_attr [ tenant_id ] . mutex_lock : ret = self . add_fw_db ( fw_dict . get ( 'fw_id' ) , fw_dict , fw_constants . RESULT_FW_CREATE_INIT ) if not ret : LOG . error ( "Adding FW DB failed for tenant %s" , tenant_id ) return self . _create_fw_fab_dev ( tenant_id , drvr_name , fw_dict ) except Exception as exc : LOG . error ( "Exception raised in create fw %s" , str ( exc ) )
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.