Bug 1291891 - network association missing from vm.hardware.nics
Summary: network association missing from vm.hardware.nics
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: All
OS: All
unspecified
medium
Target Milestone: GA
: 5.6.0
Assignee: Lucy Fu
QA Contact: Shveta
URL:
Whiteboard:
Depends On:
Blocks: 1292220 1301084
TreeView+ depends on / blocked
 
Reported: 2015-12-15 19:47 UTC by Josh Carter
Modified: 2019-10-10 10:42 UTC (History)
7 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1292220 1301084 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:21:06 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Comment 2 Greg McCullough 2015-12-15 20:00:50 UTC
Lots of text in the description, but the end result is a request to expose networks from the hardware service model:

miq_ae_service_hardware.rb
    expose :networks,         :association => true  <---Add this line

To reproduce you can use the following code in the rails console:
$evm =
MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
vm = $evm.vmdb(:vm_vmware).first
vm.hardware.networks

Comment 4 CFME Bot 2015-12-16 18:20:42 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4e2f52994117df7adcbcf7569940ee8512f3a45d

commit 4e2f52994117df7adcbcf7569940ee8512f3a45d
Author:     Lucy Fu <lufu>
AuthorDate: Wed Dec 16 10:50:12 2015 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Wed Dec 16 11:22:48 2015 -0500

    Expose networks from hardware service model.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1291891

 lib/miq_automation_engine/service_models/miq_ae_service_hardware.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 5 CFME Bot 2015-12-17 13:51:58 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=8acaf89b543876fbd2689dbb070b456f25b15cfc

commit 8acaf89b543876fbd2689dbb070b456f25b15cfc
Author:     Lucy Fu <lufu>
AuthorDate: Wed Dec 16 10:50:12 2015 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Wed Dec 16 13:54:53 2015 -0500

    Expose networks from hardware service model.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1291891

 lib/miq_automation_engine/service_models/miq_ae_service_hardware.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 6 CFME Bot 2016-02-09 22:47:52 UTC
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4e24065dbf75767ae725dc923c5f23d924b95cab

commit 4e24065dbf75767ae725dc923c5f23d924b95cab
Author:     Lucy Fu <lufu>
AuthorDate: Wed Dec 16 10:50:12 2015 -0500
Commit:     Lucy Fu <lufu>
CommitDate: Thu Jan 28 11:02:49 2016 -0500

    Expose networks from hardware service model.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1291891

 vmdb/lib/miq_automation_engine/service_models/miq_ae_service_hardware.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 7 Shveta 2016-04-19 18:45:41 UTC
Execute the following in rails console : 
========================
$evm = MiqAeMethodService::MiqAeService.new(MiqAeEngine::MiqAeWorkspaceRuntime.new)
vm_ar = ManageIQ::Providers::Vmware::InfraManager::Vm.all.detect {|v| v.hardware.networks.present?}
vm = $evm.vmdb(:vm_vmware, vm_ar.id)
vm.hardware.networks

-----------------------------
Network association is shown : 

irb(main):040:0> vm.hardware.networks
=> [#<MiqAeServiceNetwork:0xab5f18 @object=#<Network id: 97, hardware_id: 1437, device_id: 212, description: nil, guid: nil, dhcp_enabled: nil, ipaddress: "10.8.59.80", subnet_mask: nil, lease_obtained: nil, lease_expires: nil, default_gateway: nil, dhcp_server: nil, dns_server: nil, hostname: "dhcp-8-59-80.cfme.lab.eng.rdu2.redhat.com", domain: nil, ipv6address: "2620:52:0:83a:250:56ff:fe96:d8f4">, @virtual_columns=["region_description", "region_number"], @associations=["guest_device", "hardware"]>]

===========================================
5.6.0.1-beta2.20160413141124_e25ac0e

Comment 9 errata-xmlrpc 2016-06-29 15:21:06 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, 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/RHBA-2016:1348


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