weizhouapache commented on code in PR #13032:
URL: https://github.com/apache/cloudstack/pull/13032#discussion_r3334275116
##########
framework/extensions/src/main/java/org/apache/cloudstack/framework/extensions/manager/ExtensionsManagerImpl.java:
##########
@@ -880,19 +989,102 @@ public Extension
registerExtensionWithResource(RegisterExtensionCmd cmd) {
String resourceType = cmd.getResourceType();
if (!EnumUtils.isValidEnum(ExtensionResourceMap.ResourceType.class,
resourceType)) {
throw new InvalidParameterValueException(
- String.format("Currently only [%s] can be used to register
an extension of type Orchestrator",
+ String.format("Currently only [%s] can be used to register
an extension",
EnumSet.allOf(ExtensionResourceMap.ResourceType.class)));
}
- ClusterVO clusterVO = clusterDao.findByUuid(resourceId);
- if (clusterVO == null) {
- throw new InvalidParameterValueException("Invalid cluster ID
specified");
+ ExtensionVO extension = extensionDao.findById(extensionId);
+ if (extension == null) {
+ throw new InvalidParameterValueException("Invalid extension
specified");
+ }
+ ExtensionResourceMap.ResourceType resType =
ExtensionResourceMap.ResourceType.valueOf(resourceType);
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]