simulator: removing cyclic dependency from simulator The database creator caused a cyclic dependecny in the simulator which is removed with this commit. Additionally the simulator profile is now merged with developer profile and a test for server health is included
Steps to run: $ mvn -Pdeveloper clean install $ mvn -Pdeveloper -pl developer -Ddeploydb $ mvn -Pdeveloper -pl developer -Ddeploydb-simulator $ mvn -pl client jetty:run To deploy an adv. zone and test the server health: $ mvn -Pdeveloper,marvin -Dmarvin.config=`find . -name simulator.cfg` -pl :cloud-marvin test Conflicts: pom.xml Signed-off-by: Prasanna Santhanam <t...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/792db8b5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/792db8b5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/792db8b5 Branch: refs/heads/cisco-vnmc-api-integration Commit: 792db8b5cc2cd2d593435457d54620768941dd61 Parents: 4faad73 Author: Prasanna Santhanam <t...@apache.org> Authored: Sun Mar 10 21:07:29 2013 +0530 Committer: Prasanna Santhanam <t...@apache.org> Committed: Wed Mar 20 10:36:43 2013 +0530 ---------------------------------------------------------------------- client/pom.xml | 20 +-- client/tomcatconf/componentContext.xml.in | 6 +- developer/pom.xml | 240 ++++++++++++++---------- pom.xml | 113 +----------- tools/apidoc/gen_toc.py | 1 + tools/marvin/pom.xml | 218 +++++++++++----------- 6 files changed, 259 insertions(+), 339 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/792db8b5/client/pom.xml ---------------------------------------------------------------------- diff --git a/client/pom.xml b/client/pom.xml index ecf232b..382706d 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -219,6 +219,11 @@ <artifactId>cloud-engine-storage-volume</artifactId> <version>${project.version}</version> </dependency> + <dependency> + <groupId>org.apache.cloudstack</groupId> + <artifactId>cloud-plugin-hypervisor-simulator</artifactId> + <version>${project.version}</version> + </dependency> </dependencies> <build> <defaultGoal>install</defaultGoal> @@ -482,21 +487,6 @@ </build> <profiles> <profile> - <id>simulator</id> - <activation> - <property> - <name>simulator</name> - </property> - </activation> - <dependencies> - <dependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-plugin-hypervisor-simulator</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - </profile> - <profile> <id>netapp</id> <activation> <property> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/792db8b5/client/tomcatconf/componentContext.xml.in ---------------------------------------------------------------------- diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in index 016df0a..b536879 100644 --- a/client/tomcatconf/componentContext.xml.in +++ b/client/tomcatconf/componentContext.xml.in @@ -215,11 +215,9 @@ <property name="name" value="KVM Agent"/> </bean> - <!-- <bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer"> - <property name="name" value="KVM Agent"/> + <property name="name" value="Simulator Agent"/> </bean> - --> <bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer"> @@ -318,11 +316,9 @@ <property name="name" value="OvmGuru"/> </bean> - <!-- <bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru"> <property name="name" value="SimulatorGuru"/> </bean> - --> <bean id="BaremetalGuru" class="com.cloud.baremetal.manager.BareMetalGuru"> <property name="name" value="BaremetalGuru"/> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/792db8b5/developer/pom.xml ---------------------------------------------------------------------- diff --git a/developer/pom.xml b/developer/pom.xml index ff47b14..3dc276a 100644 --- a/developer/pom.xml +++ b/developer/pom.xml @@ -10,7 +10,7 @@ language governing permissions and limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <artifactId>cloud-developer</artifactId> <name>Apache CloudStack Developer Tools</name> @@ -21,25 +21,98 @@ <version>4.2.0-SNAPSHOT</version> </parent> <dependencies> + <!-- specify the dependent jdbc driver here --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> - <version>5.1.21</version> - <scope>runtime</scope> + <version>${cs.mysql.version}</version> + </dependency> + <dependency> + <groupId>commons-dbcp</groupId> + <artifactId>commons-dbcp</artifactId> + <version>${cs.dbcp.version}</version> + </dependency> + <dependency> + <groupId>commons-pool</groupId> + <artifactId>commons-pool</artifactId> + <version>${cs.pool.version}</version> + </dependency> + <dependency> + <groupId>org.jasypt</groupId> + <artifactId>jasypt</artifactId> + <version>${cs.jasypt.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cloudstack</groupId> + <artifactId>cloud-utils</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cloudstack</groupId> + <artifactId>cloud-server</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.cloudstack</groupId> + <artifactId>cloud-plugin-hypervisor-simulator</artifactId> + <version>${project.version}</version> + <scope>compile</scope> </dependency> - <dependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-plugin-hypervisor-simulator</artifactId> - <version>${project.version}</version> - <scope>compile</scope> - </dependency> </dependencies> <build> <defaultGoal>install</defaultGoal> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>properties-maven-plugin</artifactId> + <version>1.0-alpha-2</version> + <executions> + <execution> + <phase>initialize</phase> + <goals> + <goal>read-project-properties</goal> + </goals> + <configuration> + <files> + <file>${basedir}/../utils/conf/db.properties</file> + <file>${basedir}/../utils/conf/db.properties.override</file> + </files> + <quiet>true</quiet> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> + <executions> + <execution> + <phase>generate-resources</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <filter token="VERSION" value="${project.version}"/> + <copy todir="${basedir}/target/db" filtering="true"> + <fileset dir="${basedir}/../setup/db/"/> + </copy> + <copy todir="${basedir}/target/db" filtering="true"> + <fileset + dir="${basedir}/../awsapi-setup/db/mysql/"> + <include name="**/*.sql"/> + </fileset> + </copy> + </target> + </configuration> + </execution> + </executions> + </plugin> + </plugins> </build> - <profiles> <profile> + <!-- default deploydb property --> <id>deploydb</id> <activation> <property> @@ -50,89 +123,8 @@ <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> - <artifactId>properties-maven-plugin</artifactId> - <version>1.0-alpha-2</version> - <executions> - <execution> - <phase>initialize</phase> - <goals> - <goal>read-project-properties</goal> - </goals> - <configuration> - <files> - <file>${project.parent.basedir}/utils/conf/db.properties</file> - <file>${project.parent.basedir}/utils/conf/db.properties.override</file> - </files> - <quiet>true</quiet> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.7</version> - <executions> - <execution> - <phase>generate-resources</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <target> - <filter token="VERSION" value="${project.version}" /> - <copy todir="${basedir}/target/db" filtering="true"> - <fileset dir="${project.basedir}/../setup/db/" /> - </copy> - <copy todir="${basedir}/target/db" filtering="true"> - <fileset - dir="${project.basedir}/../awsapi-setup/db/mysql/"> - <include name="**/*.sql" /> - </fileset> - </copy> - </target> - </configuration> - </execution> - </executions> - </plugin> - - <!-- DatabaseCreator driver here --> - <plugin> - <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.2.1</version> - <dependencies> - <!-- specify the dependent jdbc driver here --> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - <version>${cs.mysql.version}</version> - </dependency> - <dependency> - <groupId>commons-dbcp</groupId> - <artifactId>commons-dbcp</artifactId> - <version>${cs.dbcp.version}</version> - </dependency> - <dependency> - <groupId>commons-pool</groupId> - <artifactId>commons-pool</artifactId> - <version>${cs.pool.version}</version> - </dependency> - <dependency> - <groupId>org.jasypt</groupId> - <artifactId>jasypt</artifactId> - <version>${cs.jasypt.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-utils</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-server</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> <executions> <execution> <phase>process-resources</phase> @@ -143,17 +135,11 @@ </execution> </executions> <configuration> - <includeProjectDependencies>false</includeProjectDependencies> - <includePluginDependencies>true</includePluginDependencies> - <executableDependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-server</artifactId> - </executableDependency> <mainClass>com.cloud.upgrade.DatabaseCreator</mainClass> <arguments> <!-- db properties file --> - <argument>${project.parent.basedir}/utils/conf/db.properties</argument> - <argument>${project.parent.basedir}/utils/conf/db.properties.override</argument> + <argument>${basedir}/../utils/conf/db.properties</argument> + <argument>${basedir}/../utils/conf/db.properties.override</argument> <!-- Create default schema and db table views --> <argument>${basedir}/target/db/create-schema.sql</argument> <argument>${basedir}/target/db/create-schema-premium.sql</argument> @@ -181,7 +167,59 @@ <systemProperties> <systemProperty> <key>catalina.home</key> - <value>${project.parent.basedir}/utils</value> + <value>${basedir}/../utils</value> + </systemProperty> + <systemProperty> + <key>paths.script</key> + <value>${basedir}/target/db</value> + </systemProperty> + </systemProperties> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <!-- simulator deploydb property --> + <id>deploydb-simulator</id> + <activation> + <property> + <name>deploydb-simulator</name> + </property> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <phase>process-resources</phase> + <id>create-schema-simulator</id> + <goals> + <goal>java</goal> + </goals> + </execution> + </executions> + <configuration> + <mainClass>com.cloud.upgrade.DatabaseCreator</mainClass> + <arguments> + <!-- db properties file --> + <argument>${basedir}/../utils/conf/db.properties</argument> + <argument>${basedir}/../utils/conf/db.properties.override</argument> + <!-- simulator sql files --> + <argument>${basedir}/target/db/create-schema-simulator.sql</argument> + <argument>${basedir}/target/db/templates.simulator.sql</argument> + <!-- upgrade --> + <argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument> + <argument>--database=simulator</argument> + <argument>--rootpassword=${db.root.password}</argument> + </arguments> + <systemProperties> + <systemProperty> + <key>catalina.home</key> + <value>${basedir}/../utils</value> </systemProperty> <systemProperty> <key>paths.script</key> @@ -194,4 +232,4 @@ </build> </profile> </profiles> -</project> +</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/792db8b5/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index e75c420..1faafb2 100644 --- a/pom.xml +++ b/pom.xml @@ -182,7 +182,6 @@ <version>${cs.junit.version}</version> <scope>test</scope> </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> @@ -222,14 +221,12 @@ <version>1.9.5</version> <scope>test</scope> </dependency> - <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${org.springframework.version}</version> <scope>test</scope> </dependency> - <dependency> <groupId>org.aspectj</groupId> <artifactId>aspectjrt</artifactId> @@ -276,7 +273,7 @@ </goals> </pluginExecutionFilter> <action> - <ignore /> + <ignore/> </action> </pluginExecution> </pluginExecutions> @@ -509,113 +506,5 @@ <module>vmware-base</module> </modules> </profile> - <profile> - <id>simulator</id> - <activation> - <property> - <name>deploydb-simulator</name> - </property> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>properties-maven-plugin</artifactId> - <version>1.0-alpha-2</version> - <executions> - <execution> - <phase>initialize</phase> - <goals> - <goal>read-project-properties</goal> - </goals> - <configuration> - <files> - <file>${project.basedir}/utils/conf/db.properties</file> - <file>${project.basedir}/utils/conf/db.properties.override</file> - </files> - <quiet>true</quiet> - </configuration> - </execution> - </executions> - </plugin> - <!-- DatabaseCreator driver here --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <dependencies> - <!-- specify the dependent jdbc driver here --> - <dependency> - <groupId>mysql</groupId> - <artifactId>mysql-connector-java</artifactId> - <version>${cs.mysql.version}</version> - </dependency> - <dependency> - <groupId>commons-dbcp</groupId> - <artifactId>commons-dbcp</artifactId> - <version>${cs.dbcp.version}</version> - </dependency> - <dependency> - <groupId>commons-pool</groupId> - <artifactId>commons-pool</artifactId> - <version>${cs.pool.version}</version> - </dependency> - <dependency> - <groupId>org.jasypt</groupId> - <artifactId>jasypt</artifactId> - <version>${cs.jasypt.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-utils</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-server</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - <executions> - <execution> - <phase>process-resources</phase> - <id>create-schema</id> - <goals> - <goal>java</goal> - </goals> - </execution> - </executions> - <configuration> - <includeProjectDependencies>false</includeProjectDependencies> - <includePluginDependencies>true</includePluginDependencies> - <executableDependency> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-server</artifactId> - </executableDependency> - <mainClass>com.cloud.upgrade.DatabaseCreator</mainClass> - <arguments> - <!-- db properties file --> - <argument>${project.basedir}/utils/conf/db.properties</argument> - <argument>${project.basedir}/utils/conf/db.properties.override</argument> - <!-- simulator sql files --> - <argument>${basedir}/target/db/create-schema-simulator.sql</argument> - <argument>${basedir}/target/db/templates.simulator.sql</argument> - <!-- database upgrade --> - <argument>com.cloud.upgrade.DatabaseUpgradeChecker</argument> - <argument>--database=simulator</argument> - <argument>--rootpassword=${db.root.password}</argument> - <!-- enable verbosity by -v or dash-dash-verbose --> - </arguments> - <systemProperties> - <systemProperty> - <key>catalina.home</key> - <value>${project.basedir}/utils</value> - </systemProperty> - </systemProperties> - </configuration> - </plugin> - </plugins> - </build> - </profile> </profiles> </project> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/792db8b5/tools/apidoc/gen_toc.py ---------------------------------------------------------------------- diff --git a/tools/apidoc/gen_toc.py b/tools/apidoc/gen_toc.py index 6292c53..1fe5e16 100644 --- a/tools/apidoc/gen_toc.py +++ b/tools/apidoc/gen_toc.py @@ -123,6 +123,7 @@ known_categories = { 'Pool': 'Pool', 'VPC': 'VPC', 'PrivateGateway': 'VPC', + 'Simulator': 'simulator', 'StaticRoute': 'VPC', 'Tags': 'Resource tags', 'NiciraNvpDevice': 'Nicira NVP', http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/792db8b5/tools/marvin/pom.xml ---------------------------------------------------------------------- diff --git a/tools/marvin/pom.xml b/tools/marvin/pom.xml index 80099be..8cb9ec3 100644 --- a/tools/marvin/pom.xml +++ b/tools/marvin/pom.xml @@ -9,112 +9,118 @@ OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> - <modelVersion>4.0.0</modelVersion> - <artifactId>cloud-marvin</artifactId> - <name>Apache CloudStack marvin</name> - <packaging>pom</packaging> - <parent> - <groupId>org.apache.cloudstack</groupId> - <artifactId>cloud-tools</artifactId> - <version>4.2.0-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - <build> - <defaultGoal>install</defaultGoal> - <plugins> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.7</version> - <executions> - <execution> - <id>clean</id> - <phase>clean</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <target> - <delete dir="marvin/cloudstackAPI"/> - <echo>Deleting ${project.artifactId} API sources</echo> - </target> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <executions> - <execution> - <id>compile</id> - <phase>compile</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <workingDirectory>${basedir}/marvin</workingDirectory> - <executable>python</executable> - <arguments> - <argument>codegenerator.py</argument> - <argument>-s</argument> - <argument>${basedir}/../apidoc/target/commands.xml</argument> - <echo>Generating ${project.artifactId} API classes}</echo> - </arguments> - </configuration> - </execution> - <execution> - <id>package</id> - <phase>package</phase> - <goals> - <goal>exec</goal> - </goals> - <configuration> - <workingDirectory>${exec.workingdir}</workingDirectory> - <executable>python</executable> - <arguments> - <argument>setup.py</argument> - <argument>sdist</argument> - </arguments> - </configuration> - </execution> - </executions> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <artifactId>cloud-marvin</artifactId> + <name>Apache CloudStack marvin</name> + <packaging>pom</packaging> + <parent> + <groupId>org.apache.cloudstack</groupId> + <artifactId>cloud-tools</artifactId> + <version>4.2.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + <build> + <defaultGoal>install</defaultGoal> + <plugins> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.7</version> + <executions> + <execution> + <id>clean</id> + <phase>clean</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <target> + <delete dir="marvin/cloudstackAPI"/> + <echo>Deleting ${project.artifactId} API sources</echo> + </target> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <executions> + <execution> + <id>compile</id> + <phase>compile</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${basedir}/marvin</workingDirectory> + <executable>python</executable> + <arguments> + <argument>codegenerator.py</argument> + <argument>-s</argument> + <argument>${basedir}/../apidoc/target/commands.xml</argument> + <echo>Generating ${project.artifactId} API classes}</echo> + </arguments> + </configuration> + </execution> + <execution> + <id>package</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <workingDirectory>${exec.workingdir}</workingDirectory> + <executable>python</executable> + <arguments> + <argument>setup.py</argument> + <argument>sdist</argument> + </arguments> + </configuration> + </execution> + </executions> - </plugin> + </plugin> </plugins> - </build> - <profiles> - <profile> - <id>marvin</id> - <activation> - </activation> - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>1.2.1</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>exec</goal> - </goals> - </execution> - </executions> - <configuration> - <workingDirectory>${basedir}/marvin</workingDirectory> - <executable>python</executable> - <arguments> - <argument>deployDataCenter.py</argument> - <argument>-i</argument> - <argument>${user.dir}/${marvin.config}</argument> - </arguments> - </configuration> - </plugin> - </plugins> - </build> - </profile> - </profiles> + </build> + <profiles> + <profile> + <id>marvin</id> + <activation> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>1.2.1</version> + <configuration> + <workingDirectory>${basedir}/marvin</workingDirectory> + <executable>python</executable> + <arguments> + <argument>deployAndRun.py</argument> + <argument>-c</argument> + <argument>${user.dir}/${marvin.config}</argument> + <argument>-t</argument> + <argument>/tmp/t.log</argument> + <argument>-r</argument> + <argument>/tmp/r.log</argument> + <argument>-f</argument> + <argument>${basedir}/marvin/testSetupSuccess.py</argument> + </arguments> + </configuration> + <executions> + <execution> + <phase>test</phase> + <goals> + <goal>exec</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> </project>