Description of problem: Currently when registering a template or a vm, the REST API model accepts <vnic_profile_mappings> as a stand-alone entity in the action body of the REST request. But the <vnic_profile_mappings> should appear under the <registration_configuration> entity which has been added in 4.2.0 Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
As part of this fix we should also include the change of using network name and profile name without the use of profile_id, since the id attribute is an internal property which the user should not be aware of it. So the mapping should be as follow: - primary_network_name: ovirtmgmt primary_profile_name: ovirtmgmt secondary_network_name: ovirtmgmt2 secondary_profile_name: ovirtmgmt2
Causes a regression in ost 007_sd_reattach.import_lost_vm: reassign bad macs flag is ignored when VM is registered via REST. moved back to post to provide fix
example of a request when the vm being registered has a MAC on one of its vnics which is out of range: http://{{user}}:{{pass}}@{{host}}:{{port}}/ovirt-engine/api/storagedomains/{{sd-id}}/vms/{{vm-id}}/register <action> <cluster id="{{cluster-id}}"/> <reassign_bad_macs>true</reassign_bad_macs> <registration_configuration> <vnic_profile_mappings> <registration_vnic_profile_mapping> <from> <name>{{name}}</name> <network> <name>{{name}}</name> </network> </from> <to id="{{vnic-profile-id}}"/> </registration_vnic_profile_mapping> </vnic_profile_mappings> </registration_configuration> </action> the request failed before the fix and should pass after it.
(In reply to Maor from comment #1) > As part of this fix we should also include the change of using network name > and profile name without the use of profile_id, since the id attribute is an > internal property which the user should not be aware of it. > So the mapping should be as follow: > - primary_network_name: ovirtmgmt > primary_profile_name: ovirtmgmt > secondary_network_name: ovirtmgmt2 > secondary_profile_name: ovirtmgmt2 Will be implemented under BZ-1530814
Verified on - 4.2.1.3-0.1.el7
This bugzilla is included in oVirt 4.2.1 release, published on Feb 12th 2018. Since the problem described in this bug report should be resolved in oVirt 4.2.1 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.