X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fpol%2Fsrc%2Fcharm.py;h=e2fcdb3eb95d0dd11bcb388a9cc7fb293281e85b;hb=3ca961399d4a0e44979839cad5a6a24dcc7976e4;hp=345a87f4be3b754a65a20d81befed7e126bfaf58;hpb=540d93716ee0a4c4ffd070120779c1c40f6f353c;p=osm%2Fdevops.git diff --git a/installers/charm/pol/src/charm.py b/installers/charm/pol/src/charm.py index 345a87f4..e2fcdb3e 100755 --- a/installers/charm/pol/src/charm.py +++ b/installers/charm/pol/src/charm.py @@ -91,11 +91,22 @@ class PolCharm(CharmedOsmBase): super().__init__( *args, oci_image="image", - debug_mode_config_key="debug_mode", - debug_pubkey_config_key="debug_pubkey", vscode_workspace=VSCODE_WORKSPACE, ) - + if self.config.get("debug_mode"): + self.enable_debug_mode( + pubkey=self.config.get("debug_pubkey"), + hostpaths={ + "POL": { + "hostpath": self.config.get("debug_pol_local_path"), + "container-path": "/usr/lib/python3/dist-packages/osm_policy_module", + }, + "osm_common": { + "hostpath": self.config.get("debug_common_local_path"), + "container-path": "/usr/lib/python3/dist-packages/osm_common", + }, + }, + ) self.kafka_client = KafkaClient(self, "kafka") self.framework.observe(self.on["kafka"].relation_changed, self.configure_pod) self.framework.observe(self.on["kafka"].relation_broken, self.configure_pod) @@ -111,7 +122,10 @@ class PolCharm(CharmedOsmBase): def _check_missing_dependencies(self, config: ConfigModel): missing_relations = [] - if self.kafka_client.is_missing_data_in_unit(): + if ( + self.kafka_client.is_missing_data_in_unit() + and self.kafka_client.is_missing_data_in_app() + ): missing_relations.append("kafka") if not config.mongodb_uri and self.mongodb_client.is_missing_data_in_unit(): missing_relations.append("mongodb")