Skip to content

Commit ac5622c

Browse files
author
Edison Su
committed
add sample driver code: solidfire and s3
1 parent fc16e1e commit ac5622c

20 files changed

Lines changed: 486 additions & 16 deletions

File tree

engine/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<module>storage</module>
4040
<module>storage/volume</module>
4141
<module>storage/image</module>
42+
<module>storage/imagemotion</module>
4243
<module>storage/backup</module>
4344
<module>storage/snapshot</module>
4445
<module>storage/integration-test</module>

engine/storage/imagemotion/pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
2+
license agreements. See the NOTICE file distributed with this work for additional
3+
information regarding copyright ownership. The ASF licenses this file to
4+
you under the Apache License, Version 2.0 (the "License"); you may not use
5+
this file except in compliance with the License. You may obtain a copy of
6+
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
7+
by applicable law or agreed to in writing, software distributed under the
8+
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
9+
OF ANY KIND, either express or implied. See the License for the specific
10+
language governing permissions and limitations under the License. -->
11+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
12+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
13+
<modelVersion>4.0.0</modelVersion>
14+
<artifactId>cloud-engine-storage-imagemotion</artifactId>
15+
<name>Apache CloudStack Engine Storage Image Motion Component</name>
16+
<parent>
17+
<groupId>org.apache.cloudstack</groupId>
18+
<artifactId>cloud-engine</artifactId>
19+
<version>4.1.0-SNAPSHOT</version>
20+
<relativePath>../../pom.xml</relativePath>
21+
</parent>
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.apache.cloudstack</groupId>
25+
<artifactId>cloud-engine-storage</artifactId>
26+
<version>${project.version}</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.apache.cloudstack</groupId>
30+
<artifactId>cloud-engine-storage-volume</artifactId>
31+
<version>${project.version}</version>
32+
<scope>runtime</scope>
33+
</dependency>
34+
<dependency>
35+
<groupId>org.apache.cloudstack</groupId>
36+
<artifactId>cloud-engine-storage-image</artifactId>
37+
<version>${project.version}</version>
38+
<scope>runtime</scope>
39+
</dependency>
40+
<dependency>
41+
<groupId>mysql</groupId>
42+
<artifactId>mysql-connector-java</artifactId>
43+
<version>${cs.mysql.version}</version>
44+
<scope>provided</scope>
45+
</dependency>
46+
<dependency>
47+
<groupId>org.mockito</groupId>
48+
<artifactId>mockito-all</artifactId>
49+
<version>1.9.5</version>
50+
</dependency>
51+
<dependency>
52+
<groupId>javax.inject</groupId>
53+
<artifactId>javax.inject</artifactId>
54+
<version>1</version>
55+
</dependency>
56+
</dependencies>
57+
<build>
58+
<defaultGoal>install</defaultGoal>
59+
<sourceDirectory>src</sourceDirectory>
60+
<testSourceDirectory>test</testSourceDirectory>
61+
</build>
62+
</project>

engine/storage/image/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java renamed to engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java

File renamed without changes.

engine/storage/image/src/org/apache/cloudstack/storage/image/motion/ImageMotionServiceImpl.java renamed to engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionServiceImpl.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@
2222

2323
import javax.inject.Inject;
2424

25-
import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity;
2625
import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
27-
import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo;
28-
import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo;
29-
import org.apache.cloudstack.storage.datastore.PrimaryDataStore;
3026
import org.apache.cloudstack.storage.image.ImageService;
3127
import org.apache.cloudstack.storage.image.TemplateInfo;
3228
import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo;

engine/storage/image/src/org/apache/cloudstack/storage/image/motion/ImageMotionStrategy.java renamed to engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionStrategy.java

File renamed without changes.

engine/storage/integration-test/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@
3838
<version>${project.version}</version>
3939
<scope>test</scope>
4040
</dependency>
41+
<dependency>
42+
<groupId>org.apache.cloudstack</groupId>
43+
<artifactId>cloud-engine-storage-imagemotion</artifactId>
44+
<version>${project.version}</version>
45+
<scope>test</scope>
46+
</dependency>
4147
<dependency>
4248
<groupId>mysql</groupId>
4349
<artifactId>mysql-connector-java</artifactId>

engine/storage/pom.xml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,5 @@
6666
<defaultGoal>install</defaultGoal>
6767
<sourceDirectory>src</sourceDirectory>
6868
<testSourceDirectory>test</testSourceDirectory>
69-
<plugins>
70-
<plugin>
71-
<groupId>org.apache.maven.plugins</groupId>
72-
<artifactId>maven-surefire-plugin</artifactId>
73-
<version>2.12.4</version>
74-
<configuration>
75-
<skipTests>true</skipTests>
76-
</configuration>
77-
</plugin>
78-
</plugins>
7969
</build>
8070
</project>

engine/storage/image/src/org/apache/cloudstack/storage/image/ImageService.java renamed to engine/storage/src/org/apache/cloudstack/storage/image/ImageService.java

File renamed without changes.

engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProv
2323
private final String providerName = "default primary data store provider";
2424
protected PrimaryDataStoreDriver driver;
2525
private PrimaryDataStoreProviderVO provider;
26-
private final PrimaryDataStoreDao dataStoreDao;
26+
protected final PrimaryDataStoreDao dataStoreDao;
2727
protected PrimaryDataStoreLifeCycle dataStoreLifeCycle;
2828

2929
@Inject

engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.apache.cloudstack.storage.volume.db.VolumeDao;
3636
import org.apache.cloudstack.storage.volume.db.VolumeVO;
3737

38+
import org.springframework.stereotype.Component;
3839
import org.springframework.stereotype.Service;
3940

4041
import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
@@ -45,7 +46,7 @@
4546
//1. change volume state
4647
//2. orchestrator of volume, control most of the information of volume, storage pool id, voluem state, scope etc.
4748

48-
@Service
49+
@Component
4950
public class VolumeServiceImpl implements VolumeService {
5051
@Inject
5152
VolumeDao volDao;

0 commit comments

Comments
 (0)