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

Follow up to update_vm_name for Service template provisioning #16949

Merged

Conversation

gmcculloug
Copy link
Member

When provisioning a VM as part of a service the miq_provision task gets associated to a service_template_provision_request which does not have an update_description_from_tasks method. In this case we want to skip calling the update_description_from_tasks method if the request object does not expose it.

Links

cc @syncrou

@@ -68,7 +68,7 @@ def update_vm_name(new_name, update_request: true)
options[:vm_target_hostname] = get_hostname(new_name)

update_attributes(:description => self.class.get_description(self, new_name), :options => options)
miq_request.update_description_from_tasks if update_request
miq_request.update_description_from_tasks if update_request && miq_request.respond_to?(:update_description_from_tasks)
Copy link
Member

Choose a reason for hiding this comment

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

miq_request.try(:update_description_from_tasks) if update_request?

@gmcculloug gmcculloug force-pushed the provision_vm_update_name_service branch from a9b9580 to ad1e960 Compare February 5, 2018 15:48
@miq-bot
Copy link
Member

miq-bot commented Feb 5, 2018

Checked commit gmcculloug@ad1e960 with ruby 2.3.3, rubocop 0.52.0, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🍰

@bdunne bdunne merged commit cdb1271 into ManageIQ:master Feb 5, 2018
@bdunne bdunne added this to the Sprint 79 Ending Feb 12, 2018 milestone Feb 5, 2018
@bdunne bdunne self-assigned this Feb 5, 2018
simaishi pushed a commit that referenced this pull request Feb 5, 2018
…rvice

Follow up to update_vm_name for Service template provisioning
(cherry picked from commit cdb1271)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1539752
@simaishi
Copy link
Contributor

simaishi commented Feb 5, 2018

Fine backport details:

$ git log -1
commit c36d65447228c50432391bf37548c4ae18168140
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Mon Feb 5 11:20:16 2018 -0500

    Merge pull request #16949 from gmcculloug/provision_vm_update_name_service
    
    Follow up to update_vm_name for Service template provisioning
    (cherry picked from commit cdb1271d6d4f51d0f55253676f9170b2f7a1bbd0)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1539752

simaishi pushed a commit that referenced this pull request Feb 5, 2018
…rvice

Follow up to update_vm_name for Service template provisioning
(cherry picked from commit cdb1271)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1539750
@simaishi
Copy link
Contributor

simaishi commented Feb 5, 2018

Gaprindashvili backport details:

$ git log -1
commit 7f3a211145eb28713cb941b6ae2927e58c72c1c6
Author: Brandon Dunne <brandondunne@hotmail.com>
Date:   Mon Feb 5 11:20:16 2018 -0500

    Merge pull request #16949 from gmcculloug/provision_vm_update_name_service
    
    Follow up to update_vm_name for Service template provisioning
    (cherry picked from commit cdb1271d6d4f51d0f55253676f9170b2f7a1bbd0)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1539750

d-m-u pushed a commit to d-m-u/manageiq that referenced this pull request Jun 6, 2018
…_name_service

Follow up to update_vm_name for Service template provisioning
(cherry picked from commit cdb1271)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1539752
@gmcculloug gmcculloug deleted the provision_vm_update_name_service branch September 7, 2018 00:26
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.

4 participants