Skip to content
Snippets Groups Projects
Commit ac4845d0 authored by Cory Lee's avatar Cory Lee
Browse files

DEPR-14 Remove AWS.py

parent 17a993b7
Branches
Tags
No related merge requests found
Showing
with 27 additions and 1713 deletions
This diff is collapsed.
......@@ -654,7 +654,7 @@ SERVER_EMAIL = 'devops@example.com'
ADMINS = []
MANAGERS = ADMINS
# Initialize to 'unknown', but read from JSON in aws.py
# Initialize to 'unknown', but read from JSON in production.py
EDX_PLATFORM_REVISION = 'unknown'
# Static content
......
......@@ -2,8 +2,6 @@
Settings for OpenStack deployments.
"""
# We import the aws settings because that's currently where the base settings are stored for all deployments.
# TODO - fix this when aws.py is split/renamed.
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import
SWIFT_AUTH_URL = AUTH_TOKENS.get('SWIFT_AUTH_URL')
......
......@@ -604,12 +604,6 @@ COURSE_ENROLLMENT_MODES = ENV_TOKENS.get('COURSE_ENROLLMENT_MODES', COURSE_ENROL
# This is at the bottom because it is going to load more settings after base settings are loaded
# Load aws.py in plugins for reverse compatibility. This can be removed after aws.py
# is officially removed.
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS,
plugin_constants.SettingsType.AWS)
# We continue to load production.py over aws.py
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.CMS, plugin_constants.SettingsType.PRODUCTION)
########################## Derive Any Derived Settings #######################
......
......@@ -338,7 +338,8 @@ class OAuth2ProviderConfig(ProviderConfig):
help_text=(
"Which python-social-auth OAuth2 provider backend to use. "
"The list of backend choices is determined by the THIRD_PARTY_AUTH_BACKENDS setting."
# To be precise, it's set by AUTHENTICATION_BACKENDS - which aws.py sets from THIRD_PARTY_AUTH_BACKENDS
# To be precise, it's set by AUTHENTICATION_BACKENDS
# which production.py sets from THIRD_PARTY_AUTH_BACKENDS
)
)
key = models.TextField(blank=True, verbose_name="Client ID")
......
......@@ -26,7 +26,7 @@ class GradesConfig(AppConfig):
},
PluginSettings.CONFIG: {
ProjectType.LMS: {
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
SettingsType.PRODUCTION: {PluginSettings.RELATIVE_PATH: u'settings.production'},
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
SettingsType.TEST: {PluginSettings.RELATIVE_PATH: u'settings.test'},
}
......
"""Common environment variables unique to the grades plugin."""
def plugin_settings(settings):
"""Common settings for Grades"""
# Queue to use for updating persistent grades
settings.RECALCULATE_GRADES_ROUTING_KEY = settings.ENV_TOKENS.get(
'RECALCULATE_GRADES_ROUTING_KEY', settings.DEFAULT_PRIORITY_QUEUE,
......
......@@ -26,7 +26,7 @@ class InstructorConfig(AppConfig):
PluginSettings.CONFIG: {
ProjectType.LMS: {
SettingsType.DEVSTACK: {PluginSettings.RELATIVE_PATH: u'settings.devstack'},
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
SettingsType.PRODUCTION: {PluginSettings.RELATIVE_PATH: u'settings.production'},
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
SettingsType.TEST: {PluginSettings.RELATIVE_PATH: u'settings.test'},
}
......
This diff is collapsed.
......@@ -3283,7 +3283,7 @@ ENTERPRISE_CUSTOMER_CATALOG_DEFAULT_CONTENT_FILTER = {}
############## ENTERPRISE SERVICE API CLIENT CONFIGURATION ######################
# The LMS communicates with the Enterprise service via the EdxRestApiClient class
# These default settings are utilized by the LMS when interacting with the service,
# and are overridden by the configuration parameter accessors defined in aws.py
# and are overridden by the configuration parameter accessors defined in production.py
ENTERPRISE_API_URL = LMS_INTERNAL_ROOT_URL + '/enterprise/api/v1/'
ENTERPRISE_CONSENT_API_URL = LMS_INTERNAL_ROOT_URL + '/consent/api/v1/'
......@@ -3385,7 +3385,7 @@ COURSES_API_CACHE_TIMEOUT = 3600 # Value is in seconds
COURSEGRAPH_JOB_QUEUE = DEFAULT_PRIORITY_QUEUE
# Initialize to 'unknown', but read from JSON in aws.py
# Initialize to 'unknown', but read from JSON in production.py
EDX_PLATFORM_REVISION = 'unknown'
############## Settings for Completion API #########################
......
......@@ -17,7 +17,7 @@ JSON Configuration Files
------------------------
In addition, there is a mechanism for reading and overriding configuration
settings from JSON files on-disk. The :file:`/lms/envs/aws.py` module loads
settings from JSON files on-disk. The :file:`/lms/envs/production.py` module loads
settings from ``lms.env.json`` and ``lms.auth.json`` files. All
security-sensitive settings and data belong in the ``lms.auth.json`` file, while
the rest are configured via the ``lms.env.json`` file.
......@@ -66,7 +66,7 @@ In this case, ``LOCALE_PATHS`` will be defined correctly at the end of the
settings module parsing no matter what ``REPO_ROOT``,
`ENABLE_COMPREHENSIVE_THEMING`, and ``COMPREHENSIVE_THEME_LOCALE_PATHS`` are
currently set to. This is true even if the ``LOCALE_PATHS`` calculation was
defined in ``lms/envs/common.py`` and you're using ``lms/envs/aws.py`` which
defined in ``lms/envs/common.py`` and you're using ``lms/envs/production.py`` which
includes overrides both from that module and the JSON configuration files.
List entries and dictionary values can also be derived from other settings, even
......
......@@ -2,8 +2,6 @@
Settings for OpenStack deployments.
"""
# We import the aws settings because that's currently where the base settings are stored for all deployments.
# TODO - fix this when aws.py is split/renamed.
from .production import * # pylint: disable=wildcard-import, unused-wildcard-import
SWIFT_AUTH_URL = AUTH_TOKENS.get('SWIFT_AUTH_URL')
......
......@@ -1101,11 +1101,6 @@ PROFILE_MICROFRONTEND_URL = ENV_TOKENS.get('PROFILE_MICROFRONTEND_URL', PROFILE_
# This is at the bottom because it is going to load more settings after base settings are loaded
# Load aws.py in plugins for reverse compatibility. This can be removed after aws.py
# is officially removed.
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS,
plugin_constants.SettingsType.AWS)
# Load production.py in plugins
plugin_settings.add_plugins(__name__, plugin_constants.ProjectType.LMS, plugin_constants.SettingsType.PRODUCTION)
......
......@@ -48,7 +48,7 @@ def parse_args():
'--service-variant',
choices=['lms', 'lms-xml', 'lms-preview'],
default='lms',
help='Which service variant to run, when using the aws environment')
help='Which service variant to run, when using the production environment')
lms.add_argument(
'--contracts',
action='store_true',
......
......@@ -17,12 +17,12 @@ class AceCommonConfig(AppConfig):
plugin_app = {
PluginSettings.CONFIG: {
ProjectType.LMS: {
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
SettingsType.PRODUCTION: {PluginSettings.RELATIVE_PATH: u'settings.production'},
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
SettingsType.DEVSTACK: {PluginSettings.RELATIVE_PATH: u'settings.devstack'},
},
ProjectType.CMS: {
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
SettingsType.PRODUCTION: {PluginSettings.RELATIVE_PATH: u'settings.production'},
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
SettingsType.DEVSTACK: {PluginSettings.RELATIVE_PATH: u'settings.devstack'},
}
......
"""Common environment variables unique to the ace_common plugin."""
def plugin_settings(settings):
"""Settings for the ace_common plugin. """
settings.ACE_ENABLED_CHANNELS = settings.ENV_TOKENS.get('ACE_ENABLED_CHANNELS', settings.ACE_ENABLED_CHANNELS)
settings.ACE_ENABLED_POLICIES = settings.ENV_TOKENS.get('ACE_ENABLED_POLICIES', settings.ACE_ENABLED_POLICIES)
settings.ACE_CHANNEL_SAILTHRU_DEBUG = settings.ENV_TOKENS.get(
......
......@@ -23,7 +23,7 @@ class BookmarksConfig(AppConfig):
},
PluginSettings.CONFIG: {
ProjectType.LMS: {
SettingsType.AWS: {PluginSettings.RELATIVE_PATH: u'settings.aws'},
SettingsType.PRODUCTION: {PluginSettings.RELATIVE_PATH: u'settings.production'},
SettingsType.COMMON: {PluginSettings.RELATIVE_PATH: u'settings.common'},
}
}
......
"""Common environment variables unique to the Course Content Bookmarks plugin."""
def plugin_settings(settings):
# Course Content Bookmarks Settings
"""Settings for the Course Content Bookmarks plugin. """
settings.MAX_BOOKMARKS_PER_COURSE = settings.ENV_TOKENS.get(
'MAX_BOOKMARKS_PER_COURSE',
settings.MAX_BOOKMARKS_PER_COURSE
......
......@@ -33,7 +33,7 @@ class Command(BaseCommand):
Example usage:
python manage.py lms dump_to_neo4j --host localhost --https_port 7473 \
--secure --user user --password password --settings=aws
--secure --user user --password password --settings=production
"""
def add_arguments(self, parser):
parser.add_argument('--host', type=six.text_type)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment