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_r392568615
 
 

 ##########
 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:
   ah, i missed the side effect of `verifyServiceOfferingByUuid()`, where the 
id is set, thanks.
   
   Maybe to make this more obvious for stupid people like me we can make 
`verifyServiceOfferingByUuid()` return a uuid or null and set it in the 
`findAccountServiceOfferingId()`?

----------------------------------------------------------------
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