abh1sar opened a new pull request, #13180: URL: https://github.com/apache/cloudstack/pull/13180
### Description This PR fixes #11727 #9465 #9465 Backup related events for cmds `AssignVirtualMachineToBackupOfferingCmd`, `RemoveVirtualMachineFromBackupOfferingCmd`, `CreateBackupScheduleCmd` and `RestoreVolumeFromBackupAndAttachToVMCmd` don't have proper ApiResourceType set. So they are not currently displayed in Instances' events section. #11727 If CreateBackupCmd success or fails, it throws a `Complete` or `Error` event, but the event doesn't have the Instance Id set as the `resource_id`. Due to this, in the Instance's events tab, `Start` event is present for CreateBackup but `Complete` or `Error` events are not present which makes it hard to track failed backups. This PR fixes both of the above issues. P.S, Also made changes to replace `VM` with `Instance` and added capitalisation of resource names in Event msgs and Exceptions. <!--- Describe your changes in DETAIL - And how has behaviour functionally changed. --> <!-- For new features, provide link to FS, dev ML discussion etc. --> <!-- In case of bug fix, the expected and actual behaviours, steps to reproduce. --> <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be closed when this PR gets merged --> <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" --> <!-- Fixes: # --> <!--- ******************************************************************************* --> <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE DOCUMENTATION. --> <!--- PLEASE PUT AN 'X' in only **ONE** box --> <!--- ******************************************************************************* --> ### Types of changes - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] New feature (non-breaking change which adds functionality) - [x] Bug fix (non-breaking change which fixes an issue) - [ ] Enhancement (improves an existing feature and functionality) - [ ] Cleanup (Code refactoring and cleanup, that may add test cases) - [ ] Build/CI - [ ] Test (unit or integration test code) ### Feature/Enhancement Scale or Bug Severity #### Feature/Enhancement Scale - [ ] Major - [ ] Minor #### Bug Severity - [ ] BLOCKER - [ ] Critical - [ ] Major - [x] Minor - [ ] Trivial ### Screenshots (if appropriate): Backup offering Assign and Remove events in Instance's Events tab: <img width="1397" height="877" alt="Screenshot 2026-05-18 at 10 51 42 AM" src="https://github.com/user-attachments/assets/5a0594b5-2052-455c-b8fd-7d675a1a50d1" /> RestoreVolumeFromBackupAndAttachToVM events in Instance's Events tab: <img width="1697" height="328" alt="Screenshot 2026-05-18 at 1 44 52 PM" src="https://github.com/user-attachments/assets/52040685-41d7-465d-b634-ae5986646936" /> Backup Create Completed and Error events in Instance's Events tab: <img width="1397" height="396" alt="Screenshot 2026-05-18 at 11 47 15 AM" src="https://github.com/user-attachments/assets/b571f7a7-2022-4d7d-86d9-96b8745f110c" /> ### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. --> <!-- Include details of your testing environment, and the tests you ran to --> #### How did you try to break this feature and the system with this change? <!-- see how your change affects other areas of the code, etc. --> <!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document --> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
