Bug 1291891 - network association missing from vm.hardware.nics
network association missing from vm.hardware.nics
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.4.0
All All
unspecified Severity medium
: GA
: 5.6.0
Assigned To: Lucy Fu
Shveta
: ZStream
Depends On:
Blocks: 1292220 1301084
  Show dependency treegraph
 
Reported: 2015-12-15 14:47 EST by Josh Carter
Modified: 2016-06-29 11:21 EDT (History)
7 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1292220 1301084 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:21:06 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Comment 2 Greg McCullough 2015-12-15 15:00:50 EST
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 13:20:42 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/4e2f52994117df7adcbcf7569940ee8512f3a45d

commit 4e2f52994117df7adcbcf7569940ee8512f3a45d
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Wed Dec 16 10:50:12 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
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 08:51:58 EST
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@redhat.com>
AuthorDate: Wed Dec 16 10:50:12 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
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 17:47:52 EST
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@redhat.com>
AuthorDate: Wed Dec 16 10:50:12 2015 -0500
Commit:     Lucy Fu <lufu@redhat.com>
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 14:45:41 EDT
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 11:21:06 EDT
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.