Bug 1734629 - [RFE] set_stats - Support object update using playbook set_stats naming convention
Summary: [RFE] set_stats - Support object update using playbook set_stats naming conve...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.12.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.7
Assignee: Lucy Fu
QA Contact: Gaurav Talreja
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-31 06:50 UTC by Loic Avenel
Modified: 2022-07-09 11:29 UTC (History)
8 users (show)

Fixed In Version: 5.11.7.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-06 14:32:52 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:
simaishi: cfme-5.11.z+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2020:3358 0 None None None 2020-08-06 14:33:04 UTC

Description Loic Avenel 2019-07-31 06:50:22 UTC
set_stats - Support object update using playbook set_stats naming convention

Comment 2 Tina Fitzgerald 2019-10-31 19:51:20 UTC
Hi Lucy,

Here's the ticket for your PR: https://github.com/ManageIQ/manageiq-automation_engine/pull/381 

Thanks,
Tina

Comment 3 CFME Bot 2019-11-26 16:57:19 UTC
New commit detected on ManageIQ/manageiq-automation_engine/master:

https://github.com/ManageIQ/manageiq-automation_engine/commit/1d6d1522988e9f1c6f3bcdf750f9fe152bd93184
commit 1d6d1522988e9f1c6f3bcdf750f9fe152bd93184
Author:     Lucy Fu <lufu>
AuthorDate: Thu Oct 24 15:06:06 2019 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Thu Oct 24 15:06:06 2019 -0400

    Update object based on ansible set_stats data.

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

 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_ansible_method_base.rb | 30 +-
 spec/miq_ae_playbook_method_spec.rb | 20 +-
 2 files changed, 43 insertions(+), 7 deletions(-)

Comment 4 CFME Bot 2020-06-22 21:06:05 UTC
New commit detected on ManageIQ/manageiq-automation_engine/ivanchuk:

https://github.com/ManageIQ/manageiq-automation_engine/commit/11451b8823b868975a0e79d804d26b72faf89e6a
commit 11451b8823b868975a0e79d804d26b72faf89e6a
Author:     tina <tfitzger>
AuthorDate: Tue Nov 26 16:56:11 2019 +0000
Commit:     Satoe Imaishi <simaishi>
CommitDate: Mon Jun 22 18:36:42 2020 +0000

    Merge pull request #381 from lfu/ansible_stats_update_object

    Update object based on ansible set_stats data.

    (cherry picked from commit f53215a9fb128430516ea0538e2c724ced56f709)

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

 lib/miq_automation_engine/engine/miq_ae_engine/miq_ae_ansible_method_base.rb | 30 +-
 spec/miq_ae_playbook_method_spec.rb | 20 +-
 2 files changed, 43 insertions(+), 7 deletions(-)

Comment 6 Lucy Fu 2020-07-17 16:22:59 UTC
Requirement from this BZ:
  1. set_stats - Support object update using playbook set_stats naming convention:
  for example: miq_provision__options_ipaddr
  would look in the current/root object for the miq_provision object,
  and if found, would update/add options hash ipaddr key with the value specified.

The first playbook might look similar to this:
- hosts: localhost
  tasks:
    - name: "Artifact data of test results to next playbook"
      set_stats:
        data:
          service_template_provision_task__status: "Warn"
          service_template_provision_task__options__config_info__active: true
It has access to a service_template_provision_task object and updates its status and options[:config_info][:active] value. 

Then when the second playbook runs, it would be able to access these updated values from service_template_provision_task object.

Comment 11 errata-xmlrpc 2020-08-06 14:32:52 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 (Critical: CloudForms 5.0.7 bug fix and enhancement update), 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://access.redhat.com/errata/RHSA-2020:3358


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