From: Frank Brehm Date: Fri, 3 Sep 2021 08:51:07 +0000 (+0200) Subject: Adding some allowed puppet environments, changing behaviour on unknown environment X-Git-Tag: 1.5.2^2~44 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=b8657b7512d697c868f6085be7171e0cd02a2fe3;p=pixelpark%2Fcreate-terraform.git Adding some allowed puppet environments, changing behaviour on unknown environment --- diff --git a/lib/cr_tf/terraform/vm.py b/lib/cr_tf/terraform/vm.py index e8c3868..fd21ec3 100644 --- a/lib/cr_tf/terraform/vm.py +++ b/lib/cr_tf/terraform/vm.py @@ -37,7 +37,7 @@ from .disk import TerraformDisk, TerraformDiskDict from .interface import TerraformInterface -__version__ = '1.5.2' +__version__ = '1.5.3' LOG = logging.getLogger(__name__) @@ -53,7 +53,9 @@ PUPPET_ENVIRONMENTS = ( 'production', 'test', 'development', - 'dev_chronie' + 'pre_production', + 'dev_chronie', + 'dev_fbrehm' ) DS_TYPES = ( @@ -93,6 +95,8 @@ class TerraformVm(HandlingObject): default_purpose = "Customer project" default_rootdisk_size = 32.0 + valid_puppet_environments = copy.copy(PUPPET_ENVIRONMENTS) + max_num_cpus = 64 memory_chunk = 256 max_memory = 512 * 1024 @@ -1160,9 +1164,8 @@ class TerraformVm(HandlingObject): return if val not in PUPPET_ENVIRONMENTS: - LOG.warn(_("A puppet environment must be one of {li} (given: {v!r}).").format( + LOG.warn(_("A puppet environment should be one of {li} (given: {v!r}).").format( li=pp(PUPPET_ENVIRONMENTS), v=value)) - return self._puppet_env = val