*: fix legacy imports

This change reorganizes imports and renames the legacy flask extensions.
This commit is contained in:
Jimmy Zelinskie 2016-09-28 20:17:14 -04:00
parent 0d805905dc
commit fc7301be0d
23 changed files with 179 additions and 139 deletions

View file

@ -1,5 +1,6 @@
from functools import wraps
from flask.ext.restful.utils import unpack
from flask_restful.utils import unpack
def cache_control(max_age=55):

View file

@ -1,33 +1,36 @@
import redis
import ldap
import peewee
import OpenSSL
import logging
import time
import subprocess
import time
from StringIO import StringIO
from fnmatch import fnmatch
from data.users import LDAP_CERT_FILENAME
from data.users.keystone import KeystoneUsers
from data.users.externaljwt import ExternalJWTAuthN
from data.users.externalldap import LDAPConnection, LDAPUsers
import OpenSSL
import ldap
import peewee
import redis
from flask import Flask
from flask.ext.mail import Mail, Message
from data.database import validate_database_url
from storage import get_storage_driver
from auth.auth_context import get_authenticated_user
from util.config.oauth import GoogleOAuthConfig, GithubOAuthConfig, GitLabOAuthConfig
from bitbucket import BitBucket
from util.security.signing import SIGNING_ENGINES
from util.secscan.api import SecurityScannerAPI
from boot import setup_jwt_proxy
from flask_mail import Mail, Message
from app import app, config_provider, get_app_url, OVERRIDE_CONFIG_DIRECTORY
from auth.auth_context import get_authenticated_user
from bitbucket import BitBucket
from boot import setup_jwt_proxy
from data.database import validate_database_url
from data.users import LDAP_CERT_FILENAME
from data.users.externaljwt import ExternalJWTAuthN
from data.users.externalldap import LDAPConnection, LDAPUsers
from data.users.keystone import KeystoneUsers
from storage import get_storage_driver
from util.config.oauth import GoogleOAuthConfig, GithubOAuthConfig, GitLabOAuthConfig
from util.secscan.api import SecurityScannerAPI
from util.security.signing import SIGNING_ENGINES
logger = logging.getLogger(__name__)
# Note: Only add files required for HTTPS to the SSL_FILESNAMES list.
SSL_FILENAMES = ['ssl.cert', 'ssl.key']
DB_SSL_FILENAMES = ['database.pem']

View file

@ -1,18 +1,22 @@
import logging
import json
import features
import logging
from flask.ext.mail import Message
from flask_mail import Message
import features
from app import mail, app, get_app_url
from util.jinjautil import get_template_env
logger = logging.getLogger(__name__)
template_env = get_template_env("emails")
class CannotSendEmailException(Exception):
pass
class GmailAction(object):
""" Represents an action that can be taken in Gmail in response to the email. """
def __init__(self, metadata):