Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1603881 - System/Request/vm_retire_extend no longer actually extends VM retirement date
Summary: System/Request/vm_retire_extend no longer actually extends VM retirement date
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.10.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: GA
: 5.10.0
Assignee: William Fitzgerald
QA Contact: Tasos Papaioannou
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-19 19:19 UTC by Tasos Papaioannou
Modified: 2019-02-11 14:18 UTC (History)
5 users (show)

Fixed In Version: 5.10.0.11
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-11 14:18:23 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)

Description Tasos Papaioannou 2018-07-19 19:19:39 UTC
Description of problem:

In 5.10, vm_retire_extend has been refactored, but now it just sends the notification email without actually extending the retirement date.

Version-Release number of selected component (if applicable):

5.10.0.3

How reproducible:

100%

Steps to Reproduce:
1.) Create a button under the 'VM and Instance' object type, with object details:

Object Details

System/Process		Request
Message			create
Request			vm_retire_extend


2.) Add a provider and set the retirement date for a VM.
3.) Click on the custom button to extend the VM's retirement date.
4.) Wait a few seconds, then refresh the VM's details.

Actual results:

Retirement date isn't extended.

Expected results:

Retirement date is extended (default: 14 days).

Additional info:

On 5.9.4.0, the vm_retire_extend instance points to another instance, which calls the vm_retire_extend method.

System/Request/vm_retire_extend:

	rel5 	/${/#ae_provider_category}/VM/Retirement/Email/vm_retire_extend

Infrastructure/VM/Retirement/Email/vm_retire_extend:

		Name			Value
		to_email_address 	evmadmin@example.com
		from_email_address 	evmadmin@example.com
		signature 		Virtualization Infrastructure Team
		vm_retire_extend_days 	14
		method1			vm_retire_extend

This method extends the retirement date and sends an email.

On 5.10.0.3, points to a new instance which just sends an email:

System/Request/vm_retire_extend:

		 rel5 	/System/Notification/Email/${/#ae_provider_category}VmRetireExtend?event=vm_retire_extend

	System/Notification/Email/InfrastructureVmRetireExtend:

		Name 		Value
		sendmail 	true
		configuration 	/Configuration/Email/Default
		pre1
		approver	${/Configuration/Email/Default#approver}
		owner
		to		${/#vm.owner.email} ||${/#miq_request.get_option(:owner_email)} || ${/#miq_request.requester.email} || ${/Configuration/Email/Default#default_recipient}
		cc		${/Configuration/Email/Default#cc}
		bcc		${/Configuration/Email/Default#bcc}
		from		${/Configuration/Email/Default#from}
		signature	${/Configuration/Email/Default#signature}
		subject		Virtual Machine Retirement extended for : ${/#vm}.
		body		Hello,<br/><br/>Your Virtual Machine : ${/#vm} will now be retired on : ${/#vm.retires_on}. <br/><br/>If you need to use this Virtual Machine past this date please request an <br/><br/>extension by contacting Support. <br/><br/> Thank you,<br/> ${#signature}
		customize
		post1
		mail_method	${/Configuration/Email/Default#email_method}

Comment 4 CFME Bot 2018-08-02 14:03:39 UTC
New commit detected on ManageIQ/manageiq-content/master:

https://github.com/ManageIQ/manageiq-content/commit/1d76f6d57fd93b084288b1bca3ff1a41c203fc21
commit 1d76f6d57fd93b084288b1bca3ff1a41c203fc21
Author:     william fitzgerald <wfitzger@redhat.com>
AuthorDate: Fri Jul 20 18:22:10 2018 -0400
Commit:     william fitzgerald <wfitzger@redhat.com>
CommitDate: Fri Jul 20 18:22:10 2018 -0400

    Added vm_retire_extend method for new email.

    Updated System/Request/vm_retire_extend instance to include vm_retire_extend method for new email.
    Created tests

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1603881

    Adding tests
    Updated method

 content/automate/ManageIQ/System/Request.class/__methods__/vm_retire_extend.rb | 64 +
 content/automate/ManageIQ/System/Request.class/__methods__/vm_retire_extend.yaml | 13 +
 content/automate/ManageIQ/System/Request.class/vm_retire_extend.yaml | 2 +
 spec/content/automate/ManageIQ/System/Request.class/__methods__/vm_retire_extend_spec.rb | 69 +
 4 files changed, 148 insertions(+)

Comment 5 Tasos Papaioannou 2018-08-29 19:20:25 UTC
Verified on 5.10.0.12.


Note You need to log in before you can comment on or make changes to this bug.