Alona Kaplan has uploaded a new change for review.
Change subject: restapi: Prefering <usages> over <display>
......................................................................
restapi: Prefering <usages> over <display>
There are two ways setting an network as display
1. The old (dprecated) way- <display>false</display>
2. Thr new way- <usages>
<usage>display</usage>
</usages>
If both of them are used the display should be set according to the new
way.
https://bugzilla.redhat.com/1081005
Change-Id: Ia9794bba6de9803b12a99f146c80d03c82dc4503
Signed-off-by: Alona Kaplan <[email protected]>
---
M
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/NetworkMapper.java
1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/27501/1
diff --git
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/NetworkMapper.java
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/NetworkMapper.java
index cfdaa1a..c037bc9 100644
---
a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/NetworkMapper.java
+++
b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/NetworkMapper.java
@@ -51,6 +51,9 @@
if (model.isSetStp()) {
entity.setStp(model.isStp());
}
+ if (model.isSetDisplay()) { // for backward compatibility use display
tag or usage tag
+ entity.getCluster().setDisplay(model.isDisplay());
+ }
if (model.isSetUsages()) {
List<NetworkUsage> networkUsages = new ArrayList<NetworkUsage>();
for (String usage : model.getUsages().getUsages()) {
@@ -62,9 +65,6 @@
}
if (model.isSetMtu()) {
entity.setMtu(model.getMtu());
- }
- if (model.isSetDisplay()) { // for backward compatibility use display
tag or usage tag
- entity.getCluster().setDisplay(model.isDisplay());
}
if (model.isSetRequired()) {
entity.getCluster().setRequired(model.isRequired());
--
To view, visit http://gerrit.ovirt.org/27501
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9794bba6de9803b12a99f146c80d03c82dc4503
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alona Kaplan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches