Github user rafaelweingartner commented on the pull request:

    https://github.com/apache/cloudstack/pull/1278#issuecomment-171619337
  
    @anshul1886 I did not understand what you wanted to express presenting 
those commits, would you care to explain? I noticed the commits you pointed 
out, are pretty old and do not correspond to the code we have in master branch 
today.
    
    The Point that @GabrielBrascher touched makes sense to me, have you looked 
at the piece of code he pointed at?
    
    I looked at the code, the variables you changed are not used. If they 
should be used, that has to be properly coded, if not, they should be removed.
    
    In details for you:
    You changed the method 
com.cloud.network.router.NetworkHelperImpl.startRouters(RouterDeploymentDefinition),
 to use the called user as the one returned by the code 
“_accountMgr.getActiveUser(CallContext.current().getCallingUserId())” and 
the Account by the one returned by the 
method“CallContext.current().getCallingAccount();”.
    
    Then, at line 336, it is called the method 
“com.cloud.network.router.NetworkHelperImpl.startVirtualRouter(DomainRouterVO,
 User, Account, Map<Param, Object>)” with the aforementioned variables you 
changed. That method does not use either one use of those variables you 
changed, it only uses them to execute the method 
“com.cloud.network.router.NetworkHelperImpl.start(DomainRouterVO, User, 
Account, Map<Param, Object>, DeploymentPlan)”. Those executions occur at 
lines 349, 387 or 412, depending on some logic.
    
    After that, the method 
“com.cloud.network.router.NetworkHelperImpl.start(DomainRouterVO, User, 
Account, Map<Param, Object>, DeploymentPlan)”, receives its parameters and 
performs its job. However, it does not use the  “User” and “Account” 
parameters in any of its operations.
    
    At the end, the variables were not being used before your change and they 
are not being used now. Therefore, I do not see how that simple change can 
solve a problem.
    
    Do you intend to alter the code of 
“com.cloud.network.router.NetworkHelperImpl.start(DomainRouterVO, User, 
Account, Map<Param, Object>, DeploymentPlan)” too ?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to