Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes spurious plugin not found messages #4581

Merged
merged 1 commit into from
Mar 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
* @author Greg Schueler <a href="mailto:greg@dtosolutions.com">greg@dtosolutions.com</a>
*/
public class WorkflowExecutionService extends ChainedProviderService<WorkflowExecutor> implements DescribableService {
public class WorkflowExecutionService extends ChainedProviderService<WorkflowExecutor> implements DescribableService, PluggableProviderService<WorkflowExecutor> {
private static final String SERVICE_NAME = ServiceNameConstants.WorkflowExecution;

private List<ProviderService<WorkflowExecutor>> serviceList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import com.dtolabs.rundeck.core.common.Framework;
import com.dtolabs.rundeck.core.execution.service.FileCopier;
import com.dtolabs.rundeck.core.execution.service.NodeExecutor;
import com.dtolabs.rundeck.core.execution.workflow.WorkflowExecutor;
import com.dtolabs.rundeck.core.execution.workflow.WorkflowStrategy;
import com.dtolabs.rundeck.core.plugins.PluggableProviderService;
import com.dtolabs.rundeck.core.resources.ResourceModelSourceFactory;
import com.dtolabs.rundeck.core.resources.format.ResourceFormatGenerator;
Expand Down Expand Up @@ -46,7 +48,9 @@ public class CorePluginProviderServices {
ResourceModelSourceFactory.class,
ResourceFormatParser.class,
ResourceFormatGenerator.class,
OrchestratorPlugin.class
OrchestratorPlugin.class,
WorkflowExecutor.class,
WorkflowStrategy.class
)));

/**
Expand Down Expand Up @@ -101,6 +105,12 @@ public static <T> PluggableProviderService<T> getPluggableProviderServiceForType
} else if (type.equals(OrchestratorPlugin.class)) {
PluggableProviderService<OrchestratorPlugin> svc = framework.getOrchestratorService();
return (PluggableProviderService<T>) svc;
} else if (type.equals(WorkflowStrategy.class)) {
PluggableProviderService<WorkflowStrategy> svc = framework.getWorkflowStrategyService();
return (PluggableProviderService<T>) svc;
} else if (type.equals(WorkflowExecutor.class)) {
PluggableProviderService<WorkflowExecutor> svc = framework.getWorkflowExecutionService();
return (PluggableProviderService<T>) svc;
}
return null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import com.dtolabs.rundeck.plugins.ServiceNameConstants
import com.dtolabs.rundeck.server.authorization.AuthConstants
import com.dtolabs.rundeck.core.plugins.DescribedPlugin
import com.dtolabs.rundeck.server.plugins.loader.ApplicationContextPluginFileSource
import com.dtolabs.rundeck.server.plugins.services.StoragePluginProviderService
import grails.core.GrailsApplication
import org.rundeck.app.spi.Services
import org.rundeck.core.projects.ProjectConfigurable
Expand Down Expand Up @@ -70,6 +71,7 @@ class FrameworkService implements ApplicationContextAware, AuthContextProvider,
def rundeckPluginRegistry
def PluginService pluginService
def PluginControlService pluginControlService
StoragePluginProviderService storagePluginProviderService

def getRundeckBase(){
return rundeckFramework.baseDir.absolutePath;
Expand Down Expand Up @@ -1414,4 +1416,8 @@ class FrameworkService implements ApplicationContextAware, AuthContextProvider,
remove: removePrefixes
]
}

public <T> PluggableProviderService<T> getStorageProviderPluginService() {
return (PluggableProviderService<T>)storagePluginProviderService
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import com.dtolabs.rundeck.core.plugins.ConfiguredPlugin
import com.dtolabs.rundeck.core.plugins.DescribedPlugin
import com.dtolabs.rundeck.core.plugins.PluginRegistry
import com.dtolabs.rundeck.plugins.ServiceTypes
import com.dtolabs.rundeck.plugins.storage.StoragePlugin
import com.dtolabs.rundeck.server.plugins.RenamedDescription
import com.dtolabs.rundeck.core.plugins.ValidatedPlugin
import groovy.transform.CompileStatic
Expand Down Expand Up @@ -150,6 +151,7 @@ class PluginService {
(Framework) frameworkService.rundeckFramework
)
}
if(type == StoragePlugin) return frameworkService.storageProviderPluginService
rundeckPluginRegistry?.createPluggableService(type)
}

Expand Down