X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=installers%2Fcharm%2Fnbi%2Fsrc%2Fcharm.py;h=0e360738c5c269acd06044e88e46d28f90234c2c;hb=d680be4f261d4c580fcdf75abe11cfc29003915d;hp=938a75a012e055e28eaeb2b31b2c686ded636674;hpb=3ddbbd1f6c70306d13db0976e1e6b3bda0c69abd;p=osm%2Fdevops.git diff --git a/installers/charm/nbi/src/charm.py b/installers/charm/nbi/src/charm.py index 938a75a0..0e360738 100755 --- a/installers/charm/nbi/src/charm.py +++ b/installers/charm/nbi/src/charm.py @@ -116,7 +116,13 @@ class ConfigModel(ModelValidator): class NbiCharm(CharmedOsmBase): def __init__(self, *args) -> NoReturn: - super().__init__(*args, oci_image="image") + super().__init__( + *args, + oci_image="image", + debug_mode_config_key="debug_mode", + debug_pubkey_config_key="debug_pubkey", + vscode_workspace=VSCODE_WORKSPACE, + ) self.kafka_client = KafkaClient(self, "kafka") self.framework.observe(self.on["kafka"].relation_changed, self.configure_pod) @@ -296,5 +302,27 @@ class NbiCharm(CharmedOsmBase): return pod_spec_builder.build() +VSCODE_WORKSPACE = { + "folders": [ + {"path": "/usr/lib/python3/dist-packages/osm_nbi"}, + {"path": "/usr/lib/python3/dist-packages/osm_common"}, + {"path": "/usr/lib/python3/dist-packages/osm_im"}, + ], + "settings": {}, + "launch": { + "version": "0.2.0", + "configurations": [ + { + "name": "NBI", + "type": "python", + "request": "launch", + "module": "osm_nbi.nbi", + "justMyCode": False, + } + ], + }, +} + + if __name__ == "__main__": main(NbiCharm)