weizhouapache commented on code in PR #13032:
URL: https://github.com/apache/cloudstack/pull/13032#discussion_r3335443434


##########
framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManagerImpl.java:
##########
@@ -1765,4 +2433,101 @@ protected void runInContext() {
             }
         }
     }
+
+    @Override
+    public String getExtensionScriptPath(Extension extension) {
+        if (extension == null) {
+            return null;
+        }
+        return 
externalProvisioner.getExtensionPath(extension.getRelativePath());
+    }
+
+    @Override
+    public Extension getExtensionForPhysicalNetworkAndProvider(long 
physicalNetworkId, String providerName) {
+        if (StringUtils.isBlank(providerName)) {
+            return null;
+        }
+        List<ExtensionResourceMapVO> maps = 
extensionResourceMapDao.listByResourceIdAndType(
+                physicalNetworkId, 
ExtensionResourceMap.ResourceType.PhysicalNetwork);
+        if (maps == null || maps.isEmpty()) {
+            return null;
+        }
+        for (ExtensionResourceMapVO map : maps) {
+            ExtensionVO ext = extensionDao.findById(map.getExtensionId());
+            if (ext != null && providerName.equalsIgnoreCase(ext.getName())) {
+                return ext;
+            }
+        }
+        return null;
+    }
+
+    @Override
+    public Map<String, String> 
getAllResourceMapDetailsForExtensionOnPhysicalNetwork(long physicalNetworkId, 
long extensionId) {
+        List<ExtensionResourceMapVO> maps = 
extensionResourceMapDao.listByResourceIdAndType(

Review Comment:
   done



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to