Fix validation error for ImagePullPolicy in charms 27/11127/2
authorsousaedu <eduardo.sousa@canonical.com>
Mon, 30 Aug 2021 15:33:33 +0000 (16:33 +0100)
committersousaedu <eduardo.sousa@canonical.com>
Thu, 2 Sep 2021 16:17:47 +0000 (18:17 +0200)
Change-Id: I00711202fdbacd73e9205dd3fc34424893440be5
Signed-off-by: sousaedu <eduardo.sousa@canonical.com>
14 files changed:
installers/charm/grafana/src/charm.py
installers/charm/kafka-exporter/src/charm.py
installers/charm/keystone/src/charm.py
installers/charm/lcm/src/charm.py
installers/charm/lcm/tests/test_charm.py
installers/charm/mon/src/charm.py
installers/charm/mongodb-exporter/src/charm.py
installers/charm/mysqld-exporter/src/charm.py
installers/charm/nbi/src/charm.py
installers/charm/ng-ui/src/charm.py
installers/charm/pla/src/charm.py
installers/charm/pol/src/charm.py
installers/charm/prometheus/src/charm.py
installers/charm/ro/src/charm.py

index c482bbb..e20a052 100755 (executable)
@@ -58,7 +58,7 @@ class ConfigModel(ModelValidator):
     ingress_class: Optional[str]
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("log_level")
     def validate_log_level(cls, v):
index 2147781..7eaa2a0 100755 (executable)
@@ -52,7 +52,7 @@ class ConfigModel(ModelValidator):
     ingress_class: Optional[str]
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("site_url")
     def validate_site_url(cls, v):
index 4e04e88..51ee6ad 100755 (executable)
@@ -84,7 +84,7 @@ class ConfigModel(ModelValidator):
     mysql_host: Optional[str]
     mysql_port: Optional[int]
     mysql_root_password: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("max_file_size")
     def validate_max_file_size(cls, v):
index af407e9..01ac0bf 100755 (executable)
@@ -110,7 +110,7 @@ class ConfigModel(ModelValidator):
     vca_model_config_update_status_hook_interval: Optional[str]
     vca_stablerepourl: Optional[str]
     vca_helm_ca_certs: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("log_level")
     def validate_log_level(cls, v):
index 3e6b2a4..1378e5c 100644 (file)
@@ -31,7 +31,7 @@ from ops.testing import Harness
 
 
 class TestCharm(unittest.TestCase):
-    """Prometheus Charm unit tests."""
+    """LCM Charm unit tests."""
 
     def setUp(self) -> NoReturn:
         """Test setup"""
index f253c09..e134041 100755 (executable)
@@ -80,7 +80,7 @@ class ConfigModel(ModelValidator):
     grafana_user: str
     grafana_password: str
     certificates: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("log_level")
     def validate_log_level(cls, v):
index ad596c3..d839d82 100755 (executable)
@@ -53,7 +53,7 @@ class ConfigModel(ModelValidator):
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
     mongodb_uri: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("site_url")
     def validate_site_url(cls, v):
index a351d2b..a0015cc 100755 (executable)
@@ -53,7 +53,7 @@ class ConfigModel(ModelValidator):
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
     mysql_uri: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("site_url")
     def validate_site_url(cls, v):
index 0e36073..1460459 100755 (executable)
@@ -61,7 +61,7 @@ class ConfigModel(ModelValidator):
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
     mongodb_uri: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("auth_backend")
     def validate_auth_backend(cls, v):
index 56644f2..7d8c59c 100755 (executable)
@@ -54,7 +54,7 @@ class ConfigModel(ModelValidator):
     ingress_class: Optional[str]
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("port")
     def validate_port(cls, v):
index 2a08ea5..ba3b1ff 100755 (executable)
@@ -46,7 +46,7 @@ class ConfigModel(ModelValidator):
     database_commonkey: str
     mongodb_uri: Optional[str]
     log_level: str
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("log_level")
     def validate_log_level(cls, v):
index d1341c1..36eb8c6 100755 (executable)
@@ -49,7 +49,7 @@ class ConfigModel(ModelValidator):
     log_level: str
     mongodb_uri: Optional[str]
     mysql_uri: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("log_level")
     def validate_log_level(cls, v):
index 3dcb5d4..e79de69 100755 (executable)
@@ -60,7 +60,7 @@ class ConfigModel(ModelValidator):
     ingress_whitelist_source_range: Optional[str]
     tls_secret_name: Optional[str]
     enable_web_admin_api: bool
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("web_subpath")
     def validate_web_subpath(cls, v):
index 5212393..9b2934f 100755 (executable)
@@ -73,7 +73,7 @@ class ConfigModel(ModelValidator):
     ro_database: str
     openmano_tenant: str
     certificates: Optional[str]
-    image_pull_policy: Optional[str]
+    image_pull_policy: str
 
     @validator("log_level")
     def validate_log_level(cls, v):