def v3_app_factory(global_conf, **local_conf): controllers.register_version('v3') mapper = routes.Mapper() v3routers = [] for module in [assignment, auth, catalog, credential, identity, policy]: module.routers.append_v3_routers(mapper, v3routers) if CONF.trust.enabled: trust.routers.append_v3_routers(mapper, v3routers) # Add in the v3 version api v3routers.append(routers.VersionV3('admin')) v3routers.append(routers.VersionV3('public')) # TODO(ayoung): put token routes here return wsgi.ComposingRouter(mapper, v3routers)
def v3_app_factory(global_conf, **local_conf): controllers.register_version('v3') mapper = routes.Mapper() sub_routers = [] _routers = [] # NOTE(dstanek): Routers should be ordered by their frequency of use in # a live system. This is due to the routes implementation. The most # frequently used routers should appear first. router_modules = [ auth, assignment, catalog, credential, identity, policy, resource ] if CONF.trust.enabled: router_modules.append(trust) if CONF.endpoint_policy.enabled: router_modules.append(endpoint_policy) for module in router_modules: routers_instance = module.routers.Routers() _routers.append(routers_instance) routers_instance.append_v3_routers(mapper, sub_routers) # Add in the v3 version api sub_routers.append(routers.VersionV3('public', _routers)) return wsgi.ComposingRouter(mapper, sub_routers)
def v3_app_factory(global_conf, **local_conf): conf = global_conf.copy() conf.update(local_conf) mapper = routes.Mapper() v3routers = [] for module in [auth, catalog, identity, policy]: module.routers.append_v3_routers(mapper, v3routers) if CONF.trust.enabled: trust.routers.append_v3_routers(mapper, v3routers) # Add in the v3 version api v3routers.append(routers.VersionV3('admin')) v3routers.append(routers.VersionV3('public')) # TODO(ayoung): put token routes here return wsgi.ComposingRouter(mapper, v3routers)
def v3_app_factory(global_conf, **local_conf): controllers.register_version('v3') mapper = routes.Mapper() sub_routers = [] _routers = [] router_modules = [assignment, auth, catalog, credential, identity, policy] if CONF.trust.enabled: router_modules.append(trust) for module in router_modules: routers_instance = module.routers.Routers() _routers.append(routers_instance) routers_instance.append_v3_routers(mapper, sub_routers) # Add in the v3 version api sub_routers.append(routers.VersionV3('admin', _routers)) sub_routers.append(routers.VersionV3('public', _routers)) return wsgi.ComposingRouter(mapper, sub_routers)