Bug 1291922

Summary: VM vendor column for Azure VMs is incorrectly set
Product: Red Hat CloudForms Management Engine Reporter: Greg McCullough <gmccullo>
Component: ProvidersAssignee: Bill Wei <bilwei>
Status: CLOSED ERRATA QA Contact: Jeff Teehan <jteehan>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: bilwei, cpelland, jfrey, jhardy, jprause, jteehan, obarenbo
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:vm:provider:azure
Fixed In Version: 5.6.0.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1292147 (view as bug list) Environment:
Last Closed: 2016-06-29 15:21:25 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1292147    

Description Greg McCullough 2015-12-15 22:11:07 UTC
Description of problem:
The vendor property of a VM should be unique per provider and needs to be set in the database as a lower-cased value.

Version-Release number of selected component (if applicable): 5.5.0


How reproducible: Always


Steps to Reproduce:
1. Configure an Azure provider and refresh so VMs and Templates are collected
2. From the rails console load an Azure VM
   v = ManageIQ::Providers::Azure::CloudManager::Vm.first
3. Evaluate the setting for vendor (which can be directly from the db column or through a method on the model):
1) DB column access:
  v.attributes["vendor"]
  => "Microsoft"
2) Model method:
  v.vendor
  => nil

Actual results:
  DB column returns "Microsoft"
  Model method returns nil

Expected results:
  DB column returns "azure" 
  Model method returns "Azure"

Additional info:

Comment 3 Greg McCullough 2015-12-16 14:16:49 UTC
Opened based on PR discussion https://github.com/ManageIQ/manageiq/pull/5717#discussion-diff-47688376

Comment 4 Greg McCullough 2015-12-17 18:41:56 UTC
Reproduction steps are incorrect.  The vendor column is properly set to a lower-case value but the value should be set to "azure" and not "microsoft".

Comment 5 CFME Bot 2015-12-23 15:00:57 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/ea9d594a7a931e68fb21f5ce636f27a408a12d99

commit ea9d594a7a931e68fb21f5ce636f27a408a12d99
Author:     Bill Wei <bilwei>
AuthorDate: Tue Dec 15 17:02:12 2015 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Tue Dec 15 18:14:29 2015 -0500

    Change vendor names to azure
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1291922

 app/models/manageiq/providers/azure/cloud_manager/refresh_parser.rb | 4 ++--
 .../models/manageiq/providers/azure/cloud_manager/refresher_spec.rb | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

Comment 6 CFME Bot 2015-12-23 20:48:37 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=f7b0ae2fb1e91bdf7047eb41fec07517d55d5f1f

commit f7b0ae2fb1e91bdf7047eb41fec07517d55d5f1f
Author:     Bill Wei <bilwei>
AuthorDate: Tue Dec 15 17:02:12 2015 -0500
Commit:     Bill Wei <bilwei>
CommitDate: Wed Dec 23 13:26:00 2015 -0500

    Change vendor names to azure
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1291922

 app/models/manageiq/providers/azure/cloud_manager/refresh_parser.rb | 4 ++--
 .../models/manageiq/providers/azure/cloud_manager/refresher_spec.rb | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

Comment 7 Jeff Teehan 2016-03-29 14:57:15 UTC
Container now reads azure.  Moving to verified.
Tested on 5.6 Beta 1 using https://10.16.6.154/vm_cloud/explorer

Comment 9 errata-xmlrpc 2016-06-29 15:21:25 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