You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by wi...@apache.org on 2013/04/03 12:33:39 UTC
[31/50] [abbrv] git commit: updated refs/heads/kvm-vnc-listen to
3890860
marvin changes to do an pre-integration and integration test
Introducing the simulator spring context -
simulatorComponentContext.xml.in. This separates the simulator beans so
that production deployments don't have the simulator in them. Context is
enabled with -Dsimulator as part of the developer profile.
Also adding config files - Simulator Config for advanced zone and basic
zone deployments under setup/dev.
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/2e2046fe
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/2e2046fe
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/2e2046fe
Branch: refs/heads/kvm-vnc-listen
Commit: 2e2046fe389b79b2b105ef40b792263cee831929
Parents: fe48bbe
Author: Prasanna Santhanam <ts...@apache.org>
Authored: Thu Mar 21 20:02:23 2013 +0530
Committer: Prasanna Santhanam <ts...@apache.org>
Committed: Tue Apr 2 18:31:29 2013 +0530
----------------------------------------------------------------------
client/pom.xml | 67 +++-
client/tomcatconf/componentContext.xml.in | 9 -
client/tomcatconf/simulatorComponentContext.xml.in | 270 +++++++++++++++
setup/db/templates.simulator.sql | 2 +-
setup/dev/advanced.cfg | 195 +++++++++++
setup/dev/basic.cfg | 178 ++++++++++
test/integration/smoke/test_vm_life_cycle.py | 14 +-
.../marvin/sandbox/demo/simulator/simulator.cfg | 196 -----------
tools/marvin/marvin/testSetupSuccess.py | 5 +
tools/marvin/pom.xml | 49 ++-
10 files changed, 738 insertions(+), 247 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/client/pom.xml
----------------------------------------------------------------------
diff --git a/client/pom.xml b/client/pom.xml
index 7565029..91dfece 100644
--- a/client/pom.xml
+++ b/client/pom.xml
@@ -219,6 +219,10 @@
<artifactId>cloud-plugin-hypervisor-simulator</artifactId>
<version>${project.version}</version>
</dependency>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloud-plugin-storage-volume-default</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
@@ -376,22 +380,38 @@
</target>
</configuration>
</execution>
- <execution>
- <id>process-nonoss</id>
- <phase>process-resources</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target if="${nonoss}">
- <echo>test</echo>
- <replaceregexp
- file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
- match="cloud-stack-components-specification=.*"
- replace="cloud-stack-components-specification=components-nonoss.xml" byline="true" />
- </target>
- </configuration>
- </execution>
+ <execution>
+ <id>process-nonoss</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target if="${nonoss}">
+ <echo>test</echo>
+ <replaceregexp
+ file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
+ match="cloud-stack-components-specification=.*"
+ replace="cloud-stack-components-specification=components-nonoss.xml" byline="true"/>
+ </target>
+ </configuration>
+ </execution>
+ <execution>
+ <id>process-simulator-context</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target if="${simulator}">
+ <echo>test</echo>
+ <replaceregexp
+ file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
+ match="classpath:componentContext.xml"
+ replace="classpath:simulatorComponentContext.xml" byline="true" />
+ </target>
+ </configuration>
+ </execution>
<execution>
<id>process-nonoss-spring-context</id>
<phase>process-resources</phase>
@@ -481,6 +501,21 @@
</build>
<profiles>
<profile>
+ <id>developer</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/cloudstack/blob/2e2046fe/client/tomcatconf/componentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in
index d5714ea..584be97 100644
--- a/client/tomcatconf/componentContext.xml.in
+++ b/client/tomcatconf/componentContext.xml.in
@@ -203,11 +203,6 @@
<property name="name" value="KVM Agent"/>
</bean>
- <bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
- <property name="name" value="Simulator Agent"/>
- </bean>
-
-
<bean id="BareMetalDiscoverer" class="com.cloud.baremetal.manager.BareMetalDiscoverer">
<property name="name" value="Bare Metal Agent"/>
</bean>
@@ -304,10 +299,6 @@
<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"/>
</bean>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/client/tomcatconf/simulatorComponentContext.xml.in
----------------------------------------------------------------------
diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in
new file mode 100644
index 0000000..d501ca1
--- /dev/null
+++ b/client/tomcatconf/simulatorComponentContext.xml.in
@@ -0,0 +1,270 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:tx="http://www.springframework.org/schema/tx"
+ xmlns:aop="http://www.springframework.org/schema/aop"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+ http://www.springframework.org/schema/tx
+ http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
+ http://www.springframework.org/schema/aop
+ http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+
+ <!--
+ Compose a CloudStack deployment with selected components here
+ -->
+ <bean id="databaseUpgradeChecker" class="com.cloud.upgrade.DatabaseUpgradeChecker" />
+ <bean id="encryptionSecretKeyChecker" class="com.cloud.utils.crypt.EncryptionSecretKeyChecker" />
+ <bean id="configurationServerImpl" class="com.cloud.server.ConfigurationServerImpl" />
+
+ <bean id="managementServerImpl" class ="com.cloud.server.ManagementServerImpl" >
+ <property name="UserAuthenticators">
+ <list>
+ <ref bean="MD5UserAuthenticator"/>
+ <ref bean="LDAPUserAuthenticator"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean id ="AccountManagerImpl" class="com.cloud.user.AccountManagerImpl">
+ <property name="UserAuthenticators">
+ <list>
+ <ref bean="MD5UserAuthenticator"/>
+ <ref bean="LDAPUserAuthenticator"/>
+ </list>
+ </property>
+ </bean>
+
+ <bean id="clusterManagerImpl" class="com.cloud.cluster.ClusterManagerImpl" />
+ <bean id="clusteredAgentManagerImpl" class="com.cloud.agent.manager.ClusteredAgentManagerImpl" />
+ <bean id="clusteredVirtualMachineManagerImpl" class="com.cloud.vm.ClusteredVirtualMachineManagerImpl" />
+ <bean id="highAvailabilityManagerExtImpl" class="com.cloud.ha.HighAvailabilityManagerExtImpl" />
+ <bean id="userVmManagerImpl" class="com.cloud.vm.UserVmManagerImpl" />
+ <bean id="consoleProxyManagerImpl" class="com.cloud.consoleproxy.ConsoleProxyManagerImpl" />
+ <bean id="securityGroupManagerImpl2" class="com.cloud.network.security.SecurityGroupManagerImpl2" />
+ <bean id="premiumSecondaryStorageManagerImpl" class="com.cloud.secstorage.PremiumSecondaryStorageManagerImpl" />
+ <bean id="userVmDaoImpl" class="com.cloud.vm.dao.UserVmDaoImpl" />
+ <bean id="ipv6AddressManagerImpl" class="com.cloud.network.Ipv6AddressManagerImpl" />
+
+ <bean id="apiRateLimitServiceImpl" class="org.apache.cloudstack.ratelimit.ApiRateLimitServiceImpl"/>
+
+ <!--
+ Network Elements
+ -->
+ <bean id="Ovs" class="com.cloud.network.element.OvsElement">
+ <property name="name" value="Ovs"/>
+ </bean>
+ <bean id="SecurityGroupProvider" class="com.cloud.network.element.SecurityGroupElement">
+ <property name="name" value="SecurityGroupProvider"/>
+ </bean>
+ <bean id="VirtualRouter" class="com.cloud.network.element.VirtualRouterElement">
+ <property name="name" value="VirtualRouter"/>
+ </bean>
+ <bean id="VpcVirtualRouter" class="com.cloud.network.element.VpcVirtualRouterElement">
+ <property name="name" value="VpcVirtualRouter"/>
+ </bean>
+
+ <!--
+ Adapters
+ -->
+ <bean id="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.FirstFitRoutingAllocator">
+ <property name="name" value="FirstFitRouting"/>
+ </bean>
+
+ <bean id="hypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
+ <property name="name" value="HypervisorAdapter"/>
+ </bean>
+
+ <!--
+ Storage pool allocators
+ -->
+
+ <bean id="LocalStoragePoolAllocator" class="org.apache.cloudstack.storage.allocator.LocalStoragePoolAllocator">
+ <property name="name" value="LocalStorage"/>
+ </bean>
+
+ <bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
+ <property name="name" value="User First"/>
+ </bean>
+
+ <bean id="ConsoleProxyAllocator" class="com.cloud.consoleproxy.ConsoleProxyBalanceAllocator">
+ <property name="name" value="Balance"/>
+ </bean>
+
+ <bean id="StaticRoleBasedAPIAccessChecker" class="org.apache.cloudstack.acl.StaticRoleBasedAPIAccessChecker"/>
+
+ <bean id="ExteralIpAddressAllocator" class="com.cloud.network.ExteralIpAddressAllocator">
+ <property name="name" value="Basic"/>
+ </bean>
+
+ <bean id="HypervisorTemplateAdapter" class="com.cloud.template.HypervisorTemplateAdapter">
+ <property name="name" value="HypervisorAdapter"/>
+ </bean>
+
+ <!--
+ Authenticators
+ -->
+ <bean id="MD5UserAuthenticator" class="com.cloud.server.auth.MD5UserAuthenticator">
+ <property name="name" value="MD5"/>
+ </bean>
+
+ <bean id="LDAPUserAuthenticator" class="com.cloud.server.auth.LDAPUserAuthenticator">
+ <property name="name" value="LDAP"/>
+ </bean>
+
+ <!--
+ Investigators
+ -->
+ <bean id="CheckOnAgentInvestigator" class="com.cloud.ha.CheckOnAgentInvestigator">
+ <property name="name" value="SimpleInvestigator"/>
+ </bean>
+
+ <bean id="XenServerInvestigator" class="com.cloud.ha.XenServerInvestigator">
+ <property name="name" value="XenServerInvestigator"/>
+ </bean>
+
+ <bean id="UserVmDomRInvestigator" class="com.cloud.ha.UserVmDomRInvestigator">
+ <property name="name" value="PingInvestigator"/>
+ </bean>
+
+ <bean id="ManagementIPSystemVMInvestigator" class="com.cloud.ha.ManagementIPSystemVMInvestigator">
+ <property name="name" value="ManagementIPSysVMInvestigator"/>
+ </bean>
+
+ <!--
+ Fencers
+ -->
+ <bean id="XenServerFencer" class="com.cloud.ha.XenServerFencer">
+ <property name="name" value="XenServerFenceBuilder"/>
+ </bean>
+ <bean id="KVMFencer" class="com.cloud.ha.KVMFencer">
+ <property name="name" value="KVMFenceBuilder"/>
+ </bean>
+ <bean id="OvmFencer" class="com.cloud.ovm.hypervisor.OvmFencer">
+ <property name="name" value="OvmFenceBuilder"/>
+ </bean>
+
+ <bean id="XcpServerDiscoverer" class="com.cloud.hypervisor.xen.discoverer.XcpServerDiscoverer">
+ <property name="name" value="XCP Agent"/>
+ </bean>
+
+ <bean id="SimulatorSecondaryStorageDiscoverer" class="com.cloud.resource.SimulatorSecondaryDiscoverer">
+ <property name="name" value="SecondaryStorage"/>
+ </bean>
+
+ <bean id="SecondaryStorageDiscoverer" class="com.cloud.storage.secondary.SecondaryStorageDiscoverer">
+ <property name="name" value="SecondaryStorage"/>
+ </bean>
+
+ <bean id="KvmServerDiscoverer" class="com.cloud.hypervisor.kvm.discoverer.KvmServerDiscoverer">
+ <property name="name" value="KVM Agent"/>
+ </bean>
+
+ <bean id="SimulatorDiscoverer" class="com.cloud.resource.SimulatorDiscoverer">
+ <property name="name" value="Simulator Agent"/>
+ </bean>
+
+ <bean id="HypervServerDiscoverer" class="com.cloud.hypervisor.hyperv.HypervServerDiscoverer">
+ <property name="name" value="SCVMMServer"/>
+ </bean>
+
+ <bean id="OvmDiscoverer" class="com.cloud.ovm.hypervisor.OvmDiscoverer">
+ <property name="name" value="Ovm Discover"/>
+ </bean>
+
+ <bean id="FirstFitPlanner" class="com.cloud.deploy.FirstFitPlanner">
+ <property name="name" value="First Fit"/>
+ </bean>
+
+ <bean id="UserDispersingPlanner" class="com.cloud.deploy.UserDispersingPlanner">
+ <property name="name" value="UserDispersing"/>
+ </bean>
+
+ <bean id="UserConcentratedPodPlanner" class="com.cloud.deploy.UserConcentratedPodPlanner">
+ <property name="name" value="UserConcentratedPod"/>
+ </bean>
+
+ <bean id="HypervisorPlannerSelector" class="com.cloud.deploy.HypervisorVmPlannerSelector">
+ <property name="name" value="HypervisorPlannerSelector"/>
+ </bean>
+
+
+ <!--
+ Network Gurus
+ -->
+ <bean id="StorageNetworkGuru" class="com.cloud.network.guru.StorageNetworkGuru">
+ <property name="name" value="StorageNetworkGuru"/>
+ </bean>
+ <bean id="ExternalGuestNetworkGuru" class="com.cloud.network.guru.ExternalGuestNetworkGuru">
+ <property name="name" value="ExternalGuestNetworkGuru"/>
+ </bean>
+ <bean id="PublicNetworkGuru" class="com.cloud.network.guru.PublicNetworkGuru">
+ <property name="name" value="PublicNetworkGuru"/>
+ </bean>
+ <bean id="PodBasedNetworkGuru" class="com.cloud.network.guru.PodBasedNetworkGuru">
+ <property name="name" value="PodBasedNetworkGuru"/>
+ </bean>
+ <bean id="ControlNetworkGuru" class="com.cloud.network.guru.ControlNetworkGuru">
+ <property name="name" value="ControlNetworkGuru"/>
+ </bean>
+ <bean id="DirectNetworkGuru" class="com.cloud.network.guru.DirectNetworkGuru">
+ <property name="name" value="DirectNetworkGuru"/>
+ </bean>
+ <bean id="DirectPodBasedNetworkGuru" class="com.cloud.network.guru.DirectPodBasedNetworkGuru">
+ <property name="name" value="DirectPodBasedNetworkGuru"/>
+ </bean>
+ <bean id="OvsGuestNetworkGuru" class="com.cloud.network.guru.OvsGuestNetworkGuru">
+ <property name="name" value="OvsGuestNetworkGuru"/>
+ </bean>
+ <bean id="PrivateNetworkGuru" class="com.cloud.network.guru.PrivateNetworkGuru">
+ <property name="name" value="PrivateNetworkGuru"/>
+ </bean>
+
+ <!--
+ Hypervisor Gurus
+ -->
+ <bean id="XenServerGuru" class="com.cloud.hypervisor.XenServerGuru">
+ <property name="name" value="XenServerGuru"/>
+ </bean>
+
+ <bean id="KVMGuru" class="com.cloud.hypervisor.KVMGuru">
+ <property name="name" value="KVMGuru"/>
+ </bean>
+
+ <bean id="HypervGuru" class="com.cloud.hypervisor.guru.HypervGuru">
+ <property name="name" value="HypervGuru"/>
+ </bean>
+
+ <bean id="OvmGuru" class="com.cloud.ovm.hypervisor.OvmGuru">
+ <property name="name" value="OvmGuru"/>
+ </bean>
+
+ <bean id="SimulatorGuru" class="com.cloud.simulator.SimulatorGuru">
+ <property name="name" value="SimulatorGuru"/>
+ </bean>
+
+ <bean id="ClassicalPrimaryDataStoreProvider" class="org.apache.cloudstack.storage.datastore.provider.CloudStackPrimaryDataStoreProviderImpl">
+ </bean>
+
+</beans>
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/setup/db/templates.simulator.sql
----------------------------------------------------------------------
diff --git a/setup/db/templates.simulator.sql b/setup/db/templates.simulator.sql
index 1324623..a804450 100755
--- a/setup/db/templates.simulator.sql
+++ b/setup/db/templates.simulator.sql
@@ -19,4 +19,4 @@
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, image_data_store_id)
VALUES (10, UUID(), 'simulator-domR', 'SystemVM Template (simulator)', 0, now(), 'SYSTEM', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/routing/debian/latest/systemvm.vhd.bz2', '', 0, 'SystemVM Template (simulator)', 'VHD', 15, 0, 1, 'Simulator', 1);
INSERT INTO `cloud`.`vm_template` (id, uuid, unique_name, name, public, created, type, hvm, bits, account_id, url, checksum, enable_password, display_text, format, guest_os_id, featured, cross_zones, hypervisor_type, image_data_store_id)
- VALUES (11, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', '', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 11, 1, 1, 'Simulator', 1);
+ VALUES (11, UUID(), 'simulator-Centos', 'CentOS 5.3(64-bit) no GUI (Simulator)', 1, now(), 'BUILTIN', 0, 64, 1, 'http://nfs1.lab.vmops.com/templates/centos53-x86_64/latest/f59f18fb-ae94-4f97-afd2-f84755767aca.vhd.bz2', '', 0, 'CentOS 5.3(64-bit) no GUI (Simulator)', 'VHD', 12, 1, 1, 'Simulator', 1);
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/setup/dev/advanced.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/advanced.cfg b/setup/dev/advanced.cfg
new file mode 100644
index 0000000..c031c2a
--- /dev/null
+++ b/setup/dev/advanced.cfg
@@ -0,0 +1,195 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+{
+ "zones": [
+ {
+ "name": "Sandbox-simulator",
+ "guestcidraddress": "10.1.1.0/24",
+ "dns1": "10.147.28.6",
+ "physical_networks": [
+ {
+ "broadcastdomainrange": "Zone",
+ "vlan": "100-200",
+ "name": "Sandbox-pnet",
+ "traffictypes": [
+ {
+ "typ": "Guest"
+ },
+ {
+ "typ": "Management"
+ },
+ {
+ "typ": "Public"
+ }
+ ],
+ "providers": [
+ {
+ "broadcastdomainrange": "ZONE",
+ "name": "VirtualRouter"
+ },
+ {
+ "broadcastdomainrange": "ZONE",
+ "name": "VpcVirtualRouter"
+ }
+ ]
+ }
+ ],
+ "ipranges": [
+ {
+ "startip": "192.168.2.2",
+ "endip": "192.168.2.200",
+ "netmask": "255.255.255.0",
+ "vlan": "50",
+ "gateway": "192.168.2.1"
+ }
+ ],
+ "networktype": "Advanced",
+ "pods": [
+ {
+ "endip": "172.16.15.200",
+ "name": "POD0",
+ "startip": "172.16.15.2",
+ "netmask": "255.255.255.0",
+ "clusters": [
+ {
+ "clustername": "C0",
+ "hypervisor": "simulator",
+ "hosts": [
+ {
+ "username": "root",
+ "url": "http://sim/c0/h0",
+ "password": "password"
+ },
+ {
+ "username": "root",
+ "url": "http://sim/c0/h1",
+ "password": "password"
+ }
+ ],
+ "clustertype": "CloudManaged",
+ "primaryStorages": [
+ {
+ "url": "nfs://10.147.28.6:/export/home/sandbox/primary",
+ "name": "PS0"
+ }
+ ]
+ }
+ ],
+ "gateway": "172.16.15.1"
+ }
+ ],
+ "internaldns1": "10.147.28.6",
+ "secondaryStorages": [
+ {
+ "url": "nfs://10.147.28.6:/export/home/sandbox/secondary"
+ }
+ ]
+ }
+ ],
+ "dbSvr": {
+ "dbSvr": "localhost",
+ "passwd": "cloud",
+ "db": "cloud",
+ "port": 3306,
+ "user": "cloud"
+ },
+ "logger": [
+ {
+ "name": "TestClient",
+ "file": "/tmp/testclient.log"
+ },
+ {
+ "name": "TestCase",
+ "file": "/tmp/testcase.log"
+ }
+ ],
+ "globalConfig": [
+ {
+ "name": "network.gc.wait",
+ "value": "60"
+ },
+ {
+ "name": "storage.cleanup.interval",
+ "value": "300"
+ },
+ {
+ "name": "vm.op.wait.interval",
+ "value": "5"
+ },
+ {
+ "name": "default.page.size",
+ "value": "10000"
+ },
+ {
+ "name": "network.gc.interval",
+ "value": "60"
+ },
+ {
+ "name": "instance.name",
+ "value": "QA"
+ },
+ {
+ "name": "workers",
+ "value": "10"
+ },
+ {
+ "name": "account.cleanup.interval",
+ "value": "600"
+ },
+ {
+ "name": "guest.domain.suffix",
+ "value": "sandbox.simulator"
+ },
+ {
+ "name": "expunge.delay",
+ "value": "60"
+ },
+ {
+ "name": "vm.allocation.algorithm",
+ "value": "random"
+ },
+ {
+ "name": "expunge.interval",
+ "value": "60"
+ },
+ {
+ "name": "expunge.workers",
+ "value": "3"
+ },
+ {
+ "name": "check.pod.cidrs",
+ "value": "true"
+ },
+ {
+ "name": "secstorage.allowed.internal.sites",
+ "value": "10.147.28.0/24"
+ },
+ {
+ "name": "direct.agent.load.size",
+ "value": "1000"
+ }
+ ],
+ "mgtSvr": [
+ {
+ "mgtSvrIp": "localhost",
+ "passwd": "password",
+ "user": "root",
+ "port": 8096
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/setup/dev/basic.cfg
----------------------------------------------------------------------
diff --git a/setup/dev/basic.cfg b/setup/dev/basic.cfg
new file mode 100644
index 0000000..fb99b8b
--- /dev/null
+++ b/setup/dev/basic.cfg
@@ -0,0 +1,178 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+{
+ "zones": [
+ {
+ "name": "Sandbox-simulator",
+ "dns1": "8.8.8.8",
+ "physical_networks": [
+ {
+ "broadcastdomainrange": "Zone",
+ "name": "Sandbox-pnet",
+ "traffictypes": [
+ {
+ "typ": "Guest"
+ },
+ {
+ "typ": "Management"
+ }
+ ],
+ "providers": [
+ {
+ "broadcastdomainrange": "ZONE",
+ "name": "VirtualRouter"
+ },
+ {
+ "broadcastdomainrange": "Pod",
+ "name": "SecurityGroupProvider"
+ }
+ ]
+ }
+ ],
+ "securitygroupenabled": "true",
+ "networktype": "Basic",
+ "pods": [
+ {
+ "endip": "172.16.15.254",
+ "name": "POD0",
+ "startip": "172.16.15.2",
+ "guestIpRanges": [
+ {
+ "startip": "60.147.41.2",
+ "endip": "60.147.41.254",
+ "netmask": "255.255.255.0",
+ "gateway": "60.147.40.1"
+ }
+ ],
+ "netmask": "255.255.255.0",
+ "clusters": [
+ {
+ "clustername": "C0",
+ "hypervisor": "simulator",
+ "hosts": [
+ {
+ "username": "root",
+ "url": "http://sim/c0/h0",
+ "password": "password"
+ }
+ ],
+ "clustertype": "CloudManaged",
+ "primaryStorages": [
+ {
+ "url": "nfs://nfsstor:/export/home/sandbox/primary",
+ "name": "PS0"
+ }
+ ]
+ }
+ ],
+ "gateway": "172.16.15.1"
+ }
+ ],
+ "internaldns1": "8.8.8.8",
+ "secondaryStorages": [
+ {
+ "url": "nfs://nfsstor:/export/home/sandbox/secondary"
+ }
+ ]
+ }
+ ],
+ "dbSvr": {
+ "dbSvr": "localhost",
+ "passwd": "cloud",
+ "db": "cloud",
+ "port": 3306,
+ "user": "cloud"
+ },
+ "logger": [
+ {
+ "name": "TestClient",
+ "file": "/var/log/testclient.log"
+ },
+ {
+ "name": "TestCase",
+ "file": "/var/log/testcase.log"
+ }
+ ],
+ "globalConfig": [
+ {
+ "name": "storage.cleanup.interval",
+ "value": "300"
+ },
+ {
+ "name": "direct.agent.load.size",
+ "value": "1000"
+ },
+ {
+ "name": "default.page.size",
+ "value": "10000"
+ },
+ {
+ "name": "instance.name",
+ "value": "QA"
+ },
+ {
+ "name": "workers",
+ "value": "10"
+ },
+ {
+ "name": "vm.op.wait.interval",
+ "value": "5"
+ },
+ {
+ "name": "account.cleanup.interval",
+ "value": "600"
+ },
+ {
+ "name": "guest.domain.suffix",
+ "value": "sandbox.simulator"
+ },
+ {
+ "name": "expunge.delay",
+ "value": "60"
+ },
+ {
+ "name": "vm.allocation.algorithm",
+ "value": "random"
+ },
+ {
+ "name": "expunge.interval",
+ "value": "60"
+ },
+ {
+ "name": "expunge.workers",
+ "value": "3"
+ },
+ {
+ "name": "secstorage.allowed.internal.sites",
+ "value": "172.16.15.0/24"
+ },
+ {
+ "name": "check.pod.cidrs",
+ "value": "true"
+ }
+ ],
+ "mgtSvr": [
+ {
+ "mgtSvrIp": "localhost",
+ "passwd": "password",
+ "user": "root",
+ "port": 8096
+ }
+ ]
+}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/test/integration/smoke/test_vm_life_cycle.py
----------------------------------------------------------------------
diff --git a/test/integration/smoke/test_vm_life_cycle.py b/test/integration/smoke/test_vm_life_cycle.py
index 719984d..143fea7 100644
--- a/test/integration/smoke/test_vm_life_cycle.py
+++ b/test/integration/smoke/test_vm_life_cycle.py
@@ -20,7 +20,6 @@
import marvin
from marvin.cloudstackTestCase import *
from marvin.cloudstackAPI import *
-from marvin.remoteSSHClient import remoteSSHClient
from marvin.integration.lib.utils import *
from marvin.integration.lib.base import *
from marvin.integration.lib.common import *
@@ -177,7 +176,7 @@ class TestDeployVM(cloudstackTestCase):
self.account
]
- @attr(tags = ["devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
+ @attr(tags = ["simulator", "devcloud", "advanced", "advancedns", "smoke", "basic", "sg"])
def test_deploy_vm(self):
"""Test Deploy Virtual Machine
"""
@@ -231,6 +230,13 @@ class TestDeployVM(cloudstackTestCase):
self.virtual_machine.name,
"Check virtual machine name in listVirtualMachines"
)
+
+ self.assertEqual(
+ vm_response.state,
+ 'Running',
+ msg="VM is not in Running state"
+ )
+
return
def tearDown(self):
@@ -996,6 +1002,4 @@ class TestVMLifeCycle(cloudstackTestCase):
False,
"Check if ISO is detached from virtual machine"
)
- return
-
-
+ return
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg b/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
deleted file mode 100644
index ca79460..0000000
--- a/tools/marvin/marvin/sandbox/demo/simulator/simulator.cfg
+++ /dev/null
@@ -1,196 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-{
- "zones": [
- {
- "name": "Sandbox-simulator",
- "guestcidraddress": "10.1.1.0/24",
- "dns1": "10.147.28.6",
- "vlan": "100-200",
- "physical_networks": [
- {
- "broadcastdomainrange": "Zone",
- "name": "Sandbox-pnet",
- "traffictypes": [
- {
- "typ": "Guest"
- },
- {
- "typ": "Management"
- },
- {
- "typ": "Public"
- }
- ],
- "providers": [
- {
- "broadcastdomainrange": "ZONE",
- "name": "VirtualRouter"
- },
- {
- "broadcastdomainrange": "ZONE",
- "name": "VpcVirtualRouter"
- }
- ]
- }
- ],
- "ipranges": [
- {
- "startip": "192.168.2.2",
- "endip": "192.168.2.200",
- "netmask": "255.255.255.0",
- "vlan": "50",
- "gateway": "192.168.2.1"
- }
- ],
- "networktype": "Advanced",
- "pods": [
- {
- "endip": "172.16.15.200",
- "name": "POD0",
- "startip": "172.16.15.2",
- "netmask": "255.255.255.0",
- "clusters": [
- {
- "clustername": "C0",
- "hypervisor": "simulator",
- "hosts": [
- {
- "username": "root",
- "url": "http://sim/c0/h0",
- "password": "password"
- },
- {
- "username": "root",
- "url": "http://sim/c0/h1",
- "password": "password"
- }
- ],
- "clustertype": "CloudManaged",
- "primaryStorages": [
- {
- "url": "nfs://10.147.28.6:/export/home/sandbox/primary",
- "name": "PS0"
- }
- ]
- }
- ],
- "gateway": "172.16.15.1"
- }
- ],
- "internaldns1": "10.147.28.6",
- "secondaryStorages": [
- {
- "url": "nfs://10.147.28.6:/export/home/sandbox/secondary"
- }
- ]
- }
- ],
- "dbSvr": {
- "dbSvr": "localhost",
- "passwd": "cloud",
- "db": "cloud",
- "port": 3306,
- "user": "cloud"
- },
- "logger": [
- {
- "name": "TestClient",
- "file": "/tmp/testclient.log"
- },
- {
- "name": "TestCase",
- "file": "/tmp/testcase.log"
- }
- ],
- "globalConfig": [
- {
- "name": "network.gc.wait",
- "value": "60"
- },
- {
- "name": "storage.cleanup.interval",
- "value": "300"
- },
- {
- "name": "vm.op.wait.interval",
- "value": "5"
- },
- {
- "name": "default.page.size",
- "value": "10000"
- },
- {
- "name": "network.gc.interval",
- "value": "60"
- },
- {
- "name": "instance.name",
- "value": "QA"
- },
- {
- "name": "workers",
- "value": "10"
- },
- {
- "name": "account.cleanup.interval",
- "value": "600"
- },
- {
- "name": "guest.domain.suffix",
- "value": "sandbox.simulator"
- },
- {
- "name": "expunge.delay",
- "value": "60"
- },
- {
- "name": "vm.allocation.algorithm",
- "value": "random"
- },
- {
- "name": "expunge.interval",
- "value": "60"
- },
- {
- "name": "expunge.workers",
- "value": "3"
- },
- {
- "name": "check.pod.cidrs",
- "value": "true"
- },
- {
- "name": "secstorage.allowed.internal.sites",
- "value": "10.147.28.0/24"
- },
- {
- "name": "direct.agent.load.size",
- "value": "1000"
- }
- ],
- "mgtSvr": [
- {
- "mgtSvrIp": "localhost",
- "passwd": "password",
- "user": "root",
- "port": 8096
- }
- ]
-}
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/tools/marvin/marvin/testSetupSuccess.py
----------------------------------------------------------------------
diff --git a/tools/marvin/marvin/testSetupSuccess.py b/tools/marvin/marvin/testSetupSuccess.py
index b1721c4..dcd15e6 100644
--- a/tools/marvin/marvin/testSetupSuccess.py
+++ b/tools/marvin/marvin/testSetupSuccess.py
@@ -76,6 +76,11 @@ class TestSetupSuccess(cloudstackTestCase):
delay(60) #wait a minute for retry
self.assertNotEqual(retry, 0, "builtIn templates not ready in zone %s"%z.name)
+ def test_deployVmWithBuiltIn(self):
+ """
+ Deploys a VM with the built-in CentOS template
+ """
+
@classmethod
def tearDownClass(cls):
pass
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2e2046fe/tools/marvin/pom.xml
----------------------------------------------------------------------
diff --git a/tools/marvin/pom.xml b/tools/marvin/pom.xml
index 194d784..ff5176f 100644
--- a/tools/marvin/pom.xml
+++ b/tools/marvin/pom.xml
@@ -48,8 +48,8 @@
<version>1.2.1</version>
<executions>
<execution>
- <id>compile</id>
- <phase>compile</phase>
+ <id>generate-sources</id>
+ <phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
@@ -80,7 +80,6 @@
</configuration>
</execution>
</executions>
-
</plugin>
</plugins>
</build>
@@ -88,7 +87,9 @@
<profile>
<id>marvin</id>
<activation>
- <property><name>marvin.config</name></property>
+ <property>
+ <name>marvin.config</name>
+ </property>
</activation>
<build>
<plugins>
@@ -96,24 +97,32 @@
<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>
+ <id>pre-integration-test</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <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>
+ </execution>
+ <execution>
+ <id>integration-test</id>
+ <phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>