From d604901ffd383da84394b34725a4b98605232a81 Mon Sep 17 00:00:00 2001 From: jem Date: Mon, 9 Mar 2020 20:02:13 +0100 Subject: [PATCH] find better name for aws mixin --- build.py | 2 +- src/main/python/ddadevops/__init__.py | 2 +- .../{aws_mixin.py => aws_backend_properties_mixin.py} | 8 ++++---- src/main/python/ddadevops/aws_mfa_mixin.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) rename src/main/python/ddadevops/{aws_mixin.py => aws_backend_properties_mixin.py} (86%) diff --git a/build.py b/build.py index f757379..9331a44 100644 --- a/build.py +++ b/build.py @@ -27,7 +27,7 @@ use_plugin("python.distutils") default_task = "publish" name = "ddadevops" -version = "0.4.1.dev3" +version = "0.4.1.dev6" summary = "tools to support builds combining gopass, terraform, dda-pallet, aws & hetzner-cloud" description = __doc__ authors = [Author("meissa GmbH", "buero@meissa-gmbh.de")] diff --git a/src/main/python/ddadevops/__init__.py b/src/main/python/ddadevops/__init__.py index beccf16..62ddb46 100644 --- a/src/main/python/ddadevops/__init__.py +++ b/src/main/python/ddadevops/__init__.py @@ -8,7 +8,7 @@ from .credential import gopass_credential_from_env_path, gopass_credential_from_ from .devops_build import DevopsBuild, create_devops_build_config, get_devops_build from .devops_terraform_build import DevopsTerraformBuild, create_devops_terraform_build_config from .hetzner_mixin import HetznerMixin, add_hetzner_mixin_config -from .aws_mixin import AwsMixin, add_aws_mixin_config +from .aws_backend_properties_mixin import AwsBackendPropertiesMixin, add_aws_backend_properties_mixin_config from .aws_mfa_mixin import AwsMfaMixin, add_aws_mfa_mixin_config from .dda_pallet_mixin import DdaPalletMixin, add_dda_pallet_mixin_config diff --git a/src/main/python/ddadevops/aws_mixin.py b/src/main/python/ddadevops/aws_backend_properties_mixin.py similarity index 86% rename from src/main/python/ddadevops/aws_mixin.py rename to src/main/python/ddadevops/aws_backend_properties_mixin.py index d6021eb..6ee0e89 100644 --- a/src/main/python/ddadevops/aws_mixin.py +++ b/src/main/python/ddadevops/aws_backend_properties_mixin.py @@ -2,17 +2,17 @@ from python_terraform import * from .devops_terraform_build import DevopsTerraformBuild -def add_aws_mixin_config(config, account_name): - config.update({'AwsMixin': +def add_aws_backend_properties_mixin_config(config, account_name): + config.update({'AwsBackendPropertiesMixin': {'account_name': account_name}}) return config -class AwsMixin(DevopsTerraformBuild): +class AwsBackendPropertiesMixin(DevopsTerraformBuild): def __init__(self, project, config): super().__init__(project, config) - aws_mixin_config = config['AwsMixin'] + aws_mixin_config = config['AwsBackendPropertiesMixin'] self.account_name = aws_mixin_config['account_name'] def backend_config(self): diff --git a/src/main/python/ddadevops/aws_mfa_mixin.py b/src/main/python/ddadevops/aws_mfa_mixin.py index a46bfc7..f981cd9 100644 --- a/src/main/python/ddadevops/aws_mfa_mixin.py +++ b/src/main/python/ddadevops/aws_mfa_mixin.py @@ -2,7 +2,7 @@ from python_terraform import * from boto3 import * from .credential import gopass_credential_from_env_path from .python_util import execute -from .aws_mixin import AwsMixin +from .aws_backend_properties_mixin import AwsBackendPropertiesMixin def add_aws_mfa_mixin_config(config, account_id, region, @@ -16,7 +16,7 @@ mfa_role='developer', mfa_account_prefix='', mfa_login_account_suffix='main'): return config -class AwsMfaMixin(AwsMixin): +class AwsMfaMixin(AwsBackendPropertiesMixin): def __init__(self, project, config): super().__init__(project, config)