Refresh period is allowed >=60 or -1. Setting it -1
will disable the updating VM status.
Change-Id: I18a8cd8fd39da16d2d0221dac15324a08da76c2a
Signed-off-by: aticig <gulsum.atici@canonical.com>
$ git clone "https://osm.etsi.org/gerrit/osm/common" /home/ubuntu/common
$ juju config ro common-hostpath=/home/ubuntu/common
$ git clone "https://osm.etsi.org/gerrit/osm/common" /home/ubuntu/common
$ juju config ro common-hostpath=/home/ubuntu/common
- This configuration only applies if option `debug-mode` is set to true.
+ This configuration only applies if option `debug-mode` is set to true.
+
+ 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
]:
raise CharmError("invalid value for log-level option")
]:
raise CharmError("invalid value for log-level option")
+ refresh_period = self.config.get("period_refresh_active")
+ if refresh_period and refresh_period < 60 and refresh_period != -1:
+ raise ValueError(
+ "Refresh Period is too tight, insert >= 60 seconds or disable using -1"
+ )
+
def _check_relations(self) -> None:
"""Validate charm relations.
def _check_relations(self) -> None:
"""Validate charm relations.
"OSMRO_STORAGE_PATH": "/app/storage",
"OSMRO_STORAGE_COLLECTION": "files",
"OSMRO_STORAGE_URI": self.mongodb_client.connection_string,
"OSMRO_STORAGE_PATH": "/app/storage",
"OSMRO_STORAGE_COLLECTION": "files",
"OSMRO_STORAGE_URI": self.mongodb_client.connection_string,
+ "OSMRO_PERIOD_REFRESH_ACTIVE": self.config.get("period_refresh_active")
+ or 60,
description = Check code against coding style standards
deps =
black
description = Check code against coding style standards
deps =
black
flake8-docstrings
flake8-copyright
flake8-builtins
flake8-docstrings
flake8-copyright
flake8-builtins