Bug 1411511 - Notifications - subject may not have tenant.
Summary: Notifications - subject may not have tenant.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.7.1
Assignee: Šimon Lukašík
QA Contact: Pavol Kotvan
URL:
Whiteboard: cfme_tenant:notification
Depends On: 1400246
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-09 21:19 UTC by Satoe Imaishi
Modified: 2022-07-09 08:09 UTC (History)
7 users (show)

Fixed In Version: 5.7.1.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1400246
Environment:
Last Closed: 2017-02-27 19:19:26 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Simulation (85.91 KB, image/png)
2017-02-20 16:48 UTC, William Fitzgerald
no flags Details
TestNotification instance (154.29 KB, image/png)
2017-02-20 17:16 UTC, William Fitzgerald
no flags Details
TestNotification method (171.32 KB, image/png)
2017-02-20 17:18 UTC, William Fitzgerald
no flags Details
Simulation (85.91 KB, image/png)
2017-02-20 17:19 UTC, William Fitzgerald
no flags Details
TestNotification method (120.07 KB, image/png)
2017-02-20 17:32 UTC, William Fitzgerald
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0320 0 normal SHIPPED_LIVE Moderate: CFME 5.7.1 bug fixes and enhancement update 2017-02-28 00:13:26 UTC

Comment 2 CFME Bot 2017-01-09 21:21:03 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/ab70868bc73d23e8b64c7ed63cfa3c1948fb82f9

commit ab70868bc73d23e8b64c7ed63cfa3c1948fb82f9
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Fri Dec 9 10:33:06 2016 -0500
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Jan 9 16:19:30 2017 -0500

    Merge pull request #13081 from isimluk/rhbz#1400246
    
    Notifications: use initiator's tenant when subject lacks tenant relationship
    (cherry picked from commit 6f6b52676964eacb45f3102813b05607d9894d9a)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1411511

 app/models/notification_type.rb  |  6 +++++-
 spec/models/notification_spec.rb | 11 +++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

Comment 3 Šimon Lukašík 2017-01-18 12:05:41 UTC
In euwe since: ab70868bc73d23e8b64c7ed63cfa3c1948fb82f9

Comment 6 William Fitzgerald 2017-02-20 16:48:58 UTC
Created attachment 1255823 [details]
Simulation

Comment 7 William Fitzgerald 2017-02-20 17:15:00 UTC
Pavol,

To test notification do the following:

- Create System/Request/TestNotification instance.
- Configure System/Request/TestNotification instance to run TestNotification method.
- Create System/Request/TestNotification method.
- Navigate to Automation/Automate/Simulation
- Select Request
- Set Message to ‘create'
- Set Request to 'TestNotification'
- Select Host / Node for type
- Set Selection to an available host.
- Click on Execute Methods
- Select submit and run

If you check the Automation.log you will see the following:

[----] I, [2017-02-17T16:54:56.290781 #646:3fe71ad018d0]  INFO -- : Validating Notification type: automate_tenant_info
[----] I, [2017-02-17T16:54:56.296053 #646:3fe71ad018d0]  INFO -- : Calling Create Notification type: automate_tenant_info subject type: Host id: 6 options: {}

You will also see an entry every time it runs in the Notifications table.

If there is a problem, you should be able to see it in the automation.log.

Let me know if you have any problem or questions.

Thanks

Billy

Comment 8 William Fitzgerald 2017-02-20 17:16:40 UTC
Created attachment 1255833 [details]
TestNotification instance

Comment 9 William Fitzgerald 2017-02-20 17:18:23 UTC
Created attachment 1255836 [details]
TestNotification method

Comment 10 William Fitzgerald 2017-02-20 17:19:20 UTC
Created attachment 1255837 [details]
Simulation

Comment 11 William Fitzgerald 2017-02-20 17:25:00 UTC
Pavol,

Here is my method:

#
# Description: Test Notification 
#

$evm.log("info", "notification test")
host = $evm.root['host']
n = $evm.create_notification(:type => :automate_tenant_info, :subject => host)
$evm.log("info", "notification returned: #{n.inspect}")



Billy

Comment 12 William Fitzgerald 2017-02-20 17:32:30 UTC
Created attachment 1255841 [details]
TestNotification method

Comment 15 errata-xmlrpc 2017-02-27 19:19:26 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2017-0320.html


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