incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: CLOUDSTACK-1070: HypervisorTemplateAdapter needs to be configured with proper name
Date Tue, 29 Jan 2013 01:12:51 GMT
Updated Branches:
  refs/heads/javelin 7ea83b82e -> 8887f01b3


CLOUDSTACK-1070: HypervisorTemplateAdapter needs to be configured with proper name


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/8887f01b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/8887f01b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/8887f01b

Branch: refs/heads/javelin
Commit: 8887f01b374086d527c25c9bfc423e5fde79ee0a
Parents: 7ea83b8
Author: Kelven Yang <kelveny@gmail.com>
Authored: Mon Jan 28 17:12:15 2013 -0800
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Mon Jan 28 17:12:41 2013 -0800

----------------------------------------------------------------------
 client/tomcatconf/componentContext.xml.in          |    4 ++++
 .../com/cloud/template/TemplateAdapterBase.java    |    4 ++++
 .../src/com/cloud/utils/component/AdapterBase.java |    2 +-
 3 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8887f01b/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index 46523d2..bc7858f 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -109,6 +109,10 @@
     <property name="name" value="Basic"/>
   </bean>
 
+  <bean id="hyervisorTemplateAdapter" class="com.cloud.template.HyervisorTemplateAdapter">
+    <property name="name" value="HypervisorAdapter"/>
+  </bean>
+
   <!--
     Authenticators
   -->

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8887f01b/server/src/com/cloud/template/TemplateAdapterBase.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/template/TemplateAdapterBase.java b/server/src/com/cloud/template/TemplateAdapterBase.java
index d0a0ec2..d97f05d 100755
--- a/server/src/com/cloud/template/TemplateAdapterBase.java
+++ b/server/src/com/cloud/template/TemplateAdapterBase.java
@@ -87,6 +87,10 @@ public abstract class TemplateAdapterBase implements TemplateAdapter {
 	public String getName() {
 		return _name;
 	}
+	
+	public void setName(String name) {
+		_name = name;
+	}
 
 	@Override
 	public boolean start() {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/8887f01b/utils/src/com/cloud/utils/component/AdapterBase.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/AdapterBase.java b/utils/src/com/cloud/utils/component/AdapterBase.java
index 40d6b8c..29f3c23 100644
--- a/utils/src/com/cloud/utils/component/AdapterBase.java
+++ b/utils/src/com/cloud/utils/component/AdapterBase.java
@@ -54,7 +54,7 @@ public class AdapterBase implements Adapter {
 
     public static <T extends Adapter> T getAdapterByName(List<T> adapters, String
name) {
     	for(T adapter : adapters) {
-    		if(adapter.getName().equalsIgnoreCase(name))
+    		if(adapter.getName() != null && adapter.getName().equalsIgnoreCase(name))
     			return adapter;
     	}
     	return null;


Mime
View raw message