You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2021/08/12 12:54:58 UTC

[GitHub] [cloudstack] GutoVeronezi commented on pull request #4966: Refactor few process of VirtualMachineManagerImpl and improve logs

GutoVeronezi commented on pull request #4966:
URL: https://github.com/apache/cloudstack/pull/4966#issuecomment-897615227


   @nvazquez I had in mind the following logic to remove these codes:
   
   The `nicExpungeCommands` is instantied here:
   https://github.com/apache/cloudstack/blob/2a4c2c250696a154ccf8a7c8fff8604d893e9258/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java#L576
   
   There are 2 implementation for this method:
   - `HypervisorGuruBase`, which returns `null`:
   https://github.com/apache/cloudstack/blob/2a4c2c250696a154ccf8a7c8fff8604d893e9258/server/src/main/java/com/cloud/hypervisor/HypervisorGuruBase.java#L293-L296
   
   - `VMWareGuru`, which returns some commands:
   https://github.com/apache/cloudstack/blob/2a4c2c250696a154ccf8a7c8fff8604d893e9258/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/guru/VMwareGuru.java#L342-L358
   
   `nicExpungeCommands` is only used in the following block:
   https://github.com/apache/cloudstack/blob/2a4c2c250696a154ccf8a7c8fff8604d893e9258/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java#L628-L652
   
   However, only `HypervisorGuruBase` implements the method `finalizeExpunge`, which returns `null`:
   https://github.com/apache/cloudstack/blob/2a4c2c250696a154ccf8a7c8fff8604d893e9258/server/src/main/java/com/cloud/hypervisor/HypervisorGuruBase.java#L288-L291
   
   Therefore, the block where `nicExpungeCommands` is used is never called, therefore it's not needed. 
   
   If I'm missing something, please let me know.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org