New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds new NotificationTypes - VM destroy, Cloud Volume and Cloud Volume Snapshot actions #15900
Conversation
28fc477
to
72ddcba
Compare
This is needed for ManageIQ/manageiq-providers-openstack#85 |
@petrblaho is there any reason in not using the |
@skateman thank you for your review and chat help. Looking into how to use that now. |
2c84aad
to
63dda1d
Compare
@skateman hi! could you take a look at petr's updates and see if this looks good now? |
@skateman Please Help!!! |
db/fixtures/notification_types.yml
Outdated
@@ -174,3 +174,83 @@ | |||
:expires_in: 24.hours | |||
:level: :error | |||
:audience: global | |||
- :name: vm_destroy_success | |||
:message: 'Destroying Instance %{subject} completed successfully.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if the instance
here is a good word if you name the notification as vm_*
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, ok, I can change that to VM
or Virtual Machine
.
:level: :error | ||
:audience: global | ||
- :name: cloud_volume_create_success | ||
:message: 'Creating Volume %{volume_name} completed successfully.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why no subject
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
b/c this called when creating that resource - and we do not have it so we cannot pass it into notification.
I can use subject
name as it would just have volume_name
value in it for the sake of more consistent code for calling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds acceptable 😉
:level: :error | ||
:audience: global | ||
- :name: cloud_volume_snapshot_create_success | ||
:message: 'Creating Snapshot %{snapshot_name} of Volume %{volume_name} completed successfully.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
subject
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same as on line 208.
Adds NotificationTypes for attach, detach, create, update, and delete actions on Cloud Volume.
63dda1d
to
86e3b34
Compare
Checked commits petrblaho/manageiq@d2ba1b0~...86e3b34 with ruby 2.3.3, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, if @skateman and the sea lion approve! |
@blomquisg he's my "seal of approval" 😉 |
@miq-bot add_label fine/yes |
Marked fine/yes. Needs to be backported for https://bugzilla.redhat.com/show_bug.cgi?id=1524356 |
In order to have actions in OpenStack provider create Notifications we need new NotificationTypes for them. Associated PR for OpenStack provider is ManageIQ/manageiq-providers-openstack#85