fix some imports
This commit is contained in:
parent
ff6af1f808
commit
e2f04f224e
|
@ -3,9 +3,6 @@
|
||||||
"""Main entry point into the Catalog service."""
|
"""Main entry point into the Catalog service."""
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import identity
|
|
||||||
from keystone import token
|
|
||||||
from keystone import policy
|
|
||||||
from keystone.common import manager
|
from keystone.common import manager
|
||||||
from keystone.common import wsgi
|
from keystone.common import wsgi
|
||||||
|
|
||||||
|
@ -31,9 +28,6 @@ class Manager(manager.Manager):
|
||||||
class ServiceController(wsgi.Application):
|
class ServiceController(wsgi.Application):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.catalog_api = Manager()
|
self.catalog_api = Manager()
|
||||||
self.identity_api = identity.Manager()
|
|
||||||
self.token_api = token.Manager()
|
|
||||||
self.policy_api = policy.Manager()
|
|
||||||
super(ServiceController, self).__init__()
|
super(ServiceController, self).__init__()
|
||||||
|
|
||||||
# CRUD extensions
|
# CRUD extensions
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
from keystone.backends.sql.core import *
|
from keystone.common.sql.core import *
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone.backends.sql import migration
|
from keystone.common.sql import migration
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
|
|
||||||
"""Utility methods for working with WSGI servers."""
|
"""Utility methods for working with WSGI servers."""
|
||||||
|
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -31,6 +32,8 @@ import webob
|
||||||
import webob.dec
|
import webob.dec
|
||||||
import webob.exc
|
import webob.exc
|
||||||
|
|
||||||
|
from keystone.common import utils
|
||||||
|
|
||||||
|
|
||||||
class WritableLogger(object):
|
class WritableLogger(object):
|
||||||
"""A thin wrapper that responds to `write` and logs."""
|
"""A thin wrapper that responds to `write` and logs."""
|
||||||
|
@ -146,7 +149,7 @@ class BaseApplication(object):
|
||||||
raise NotImplementedError('You must implement __call__')
|
raise NotImplementedError('You must implement __call__')
|
||||||
|
|
||||||
|
|
||||||
class Application(wsgi.BaseApplication):
|
class Application(BaseApplication):
|
||||||
@webob.dec.wsgify
|
@webob.dec.wsgify
|
||||||
def __call__(self, req):
|
def __call__(self, req):
|
||||||
arg_dict = req.environ['wsgiorg.routing_args'][1]
|
arg_dict = req.environ['wsgiorg.routing_args'][1]
|
||||||
|
@ -375,7 +378,7 @@ class ComposingRouter(Router):
|
||||||
super(ComposingRouter, self).__init__(mapper)
|
super(ComposingRouter, self).__init__(mapper)
|
||||||
|
|
||||||
|
|
||||||
class ComposableRouter(object):
|
class ComposableRouter(Router):
|
||||||
"""Router that supports use by ComposingRouter."""
|
"""Router that supports use by ComposingRouter."""
|
||||||
|
|
||||||
def __init__(self, mapper=None):
|
def __init__(self, mapper=None):
|
||||||
|
@ -394,7 +397,9 @@ class ExtensionRouter(Router):
|
||||||
|
|
||||||
Expects to be subclassed.
|
Expects to be subclassed.
|
||||||
"""
|
"""
|
||||||
def __init__(self, application, mapper):
|
def __init__(self, application, mapper=None):
|
||||||
|
if mapper is None:
|
||||||
|
mapper = routes.Mapper()
|
||||||
self.application = application
|
self.application = application
|
||||||
self.add_routes(mapper)
|
self.add_routes(mapper)
|
||||||
mapper.connect('{path_info:.*}', controller=self.application)
|
mapper.connect('{path_info:.*}', controller=self.application)
|
||||||
|
|
|
@ -5,7 +5,7 @@ import logging
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from keystone import cfg
|
from keystone.common import cfg
|
||||||
|
|
||||||
|
|
||||||
gettext.install('keystone', unicode=1)
|
gettext.install('keystone', unicode=1)
|
||||||
|
|
|
@ -20,10 +20,6 @@ class Ec2Credential(sql.ModelBase, sql.DictBase):
|
||||||
|
|
||||||
|
|
||||||
class Ec2(sql.Base):
|
class Ec2(sql.Base):
|
||||||
# Internal interface to manage the database
|
|
||||||
def db_sync(self):
|
|
||||||
migration.db_sync()
|
|
||||||
|
|
||||||
def get_credential(self, credential_id):
|
def get_credential(self, credential_id):
|
||||||
session = self.get_session()
|
session = self.get_session()
|
||||||
credential_ref = session.query(Ec2Credential)\
|
credential_ref = session.query(Ec2Credential)\
|
||||||
|
|
|
@ -30,7 +30,7 @@ class Manager(manager.Manager):
|
||||||
|
|
||||||
|
|
||||||
class Ec2Extension(wsgi.ExtensionRouter):
|
class Ec2Extension(wsgi.ExtensionRouter):
|
||||||
def add_routes(self, mapper)
|
def add_routes(self, mapper):
|
||||||
ec2_controller = Ec2Controller()
|
ec2_controller = Ec2Controller()
|
||||||
# validation
|
# validation
|
||||||
mapper.connect('/ec2tokens',
|
mapper.connect('/ec2tokens',
|
||||||
|
|
|
@ -2,8 +2,12 @@
|
||||||
|
|
||||||
"""Main entry point into the Identity service."""
|
"""Main entry point into the Identity service."""
|
||||||
|
|
||||||
|
from keystone import catalog
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import manager
|
from keystone import policy
|
||||||
|
from keystone import token
|
||||||
|
from keystone.common import manager
|
||||||
|
from keystone.common import wsgi
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
@ -65,9 +69,9 @@ class AdminRouter(wsgi.ComposableRouter):
|
||||||
conditions=dict(method=['GET']))
|
conditions=dict(method=['GET']))
|
||||||
|
|
||||||
|
|
||||||
class TenantController(Application):
|
class TenantController(wsgi.Application):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.identity_api = identity.Manager()
|
self.identity_api = Manager()
|
||||||
self.policy_api = policy.Manager()
|
self.policy_api = policy.Manager()
|
||||||
self.token_api = token.Manager()
|
self.token_api = token.Manager()
|
||||||
super(TenantController, self).__init__()
|
super(TenantController, self).__init__()
|
||||||
|
@ -148,10 +152,10 @@ class TenantController(Application):
|
||||||
return o
|
return o
|
||||||
|
|
||||||
|
|
||||||
class UserController(Application):
|
class UserController(wsgi.Application):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.catalog_api = catalog.Manager()
|
self.catalog_api = catalog.Manager()
|
||||||
self.identity_api = identity.Manager()
|
self.identity_api = Manager()
|
||||||
self.policy_api = policy.Manager()
|
self.policy_api = policy.Manager()
|
||||||
self.token_api = token.Manager()
|
self.token_api = token.Manager()
|
||||||
super(UserController, self).__init__()
|
super(UserController, self).__init__()
|
||||||
|
@ -211,10 +215,10 @@ class UserController(Application):
|
||||||
return self.update_user(context, user_id, user)
|
return self.update_user(context, user_id, user)
|
||||||
|
|
||||||
|
|
||||||
class RoleController(Application):
|
class RoleController(wsgi.Application):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.catalog_api = catalog.Manager()
|
self.catalog_api = catalog.Manager()
|
||||||
self.identity_api = identity.Manager()
|
self.identity_api = Manager()
|
||||||
self.token_api = token.Manager()
|
self.token_api = token.Manager()
|
||||||
self.policy_api = policy.Manager()
|
self.policy_api = policy.Manager()
|
||||||
super(RoleController, self).__init__()
|
super(RoleController, self).__init__()
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import wsgi
|
from keystone.common import wsgi
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
from keystone.policy.core import *
|
|
@ -3,7 +3,7 @@
|
||||||
"""Main entry point into the Policy service."""
|
"""Main entry point into the Policy service."""
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import manager
|
from keystone.common import manager
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
|
@ -11,10 +11,10 @@ from paste import deploy
|
||||||
from keystone import catalog
|
from keystone import catalog
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import identity
|
from keystone import identity
|
||||||
from keystone import logging
|
|
||||||
from keystone import token
|
from keystone import token
|
||||||
from keystone import utils
|
from keystone.common import logging
|
||||||
from keystone import wsgi
|
from keystone.common import utils
|
||||||
|
from keystone.common import wsgi
|
||||||
|
|
||||||
|
|
||||||
ROOTDIR = os.path.dirname(os.path.dirname(__file__))
|
ROOTDIR = os.path.dirname(os.path.dirname(__file__))
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
"""Main entry point into the Token service."""
|
"""Main entry point into the Token service."""
|
||||||
|
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import manager
|
from keystone.common import manager
|
||||||
|
|
||||||
|
|
||||||
CONF = config.CONF
|
CONF = config.CONF
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
# vim: tabstop=4 shiftwidth=4 softtabstop=4
|
||||||
from keystone import config
|
from keystone import config
|
||||||
from keystone import test
|
from keystone import test
|
||||||
from keystone.backends.sql import util as sql_util
|
from keystone.common.sql import util as sql_util
|
||||||
from keystone.backends.sql import migration
|
from keystone.common.sql import migration
|
||||||
|
|
||||||
import test_keystoneclient
|
import test_keystoneclient
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue