Hi, In the cartridge agent (both Java and Python implementations), the extensions have a unique name that is mentioned in the configuration given to the agent when starting up (Java - stratos.sh, Python - agent.conf)
# extension file name specified in agent.conf extension.instance.started =instance-started.sh extension.start.servers =start-servers.sh extension.instance.activated =instance-activated.sh extension.artifacts.updated =artifacts-updated.sh extension.clean =clean.sh extension.mount.volumes =mount_volumes.sh # agent.conf key name specified in a constants file INSTANCE_STARTED_SCRIPT = "extension.instance.started" START_SERVERS_SCRIPT = "extension.start.servers" INSTANCE_ACTIVATED_SCRIPT = "extension.instance.activated" ARTIFACTS_UPDATED_SCRIPT = "extension.artifacts.updated" CLEAN_UP_SCRIPT = "extension.clean" MOUNT_VOLUMES_SCRIPT = "extension.mount.volumes" # extension file name queried using the constant script_name = cartridge_agent_config.read_property(cartridgeagentconstants.INSTANCE_STARTED_SCRIPT, False) IMO, this kind of a flexibility is not needed in the case of extension script names. Especially now that Python cartridge agent is pluggable with many to many relationship for events and plugins. If we rename the extensions to match the event names corresponding to them, it will be both easier and will involve less messy code to execute the extensions. Was there a specific reason to implement the extension execution this way at the time? Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com
