def __init__(self):
     """Do the initialization for the firewall service plugin here."""
     self._fortigate = config.fgt_info
     self._driver = config.get_apiclient()
     self.task_manager = tasks.TaskManager()
     self.task_manager.start()
     firewall_db.subscribe()
 def __init__(self):
     """Do the initialization for the firewall service plugin here."""
     self._fortigate = config.fgt_info
     self._driver = config.get_apiclient()
     self.task_manager = tasks.TaskManager()
     self.task_manager.start()
     firewall_db.subscribe()
    def Fortinet_init(self):
        """Fortinet specific initialization for this class."""
        LOG.debug("FortinetMechanismDriver_init")
        self._fortigate = config.fgt_info
        self._driver = config.get_apiclient()

        for key in const.FORTINET_PARAMS:
            self.sync_conf_to_db(key)

        session = db_api.get_session()
        try:
            utils.add_vdom(self, session, vdom=const.EXT_VDOM,
                           tenant_id=const.FAKE_TENANT_ID)
            utils.set_vlanintf(self, session, vdom=const.EXT_VDOM,
                               name=self._fortigate['ext_interface'])
        except Exception as e:
            utils._rollback_on_err(self, session, e)
            raise ml2_exc.MechanismDriverError(
                method=sys._getframe().f_code.co_name)
        utils.update_status(self, session, t_consts.TaskStatus.COMPLETED)
    def Fortinet_init(self):
        """Fortinet specific initialization for this class."""
        LOG.debug("FortinetMechanismDriver_init")
        self._fortigate = config.fgt_info
        self._driver = config.get_apiclient()

        for key in const.FORTINET_PARAMS:
            self.sync_conf_to_db(key)

        session = db_api.get_session()
        try:
            utils.add_vdom(self, session, vdom=const.EXT_VDOM,
                           tenant_id=const.FAKE_TENANT_ID)
            utils.set_vlanintf(self, session, vdom=const.EXT_VDOM,
                               name=self._fortigate['ext_interface'])
        except Exception as e:
            utils._rollback_on_err(self, session, e)
            raise ml2_exc.MechanismDriverError(
                method=sys._getframe().f_code.co_name)
        utils.update_status(self, session, t_consts.TaskStatus.COMPLETED)
 def Fortinet_init(self):
     """Fortinet specific initialization for this class."""
     LOG.debug("FortinetL3ServicePlugin_init")
     self._fortigate = config.fgt_info
     self._driver = config.get_apiclient()
     self.enable_fwaas = 'fwaas_fortinet' in cfg.CONF.service_plugins
 def Fortinet_init(self):
     """Fortinet specific initialization for this class."""
     LOG.debug("FortinetL3ServicePlugin_init")
     self._fortigate = config.fgt_info
     self._driver = config.get_apiclient()
     self.enable_fwaas = 'fwaas_fortinet' in cfg.CONF.service_plugins