cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [02/12] git commit: updated refs/heads/ui-restyle to d0e8fa3
Date Mon, 04 Nov 2013 22:36:10 GMT
Get rid of several warnings and errors in the agent sources


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

Branch: refs/heads/ui-restyle
Commit: a5caa102a847ef3da8f457b64510ee516a1b831b
Parents: ed6c2d2
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Mon Nov 4 17:19:10 2013 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Mon Nov 4 20:01:13 2013 +0100

----------------------------------------------------------------------
 agent/pom.xml                                   | 33 ++++++++++++
 .../cloud/agent/dao/impl/PropertiesStorage.java | 57 ++++++++++----------
 .../com/cloud/agent/dhcp/FakeDhcpSnooper.java   |  5 --
 agent/src/com/cloud/agent/mockvm/MockVm.java    |  7 ---
 .../consoleproxy/ConsoleProxyResource.java      | 20 ++-----
 5 files changed, 66 insertions(+), 56 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5caa102/agent/pom.xml
----------------------------------------------------------------------
diff --git a/agent/pom.xml b/agent/pom.xml
index 1413322..c3ac308 100644
--- a/agent/pom.xml
+++ b/agent/pom.xml
@@ -115,5 +115,38 @@
         </executions>
       </plugin>
     </plugins>
+    <pluginManagement>
+    	<plugins>
+    		<!--This plugin's configuration is used to store Eclipse m2e settings only. It has
no influence on the Maven build itself.-->
+    		<plugin>
+    			<groupId>org.eclipse.m2e</groupId>
+    			<artifactId>lifecycle-mapping</artifactId>
+    			<version>1.0.0</version>
+    			<configuration>
+    				<lifecycleMappingMetadata>
+    					<pluginExecutions>
+    						<pluginExecution>
+    							<pluginExecutionFilter>
+    								<groupId>
+    									org.apache.maven.plugins
+    								</groupId>
+    								<artifactId>
+    									maven-antrun-plugin
+    								</artifactId>
+    								<versionRange>[1.7,)</versionRange>
+    								<goals>
+    									<goal>run</goal>
+    								</goals>
+    							</pluginExecutionFilter>
+    							<action>
+    								<ignore></ignore>
+    							</action>
+    						</pluginExecution>
+    					</pluginExecutions>
+    				</lifecycleMappingMetadata>
+    			</configuration>
+    		</plugin>
+    	</plugins>
+    </pluginManagement>
   </build>
 </project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5caa102/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java b/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java
index 411d946..0c100b3 100755
--- a/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java
+++ b/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java
@@ -119,34 +119,33 @@ public class PropertiesStorage implements StorageComponent {
         return true;
     }
 
-	@Override
-	public void setName(String name) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public void setConfigParams(Map<String, Object> params) {
-		// TODO Auto-generated method stub
-		
-	}
-
-	@Override
-	public Map<String, Object> getConfigParams() {
-		// TODO Auto-generated method stub
-		return null;
-	}
-
-	@Override
-	public int getRunLevel() {
-		// TODO Auto-generated method stub
-		return 0;
-	}
-
-	@Override
-	public void setRunLevel(int level) {
-		// TODO Auto-generated method stub
-		
-	}
+    @Override
+    public void setName(String name) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public void setConfigParams(Map<String, Object> params) {
+        // TODO Auto-generated method stub
+
+    }
+
+    @Override
+    public Map<String, Object> getConfigParams() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public int getRunLevel() {
+        // TODO Auto-generated method stub
+        return 0;
+    }
+
+    @Override
+    public void setRunLevel(int level) {
+        // TODO Auto-generated method stub
+    }
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5caa102/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java b/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java
index 73a994e..432caa6 100644
--- a/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java
+++ b/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java
@@ -18,9 +18,6 @@ package com.cloud.agent.dhcp;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-
-import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Queue;
@@ -32,8 +29,6 @@ import javax.naming.ConfigurationException;
 
 import org.apache.log4j.Logger;
 
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
 import com.cloud.utils.Pair;
 import com.cloud.utils.net.NetUtils;
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5caa102/agent/src/com/cloud/agent/mockvm/MockVm.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/mockvm/MockVm.java b/agent/src/com/cloud/agent/mockvm/MockVm.java
index 306a6c4..8a806ee 100644
--- a/agent/src/com/cloud/agent/mockvm/MockVm.java
+++ b/agent/src/com/cloud/agent/mockvm/MockVm.java
@@ -71,11 +71,4 @@ public class MockVm {
         return vncPort;
     }
 
-    public static void main(String[] args) {
-        long i = 10;
-        Long l = null;
-        if (i == l) {
-            System.out.print("fdfd");
-        }
-    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a5caa102/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
----------------------------------------------------------------------
diff --git a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
index 6f49f47..054acd1 100644
--- a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
+++ b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
@@ -32,9 +32,12 @@ import java.util.Properties;
 
 import javax.naming.ConfigurationException;
 
-import org.apache.cloudstack.managed.context.ManagedContextRunnable;
 import org.apache.log4j.Logger;
 
+import com.google.gson.Gson;
+
+import org.apache.cloudstack.managed.context.ManagedContextRunnable;
+
 import com.cloud.agent.Agent.ExitStatus;
 import com.cloud.agent.api.AgentControlAnswer;
 import com.cloud.agent.api.Answer;
@@ -61,7 +64,6 @@ import com.cloud.resource.ServerResourceBase;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.net.NetUtils;
 import com.cloud.utils.script.Script;
-import com.google.gson.Gson;
 
 /**
  * 
@@ -130,19 +132,6 @@ public class ConsoleProxyResource extends ServerResourceBase implements
         }
     }
 
-    private boolean copyCertToDirectory(String certificate, String filePath)
-            throws IOException {
-        boolean success;
-        // copy cert to the dir
-        FileWriter fstream = new FileWriter(filePath);
-        BufferedWriter out = new BufferedWriter(fstream);
-        out.write(certificate);
-        // Close the output stream
-        out.close();
-        success = true;
-        return success;
-    }
-
     protected Answer execute(final CheckConsoleProxyLoadCommand cmd) {
         return executeProxyLoadScan(cmd, cmd.getProxyVmId(),
                 cmd.getProxyVmName(), cmd.getProxyManagementIp(),
@@ -204,6 +193,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements
         return null;
     }
 
+    @Override
     public Type getType() {
         return Host.Type.ConsoleProxy;
     }


Mime
View raw message