DaanHoogland commented on a change in pull request #3946: server: add global 
configuration for default router service offering
URL: https://github.com/apache/cloudstack/pull/3946#discussion_r392508300
 
 

 ##########
 File path: 
server/src/main/java/org/cloud/network/router/deployment/RouterDeploymentDefinition.java
 ##########
 @@ -389,8 +390,34 @@ protected void findDefaultServiceOfferingId() {
         serviceOfferingId = serviceOffering.getId();
     }
 
+    protected void findAccountServiceOfferingId(long accountId) {
+        String accountRouterOffering = 
VirtualNetworkApplianceManager.VirtualRouterServiceOffering.valueIn(accountId);
+        String globalRouterOffering = 
VirtualNetworkApplianceManager.VirtualRouterServiceOffering.value();
+        if (accountRouterOffering != null) {
+            verifyServiceOfferingByUuid(accountRouterOffering);
+        }
+        if (serviceOfferingId == null && globalRouterOffering != 
accountRouterOffering) {
 
 Review comment:
   @weizhouapache `if (serviceOffering != null)`, which should be always, 
`globalRouterOffering` will not be checked, whether or not 
`globalRouterOffering` == `accountRouterOffering`.
   so I don't think your 3 and 4 are correct but this condition will never be 
met and `verifyServiceOfferingByUuid(globalRouterOffering)` will never be 
executed.
   So, why check for `serviceOfferingId` before `globalRouterOffering` when it 
is the last resort and is only relevant after `globalRouterOffering`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to