class RootController(object): """ This is /v2/ Controller. Pecan will find all controllers via the object properties attached to this. """ def __init__(self): enabled_ext = cfg.CONF['service:api'].enabled_extensions_v2 if len(enabled_ext) > 0: self._mgr = named.NamedExtensionManager( namespace='designate.api.v2.extensions', names=enabled_ext, invoke_on_load=True) for ext in self._mgr: controller = self path = ext.obj.get_path() for p in path.split('.')[:-1]: if p != '': controller = getattr(controller, p) setattr(controller, path.split('.')[-1], ext.obj) limits = limits.LimitsController() reverse = reverse.ReverseController() tlds = tlds.TldsController() zones = zones.ZonesController() blacklists = blacklists.BlacklistsController() errors = errors.ErrorsController() pools = pools.PoolsController() service_statuses = service_status.ServiceStatusController() tsigkeys = tsigkeys.TsigKeysController() recordsets = recordsets.RecordSetsViewController() quotas = quotas.QuotasController() rbac = rbac.RbacController()
class RootController(object): """ This is /v2/ Controller. Pecan will find all controllers via the object properties attached to this. """ limits = limits.LimitsController() schemas = schemas.SchemasController() reverse = reverse.ReverseController() tlds = tlds.TldsController() zones = zones.ZonesController() blacklists = blacklists.BlacklistsController()