Skip to content
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

Email instances for Infra VM provisioning. #303

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ object:
datatype: string
priority: 9
owner:
default_value: "/Infrastructure/VM/Provisioning/Email/MiqProvision_complete?event=template_provisioned"
default_value: "/System/Notification/Email/InfrastructureMiqProvisionComplete?event=template_provisioned"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@billfitzgerald0120 Where are we documenting these changes, can we start a google doc and make a not of these changes, so it will help us in migration documentation. Its a value in the class schema and not in individual instance.

substitute: true
message: create
visibility:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ object:
datatype: string
priority: 14
owner:
default_value: "/Infrastructure/VM/Provisioning/Email/MiqProvision_Complete?event=vm_provisioned"
default_value: "/System/Notification/Email/InfrastructureMiqProvisionComplete?event=vm_provisioned"
substitute: true
message: create
visibility:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ object:
- PreProvision:
value: "/Infrastructure/VM/Provisioning/StateMachines/Methods/PreProvision_Clone_to_VM#${/#miq_provision.source.vendor}"
- EmailOwner:
value: "/Infrastructure/VM/Provisioning/Email/MiqProvision_Complete?event=vm_cloned"
value: "/System/Notification/Email/InfrastructureMiqProvisionComplete?event=vm_cloned"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tinaafitz
do you know if the event is needed when calling the method, is it used by the called instance or any other child of the called instance.

Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionComplete
inherits:
description:
fields:
- to:
value: "${/#miq_provision.miq_request.get_option(:owner_email)} || ${/#miq_provision.miq_request.requester.email}
|| ${/Configuration/Email/Default#default_recipient}"
- subject:
value: 'Request ID ${/#miq_provision.miq_request.id} - Your Virtual Machine
Request has Completed - Vm Name: <${/#miq_provision.vm.name}>'
- customize:
value: miq_provision_customize_body
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@billfitzgerald0120
Is there a state machine step that calls this instance, should that be attached to this PR?

object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionRequestApproverApproved
inherits:
description:
fields:
- subject:
value: Request ID ${/#miq_request.id} - Virtual Machine Request from <${/#miq_request.requester.email}>
was Approved, pending Quota Validation.
- body:
value: 'Approver, <br><br>A Virtual Machine Request received from ${/#miq_request.requester.email}
was Approved.<br><br>Approvers reason: ${/#miq_request.reason}<br><br>To view
this Request go to: <a href=${/#miq_request.show_url}>${/#miq_request.show_url}</a><br><br>
Thank you,<br> ${#signature}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionRequestApproverDenied
inherits:
description:
fields:
- subject:
value: Request ID ${/#miq_request.id} - Virtual Machine Request from <${/#miq_request.requester.email}>
was Denied.
- body:
value: 'Approver, <br><br>A Virtual Machine Request received from ${/#miq_request.requester.email}
was Denied.<br><br>${/#miq_request.resource.message}.<br><br>Approvers notes:
${/#miq_request.reason}<br><br>For more information you can go to: <a href=${/#miq_request.show_url}>${/#miq_request.show_url}</a><br><br>
Thank you,<br> ${#signature}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionRequestApproverPending
inherits:
description:
fields:
- subject:
value: Request ID ${/#miq_request.id} - Virtual Machine Request from <${/#miq_request.requester.email}>
Pending Approval.
- body:
value: 'Approver, <br><br>A Virtual Machine Request received from ${/#miq_request.requester.email}
is Pending.<br><br>${/#miq_request.resource.message}.<br><br>Approvers notes:
${/#miq_request.reason}<br><br>For more information you can go to: <a href=${/#miq_request.show_url}>${/#miq_request.show_url}</a><br><br>
Thank you,<br> ${#signature}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionRequestRequesterApproved
inherits:
description:
fields:
- to:
value: "${/#miq_request.get_option(:owner_email)} || ${/#miq_request.requester.email}
|| ${/Configuration/Email/Default#default_recipient}"
- subject:
value: Request ID ${/#miq_request.id} - Your Virtual Machine Request was Approved,
pending Quota Validation.
- body:
value: 'Hello ${/#user.name},<br><br>Your Virtual Machine Request was Approved.
If Quota validation is successful you will be notified via email when the
host is available.<br><br>To view this Request go to: <a href=${/#miq_request.show_url}>${/#miq_request.show_url}</a><br><br>
Thank you,<br> ${#signature}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionRequestRequesterDenied
inherits:
description:
fields:
- to:
value: "${/#miq_request.get_option(:owner_email)} || ${/#miq_request.requester.email}
|| ${/Configuration/Email/Default#default_recipient}"
- subject:
value: Request ID ${/#miq_request.id} - Your Virtual Machine Request was Denied.
- body:
value: 'Hello,<br><br>Your Virtual Machine Request was Denied.<br><br>${/#miq_request.resource.message}.<br><br>Approvers
notes: ${/#miq_request.reason}<br><br>For more information you can go to:
<a href=${/#miq_request.show_url}>${/#miq_request.show_url}</a><br><br> Thank
you,<br> ${#signature}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
object_type: instance
version: 1.0
object:
attributes:
display_name:
name: InfrastructureMiqProvisionRequestRequesterPending
inherits:
description:
fields:
- to:
value: "${/#miq_request.get_option(:owner_email)} || ${/#miq_request.requester.email}
|| ${/Configuration/Email/Default#default_recipient}"
- subject:
value: Request ID ${/#miq_request.id} - Your Virtual Machine Request is Pending.
- body:
value: 'Hello,<br><br>Please review your Virtual Machine Request and wait for
approval from an Administrator.<br><br>To view this Request go to: <a href=${/#miq_request.show_url}>${/#miq_request.show_url}</a><br><br>
Thank you,<br> ${#signature}'