You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2013/06/03 18:21:37 UTC
git commit: updated refs/heads/master to 767ed06
Updated Branches:
refs/heads/master 48913679e -> 767ed065c
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 <ts...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/767ed065
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/767ed065
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/767ed065
Branch: refs/heads/master
Commit: 767ed065c500b6e73451135d538ebe999f0d17f1
Parents: 4891367
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Mon Jun 3 21:50:19 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Mon Jun 3 21:51:18 2013 +0530
----------------------------------------------------------------------
client/tomcatconf/applicationContext.xml.in | 1 -
client/tomcatconf/componentContext.xml.in | 4 ++--
client/tomcatconf/simulatorComponentContext.xml.in | 6 ++++++
.../dedicated/DedicatedResourceManagerImpl.java | 1 +
.../cloudstack/dedicated/DedicatedService.java | 14 +++++++-------
server/src/com/cloud/api/ApiServer.java | 6 +++++-
6 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/767ed065/client/tomcatconf/applicationContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in
index ee99785..e2bde8f 100644
--- a/client/tomcatconf/applicationContext.xml.in
+++ b/client/tomcatconf/applicationContext.xml.in
@@ -681,7 +681,6 @@
<bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
<bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
-
<bean id="alertManagerImpl" class="com.cloud.alert.AlertManagerImpl" />
<bean id="asyncJobExecutorContextImpl" class="com.cloud.async.AsyncJobExecutorContextImpl" />
<bean id="asyncJobManagerImpl" class="com.cloud.async.AsyncJobManagerImpl" />
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/767ed065/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index 03e931a..93ef21f 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -274,7 +274,7 @@
-->
<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"/>
+ <property name="name" value="ExplicitDedicationProcessor"/>
+ <property name="type" value="ExplicitDedication"/>
</bean>
</beans>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/767ed065/client/tomcatconf/simulatorComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in
index 652c4c8..d71cf16 100644
--- a/client/tomcatconf/simulatorComponentContext.xml.in
+++ b/client/tomcatconf/simulatorComponentContext.xml.in
@@ -234,4 +234,10 @@
</property>
</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>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/767ed065/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java b/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
index ae25b02..c321b22 100755
--- a/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
+++ b/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedResourceManagerImpl.java
@@ -24,6 +24,7 @@ import javax.ejb.Local;
import javax.inject.Inject;
import javax.naming.ConfigurationException;
+import com.cloud.utils.component.AdapterBase;
import org.apache.cloudstack.api.commands.DedicateClusterCmd;
import org.apache.cloudstack.api.commands.DedicateHostCmd;
import org.apache.cloudstack.api.commands.DedicatePodCmd;
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/767ed065/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedService.java
----------------------------------------------------------------------
diff --git a/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedService.java b/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedService.java
index 81ababc..6f26ad6 100755
--- a/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedService.java
+++ b/plugins/dedicated-resources/src/org/apache/cloudstack/dedicated/DedicatedService.java
@@ -16,8 +16,10 @@
// under the License.
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.ListDedicatedHostsCmd;
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.DedicatePodResponse;
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);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/767ed065/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 9bad32c..0cd1d61 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -217,8 +217,12 @@ public class ApiServer extends ManagerBase implements HttpRequestHandler, ApiSer
}
Set<Class<?>> cmdClasses = new HashSet<Class<?>>();
- for(PluggableService pluggableService: _pluggableServices)
+ for(PluggableService pluggableService: _pluggableServices) {
cmdClasses.addAll(pluggableService.getCommands());
+ if (s_logger.isDebugEnabled()) {
+ s_logger.debug("Discovered plugin " + pluggableService.getClass().getSimpleName());
+ }
+ }
for(Class<?> cmdClass: cmdClasses) {
APICommand at = cmdClass.getAnnotation(APICommand.class);