Change in ovirt-engine[master]: engine: Remove ListUtils.nullSafe[Element]Add
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: engine: Remove ListUtils.nullSafe[Element]Add
......................................................................
engine: Remove ListUtils.nullSafe[Element]Add
ListUtils.nullSafeElementAdd was only used in
ConfigureLocalStorageModel, and could easily be replaced:
- notAvailableNumberList is known to not be null, as it's created a few
lines before this call
- The integer value isn't intrinsically null, it's just created by a
failure to parse a string, which could be handled in a much more
readable fashion by catching the NumberFormatException explicitly.
This patch removes:
- The only real usage of nullSafeElementAdd, as described above
- The now unused ListUtils.nullSafeElementAdd and
ListUtils.nullSafeAdd
- The unit test for those methods
Change-Id: I31fdcaf977fc125a5ae57906659f75cf7149b318
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/utils/ListUtils.java
M backend/manager/modules/common/src/test/java/org/ovirt/engine/core/common/utils/ListUtilsTest.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/ConfigureLocalStorageModel.java
3 files changed, 6 insertions(+), 27 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/49619
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I31fdcaf977fc125a5ae57906659f75cf7149b318
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: webadmin: isOptionEnabledOnVolume Linq
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: isOptionEnabledOnVolume Linq
......................................................................
webadmin: isOptionEnabledOnVolume Linq
Replaced the usage of ListUtils in this method to the frontend's
standard Linq. This patch achieves three things:
1. It standardizes the code and aligns this method to the same utility
(Linq) the rest of the frontend uses.
2. It makes the code shorter and more intuitive to understand.
3. It improves performance. The original implementation copied the
list (an O(n) operation) and then ran over it and filtered it
(another O(n) operation), only to check if the resulting filtered
list was empty or not.
The new implementation runs over the list only once, and terminates
immediately when finding a match. In the worst case this is an O(n)
operation (if no matches are found), meaning this patch should, at
the very least, should half the number of operations performed.
Memory-wise, instead of holding two additional copies of the list,
the new implementation performs its logic in-place.
Change-Id: Ifa75601502e7de49f94645c593170b18b97a4de8
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
1 file changed, 6 insertions(+), 10 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/49618
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa75601502e7de49f94645c593170b18b97a4de8
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: webadmin: isOptionEnabledOnVolume filters
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: isOptionEnabledOnVolume filters
......................................................................
webadmin: isOptionEnabledOnVolume filters
isOptionEnabledOnVolume receives a list of filters, but is always
called with a singlton list containing a single element. Taking into
consideration that this code was not touched for over a year, the method
can be simplified to receive a single filter, in order to make it easier
to read.
In the future, if additional filters are required, this patch could
always be reverted.
Change-Id: Ide95e55e72f082e3969857b8e3ba13d668316130
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
1 file changed, 5 insertions(+), 8 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/49617
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ide95e55e72f082e3969857b8e3ba13d668316130
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: webadmin: isOptionEnabledOnVolume local variables
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: isOptionEnabledOnVolume local variables
......................................................................
webadmin: isOptionEnabledOnVolume local variables
Removed redundant local variable to improve the code's readability.
Change-Id: I2a879d40c17c69ada9b63bbddd35141ee0a6d9b5
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
1 file changed, 1 insertion(+), 2 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/49616
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I2a879d40c17c69ada9b63bbddd35141ee0a6d9b5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: webadmin: isOptionEnabledOnVolume return
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: isOptionEnabledOnVolume return
......................................................................
webadmin: isOptionEnabledOnVolume return
Clean up isOptionEnabledOnVolume's return statement to improve the
code's readability.
Change-Id: I77122bef2199aa4ea858f9a11e52d74c55c0d738
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/volumes/VolumeListModel.java
1 file changed, 1 insertion(+), 4 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Allon Mureinik: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/49615
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I77122bef2199aa4ea858f9a11e52d74c55c0d738
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Daniel Erez <derez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sahina Bose <sabose(a)redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: restapi: Document the use of All-Content in /clusters
by juan.hernandez@redhat.com
Juan Hernandez has submitted this change and it was merged.
Change subject: restapi: Document the use of All-Content in /clusters
......................................................................
restapi: Document the use of All-Content in /clusters
The "/clusters" resource uses the "All-Content" header to decide if
additional information should be displayed for each cluster. In
particular it uses it to decide if the "management_network" property
should be displayed. But the header isn't documented in the RSDL
metadata. As a result it isn't available in the SDKs or in the CLI. This
patch documents it.
Change-Id: I5cdf734ac9640a202006d46791a57d1d8ddc97c4
Bug-Url: https://bugzilla.redhat.com/1287688
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
1 file changed, 1 insertion(+), 0 deletions(-)
Approvals:
Juan Hernandez: Verified; Looks good to me, approved
Jenkins CI: Passed CI tests
Yevgeny Zaspitsky: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/49576
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5cdf734ac9640a202006d46791a57d1d8ddc97c4
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: webadmin: support vmware provider without data-center
by ahadas@redhat.com
Arik Hadas has submitted this change and it was merged.
Change subject: webadmin: support vmware provider without data-center
......................................................................
webadmin: support vmware provider without data-center
Fix NPE that was thrown when adding external provider of
type VMware with no data center defined.
This patch also fixes the import-VM dialog to support
import from external provider that is not defined for
a particular data center (but with 'any data center').
Change-Id: I32aef8081e4f52cf95348735a743f41c2cbfb1c6
Bug-Url: https://bugzilla.redhat.com/1284260
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/providers/ProviderModel.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ImportVmsModel.java
2 files changed, 4 insertions(+), 2 deletions(-)
Approvals:
Tomas Jelinek: Looks good to me, approved
Arik Hadas: Verified; Passed CI tests
--
To view, visit https://gerrit.ovirt.org/49582
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I32aef8081e4f52cf95348735a743f41c2cbfb1c6
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Shahar Havivi <shavivi(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: core: Fix equals/hashCode in VmOperationParameterBase and ch...
by mperina@redhat.com
Martin Peřina has submitted this change and it was merged.
Change subject: core: Fix equals/hashCode in VmOperationParameterBase and children
......................................................................
core: Fix equals/hashCode in VmOperationParameterBase and children
VmOperationParameterBase overrides hashCode() but not equals() which
break equals/hashCode contract. If we would add equals() to
VmOperationParameterBase, then we would have to add it also to all
children, but only 2 children of total 40 currently implements
equals/hashCode as other children don't need them. So this patch:
1. Removes hashCode() method from VmOperationParameterBase
2. Fixes equals/hashCode in MigrateVmParameters and RunVmParam to use
also vmId attribute from VmOperationParameterBase.
Change-Id: Ied9481e198397b364fc7781425c733b44128f08f
Signed-off-by: Martin Perina <mperina(a)redhat.com>
---
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/MigrateVmParameters.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/RunVmParams.java
M backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/action/VmOperationParameterBase.java
3 files changed, 33 insertions(+), 38 deletions(-)
Approvals:
Martin Peřina: Verified
Jenkins CI: Passed CI tests
Arik Hadas: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/48819
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ied9481e198397b364fc7781425c733b44128f08f
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Martin Peřina <mperina(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: core: Removed redundant access modifier
by rgolan@redhat.com
Roy Golan has submitted this change and it was merged.
Change subject: core: Removed redundant access modifier
......................................................................
core: Removed redundant access modifier
PredefinedRoles enum contained redundant access modifier 'private' for the constructor.
The private modifier was removed.
Change-Id: I9d819e953074be927c8392683d33148be8586da5
Bug-Url: https://bugzilla.redhat.com/1143869
Signed-off-by: Tomer Saban <tsaban(a)redhat.com>
---
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/PredefinedRoles.java
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins CI: Passed CI tests
Tomer Saban: Verified
Roy Golan: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/49383
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I9d819e953074be927c8392683d33148be8586da5
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Tomer Saban <tsaban(a)redhat.com>
Gerrit-Reviewer: Eli Mesika <emesika(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: Tomer Saban <tsaban(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years
Change in ovirt-engine[master]: core: Rm VmAnalyzer's ObjectUtils.toString call
by amureini@redhat.com
Allon Mureinik has submitted this change and it was merged.
Change subject: core: Rm VmAnalyzer's ObjectUtils.toString call
......................................................................
core: Rm VmAnalyzer's ObjectUtils.toString call
Replace the usage of Apache Commons Lang's ObjectUtils.toString with
Java's plain old toString method, as there's no risk of a new Date()
being null.
Change-Id: I171ac21948a4331746e768cbaf0517583bcd7892
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/VmAnalyzer.java
1 file changed, 1 insertion(+), 3 deletions(-)
Approvals:
Allon Mureinik: Verified; Passed CI tests
Arik Hadas: Looks good to me, approved
--
To view, visit https://gerrit.ovirt.org/49322
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I171ac21948a4331746e768cbaf0517583bcd7892
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Roy Golan <rgolan(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
9 years