Bug 1360829 - Automation Method Error When Accessing 'host'/'hosts' From a Switch
Summary: Automation Method Error When Accessing 'host'/'hosts' From a Switch
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning
Version: 5.6.0
Hardware: All
OS: All
unspecified
high
Target Milestone: GA
: 5.7.0
Assignee: Lucy Fu
QA Contact: Dmitry Misharov
URL:
Whiteboard:
Depends On:
Blocks: 1371980
TreeView+ depends on / blocked
 
Reported: 2016-07-27 15:17 UTC by Josh Carter
Modified: 2019-11-14 08:48 UTC (History)
3 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1371980 (view as bug list)
Environment:
Last Closed: 2017-01-11 20:00:15 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Greg McCullough 2016-07-27 15:23:29 UTC
Lucy - PR https://github.com/ManageIQ/manageiq/pull/7542 changed the relationship of the Switch model (mainly host to hosts) but the Automate Service model was not updated.

Please review the changes in that PR so we can update the service model relationships to match.

Comment 4 CFME Bot 2016-07-28 13:01:01 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/8aa9e80f990383fa3fcc70ef33f50fd99be18749

commit 8aa9e80f990383fa3fcc70ef33f50fd99be18749
Author:     Lucy Fu <lufu>
AuthorDate: Wed Jul 27 14:06:52 2016 -0400
Commit:     Lucy Fu <lufu>
CommitDate: Wed Jul 27 14:22:08 2016 -0400

    Update Switch's relationship from host to hosts in automate.
    
    This relationship change from host to hosts in Switch model was done in PR https://github.com/ManageIQ/manageiq/pull/7542.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1360829

 .../service_models/miq_ae_service_switch.rb               |  2 +-
 .../service_methods/miq_ae_service_switch_spec.rb         | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)
 create mode 100644 spec/lib/miq_automation_engine/service_methods/miq_ae_service_switch_spec.rb

Comment 7 Dmitry Misharov 2016-10-06 07:29:29 UTC
Fixed and verified in 5.7.0.3.20160927165516_075d0f3.
Rails console was used for testing:
$evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
s = $evm.vmdb(:switch).first
s.hosts


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