]> Frank Brehm's Git Trees - pixelpark/create-terraform.git/commitdiff
Adding default values and error classes for lib/create_terraform/consul.py
authorFrank Brehm <frank.brehm@pixelpark.com>
Fri, 24 May 2024 12:57:12 +0000 (14:57 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Fri, 24 May 2024 12:57:12 +0000 (14:57 +0200)
lib/create_terraform/__init__.py
lib/create_terraform/errors.py

index f3a87f4ffd24f8eee35627bd50c00728fd20b543..f5c7034c7efea4f08bfd87a0a6a9d6d2fd715d1b 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/env python3
 # -*- coding: utf-8 -*-
 
-__version__ = '1.8.10'
+__version__ = '1.9.0'
 
 MIN_VERSION_TERRAFORM = '1.6.5'
 MAX_VERSION_TERRAFORM = '1.9.0'
@@ -10,4 +10,14 @@ MIN_VERSION_VSPHERE_PROVIDER = '2.5.1'
 
 CFGFILE_BASENAME = 'create-terraform.ini'
 
+DEFAULT_CONSUL_API_KV_ROOTPATH = '/v1/kv/terraform'
+DEFAULT_CONSUL_API_TIMEOUT = 20
+DEFAULT_CONSUL_PORT = 8500
+DEFAULT_CONSUL_SERVER = 'terraform.pixelpark.com'
+
+# This library name will be used as a part of the user agent in HTTP(S) requests
+LIBRARY_NAME = 'create-terraform'
+
+MAX_PORT_NUMBER = (2 ** 16) - 1
+
 # vim: ts=4 et list
index bd0034d7c71d6f185f2c8e0be17ae5cd023161b4..fd84da79cb29d5e60f758cfa4e736882e21a5f8a 100644 (file)
@@ -16,7 +16,7 @@ from fb_tools.config import ConfigError
 
 from .xlate import XLATOR
 
-__version__ = '1.3.0'
+__version__ = '1.4.0'
 
 _ = XLATOR.gettext
 ngettext = XLATOR.ngettext
@@ -119,6 +119,12 @@ class AbortExecution(ExpectedHandlerError):
         return _("Aborting after {!r}.").format(self.step)
 
 
+# =============================================================================
+class ConsulHandlerError(TerraformHandlerError):
+    """Indicating a general error in ConsulHandler object."""
+
+    pass
+
 # =============================================================================
 
 if __name__ == "__main__":