description: "Log Level"
type: string
default: "INFO"
+ period_refresh_active:
+ type: int
+ description: |
+ Updates the VNF status from VIM for every given period of time seconds.
+ Values equal or greater than 60 is allowed.
+ Disable the updates from VIM by setting -1.
+ Example:
+ $ juju config ro period_refresh_active=-1
+ $ juju config ro period_refresh_active=100
mysql_host:
type: string
description: MySQL Host (external database)
image_pull_policy: str
debug_mode: bool
security_context: bool
+ period_refresh_active: Optional[int]
@validator("log_level")
def validate_log_level(cls, v):
def certificates_dict(cls):
return _extract_certificates(cls.certificates) if cls.certificates else {}
+ @validator("period_refresh_active")
+ def validate_vim_refresh_period(cls, v):
+ if v and v < 60 and v != -1:
+ raise ValueError(
+ "Refresh Period is too tight, insert >= 60 seconds or disable using -1"
+ )
+ return v
+
class RoCharm(CharmedOsmBase):
"""GrafanaCharm Charm."""
"OSMRO_LOG_LEVEL": config.log_level,
}
)
-
+ if config.period_refresh_active:
+ container_builder.add_envs(
+ {
+ "OSMRO_PERIOD_REFRESH_ACTIVE": config.period_refresh_active,
+ }
+ )
if config.enable_ng_ro:
# Add secrets to the pod
mongodb_secret_name = f"{self.app.name}-mongodb-secret"