-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLOUDSTACK-10072: Remove unused code from "com.cloud.vm.UserVmManagerImpl" #1558
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GabrielBrascher
force-pushed
the
lrg-cs-hackday-026
branch
from
May 23, 2016 02:49
40ba1d2
to
862705e
Compare
GabrielBrascher
changed the title
Remove unused code at "com.cloud.vm.UserVmManagerImpl"
Remove unused code from "com.cloud.vm.UserVmManagerImpl"
May 23, 2016
@GabrielBrascher can you fix the conflicts, thanks |
@GabrielBrascher can you rebase against latest master |
Thanks for reminding @rhtyd! I will do it. |
GabrielBrascher
changed the title
Remove unused code from "com.cloud.vm.UserVmManagerImpl"
CLOUDSTACK-10072: Remove unused code from "com.cloud.vm.UserVmManagerImpl"
Sep 12, 2017
GabrielBrascher
force-pushed
the
lrg-cs-hackday-026
branch
2 times, most recently
from
September 12, 2017 21:08
c6489eb
to
bf686b9
Compare
GabrielBrascher
force-pushed
the
lrg-cs-hackday-026
branch
2 times, most recently
from
September 27, 2017 19:58
54f4802
to
1d0a96b
Compare
- Changes at the interface "com.cloud.vm.UserVmManager": removed method "com.cloud.vm.UserVmManager.getVirtualMachines(long)" that is not used at the class that implements this interface; removed method "com.cloud.vm.UserVmManager.stopVirtualMachine(long, long)" as it is not used at the "UserVmManagerImpl" class; - Changes at the class "com.cloud.vm.UserVmManagerImpl": "com.cloud.vm.UserVmManagerImpl.UserVmCloneType" enum access level from public to private; removed unused method "com.cloud.vm.UserVmManagerImpl.getVirtualMachines(long)"; removed unused method "com.cloud.vm.UserVmManagerImpl.stopVirtualMachine(long, long)"; removed unused method "com.cloud.vm.UserVmManagerImpl.deletePrivateTemplateRecord(Long)"; removed unused method "com.cloud.vm.UserVmManagerImpl.getHypervisorTypeOfUserVM(long)"; removed unused method "com.cloud.vm.UserVmManagerImpl.isDisplayResourceEnabled(Long)"; changed access level certain global variables to protected or private (if possible); removed duplicated injected dependencies; removed null atributions to dependency injection objects (as by); removed unused variables. - Class "com.cloud.vm.UserVmManagerImpl.VmIpAddrFetchThread": changed variables access from public to private. - Class "com.cloud.vm.UserVmManagerTest": Used @Injectmocks to inject all "com.cloud.vm.UserVmManagerTest._userVmMgr" dependencies, allowing the cleaning of "manual injections" at the @before block code ("com.cloud.vm.UserVmManagerTest.setup()"). - It was removed the unused interface "com.cloud.vm.BareMetalVmService". - Interface "com.cloud.vm.UserVmService": removed the "com.cloud.vm.UserVmService.deletePrivateTemplateRecord(Long)" method that is unused at the class implementing this interface ("UserVmManagerImpl") removed the unused method "com.cloud.vm.UserVmService.isDisplayResourceEnabled(Long)"; removed the unused method "com.cloud.vm.UserVmService.getHypervisorTypeOfUserVM(long)"; removed the unused method "com.cloud.vm.UserVmService.createVirtualMachine(DeployVMCmd)"; - Changes at the class "com.cloud.vm.UserVmManagerImpl.VmAndCountDetails": removed unused method "com.cloud.vm.UserVmManagerImpl.VmAndCountDetails.setRetrievalCount(int)"; removed unused method "com.cloud.vm.UserVmManagerImpl.VmAndCountDetails.setVmId(long)";
GabrielBrascher
force-pushed
the
lrg-cs-hackday-026
branch
from
October 4, 2017 14:13
1d0a96b
to
9c6115d
Compare
@rhtyd rebased against latest master. |
@blueorangutan package |
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1157 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduction
All changes in this PR started by removing unused methods from the "UserVmManagerImpl" class. That results in changing two (2) of its implemented interfaces ("UserVmManager" and "UserVmService").
Also, the "UserVmManagerImplTest" class had small changes.
One unused interface was removed ("BareMetalVmService").
Detailed work
Changes at the interface "com.cloud.vm.UserVmManager":
that is not used at the class that implements this interface;
long)" as it is not used at the "UserVmManagerImpl" class;
Changes at the class "com.cloud.vm.UserVmManagerImpl":
from public to private;
"com.cloud.vm.UserVmManagerImpl.getVirtualMachines(long)";
"com.cloud.vm.UserVmManagerImpl.stopVirtualMachine(long, long)";
"com.cloud.vm.UserVmManagerImpl.deletePrivateTemplateRecord(Long)";
"com.cloud.vm.UserVmManagerImpl.getHypervisorTypeOfUserVM(long)";
"com.cloud.vm.UserVmManagerImpl.isDisplayResourceEnabled(Long)";
(if possible);
Class "com.cloud.vm.UserVmManagerImpl.VmIpAddrFetchThread":
Class "com.cloud.vm.UserVmManagerTest":
"com.cloud.vm.UserVmManagerTest._userVmMgr" dependencies, allowing the
cleaning of "manual injections" at the @before block code
("com.cloud.vm.UserVmManagerTest.setup()").
It was removed the unused interface "com.cloud.vm.BareMetalVmService".
Interface "com.cloud.vm.UserVmService":
"com.cloud.vm.UserVmService.deletePrivateTemplateRecord(Long)" method
that is unused at the class implementing this interface
("UserVmManagerImpl")
"com.cloud.vm.UserVmService.isDisplayResourceEnabled(Long)";
"com.cloud.vm.UserVmService.getHypervisorTypeOfUserVM(long)";
"com.cloud.vm.UserVmService.createVirtualMachine(DeployVMCmd)";
Changes at the class "com.cloud.vm.UserVmManagerImpl.VmAndCountDetails":
"com.cloud.vm.UserVmManagerImpl.VmAndCountDetails.setRetrievalCount(int)";
"com.cloud.vm.UserVmManagerImpl.VmAndCountDetails.setVmId(long)";