-
Notifications
You must be signed in to change notification settings - Fork 120
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
[WIP]Refactoring cloud vm provisioning validate_request method #419
[WIP]Refactoring cloud vm provisioning validate_request method #419
Conversation
def initialize_variables | ||
@prov = @handle.root['miq_request'] | ||
@prov_resource = @prov.resource | ||
raise "Provisioning Request not found" if @prov.nil? || @prov_resource.nil? |
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.
@pkomanek
Since this is related to requests and tasks would it make sense to have another method in
Line 56 in a31fac6
def self.log_and_raise(message, handle = $evm) |
that can be called log_and_task(...,msg,task) log_and_task_and_raise(...., msg, task) log_and_request(...., msg, request) or log_and_request_raise(..,msg, request)
Because we dont want to loose these error conditions in the log, we can have it be stored in the request as well as in the task
validate_max_retirement_days | ||
|
||
# Update Message to Requester | ||
if @approval_req == true |
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.
@pkomanek can this go into a separate private method
@pkomanek can you run it with
and attach a snippet |
Checked commits pkomanek/manageiq-content@575675b~...e81a315 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
@pkomanek Looks good |
This pull request has been automatically closed because it has not been updated for at least 6 months. Feel free to reopen this pull request if these changes are still valid. Thank you for all your contributions! |
Purpose or Intent
Refactoring Cloud/VM/Provisioning/StateMachines/ProvisionRequestApproval.class/validate_request.rb method with a spec.
This PR is based on the issue bellow.
Links
Issue: #8
@miq-bot add_label refactoring
Coverage