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 [email protected] or file a JIRA ticket
with INFRA.
---