Itamar Heim has posted comments on this change.
Change subject: core: Replace Remove Unassigned and map it to Other
......................................................................
Patch Set 1: (2 inline comments)
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateReader.java
Line 38: if (node != null) {
Line 39:
Line 40: // backward compatibility code - os id of type Other is
now 0 . "Unassigned" is removed but its Id is in
Line 41: // use. This should be removed in 4.0
Line 42: if (node.InnerText.equals(6)) {
1. i prefer constants to magic numbers.
2. i don't think we can drop it in 4.0 - export/import of OVFs should maintain
backward compatibility across major versions as well.
Line 43: node.InnerText = "0";
Line 44: }
Line 45:
Line 46:
_vmTemplate.setOsId(osRepository.getOsIdByUniqueName(node.InnerText));
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
Line 47: XmlNode node = section.SelectSingleNode("Description");
Line 48:
Line 49: // backward compatibility code - os id of type Other is now 0
. "Unassigned" is removed but its Id is in use.
Line 50: // This should be removed in 4.0
Line 51: if (node.InnerText.equals(6)) {
please no magic numbers in code
Line 52: node.InnerText = "0";
Line 53: }
Line 54:
Line 55: if (node != null) {
--
To view, visit http://gerrit.ovirt.org/16679
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie508a8828caedf4cb8fdf971e14139404f7dded3
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Michal Skrivanek <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches