diff --git a/scripts/aws/deploy.py b/scripts/aws/deploy.py index 51e6751..961114e 100755 --- a/scripts/aws/deploy.py +++ b/scripts/aws/deploy.py @@ -4,7 +4,7 @@ import argparse import logging -from deploy_common import deploy +from .deploy_common import deploy if __name__ == '__main__': @@ -66,4 +66,3 @@ 'burst_limit': cli_args.burst_limit } deploy(cli_args, integration_settings, stage_settings) - diff --git a/scripts/aws/deploy_common.py b/scripts/aws/deploy_common.py index 92dda5c..8185207 100755 --- a/scripts/aws/deploy_common.py +++ b/scripts/aws/deploy_common.py @@ -2,7 +2,6 @@ """Various functions for day-to-day management of AWS API Gateway instances.""" -import argparse import logging import botocore.session import botocore.exceptions @@ -97,6 +96,7 @@ def update_stage(client, rest_api_id, stage_name, stage_settings): return response + def deploy(cli_args, integration_settings, stage_settings): session = botocore.session.get_session() apig = session.create_client('apigateway', cli_args.aws_region) diff --git a/scripts/aws/deploy_studio.py b/scripts/aws/deploy_studio.py index b176205..f8bb654 100755 --- a/scripts/aws/deploy_studio.py +++ b/scripts/aws/deploy_studio.py @@ -4,7 +4,7 @@ import argparse import logging -from deploy_common import deploy +from .deploy_common import deploy if __name__ == '__main__': @@ -33,6 +33,8 @@ help="Default per-resource maximum rate limit") parser.add_argument("--landing-page", required=True, help="Location of landing page for 'root' level requests") + parser.add_argument("--edxapp-host", required=True, + help="Location of edxapp for request routing") parser.add_argument('--studio-host', required=True, help="Location of Studio IDA for request routing") @@ -41,6 +43,7 @@ integration_settings = { 'id': cli_args.tag, 'landing_page': cli_args.landing_page, + 'edxapp_host': cli_args.edxapp_host, 'studio_host': cli_args.studio_host, } stage_settings = { diff --git a/scripts/aws/tests/test_deploy.py b/scripts/aws/tests/test_deploy_common.py similarity index 93% rename from scripts/aws/tests/test_deploy.py rename to scripts/aws/tests/test_deploy_common.py index bdf17f3..e91eff0 100644 --- a/scripts/aws/tests/test_deploy.py +++ b/scripts/aws/tests/test_deploy_common.py @@ -1,11 +1,11 @@ """ -Tests for scripts/aws/deploy.py +Tests for scripts/aws/deploy_common.py """ import boto3 import pytest from moto import mock_apigateway from unittest import TestCase -from deploy import get_api_id, get_next_stage, deploy_api, update_stage +from deploy_common import get_api_id, get_next_stage, deploy_api, update_stage class DeployTest(TestCase):