Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1338628 - Accessing the 'cloud_subnet' and 'cloud_network' associations of a MiqAeServiceManageIQ_Providers_Openstack_NetworkManager_NetworkPort object gives a 'NoMethodError'
Accessing the 'cloud_subnet' and 'cloud_network' associations of a MiqAeServi...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.6.0
Unspecified Unspecified
unspecified Severity high
: GA
: 5.6.0
Assigned To: Lucy Fu
Dmitry Misharov
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-05-23 03:24 EDT by Peter McGowan
Modified: 2018-06-25 10:55 EDT (History)
6 users (show)

See Also:
Fixed In Version: 5.6.0.8
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-06-29 12:05:07 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 14:50:04 EDT

  None (edit)
Description Peter McGowan 2016-05-23 03:24:14 EDT
Description of problem:
Accessing the 'cloud_subnet' and 'cloud_network' associations of a MiqAeServiceManageIQ_Providers_Openstack_NetworkManager_NetworkPort object gives a 'NoMethodError'

Version-Release number of selected component (if applicable):
darga-1-rc1.1.20160523065746_af35a03 

How reproducible:
Every time

Steps to Reproduce:
1. Locate an MiqAeServiceManageIQ_Providers_Openstack_NetworkManager_NetworkPort either programmatically or in the Rails Console
2. List the associations: @associations=["cloud_network", "cloud_subnet", "cloud_tenant", "device", "ext_management_system"]>
3. Try to access the 'cloud_subnet' or 'cloud_network' associations

Actual results:
irb(main):008:0> port.cloud_network
NoMethodError: undefined method `cloud_network' for #<ManageIQ::Providers::Openstack::NetworkManager::NetworkPort:0x00000002e95b18>
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/activemodel-5.0.0.rc1/lib/active_model/attribute_methods.rb:433:in `method_missing'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:263:in `block in object_send'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:282:in `ar_method'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:292:in `ar_method'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:261:in `object_send'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:122:in `block (2 levels) in expose'
	from (irb):8
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/console.rb:65:in `start'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/console_helper.rb:9:in `start'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/commands_tasks.rb:78:in `console'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands.rb:18:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'
irb(main):009:0> port.cloud_subnet
NoMethodError: undefined method `cloud_subnet' for #<ManageIQ::Providers::Openstack::NetworkManager::NetworkPort:0x00000002e95b18>
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/activemodel-5.0.0.rc1/lib/active_model/attribute_methods.rb:433:in `method_missing'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:263:in `block in object_send'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:282:in `ar_method'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:292:in `ar_method'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:261:in `object_send'
	from /var/www/miq/vmdb/lib/miq_automation_engine/engine/miq_ae_service_model_base.rb:122:in `block (2 levels) in expose'
	from (irb):9
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/console.rb:65:in `start'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/console_helper.rb:9:in `start'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/commands_tasks.rb:78:in `console'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands/commands_tasks.rb:49:in `run_command!'
	from /opt/rubies/ruby-2.2.5/lib/ruby/gems/2.2.0/gems/railties-5.0.0.rc1/lib/rails/commands.rb:18:in `<top (required)>'
	from bin/rails:4:in `require'
	from bin/rails:4:in `<main>'

Expected results:
No error

Additional info:
Comment 3 CFME Bot 2016-05-24 10:06:42 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/84a8e792d9414b65b2affdb56e8783088e649d6c

commit 84a8e792d9414b65b2affdb56e8783088e649d6c
Author:     Lucy Fu <lufu@redhat.com>
AuthorDate: Mon May 23 13:06:43 2016 -0400
Commit:     Lucy Fu <lufu@redhat.com>
CommitDate: Mon May 23 13:07:16 2016 -0400

    Expose the associations of ManageIQ::Providers::Openstack::NetworkManager::NetworkPort to automate.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1338628

 ...rvice_manageiq-providers-openstack-network_manager-network_port.rb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 4 Milan Falešník 2016-05-31 05:14:32 EDT
Verified in 5.6.0.8

p = $evm.vmdb(:ExtManagementSystem).find_by_guid(guid)
port = p.network_manager.network_ports.last
irb(main):014:0> port.cloud_subnets
=> [#<MiqAeServiceManageIQ_Providers_Openstack_NetworkManager_CloudSubnet:0x4f00b0 @object=..., @virtual_columns=["allocation_pools", "dns_nameservers_show", "host_routes", "ip_version", "region_description", "region_number", "subnetpool_id", "total_vms"], @associations=["availability_zone", "cloud_network", "vms"]>]
irb(main):015:0> port.network_routers
=> []
irb(main):016:0> port.public_networks
=> []
Comment 6 errata-xmlrpc 2016-06-29 12:05:07 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.