Emit stopping/starting events when "salt-cloud -a stop/start" is used. #44400
What does this PR do?
salt-cloud emits numerous events when instances are created, configured and destroyed, but not when they are stopped or started.
New events were added using code from "destroy" method, so they follow the same naming pattern and have same attributes.
What issues does this PR fix or reference?
No events are fired when stop/start is used.
New events will be seen on the event bus, for example:
Commits signed with GPG?
The text was updated successfully, but these errors were encountered:
Good question - only about half of drivers have stop/start methods in them and I am actually planning to add support to one more (softlayer and maybe softlayer_hw). But yes, it would make sense to add these to those that already support stop/start and of course document them.
I can do that - though I can't test majority of them.
Before I go copy/pasting the same thing into 20 files - any idea why there isn't a helper function to emit all cloud events, since they are all structured very similarly?
Thanks @vitaliyf! All salt events are fired like this, whether they are cloud, master, or minion events. Obviously, there is some cloud-specific tags in there, but the general structure & idea is the same. Copying and pasting that information into each of the start & stop functions is the way to go in this case.
I would add the new start and stop functions for the softlayer/softlayer_hw drivers in a new PR. That way it can be reviewed separately from adding these new cloud events.
I think in addition to documenting these events as I mentioned above, it would also be prudent to make a note of these new events in the cloud section of the Oxygen release notes.