Conversation
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1586 |
GabrielBrascher
left a comment
There was a problem hiding this comment.
Thanks for the PR @Pearl1594. I raised a few minor observations of what I think can be improved.
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
Outdated
Show resolved
Hide resolved
server/src/main/java/com/cloud/vm/snapshot/VMSnapshotManagerImpl.java
Outdated
Show resolved
Hide resolved
|
@Pearl1594 can you address review comments and kick packaging/tests - assuming this is for primate, if so - can you pl change the base branch to 4.14? |
2a5b533 to
f79dc4e
Compare
f79dc4e to
2f01c8b
Compare
|
@GabrielBrascher Thanks for reviewing, I've addressed your comments. |
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1611 |
|
@blueorangutan test |
|
@Pearl1594 a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2208)
|
RodrigoDLopez
left a comment
There was a problem hiding this comment.
Hi @Pearl1594
Code looks good to me. I did not tested yet, I think you already did it.
I think if you could do those changes the code will be more readable, and add some unit tests
| SearchBuilder<ResourceTagVO> tagSearch = _resourceTagDao.createSearchBuilder(); | ||
| for (int count = 0; count < tags.size(); count++) { | ||
| tagSearch.or().op(ApiConstants.KEY + String.valueOf(count), tagSearch.entity().getKey(), SearchCriteria.Op.EQ); | ||
| tagSearch.and(ApiConstants.VALUE + String.valueOf(count), tagSearch.entity().getValue(), SearchCriteria.Op.EQ); | ||
| tagSearch.cp(); | ||
| } | ||
| tagSearch.and(ApiConstants.RESOURCE_TYPE, tagSearch.entity().getResourceType(), SearchCriteria.Op.EQ); | ||
| sb.groupBy(sb.entity().getId()); | ||
| sb.join("tagSearch", tagSearch, sb.entity().getId(), tagSearch.entity().getResourceId(), JoinBuilder.JoinType.INNER); |
There was a problem hiding this comment.
Could you please extract this to a method, add documentation to what this method do and why.
Also can you please create unit tests to cover those method
| int count = 0; | ||
| sc.setJoinParameters("tagSearch", ApiConstants.RESOURCE_TYPE, ResourceTag.ResourceObjectType.VMSnapshot.toString()); | ||
| for (String key : tags.keySet()) { | ||
| sc.setJoinParameters("tagSearch", ApiConstants.KEY + String.valueOf(count), key); | ||
| sc.setJoinParameters("tagSearch", ApiConstants.VALUE + String.valueOf(count), tags.get(key)); | ||
| count++; | ||
| } |
There was a problem hiding this comment.
cloud you do the same here please,
extract to a new method, add documentation and unit tests.
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos7 ✔debian. JID-1656 |
|
@blueorangutan package |
|
@Pearl1594 a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1662 |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos7 ✔debian. JID-1705 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2380)
|
|
@Pearl1594 pl address code review comments, send another PR for refactoring as necessary |
Description
Search VM snapshots using tags
Currently, search of VM snapshots doesn't comply with tags passed as input
Types of changes
How Has This Been Tested?
tested via CLI (cmk) and UI