mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-2815: Include dedication in simulator context
SimulatoComponentContext need sto include the dedicated resource manager to see the commands/apis exposed by it. Signed-off-by: Prasanna Santhanam <tsp@apache.org>
This commit is contained in:
parent
48913679e8
commit
767ed065c5
@ -681,7 +681,6 @@
|
|||||||
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
|
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
|
||||||
|
|
||||||
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
|
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
|
||||||
|
|
||||||
<bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
|
<bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
|
||||||
<bean id="asyncJobExecutorContextImpl" class="com.cloud.async.AsyncJobExecutorContextImpl" />
|
<bean id="asyncJobExecutorContextImpl" class="com.cloud.async.AsyncJobExecutorContextImpl" />
|
||||||
<bean id="asyncJobManagerImpl" class="com.cloud.async.AsyncJobManagerImpl" />
|
<bean id="asyncJobManagerImpl" class="com.cloud.async.AsyncJobManagerImpl" />
|
||||||
|
|||||||
@ -274,7 +274,7 @@
|
|||||||
-->
|
-->
|
||||||
<bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
|
<bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
|
||||||
<bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
|
<bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
|
||||||
<property name="name" value="ExplicitDedicationProcessor"/>
|
<property name="name" value="ExplicitDedicationProcessor"/>
|
||||||
<property name="type" value="ExplicitDedication"/>
|
<property name="type" value="ExplicitDedication"/>
|
||||||
</bean>
|
</bean>
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
@ -234,4 +234,10 @@
|
|||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
|
<bean id="DedicatedResourceManagerImpl" class="org.apache.cloudstack.dedicated.DedicatedResourceManagerImpl"/>
|
||||||
|
<bean id="ExplicitDedicationProcessor" class="org.apache.cloudstack.affinity.ExplicitDedicationProcessor">
|
||||||
|
<property name="name" value="ExplicitDedicationProcessor"/>
|
||||||
|
<property name="type" value="ExplicitDedication"/>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
|||||||
@ -24,6 +24,7 @@ import javax.ejb.Local;
|
|||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
import javax.naming.ConfigurationException;
|
import javax.naming.ConfigurationException;
|
||||||
|
|
||||||
|
import com.cloud.utils.component.AdapterBase;
|
||||||
import org.apache.cloudstack.api.commands.DedicateClusterCmd;
|
import org.apache.cloudstack.api.commands.DedicateClusterCmd;
|
||||||
import org.apache.cloudstack.api.commands.DedicateHostCmd;
|
import org.apache.cloudstack.api.commands.DedicateHostCmd;
|
||||||
import org.apache.cloudstack.api.commands.DedicatePodCmd;
|
import org.apache.cloudstack.api.commands.DedicatePodCmd;
|
||||||
|
|||||||
@ -16,8 +16,10 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package org.apache.cloudstack.dedicated;
|
package org.apache.cloudstack.dedicated;
|
||||||
|
|
||||||
import java.util.List;
|
import com.cloud.dc.DedicatedResourceVO;
|
||||||
|
import com.cloud.dc.DedicatedResources;
|
||||||
|
import com.cloud.utils.Pair;
|
||||||
|
import com.cloud.utils.component.PluggableService;
|
||||||
import org.apache.cloudstack.api.commands.ListDedicatedClustersCmd;
|
import org.apache.cloudstack.api.commands.ListDedicatedClustersCmd;
|
||||||
import org.apache.cloudstack.api.commands.ListDedicatedHostsCmd;
|
import org.apache.cloudstack.api.commands.ListDedicatedHostsCmd;
|
||||||
import org.apache.cloudstack.api.commands.ListDedicatedPodsCmd;
|
import org.apache.cloudstack.api.commands.ListDedicatedPodsCmd;
|
||||||
@ -26,12 +28,10 @@ import org.apache.cloudstack.api.response.DedicateClusterResponse;
|
|||||||
import org.apache.cloudstack.api.response.DedicateHostResponse;
|
import org.apache.cloudstack.api.response.DedicateHostResponse;
|
||||||
import org.apache.cloudstack.api.response.DedicatePodResponse;
|
import org.apache.cloudstack.api.response.DedicatePodResponse;
|
||||||
import org.apache.cloudstack.api.response.DedicateZoneResponse;
|
import org.apache.cloudstack.api.response.DedicateZoneResponse;
|
||||||
import com.cloud.dc.DedicatedResourceVO;
|
|
||||||
import com.cloud.dc.DedicatedResources;
|
|
||||||
import com.cloud.utils.Pair;
|
|
||||||
import com.cloud.utils.component.PluggableService;
|
|
||||||
|
|
||||||
public interface DedicatedService extends PluggableService{
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface DedicatedService extends PluggableService {
|
||||||
|
|
||||||
DedicatePodResponse createDedicatePodResponse(DedicatedResources resource);
|
DedicatePodResponse createDedicatePodResponse(DedicatedResources resource);
|
||||||
|
|
||||||
|
|||||||
@ -217,8 +217,12 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
|
|||||||
}
|
}
|
||||||
|
|
||||||
Set<Class<?>> cmdClasses = new HashSet<Class<?>>();
|
Set<Class<?>> cmdClasses = new HashSet<Class<?>>();
|
||||||
for(PluggableService pluggableService: _pluggableServices)
|
for(PluggableService pluggableService: _pluggableServices) {
|
||||||
cmdClasses.addAll(pluggableService.getCommands());
|
cmdClasses.addAll(pluggableService.getCommands());
|
||||||
|
if (s_logger.isDebugEnabled()) {
|
||||||
|
s_logger.debug("Discovered plugin " + pluggableService.getClass().getSimpleName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(Class<?> cmdClass: cmdClasses) {
|
for(Class<?> cmdClass: cmdClasses) {
|
||||||
APICommand at = cmdClass.getAnnotation(APICommand.class);
|
APICommand at = cmdClass.getAnnotation(APICommand.class);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user