Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1411511 - Notifications - subject may not have tenant.
Notifications - subject may not have tenant.
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.7.0
Unspecified Unspecified
unspecified Severity medium
: GA
: 5.7.1
Assigned To: Šimon Lukašík
Pavol Kotvan
cfme_tenant:notification
: ZStream
Depends On: 1400246
Blocks:
  Show dependency treegraph
 
Reported: 2017-01-09 16:19 EST by Satoe Imaishi
Modified: 2017-02-27 14:19 EST (History)
7 users (show)

See Also:
Fixed In Version: 5.7.1.0
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1400246
Environment:
Last Closed: 2017-02-27 14:19:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:0320 normal SHIPPED_LIVE Moderate: CFME 5.7.1 bug fixes and enhancement update 2017-02-27 19:13:26 EST

  None (edit)
Comment 2 CFME Bot 2017-01-09 16:21:03 EST
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/ab70868bc73d23e8b64c7ed63cfa3c1948fb82f9

commit ab70868bc73d23e8b64c7ed63cfa3c1948fb82f9
Author:     Gregg Tanzillo <gtanzill@redhat.com>
AuthorDate: Fri Dec 9 10:33:06 2016 -0500
Commit:     Satoe Imaishi <simaishi@redhat.com>
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 07:05:41 EST
In euwe since: ab70868bc73d23e8b64c7ed63cfa3c1948fb82f9
Comment 6 William Fitzgerald 2017-02-20 11:48 EST
Created attachment 1255823 [details]
Simulation
Comment 7 William Fitzgerald 2017-02-20 12:15:00 EST
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 12:16 EST
Created attachment 1255833 [details]
TestNotification instance
Comment 9 William Fitzgerald 2017-02-20 12:18 EST
Created attachment 1255836 [details]
TestNotification method
Comment 10 William Fitzgerald 2017-02-20 12:19 EST
Created attachment 1255837 [details]
Simulation
Comment 11 William Fitzgerald 2017-02-20 12:25:00 EST
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 12:32 EST
Created attachment 1255841 [details]
TestNotification method
Comment 15 errata-xmlrpc 2017-02-27 14:19:26 EST
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.