Bug 1596850 - Fixes undefined method `name` error during CSV validation required for v2v migration
Summary: Fixes undefined method `name` error during CSV validation required for v2v mi...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.9.3
Assignee: Aparna Karve
QA Contact: Yadnyawalk Tale
URL:
Whiteboard: v2v
Depends On: 1596318
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-06-29 19:18 UTC by Satoe Imaishi
Modified: 2018-07-12 17:42 UTC (History)
7 users (show)

Fixed In Version: 5.9.3.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1596318
Environment:
Last Closed: 2018-07-12 17:42:51 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
5.9.3.1_import_error.png (86.67 KB, image/png)
2018-07-05 15:19 UTC, Yadnyawalk Tale
no flags Details
5.9.3.4_import_error_fix.png (105.24 KB, image/png)
2018-07-05 15:20 UTC, Yadnyawalk Tale
no flags Details

Comment 2 CFME Bot 2018-06-29 19:21:47 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

https://github.com/ManageIQ/manageiq/commit/27c37f1f3e9ca64db05dfbe348bb06b31e19c6d8
commit 27c37f1f3e9ca64db05dfbe348bb06b31e19c6d8
Author:     Madhu Kanoor <mkanoor>
AuthorDate: Fri Jun 29 15:12:11 2018 -0400
Commit:     Madhu Kanoor <mkanoor>
CommitDate: Fri Jun 29 15:12:11 2018 -0400

    Merge pull request #17650 from AparnaKarve/fix_csv_describe_vm

    Fixes undefined method `name` error during CSV validation required for v2v migration
    (cherry picked from commit 5ff11a6f899bd9fac9f4146fbbb23b9869995fb9)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1596850

 app/models/transformation_mapping.rb | 11 +-
 app/models/vm.rb | 2 +
 spec/models/transformation_mapping_spec.rb | 7 +
 3 files changed, 16 insertions(+), 4 deletions(-)

Comment 4 Yadnyawalk Tale 2018-07-05 15:19:36 UTC
Created attachment 1456791 [details]
5.9.3.1_import_error.png

Fixed! There was special condition where this validation error comes.
Your VM should be present in a orphan or archive state to get this error (Tried to reproduced error in 5.9.3.1).

Steps:
1. add providers, create map
2. create VM in vcenter (just make sure you can select your VM via discovery)
3. retire this VM (now VM is in orphan state)
4. try to import csv with vm_name in it

```
Name
test-ytale-centos7

```
In 5.9.3.1, we get validation error after import like this (attached image).
5.9.3.4 fixes this bz and give appropriate assertion. (`VM does not exist` in my case)

Thanks for help, Aparna and Allen! 
Verified on: 5.9.3.4.20180702181921_afd03d7

Comment 5 Yadnyawalk Tale 2018-07-05 15:20:21 UTC
Created attachment 1456792 [details]
5.9.3.4_import_error_fix.png


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