Skip to content

Commit 8e360f3

Browse files
author
Edison Su
committed
CLOUDSTACK-724: add basic zone wide storage support, refactor storage allocator, need ui support
1 parent 3902f50 commit 8e360f3

38 files changed

Lines changed: 1363 additions & 1089 deletions

File tree

client/tomcatconf/componentContext.xml.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@
105105
<!--
106106
Storage pool allocators
107107
-->
108-
<bean id="LocalStoragePoolAllocator" class="com.cloud.storage.allocator.LocalStoragePoolAllocator">
109-
<property name="name" value="LocalStorage"/>
110-
</bean>
111-
<bean id="FirstFitStoragePoolAllocator" class="com.cloud.storage.allocator.FirstFitStoragePoolAllocator">
112-
<property name="name" value="Storage"/>
113-
</bean>
114108

115109
<bean id="UserConcentratedAllocator" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator">
116110
<property name="name" value="User First"/>

client/tomcatconf/components.xml.in

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@ under the License.
6666
<!--adapter name="FirstFitRouting" class="com.cloud.agent.manager.allocator.impl.RecreateHostAllocator"/-->
6767
<!--adapter name="FirstFit" class="com.cloud.agent.manager.allocator.impl.FirstFitAllocator"/-->
6868
</adapters>
69-
<adapters key="com.cloud.storage.allocator.StoragePoolAllocator">
70-
<adapter name="LocalStorage" class="com.cloud.storage.allocator.LocalStoragePoolAllocator"/>
71-
<adapter name="Storage" class="com.cloud.storage.allocator.FirstFitStoragePoolAllocator"/>
72-
</adapters>
7369
<adapters key="com.cloud.agent.manager.allocator.PodAllocator">
7470
<adapter name="User First" class="com.cloud.agent.manager.allocator.impl.UserConcentratedAllocator"/>
7571
</adapters>

core/src/com/cloud/storage/DiskOfferingVO.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,4 +311,8 @@ public void setSortKey(int key) {
311311
public int getSortKey() {
312312
return sortKey;
313313
}
314+
315+
public void setRecreatable(boolean recreatable) {
316+
this.recreatable = recreatable;
317+
}
314318
}

server/src/com/cloud/storage/allocator/StoragePoolAllocator.java renamed to engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
// KIND, either express or implied. See the License for the
1515
// specific language governing permissions and limitations
1616
// under the License.
17-
package com.cloud.storage.allocator;
17+
package org.apache.cloudstack.engine.subsystem.api.storage;
1818

1919
import java.util.List;
20-
import java.util.Set;
2120

2221
import com.cloud.deploy.DeploymentPlan;
2322
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
24-
import com.cloud.host.Host;
2523
import com.cloud.storage.StoragePool;
2624
import com.cloud.utils.component.Adapter;
2725
import com.cloud.vm.DiskProfile;
@@ -31,12 +29,6 @@
3129
/**
3230
*/
3331
public interface StoragePoolAllocator extends Adapter {
34-
35-
//keeping since storageMgr is using this API for some existing functionalities
36-
List<StoragePool> allocateToPool(DiskProfile dskCh, VirtualMachineProfile<? extends VirtualMachine> vmProfile, long dcId, long podId, Long clusterId, Long hostId, Set<? extends StoragePool> avoids, int returnUpTo);
37-
38-
String chooseStorageIp(VirtualMachine vm, Host host, Host storage);
39-
4032
/**
4133
* Determines which storage pools are suitable for the guest virtual machine
4234
*

engine/storage/integration-test/pom.xml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,29 @@
105105
</execution>
106106
</executions>
107107
</plugin>
108+
<plugin>
109+
<artifactId>maven-antrun-plugin</artifactId>
110+
<version>1.7</version>
111+
<executions>
112+
<execution>
113+
<id>generate-resource</id>
114+
<phase>generate-resources</phase>
115+
<goals>
116+
<goal>run</goal>
117+
</goals>
118+
<configuration>
119+
<target>
120+
<copy
121+
todir="${basedir}/target/test-classes/">
122+
<fileset dir="${basedir}/../../../utils/conf/">
123+
<include name="db.properties" />
124+
</fileset>
125+
</copy>
126+
</target>
127+
</configuration>
128+
</execution>
129+
</executions>
130+
</plugin>
108131
<plugin>
109132
<artifactId>maven-surefire-plugin</artifactId>
110133
<configuration>

0 commit comments

Comments
 (0)