from moniker.openstack.common import cfg
from moniker.openstack.common import log as logging
from moniker.plugin import Plugin

LOG = logging.getLogger(__name__)

cfg.CONF.register_opts([
    cfg.StrOpt('backend-driver', default='bind9',
               help='The backend driver to use')
])


def get_backend(conf):
    return Plugin.get_plugin(cfg.CONF.backend_driver, ns=__name__, conf=conf)

from moniker.openstack.common import cfg
from moniker.openstack.common import log as logging
from moniker.plugin import Plugin

LOG = logging.getLogger(__name__)

cfg.CONF.register_opts([
    cfg.StrOpt('backend-driver', default='bind9',
               help='The backend driver to use')
])


def get_backend(conf):
    return Plugin.get_plugin(cfg.CONF.backend_driver, ns=__name__,
                             conf=conf, invoke_on_load=True)

Fix so it invokes on load
Fix so it invokes on load

Change-Id: I9806ac61bc1338e566a533f57a50c214ec6e14e7

  from moniker.openstack.common import cfg
  from moniker.openstack.common import log as logging
  from moniker.plugin import Plugin
  
  LOG = logging.getLogger(__name__)
  
  cfg.CONF.register_opts([
      cfg.StrOpt('backend-driver', default='bind9',
                 help='The backend driver to use')
  ])
  
  
  def get_backend(conf):
-     return Plugin.get_plugin(cfg.CONF.backend_driver, ns=__name__, conf=conf)
+     return Plugin.get_plugin(cfg.CONF.backend_driver, ns=__name__,
+                              conf=conf, invoke_on_load=True)
  
Fix so it invokes on load
## Code Before:
from moniker.openstack.common import cfg
from moniker.openstack.common import log as logging
from moniker.plugin import Plugin

LOG = logging.getLogger(__name__)

cfg.CONF.register_opts([
    cfg.StrOpt('backend-driver', default='bind9',
               help='The backend driver to use')
])


def get_backend(conf):
    return Plugin.get_plugin(cfg.CONF.backend_driver, ns=__name__, conf=conf)

## Instruction:
Fix so it invokes on load
## Code After:
from moniker.openstack.common import cfg
from moniker.openstack.common import log as logging
from moniker.plugin import Plugin

LOG = logging.getLogger(__name__)

cfg.CONF.register_opts([
    cfg.StrOpt('backend-driver', default='bind9',
               help='The backend driver to use')
])


def get_backend(conf):
    return Plugin.get_plugin(cfg.CONF.backend_driver, ns=__name__,
                             conf=conf, invoke_on_load=True)
