Bug 1884996

Summary: [v2v][Doc][VMware to CNV VM import API] Target Network mapping example does not work
Product: Container Native Virtualization (CNV) Reporter: Ilanit Stein <istein>
Component: V2VAssignee: Sam Lucidi <slucidi>
Status: CLOSED ERRATA QA Contact: Ilanit Stein <istein>
Severity: high Docs Contact:
Priority: high    
Version: 2.5.0CC: cnv-qe-bugs, fdupont, mnadeem, slucidi
Target Milestone: ---   
Target Release: 2.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-17 13:24:56 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:

Description Ilanit Stein 2020-10-04 10:22:03 UTC
Document: 
https://github.com/kubevirt/vm-import-operator/blob/master/docs/design.md#vmware-mappings

apiVersion: v2v.kubevirt.io/v1beta1
kind: ResourceMapping
metadata:
 name: example-vmware-resourcemappings
 namespace: example-ns
spec:
  vmware:
    networkMappings:
    - source:
        name: VM Network # map network name to network attachment definition
      target: xyz  <===== Enter here network target name doesn't work.
      type: multus
    - source:
        id: network-7 # alternatively the network can be mapped by managed object reference
      Target:
        name: pod
      type: pod
    storageMappings:
    - source:
        name: iSCSI_Datastore # maps disks in a given VMware datastore to a storage class
      target: storage_class_1

Description of problem:
In VMware mapping yaml, Network section, using "target: xyz", as mentioned in the  didn't work for me (mapping yaml creation fails). 
I had to use instead:
target: 
  name: ... 
for it to work.

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

Additional info:
This might be originated from the Ovirt mapping example:
https://github.com/kubevirt/vm-import-operator/blob/master/docs/design.md#ovirt-mappings

Comment 2 Md Nadeem 2020-10-23 14:47:33 UTC
verified, the document is updated and the example is worked (verified on CNV version: 2.5.0-234)

Comment 5 errata-xmlrpc 2020-11-17 13:24:56 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 (OpenShift Virtualization 2.5.0 Images), 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/RHEA-2020:5127