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)
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)