cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From edi...@apache.org
Subject git commit: updated refs/heads/object_store to e8259e3
Date Sun, 12 May 2013 21:41:21 GMT
Updated Branches:
  refs/heads/object_store fdb523d21 -> e8259e38c


integration test is passed again


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

Branch: refs/heads/object_store
Commit: e8259e38c2ede27c9047dfd13c8a1d4a6f0c303e
Parents: fdb523d
Author: Edison Su <edison.su@citrix.com>
Authored: Sun May 12 14:41:06 2013 -0700
Committer: Edison Su <edison.su@citrix.com>
Committed: Sun May 12 14:41:06 2013 -0700

----------------------------------------------------------------------
 engine/pom.xml                                     |   14 +++++++++++++-
 .../storage/test/ChildTestConfiguration.java       |    6 ++++++
 .../cloudstack/storage/test/SnapshotTest.java      |    8 ++++++++
 .../apache/cloudstack/storage/test/VolumeTest.java |   11 +++++++++--
 .../test/resource/storageContext.xml               |    2 +-
 engine/storage/pom.xml                             |    5 +++++
 .../cloudstack/storage/LocalHostEndpoint.java      |    3 ++-
 .../xen/resource/XenServerStorageProcessor.java    |    1 +
 setup/db/db/schema-410to420.sql                    |    1 -
 9 files changed, 45 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/pom.xml
----------------------------------------------------------------------
diff --git a/engine/pom.xml b/engine/pom.xml
index 43486cb..3d305bc 100644
--- a/engine/pom.xml
+++ b/engine/pom.xml
@@ -40,10 +40,22 @@
     <module>storage/datamotion</module>
     <module>storage/cache</module>
     <module>storage/snapshot</module>
-    <module>storage/integration-test</module>
     <module>components-api</module>
     <module>schema</module>
     <module>network</module>
     <module>service</module>
   </modules>
+  <profiles>
+  <profile>
+      <id>integration-test</id>
+      <activation>
+        <property>
+          <name>nonoss</name>
+        </property>
+      </activation>
+      <modules>
+        <module>storage/integration-test</module>
+      </modules>
+  </profile>
+  </profiles>
 </project>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
index 24e685a..acb6106 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java
@@ -59,6 +59,7 @@ import com.cloud.host.dao.HostDao;
 import com.cloud.host.dao.HostDaoImpl;
 import com.cloud.host.dao.HostDetailsDaoImpl;
 import com.cloud.host.dao.HostTagsDaoImpl;
+import com.cloud.hypervisor.HypervisorGuruManager;
 import com.cloud.resource.ResourceManager;
 import com.cloud.server.ManagementServer;
 import com.cloud.server.auth.UserAuthenticator;
@@ -251,6 +252,11 @@ public class ChildTestConfiguration extends TestConfiguration {
     public AlertManager alertMgr() {
         return Mockito.mock(AlertManager.class);
     }
+    
+    @Bean
+    public HypervisorGuruManager hypervisorGuruMgr() {
+    	return Mockito.mock(HypervisorGuruManager.class);
+    }
 
     public static class Library implements TypeFilter {
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
index acd32b4..e772c82 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/SnapshotTest.java
@@ -64,6 +64,7 @@ import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
 
 import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Command;
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.HostPodVO;
@@ -75,6 +76,7 @@ import com.cloud.host.Host;
 import com.cloud.host.HostVO;
 import com.cloud.host.Host.Type;
 import com.cloud.host.dao.HostDao;
+import com.cloud.hypervisor.HypervisorGuruManager;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
 import com.cloud.org.Cluster.ClusterType;
 import com.cloud.org.Managed.ManagedState;
@@ -87,6 +89,7 @@ import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.Storage;
 import com.cloud.storage.StoragePoolStatus;
 import com.cloud.storage.VMTemplateVO;
+import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.Storage.StoragePoolType;
 import com.cloud.storage.Storage.TemplateType;
 import com.cloud.storage.dao.SnapshotDao;
@@ -133,6 +136,8 @@ public class SnapshotTest extends CloudStackTestNGBase {
     @Inject
     AgentManager agentMgr;
     @Inject
+    HypervisorGuruManager hyGuruMgr;
+    @Inject
     DataStoreManager dataStoreMgr;
     @Inject
     ResourceManager resourceMgr;
@@ -244,6 +249,7 @@ public class SnapshotTest extends CloudStackTestNGBase {
         DataObject templateOnStore = store.create(template);
         TemplateObjectTO to = new TemplateObjectTO();
         to.setPath(this.getImageInstallPath());
+        to.setFormat(ImageFormat.VHD);
         CopyCmdAnswer answer = new CopyCmdAnswer(to);
         templateOnStore.processEvent(Event.CreateOnlyRequested);
         templateOnStore.processEvent(Event.OperationSuccessed, answer);
@@ -261,6 +267,8 @@ public class SnapshotTest extends CloudStackTestNGBase {
         Mockito.when(epSelector.select(Mockito.any(DataObject.class), Mockito.any(DataObject.class))).thenReturn(ep);
         Mockito.when(epSelector.select(Mockito.any(DataObject.class))).thenReturn(ep);
         Mockito.when(epSelector.select(Mockito.any(DataStore.class))).thenReturn(ep);
+        Mockito.when(hyGuruMgr.getGuruProcessedCommandTargetHost(Mockito.anyLong(), Mockito.any(Command.class))).thenReturn(this.host.getId());
+        
     }
 
     public DataStore createPrimaryDataStore() {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
index fe62879..c610e50 100644
--- a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
+++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/VolumeTest.java
@@ -65,6 +65,7 @@ import org.testng.AssertJUnit;
 import org.testng.annotations.Test;
 
 import com.cloud.agent.AgentManager;
+import com.cloud.agent.api.Command;
 import com.cloud.dc.ClusterVO;
 import com.cloud.dc.DataCenterVO;
 import com.cloud.dc.HostPodVO;
@@ -78,6 +79,7 @@ import com.cloud.host.Host.Type;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.hypervisor.Hypervisor.HypervisorType;
+import com.cloud.hypervisor.HypervisorGuruManager;
 import com.cloud.org.Cluster.ClusterType;
 import com.cloud.org.Managed.ManagedState;
 import com.cloud.resource.ResourceManager;
@@ -85,6 +87,7 @@ import com.cloud.resource.ResourceState;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.ScopeType;
 import com.cloud.storage.Storage;
+import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.StoragePoolStatus;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.storage.VMTemplateVO;
@@ -140,6 +143,8 @@ public class VolumeTest extends CloudStackTestNGBase {
     VolumeDataFactory volFactory;
     @Inject
     EndPointSelector epSelector;
+    @Inject
+    HypervisorGuruManager hyGuruMgr;
     long primaryStoreId;
     VMTemplateVO image;
     String imageStoreName = "testImageStore";
@@ -192,7 +197,7 @@ public class VolumeTest extends CloudStackTestNGBase {
             imageStore = new ImageStoreVO();
             imageStore.setName(imageStoreName);
             imageStore.setDataCenterId(dcId);
-            imageStore.setProviderName("CloudStack ImageStore Provider");
+            imageStore.setProviderName(DataStoreProvider.NFS_IMAGE);
             imageStore.setRole(DataStoreRole.Image);
             imageStore.setUrl(this.getSecondaryStorage());
             imageStore.setUuid(UUID.randomUUID().toString());
@@ -236,6 +241,7 @@ public class VolumeTest extends CloudStackTestNGBase {
         DataObject templateOnStore = store.create(template);
         TemplateObjectTO to = new TemplateObjectTO();
         to.setPath(this.getImageInstallPath());
+        to.setFormat(ImageFormat.VHD);
         CopyCmdAnswer answer = new CopyCmdAnswer(to);
         templateOnStore.processEvent(Event.CreateOnlyRequested);
         templateOnStore.processEvent(Event.OperationSuccessed, answer);
@@ -253,6 +259,7 @@ public class VolumeTest extends CloudStackTestNGBase {
         Mockito.when(epSelector.select(Mockito.any(DataObject.class), Mockito.any(DataObject.class))).thenReturn(ep);
         Mockito.when(epSelector.select(Mockito.any(DataObject.class))).thenReturn(ep);
         Mockito.when(epSelector.select(Mockito.any(DataStore.class))).thenReturn(ep);
+        Mockito.when(hyGuruMgr.getGuruProcessedCommandTargetHost(Mockito.anyLong(), Mockito.any(Command.class))).thenReturn(this.host.getId());
     }
 
     public DataStore createPrimaryDataStore() {
@@ -297,7 +304,7 @@ public class VolumeTest extends CloudStackTestNGBase {
             pool.setPoolType(StoragePoolType.NetworkFilesystem);
             pool.setPodId(podId);
             pool.setScope(ScopeType.CLUSTER);
-            pool.setStorageProviderName("cloudstack primary data store provider");
+            pool.setStorageProviderName(DataStoreProvider.DEFAULT_PRIMARY);
             pool = this.primaryStoreDao.persist(pool);
             DataStore store = this.dataStoreMgr.getPrimaryDataStore(pool.getId());
             return store;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/storage/integration-test/test/resource/storageContext.xml
----------------------------------------------------------------------
diff --git a/engine/storage/integration-test/test/resource/storageContext.xml b/engine/storage/integration-test/test/resource/storageContext.xml
index 17f4602..cc8e3bf 100644
--- a/engine/storage/integration-test/test/resource/storageContext.xml
+++ b/engine/storage/integration-test/test/resource/storageContext.xml
@@ -61,7 +61,6 @@
   <bean id="dataStoreManagerImpl" class="org.apache.cloudstack.storage.datastore.DataStoreManagerImpl"
/>
   <bean id="primaryDataStoreProviderManagerImpl" class="org.apache.cloudstack.storage.datastore.manager.PrimaryDataStoreProviderManagerImpl"
/>
   <bean id="imageStoreProviderManagerImpl" class="org.apache.cloudstack.storage.image.manager.ImageStoreProviderManagerImpl"
/>  
-  <bean id="hypervsiorHostEndPointRpcServer" class="org.apache.cloudstack.storage.HypervsiorHostEndPointRpcServer"
/>
   <bean id="iSCSI" class="org.apache.cloudstack.storage.datastore.type.ISCSI" />
   <bean id="ISO" class="org.apache.cloudstack.storage.image.format.ISO" />
   <bean id="templateDataFactoryImpl" class="org.apache.cloudstack.storage.image.TemplateDataFactoryImpl"
/>
@@ -88,4 +87,5 @@
   <bean id="swiftImageStoreProviderImpl" class="org.apache.cloudstack.storage.datastore.provider.SwiftImageStoreProviderImpl"
/>  
   <bean id="BAREMETAL" class="org.apache.cloudstack.storage.image.format.BAREMETAL" />
   <bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl"
/>
+  <bean id="AccountGuestVlanMapDaoImpl" class="com.cloud.network.dao.AccountGuestVlanMapDaoImpl"
/>
 </beans>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/storage/pom.xml
----------------------------------------------------------------------
diff --git a/engine/storage/pom.xml b/engine/storage/pom.xml
index 270fe47..519f6ba 100644
--- a/engine/storage/pom.xml
+++ b/engine/storage/pom.xml
@@ -47,6 +47,11 @@
     </dependency>
     <dependency>
       <groupId>org.apache.cloudstack</groupId>
+      <artifactId>cloud-secondary-storage</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.cloudstack</groupId>
       <artifactId>cloud-engine-api</artifactId>
       <version>${project.version}</version>
     </dependency>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
----------------------------------------------------------------------
diff --git a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
index 610280f..5a4aaa6 100644
--- a/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
+++ b/engine/storage/src/org/apache/cloudstack/storage/LocalHostEndpoint.java
@@ -24,6 +24,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.storage.command.CopyCommand;
 import org.apache.cloudstack.storage.command.DownloadCommand;
+import org.apache.cloudstack.storage.resource.LocalNfsSecondaryStorageResource;
 
 import com.cloud.agent.Listener;
 import com.cloud.agent.api.Answer;
@@ -37,7 +38,7 @@ public class LocalHostEndpoint implements EndPoint {
 	private ScheduledExecutorService executor;
 	ServerResource resource;
 	public LocalHostEndpoint() {
-//FIXME		resource = new LocalNfsSecondaryStorageResource();
+        resource = new LocalNfsSecondaryStorageResource();
 		executor = Executors.newScheduledThreadPool(10);
 	}
 	@Override

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
index 727c3f4..03a2c28 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServerStorageProcessor.java
@@ -853,6 +853,7 @@ public class XenServerStorageProcessor implements StorageProcessor {
                 TemplateObjectTO newVol = new TemplateObjectTO();
                 newVol.setUuid(snapshotvdi.getUuid(conn));
                 newVol.setPath(newVol.getUuid());
+                newVol.setFormat(ImageFormat.VHD);
                 return new CopyCmdAnswer(newVol);
             }
         }catch (Exception e) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e8259e38/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index eb7d78f..986c3c3 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -179,7 +179,6 @@ CREATE TABLE  `cloud`.`snapshot_store_ref` (
   `update_count` bigint unsigned,
   `updated` datetime,   
   PRIMARY KEY  (`id`),
-  CONSTRAINT `fk_snapshot_store_ref__store_id` FOREIGN KEY `fk_snapshot_store_ref__store_id`
(`store_id`) REFERENCES `image_store` (`id`) ON DELETE CASCADE,
   INDEX `i_snapshot_store_ref__store_id`(`store_id`),
   CONSTRAINT `fk_snapshot_store_ref__snapshot_id` FOREIGN KEY `fk_snapshot_store_ref__snapshot_id`
(`snapshot_id`) REFERENCES `snapshots` (`id`),
   INDEX `i_snapshot_store_ref__snapshot_id`(`snapshot_id`)


Mime
View raw message