| Summary: | [Docs] [Automate] Can’t get vm name in automation.log | ||
|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Sachin <sacpatil> |
| Component: | Documentation | Assignee: | Dayle Parker <dayleparker> |
| Status: | CLOSED WONTFIX | QA Contact: | Suyog Sainkar <ssainkar> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 5.6.0 | CC: | adahms, hhudgeon, jhardy, mkanoor, obarenbo, simaishi, tfitzger |
| Target Milestone: | GA | Keywords: | Reopened |
| Target Release: | 5.6.2 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-12 05:46:50 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
Assigning to Dayle for review. Dayle - looks like the solution is already provided in the link in comment #2. Should be a quick update. 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. |
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: