Change in ovirt-engine[master]: webadmin: Remove Linq#toList usage
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Remove Linq#toList usage
......................................................................
webadmin: Remove Linq#toList usage
Use a straight-forward call to new Arraylist<> instead of using
Linq#toList.
At worst, it's just cleaner. At best, it should perform better by
saving the repeated re-allocations of the ArrayList.
Change-Id: I98243ab1befbf8e3db91406dc85f9b2c67de8c06
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/webadmin/src/main/java/org/ovirt/engine/ui/webadmin/section/main/view/tab/storage/SubTabStorageVmBackupView.java
2 files changed, 1 insertion(+), 14 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
Idan Shaby: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/75161
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I98243ab1befbf8e3db91406dc85f9b2c67de8c06
Gerrit-PatchSet: 5
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Reimplement DataCenterGuideModel#updateOptionsNonL...
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Reimplement DataCenterGuideModel#updateOptionsNonLocalFS
......................................................................
webadmin: Reimplement DataCenterGuideModel#updateOptionsNonLocalFS
This patch reimplments DataCenterGuideModel#updateOptionsNonLocalFS
with Java 8 streams instead of the for loop it used to iterate the
hosts.
Besides producing more elegant code, this reimplementation also
improves performance by extracting the cluster IDs to a Set before
attempting to match them to hosts. Thus, for a system with N hosts
and M clusters, this operation is reduced to an O(N) operation
instead of an O(M*N) operation.
The Linq#isClusterItemExistInList method, which is no longer needed
after this rewrite, is thus removed.
Change-Id: If438f9b4327cee8df3596ddb7ac338f4ef9ea25f
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterGuideModel.java
2 files changed, 11 insertions(+), 24 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/75173
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If438f9b4327cee8df3596ddb7ac338f4ef9ea25f
Gerrit-PatchSet: 6
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: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Remove Linq#all
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Remove Linq#all
......................................................................
webadmin: Remove Linq#all
Remove Linq#all and replace it with the built-in Stream#allMatch.
Change-Id: I7ed69dd4f1904ae0ca75434c796ab5e226e4fddc
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/VmSnapshotListModel.java
2 files changed, 1 insertion(+), 12 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
Idan Shaby: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/75167
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I7ed69dd4f1904ae0ca75434c796ab5e226e4fddc
Gerrit-PatchSet: 5
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Inline Linq#findManagementNetwork
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Inline Linq#findManagementNetwork
......................................................................
webadmin: Inline Linq#findManagementNetwork
Linq#findManagementNetwork is only used in one place,
ProfileBehavior, and as such shouldn't belong in a general-purpose
class like Linq.
Since Java 8's streams provide an elegant, single-statement, way of
achieving the same functionality, this patch removes that method and
inlines its functionality directly where its needed.
Change-Id: I62535d04ddb66b3a9835c6b3a59e6d456e3f6468
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/ProfileBehavior.java
2 files changed, 5 insertions(+), 11 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/75174
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I62535d04ddb66b3a9835c6b3a59e6d456e3f6468
Gerrit-PatchSet: 6
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: Alona Kaplan <alkaplan(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Remove Linq#findAllVDSByPmEnabled
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Remove Linq#findAllVDSByPmEnabled
......................................................................
webadmin: Remove Linq#findAllVDSByPmEnabled
Linq#findAllVDSByPmEnabled is only used in one place, HostListModel,
and as such should probably not be part of a general-purpose class
like Linq.
This patch removes that methods and reimplements its logic directly
in HostListModel. As a side bonus, the new implementation uses the
fail-fast allMatch to return false immediately when the first host
that doesn't have power management enabled is found instead of
continuing to iterate over the entire list of hosts.
Change-Id: If6c459331ff21e29f136851cf4f268aad228e4e0
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java
2 files changed, 1 insertion(+), 10 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/75177
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If6c459331ff21e29f136851cf4f268aad228e4e0
Gerrit-PatchSet: 6
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: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: DataCentersStorageListModel#attachInternal
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: DataCentersStorageListModel#attachInternal
......................................................................
webadmin: DataCentersStorageListModel#attachInternal
This patch offers a slight performance improvement in the
attachInternal method.
While the logic of checking if a domain is unattached or present in a
list was not changed, the order of the evaluations was flipped so
that the O(1) is performed before the O(n) operation. If the domain
is unattached, the potentially heavy O(n) check can be short
circuited away.
Change-Id: I15d7e99017b944e322dc7ad6458acf07aa46d514
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/datacenters/DataCenterStorageListModel.java
1 file changed, 2 insertions(+), 2 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
Idan Shaby: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/75170
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I15d7e99017b944e322dc7ad6458acf07aa46d514
Gerrit-PatchSet: 5
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Reimplement AbstractDiskModel#updateStorageDomains
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Reimplement AbstractDiskModel#updateStorageDomains
......................................................................
webadmin: Reimplement AbstractDiskModel#updateStorageDomains
This patch reimplements updateStorageDomains so that the list of
storage domains is only traversed once, instead of up to four times
(for regular images - once to get the data domain, once to get the
master domain(s), once to filter only the active domain and then
again to sort the result).
As a result, the methods filterStorageDomainsByStorageDomainType and
filterStorageDomainsByStorageStatus of the Linq class remained
unused, and were subsequently removed.
Change-Id: I42d623c9a6b68db17e3b65c9a2ffc9403c39d426
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/AbstractDiskModel.java
2 files changed, 15 insertions(+), 32 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/75189
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I42d623c9a6b68db17e3b65c9a2ffc9403c39d426
Gerrit-PatchSet: 7
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Inline Linq#filterNonSnapableDisks
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Inline Linq#filterNonSnapableDisks
......................................................................
webadmin: Inline Linq#filterNonSnapableDisks
As Linq#filterNonSnapableDisks is only used in one place,
SnapshotMode, it's probably not a good fit for a general purpose
class like Linq, and should be removed from it.
This patch removes this function and inlines the functionality in
SnapshotModel. As an added bonus, this patch consolidates the
filtering and the sorting of the disks list, generating a slight
performance improvement.
Change-Id: Ic052700b9a88fc55e21399241a3d4d1b27e94f9b
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms/SnapshotModel.java
2 files changed, 8 insertions(+), 12 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/75185
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic052700b9a88fc55e21399241a3d4d1b27e94f9b
Gerrit-PatchSet: 7
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: Reimplement Linq#getStorageDomainsByIds
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: Reimplement Linq#getStorageDomainsByIds
......................................................................
webadmin: Reimplement Linq#getStorageDomainsByIds
This patch reimplement Linq#getStorageDomainsByIds using the existing
where method and IdsPredicate class in order to clean up the code and
reduce code duplications.
Change-Id: Ie126d2c215faaedebf3efafe388d81d6c7e8e5ca
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/Linq.java
1 file changed, 1 insertion(+), 8 deletions(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
--
To view, visit https://gerrit.ovirt.org/75180
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie126d2c215faaedebf3efafe388d81d6c7e8e5ca
Gerrit-PatchSet: 6
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months
Change in ovirt-engine[master]: webadmin: TemplateDiskListModel#setDisks signature
by Code Review
>From Allon Mureinik <amureini(a)redhat.com>:
Allon Mureinik has submitted this change and it was merged.
Change subject: webadmin: TemplateDiskListModel#setDisks signature
......................................................................
webadmin: TemplateDiskListModel#setDisks signature
Change setDisks signature to receive a Collection (which is passed to
it anyway) instead of an Iterable in order to set up the following
changes to the Linq class.
Change-Id: Id3237a6ae0459c7527b923089c069567e3b4e491
Signed-off-by: Allon Mureinik <amureini(a)redhat.com>
---
M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/templates/TemplateDiskListModel.java
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Tal Nisan: Looks good to me, approved
Jenkins CI: Passed CI tests
Allon Mureinik: Verified
Idan Shaby: Looks good to me, but someone else must approve
--
To view, visit https://gerrit.ovirt.org/75162
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id3237a6ae0459c7527b923089c069567e3b4e491
Gerrit-PatchSet: 5
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: Idan Shaby <ishaby(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <tnisan(a)redhat.com>
Gerrit-Reviewer: Tomas Jelinek <tjelinek(a)redhat.com>
Gerrit-Reviewer: Vojtech Szocs <vszocs(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>
7 years, 8 months