Bug 1370701 - [Docs] [Automate] Can’t get vm name in automation.log
Summary: [Docs] [Automate] Can’t get vm name in automation.log
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Documentation
Version: 5.6.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: GA
: 5.6.2
Assignee: Dayle Parker
QA Contact: Suyog Sainkar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-27 04:07 UTC by Sachin
Modified: 2019-12-16 06:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-12 05:46:50 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

Description Sachin 2016-08-27 04:07:01 UTC
Description of problem:

If I execute below command in rails console

 $evm.vmdb('vm').find_each.each { |x| $evm.log(:info, "#{x.name}") }

I see following output(truncated)

    [----] I, [2016-08-26T11:15:56.187777 #11788:113d994] INFO -- : cfme002
    [----] I, [2016-08-26T11:15:56.187860 #11788:113d994] INFO -- : changeme
    [----] I, [2016-08-26T11:15:56.187972 #11788:113d994] INFO -- : vm045
    [----] I, [2016-08-26T11:15:56.188100 #11788:113d994] INFO -- : pico
    [----] I, [2016-08-26T11:15:56.188199 #11788:113d994] INFO -- : vm046
    [----] I, [2016-08-26T11:15:56.188288 #11788:113d994] INFO -- : vm051

But if I execute the same using automated method, I get,

    [----] I, [2016-08-26T11:49:10.719972 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.722004 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.723928 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.725927 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.727908 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.729907 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.731831 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.733801 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.735674 #9099:771b6f8] INFO -- : ManageIQ





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


How reproducible:

- Execute the same query via automate methods,

     $evm.vmdb('vm').find_each.each { |x| $evm.log(:info, "#{x.name}") }




Actual results:


    [----] I, [2016-08-26T11:49:10.719972 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.722004 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.723928 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.725927 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.727908 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.729907 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.731831 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.733801 #9099:771b6f8] INFO -- : ManageIQ
    [----] I, [2016-08-26T11:49:10.735674 #9099:771b6f8] INFO -- : ManageIQ


Expected results:

VM names are expected instead of 'ManageIQ'

Additional info:

Comment 4 Andrew Dahms 2016-09-12 00:28:44 UTC
Assigning to Dayle for review.

Dayle - looks like the solution is already provided in the link in comment #2. Should be a quick update.

Comment 5 Dayle Parker 2016-09-12 05:46:50 UTC
Presently, making the documentation changes described above is outside the scope and current format of the Methods Available for Automation guide. 

In the future, we hope to expand on this guide and we will be reconsidering documentation of the automation content as a whole.


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