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 Cloud VM provisioning. #302

Merged

Conversation

billfitzgerald0120
Copy link
Contributor

@billfitzgerald0120 billfitzgerald0120 commented May 23, 2018

Added 7 instances in System/Notification/Email class for Cloud/VM provisioning.

Modified EmailOwner value in State Machine schema and clone_to_vm instance to
use new instances.

Modified 3 System/Policy instances to use new email instances.

MIqProvisionRequest_Approved
MIqProvisionRequest_pending
MIqProvisionRequest_denied

Created miq_provision_customize_body method.
Created test for method.

https://bugzilla.redhat.com/show_bug.cgi?id=1314871
https://www.pivotaltracker.com/epic/show/3861726

@billfitzgerald0120
Copy link
Contributor Author

@miq-bot add_label enhancement

end

def time
@time = Time.zone.now.strftime('%A, %B %d, %Y at %I:%M%p').to_s
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120

@time ||= Time.zone.now.strftime('%A, %B %d, %Y at %I:%M%p').to_s

@vm_href ||= vm.show_url
end

def appliance
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120
We dont need appliance any more since we are using the show_url, we should delete this function and references to it


def main
@handle.log("info", "Starting miq_provision_complete")
check_email
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120
This method is only setting the body so should we just change the check_email method to be called
build_body

body(vm, appliance, prov, vm_href, time)
end

def body(vm, _appliance, _prov, _vm_href, _time)
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120
This could become just

def build_body
....
end

It doesn't need any arguments

@@ -11,12 +11,53 @@ object:
visibility:
owner:
schema:
- field:
Copy link
Contributor

Choose a reason for hiding this comment

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

@billfitzgerald0120
Isn't this change already in master?

@billfitzgerald0120 billfitzgerald0120 force-pushed the email2_cloud_miqprovision branch 4 times, most recently from 6854879 to 1c3a9e7 Compare May 24, 2018 19:31
Added 7 instances in System/Notification/Email class for Cloud/VM provisioning.

Modified EmailOwner value in State Machine schema and clone_to_vm instance to
use new instances.

Modified 3 System/Policy instances to use new email instances.

MIqProvisionRequest_Approved
MIqProvisionRequest_pending
MIqProvisionRequest_denied

Created miq_provision_customize_body method.
Created test for method.
Removed extra space and deleted quotes in body
Deleted extra class instance
@miq-bot
Copy link
Member

miq-bot commented May 24, 2018

Checked commit billfitzgerald0120@1e2f18c with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@billfitzgerald0120
Copy link
Contributor Author

@mkanoor I removed the extra spaces, removed the single quotes and deleted the class change. The coverage is still not working properly

@mkanoor mkanoor merged commit 92340fb into ManageIQ:master May 24, 2018
@mkanoor mkanoor added this to the Sprint 87 Ending Jun 4, 2018 milestone May 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants