You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2012/10/16 00:43:53 UTC
[1/2] git commit: javelin is revived
Updated Branches:
refs/heads/javelin 5d7509e96 -> 0a7d03c90
javelin is revived
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0a7d03c9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0a7d03c9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0a7d03c9
Branch: refs/heads/javelin
Commit: 0a7d03c90bb644087a45c6e3f07954ba185e0d8e
Parents: 112143d
Author: Edison Su <su...@gmail.com>
Authored: Mon Oct 15 15:42:59 2012 -0700
Committer: Edison Su <su...@gmail.com>
Committed: Mon Oct 15 15:42:59 2012 -0700
----------------------------------------------------------------------
framework/pom.xml | 37 ++++++
platform/api/pom.xml | 30 +++---
.../platform/subsystem/api/storage/DataStore.java | 1 -
.../subsystem/api/storage/DataStoreDriver.java | 4 +-
.../subsystem/api/storage/TemplateProfile.java | 44 ++++++-
.../subsystem/api/storage/TemplateStrategy.java | 1 -
platform/pom.xml | 40 +++++++
platform/storage/pom.xml | 60 +++++-----
.../storage/StorageProviderManagerImpl.java | 16 +++
.../storage/datastore/DefaultDataStore.java | 89 +++++++++++++++
.../XenNfsDataStoreConfigurator.java | 2 -
.../storage/driver/AbstractStorageDriver.java | 19 +--
.../storage/driver/DefaultNfsSecondaryDriver.java | 11 ++
.../storage/driver/XenServerStorageDriver.java | 12 ++
.../epselector/DefaultPrimaryEndpointSelector.java | 6 +
.../cloudstack/storage/image/ImageManager.java | 4 +-
.../cloudstack/storage/image/ImageManagerImpl.java | 6 +-
.../DefaultPrimaryDataStoreLifeCycle.java | 2 +-
.../storage/manager/BackupStorageManagerImpl.java | 43 +++++++
.../manager/SecondaryStorageManagerImpl.java | 5 +
.../provider/DefaultPrimaryStorageProvider.java | 5 +
.../storage/strategy/DefaultTemplateStratey.java | 2 +-
.../storage/volume/VolumeManagerImpl.java | 20 ++++
.../cloudstack/storage/volume/VolumeService.java | 2 +-
pom.xml | 2 +
server/pom.xml | 5 -
26 files changed, 384 insertions(+), 84 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/framework/pom.xml
----------------------------------------------------------------------
diff --git a/framework/pom.xml b/framework/pom.xml
new file mode 100644
index 0000000..fcb4096
--- /dev/null
+++ b/framework/pom.xml
@@ -0,0 +1,37 @@
+<!--
+ 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.
+-->
+<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>cloudstack-framework</artifactId>
+ <name>Apache CloudStack framework POM</name>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloudstack</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ </build>
+ <modules>
+ <module>ipc</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/api/pom.xml
----------------------------------------------------------------------
diff --git a/platform/api/pom.xml b/platform/api/pom.xml
index b38e388..5473ad6 100644
--- a/platform/api/pom.xml
+++ b/platform/api/pom.xml
@@ -1,24 +1,24 @@
<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-platform-api</artifactId>
<name>Apache CloudStack platform API</name>
<parent>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloudstack</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloudstack</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
<dependencies>
- <dependency>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-api</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloud-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
- <defaultGoal>install</defaultGoal>
- <sourceDirectory>src</sourceDirectory>
- <!-- <testSourceDirectory>test</testSourceDirectory> -->
- </build>
+ <defaultGoal>install</defaultGoal>
+ <sourceDirectory>src</sourceDirectory>
+ <!-- <testSourceDirectory>test</testSourceDirectory> -->
+ </build>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStore.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStore.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStore.java
index d18c7a3..0d0f082 100644
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStore.java
+++ b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStore.java
@@ -21,7 +21,6 @@ package org.apache.cloudstack.platform.subsystem.api.storage;
import com.cloud.agent.api.to.StorageFilerTO;
import com.cloud.storage.Snapshot;
import com.cloud.storage.Storage.StoragePoolType;
-import com.cloud.storage.TemplateProfile;
import com.cloud.storage.Volume;
import com.cloud.template.VirtualMachineTemplate;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreDriver.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreDriver.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreDriver.java
index 400d883..258f0a1 100644
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreDriver.java
+++ b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreDriver.java
@@ -20,18 +20,16 @@ package org.apache.cloudstack.platform.subsystem.api.storage;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.Command;
-import com.cloud.storage.TemplateProfile;
-import com.cloud.vm.DiskProfile;
public interface DataStoreDriver {
String getDriverType();
TemplateProfile install(TemplateProfile tp, DataStoreEndPoint ep);
TemplateProfile register(TemplateProfile tp, DataStoreEndPoint ep);
- DiskProfile createVolumeFromTemplate(DiskProfile volProfile, TemplateProfile tp, DataStoreEndPoint ep);
DataObject create(DataObject obj);
DataObject copy(DataObject src, DataStore dest);
DataObject copy(DataObject src, DataObject dest);
DataObject move(DataObject src, DataObject dest);
+ VolumeProfile createVolumeFromTemplate(VolumeProfile vol, TemplateProfile tp, DataStoreEndPoint dp);
Answer sendMessage(DataStoreEndPoint dsep, Command cmd);
boolean delete(DataObject obj);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateProfile.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateProfile.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateProfile.java
index b050f40..11c7e64 100755
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateProfile.java
+++ b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateProfile.java
@@ -14,13 +14,13 @@
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
-package com.cloud.template;
+package org.apache.cloudstack.platform.subsystem.api.storage;
import java.util.Map;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.storage.Storage.ImageFormat;
-import com.cloud.storage.VMTemplateVO;
+import com.cloud.template.VirtualMachineTemplate;
public class TemplateProfile {
Long userId;
@@ -44,7 +44,7 @@ public class TemplateProfile {
String chksum;
Boolean bootable;
Long templateId;
- VMTemplateVO template;
+ VirtualMachineTemplate template;
String templateTag;
Map details;
@@ -75,7 +75,7 @@ public class TemplateProfile {
this.sshKeyEnbaled = sshKeyEnabled;
}
- public TemplateProfile(Long userId, VMTemplateVO template, Long zoneId) {
+ public TemplateProfile(Long userId, VirtualMachineTemplate template, Long zoneId) {
this.userId = userId;
this.template = template;
this.zoneId = zoneId;
@@ -222,10 +222,10 @@ public class TemplateProfile {
this.bootable = bootable;
}
- public VMTemplateVO getTemplate() {
+ public VirtualMachineTemplate getTemplate() {
return template;
}
- public void setTemplate(VMTemplateVO template) {
+ public void setTemplate(VirtualMachineTemplate template) {
this.template = template;
}
@@ -252,4 +252,36 @@ public class TemplateProfile {
public Boolean getSshKeyEnabled() {
return this.sshKeyEnbaled;
}
+
+ public String getImageStorageUri() {
+ return null;
+ }
+
+ public void setLocalPath(String path) {
+
+ }
+
+ public String getLocalPath() {
+ return null;
+ }
+
+ public String getJobId() {
+ return null;
+ }
+
+ public void setTemplatePoolRefId(long id) {
+
+ }
+
+ public long getId() {
+ return 0;
+ }
+
+ public long getTemplatePoolRefId() {
+ return 0;
+ }
+
+ public long getSize() {
+ return 0;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateStrategy.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateStrategy.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateStrategy.java
index 00daf0c..61ea40a 100644
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateStrategy.java
+++ b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateStrategy.java
@@ -1,7 +1,6 @@
package org.apache.cloudstack.platform.subsystem.api.storage;
import com.cloud.agent.api.storage.DownloadCommand.Proxy;
-import com.cloud.storage.TemplateProfile;
public interface TemplateStrategy {
TemplateProfile install(TemplateProfile tp);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/pom.xml
----------------------------------------------------------------------
diff --git a/platform/pom.xml b/platform/pom.xml
new file mode 100644
index 0000000..2ba8d34
--- /dev/null
+++ b/platform/pom.xml
@@ -0,0 +1,40 @@
+<!--
+ 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.
+-->
+<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>cloudstack-platform</artifactId>
+ <name>Apache CloudStack platform POM</name>
+ <packaging>pom</packaging>
+ <parent>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloudstack</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ </parent>
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <sourceDirectory>src</sourceDirectory>
+ <testSourceDirectory>test</testSourceDirectory>
+ </build>
+ <modules>
+ <module>api</module>
+ <module>compute</module>
+ <module>orchestration</module>
+ <module>storage</module>
+ </modules>
+</project>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/pom.xml
----------------------------------------------------------------------
diff --git a/platform/storage/pom.xml b/platform/storage/pom.xml
index c867e20..0b4eba9 100644
--- a/platform/storage/pom.xml
+++ b/platform/storage/pom.xml
@@ -1,38 +1,38 @@
-<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">
+<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-platform-storage</artifactId>
<name>Apache CloudStack Platform Storage</name>
<parent>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloudstack</artifactId>
- <version>4.0.0-SNAPSHOT</version>
- <relativePath>../../parent/pom.xml</relativePath>
- </parent>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloudstack</artifactId>
+ <version>4.1.0-SNAPSHOT</version>
+ <relativePath>../../parent/pom.xml</relativePath>
+ </parent>
<dependencies>
- <dependency>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-api</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-core</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-platform-api</artifactId>
- <version>${project.version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloud-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.cloudstack</groupId>
+ <artifactId>cloud-core</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-platform-api</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
<build>
- <defaultGoal>install</defaultGoal>
- <sourceDirectory>src</sourceDirectory>
- <!-- <testSourceDirectory>test</testSourceDirectory> -->
- </build>
+ <defaultGoal>install</defaultGoal>
+ <sourceDirectory>src</sourceDirectory>
+ </build>
</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManagerImpl.java b/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManagerImpl.java
index a400d7d..6bfdf1d 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManagerImpl.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManagerImpl.java
@@ -4,6 +4,7 @@ import java.util.Map;
import javax.naming.ConfigurationException;
+import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
import org.apache.cloudstack.platform.subsystem.api.storage.StorageProvider;
import com.cloud.utils.component.Manager;
@@ -36,4 +37,19 @@ public class StorageProviderManagerImpl implements StorageProviderManager, Manag
return null;
}
+ public StorageProvider getProvider(long poolId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public StorageProvider getBackupStorageProvider(long zoneId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataStore getDataStore(long poolId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultDataStore.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultDataStore.java b/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultDataStore.java
index 81c7608..0e7bb60 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultDataStore.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultDataStore.java
@@ -6,10 +6,19 @@ import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreDriver;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPointSelector;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreLifeCycle;
import org.apache.cloudstack.platform.subsystem.api.storage.FileSystem;
+import org.apache.cloudstack.platform.subsystem.api.storage.SnapshotProfile;
import org.apache.cloudstack.platform.subsystem.api.storage.SnapshotStrategy;
+import org.apache.cloudstack.platform.subsystem.api.storage.StorageProvider;
+import org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile;
import org.apache.cloudstack.platform.subsystem.api.storage.TemplateStrategy;
+import org.apache.cloudstack.platform.subsystem.api.storage.VolumeProfile;
import org.apache.cloudstack.platform.subsystem.api.storage.VolumeStrategy;
+import com.cloud.agent.api.to.StorageFilerTO;
+import com.cloud.storage.Snapshot;
+import com.cloud.storage.Storage.StoragePoolType;
+import com.cloud.storage.Volume;
+
public class DefaultDataStore implements DataStore {
protected VolumeStrategy _volumeStrategy;
protected SnapshotStrategy _snapshotStrategy;
@@ -137,4 +146,84 @@ public class DefaultDataStore implements DataStore {
public void setLifeCycle(DataStoreLifeCycle lf) {
this._dslf = lf;
}
+
+ public long getCluterId() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long getPodId() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public long getZoneId() {
+ // TODO Auto-generated method stub
+ return 0;
+ }
+
+ public String getPath() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public StoragePoolType getPoolType() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean isSharedStorage() {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public StorageProvider getProvider() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataStoreEndPointSelector getEndPointSelector() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public VolumeProfile prepareVolume(Volume volume, DataStore destStore) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public SnapshotProfile prepareSnapshot(Snapshot snapshot, DataStore destStore) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public TemplateProfile prepareTemplate(long templateId, DataStore destStore) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean contains(Volume volume) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean contains(Snapshot snapshot) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean contains(TemplateProfile template) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public TemplateProfile get(TemplateProfile template) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public StorageFilerTO getTO() {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/datastoreconfigurator/XenNfsDataStoreConfigurator.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/datastoreconfigurator/XenNfsDataStoreConfigurator.java b/platform/storage/src/org/apache/cloudstack/storage/datastoreconfigurator/XenNfsDataStoreConfigurator.java
index 8d872a8..883f01c 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/datastoreconfigurator/XenNfsDataStoreConfigurator.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/datastoreconfigurator/XenNfsDataStoreConfigurator.java
@@ -5,10 +5,8 @@ import java.util.Map;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore.StoreType;
import org.apache.cloudstack.storage.datastore.DefaultDataStore;
-import org.apache.cloudstack.storage.datastore.XenDataStoreDriver;
import org.apache.cloudstack.storage.driver.XenServerStorageDriver;
import org.apache.cloudstack.storage.epselector.DefaultPrimaryEndpointSelector;
-import org.apache.cloudstack.storage.filesystem.DefaultFileSystem;
import org.apache.cloudstack.storage.lifecycle.DefaultPrimaryDataStoreLifeCycle;
import org.apache.cloudstack.storage.strategy.XenBackupStrategy;
import org.apache.cloudstack.storage.strategy.XenSnapshotStrategy;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/driver/AbstractStorageDriver.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/driver/AbstractStorageDriver.java b/platform/storage/src/org/apache/cloudstack/storage/driver/AbstractStorageDriver.java
index 125874e..245af06 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/driver/AbstractStorageDriver.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/driver/AbstractStorageDriver.java
@@ -21,22 +21,14 @@ package org.apache.cloudstack.storage.driver;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreDriver;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPoint;
-import org.apache.cloudstack.platform.subsystem.api.storage.VolumeProfile;
+import org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile;
import org.apache.cloudstack.platform.subsystem.api.storage.TemplateStrategy;
import com.cloud.agent.api.storage.DownloadProgressCommand;
import com.cloud.agent.api.storage.DownloadProgressCommand.RequestType;
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.storage.CreateAnswer;
-import com.cloud.agent.api.storage.CreateCommand;
import com.cloud.agent.api.storage.DownloadCommand;
import com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer;
import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand;
-import com.cloud.agent.api.to.VolumeTO;
-import com.cloud.storage.TemplateProfile;
-import com.cloud.vm.DiskProfile;
-
-
public abstract class AbstractStorageDriver implements DataStoreDriver {
protected DataStore _ds;
@@ -70,14 +62,15 @@ public abstract class AbstractStorageDriver implements DataStoreDriver {
ep.sendCommand(dcmd);
return tp;
}
-
- public DiskProfile createVolumeFromTemplate(DiskProfile volProfile, TemplateProfile tp, DataStoreEndPoint ep) {
+ /*
+ public VolumeProfile createVolumeFromTemplate(VolumeProfile volProfile, TemplateProfile tp, DataStoreEndPoint ep) {
CreateCommand cmd = new CreateCommand(volProfile, tp.getLocalPath(), _ds.getTO());
CreateAnswer ans = (CreateAnswer)ep.sendCommand(cmd);
VolumeTO created = ans.getVolume();
- DiskProfile diskProfile = new DiskProfile(volProfile);
+ DiskProfile diskProfile = new VolumeProfile(volProfile);
diskProfile.setPath(created.getPath());
diskProfile.setSize(created.getSize());
return diskProfile;
- }
+ return null;
+ }*/
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/driver/DefaultNfsSecondaryDriver.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/driver/DefaultNfsSecondaryDriver.java b/platform/storage/src/org/apache/cloudstack/storage/driver/DefaultNfsSecondaryDriver.java
index 6983978..8e6fa1d 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/driver/DefaultNfsSecondaryDriver.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/driver/DefaultNfsSecondaryDriver.java
@@ -21,6 +21,7 @@ package org.apache.cloudstack.storage.driver;
import org.apache.cloudstack.platform.subsystem.api.storage.DataObject;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPoint;
+import org.apache.cloudstack.platform.subsystem.api.storage.VolumeProfile;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.Command;
@@ -76,4 +77,14 @@ public class DefaultNfsSecondaryDriver extends AbstractStorageDriver {
return false;
}
+ public org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile register(org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile tp, DataStoreEndPoint ep) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public VolumeProfile createVolumeFromTemplate(VolumeProfile vol, org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile tp, DataStoreEndPoint dp) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/driver/XenServerStorageDriver.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/driver/XenServerStorageDriver.java b/platform/storage/src/org/apache/cloudstack/storage/driver/XenServerStorageDriver.java
index eb50f11..811b4c7 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/driver/XenServerStorageDriver.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/driver/XenServerStorageDriver.java
@@ -21,13 +21,16 @@ package org.apache.cloudstack.storage.driver;
import org.apache.cloudstack.platform.subsystem.api.storage.DataObject;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPoint;
+import org.apache.cloudstack.platform.subsystem.api.storage.VolumeProfile;
import com.cloud.agent.api.Answer;
import com.cloud.agent.api.Command;
+
public class XenServerStorageDriver extends AbstractStorageDriver {
protected DataStore _ds;
public XenServerStorageDriver(DataStore ds) {
+ super(ds);
_ds = ds;
}
@@ -66,4 +69,13 @@ public class XenServerStorageDriver extends AbstractStorageDriver {
return false;
}
+ public org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile register(org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile tp, DataStoreEndPoint ep) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public VolumeProfile createVolumeFromTemplate(VolumeProfile vol, org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile tp, DataStoreEndPoint dp) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/epselector/DefaultPrimaryEndpointSelector.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/epselector/DefaultPrimaryEndpointSelector.java b/platform/storage/src/org/apache/cloudstack/storage/epselector/DefaultPrimaryEndpointSelector.java
index 97d7375..33ccb42 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/epselector/DefaultPrimaryEndpointSelector.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/epselector/DefaultPrimaryEndpointSelector.java
@@ -6,6 +6,7 @@ import java.util.List;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPoint;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPointSelector;
+import org.apache.cloudstack.platform.subsystem.api.storage.StorageEvent;
import com.cloud.host.Host;
import com.cloud.host.HostVO;
@@ -31,4 +32,9 @@ public class DefaultPrimaryEndpointSelector implements
}
return dseps;
}
+
+ public List<DataStoreEndPoint> getEndPoints(StorageEvent event) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/image/ImageManager.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/image/ImageManager.java b/platform/storage/src/org/apache/cloudstack/storage/image/ImageManager.java
index 29845a1..ffe0efe 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/image/ImageManager.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/image/ImageManager.java
@@ -19,14 +19,14 @@
package org.apache.cloudstack.storage.image;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile;
import com.cloud.api.commands.RegisterTemplateCmd;
-import com.cloud.storage.TemplateProfile;
public interface ImageManager {
TemplateProfile AssociateTemplateStoragePool(TemplateProfile tp, DataStore ds);
TemplateProfile getProfile(long templateId);
- com.cloud.storage.TemplateProfile allocateTemplateInDB(RegisterTemplateCmd cmd);
+ TemplateProfile allocateTemplateInDB(RegisterTemplateCmd cmd);
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/image/ImageManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/image/ImageManagerImpl.java b/platform/storage/src/org/apache/cloudstack/storage/image/ImageManagerImpl.java
index 83f331f..7c956da 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/image/ImageManagerImpl.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/image/ImageManagerImpl.java
@@ -21,6 +21,7 @@ package org.apache.cloudstack.storage.image;
import java.util.List;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile;
import org.apache.log4j.Logger;
import com.cloud.api.commands.RegisterTemplateCmd;
@@ -28,7 +29,6 @@ import com.cloud.dc.DataCenterVO;
import com.cloud.dc.dao.DataCenterDao;
import com.cloud.storage.Storage.ImageFormat;
import com.cloud.storage.Storage.TemplateType;
-import com.cloud.storage.TemplateProfile;
import com.cloud.storage.VMTemplateHostVO;
import com.cloud.storage.VMTemplateStoragePoolVO;
import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
@@ -161,7 +161,7 @@ public class ImageManagerImpl implements ImageManager {
public TemplateProfile allocateTemplateInDB(RegisterTemplateCmd cmd) {
parameterCheck(cmd);
- TemplateProfile tp = new TemplateProfile(cmd);
- return persistTemplate(tp);
+ //TemplateProfile tp = new TemplateProfile(cmd);
+ return persistTemplate(null);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/lifecycle/DefaultPrimaryDataStoreLifeCycle.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/lifecycle/DefaultPrimaryDataStoreLifeCycle.java b/platform/storage/src/org/apache/cloudstack/storage/lifecycle/DefaultPrimaryDataStoreLifeCycle.java
index 0961220..dbf8589 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/lifecycle/DefaultPrimaryDataStoreLifeCycle.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/lifecycle/DefaultPrimaryDataStoreLifeCycle.java
@@ -79,7 +79,7 @@ public class DefaultPrimaryDataStoreLifeCycle implements DataStoreLifeCycle {
public void add() {
DataStoreEndPointSelector dseps = _ds.getEndPointSelector();
- List<DataStoreEndPoint> dsep = dseps.getEndPoints();
+ List<DataStoreEndPoint> dsep = dseps.getEndPoints(null);
boolean success = false;
StoragePoolVO spool = _storagePoolDao.findById(_ds.getId());
for (DataStoreEndPoint ep : dsep) {
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/manager/BackupStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/manager/BackupStorageManagerImpl.java b/platform/storage/src/org/apache/cloudstack/storage/manager/BackupStorageManagerImpl.java
index 72253fc..500763c 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/manager/BackupStorageManagerImpl.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/manager/BackupStorageManagerImpl.java
@@ -18,6 +18,49 @@
*/
package org.apache.cloudstack.storage.manager;
+import org.apache.cloudstack.platform.subsystem.api.storage.DataObjectBackupStorageOperationState.Event;
+import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
+
+import com.cloud.storage.Snapshot;
+import com.cloud.storage.Volume;
+import com.cloud.template.VirtualMachineTemplate;
+import com.cloud.utils.fsm.NoTransitionException;
+
public class BackupStorageManagerImpl implements BackupStorageManager {
+ public boolean contains(Volume vol) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean contains(Snapshot snapshot) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public boolean contains(VirtualMachineTemplate template) {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
+ public DataStore getBackupDataStore(Volume vol) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataStore getBackupDataStore(Snapshot snapshot) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public DataStore getBackupDataStore(VirtualMachineTemplate template) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ public boolean updateOperationState(Volume vol, Event event) throws NoTransitionException {
+ // TODO Auto-generated method stub
+ return false;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/manager/SecondaryStorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/manager/SecondaryStorageManagerImpl.java b/platform/storage/src/org/apache/cloudstack/storage/manager/SecondaryStorageManagerImpl.java
index 587f5d4..dd4ed68 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/manager/SecondaryStorageManagerImpl.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/manager/SecondaryStorageManagerImpl.java
@@ -48,4 +48,9 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageManager {
return null;
}
+ public List<DataStore> getImageStores(long zoneId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/provider/DefaultPrimaryStorageProvider.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/provider/DefaultPrimaryStorageProvider.java b/platform/storage/src/org/apache/cloudstack/storage/provider/DefaultPrimaryStorageProvider.java
index a416fa4..a5579d0 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/provider/DefaultPrimaryStorageProvider.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/provider/DefaultPrimaryStorageProvider.java
@@ -136,4 +136,9 @@ public class DefaultPrimaryStorageProvider implements StorageProvider {
return ds;
}
+ public List<StoreType> supportedStoreTypes() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/strategy/DefaultTemplateStratey.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/strategy/DefaultTemplateStratey.java b/platform/storage/src/org/apache/cloudstack/storage/strategy/DefaultTemplateStratey.java
index d3867fc..2c6eaa3 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/strategy/DefaultTemplateStratey.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/strategy/DefaultTemplateStratey.java
@@ -28,6 +28,7 @@ import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPoint;
import org.apache.cloudstack.platform.subsystem.api.storage.DataStoreEndPointSelector;
import org.apache.cloudstack.platform.subsystem.api.storage.StorageEvent;
import org.apache.cloudstack.platform.subsystem.api.storage.StorageProvider;
+import org.apache.cloudstack.platform.subsystem.api.storage.TemplateProfile;
import org.apache.cloudstack.platform.subsystem.api.storage.TemplateStrategy;
import org.apache.cloudstack.storage.image.ImageManager;
import org.apache.log4j.Logger;
@@ -36,7 +37,6 @@ import com.cloud.agent.api.storage.DownloadCommand.Proxy;
import com.cloud.exception.InvalidParameterValueException;
import com.cloud.hypervisor.Hypervisor.HypervisorType;
import com.cloud.storage.Storage.ImageFormat;
-import com.cloud.storage.TemplateProfile;
import com.cloud.storage.VMTemplateHostVO;
import com.cloud.storage.VMTemplateStoragePoolVO;
import com.cloud.storage.VMTemplateStorageResourceAssoc;
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeManagerImpl.java b/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeManagerImpl.java
index 20af34e..6d9bde8 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeManagerImpl.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeManagerImpl.java
@@ -18,6 +18,8 @@
*/
package org.apache.cloudstack.storage.volume;
+import org.apache.cloudstack.platform.subsystem.api.storage.VolumeProfile;
+
import com.cloud.storage.VolumeVO;
import com.cloud.storage.Volume;
import com.cloud.storage.dao.VolumeDao;
@@ -47,4 +49,22 @@ public class VolumeManagerImpl implements VolumeManager {
_volStateMachine.transitTo(vol, event, null, _volumeDao);
return _volumeDao.findById(vol.getId());
}
+
+
+ public VolumeProfile getProfile(long volumeId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ public VolumeVO getVolume(long volumeId) {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+
+ public VolumeVO updateVolume(VolumeVO volume) {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java b/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java
index d1b3d36..433d3cd 100644
--- a/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java
+++ b/platform/storage/src/org/apache/cloudstack/storage/volume/VolumeService.java
@@ -18,9 +18,9 @@
*/
package org.apache.cloudstack.storage.volume;
-import org.apache.cloudstack.platform.subsystem.api.storage.Volume;
import com.cloud.api.commands.CreateVolumeCmd;
+import com.cloud.storage.Volume;
public interface VolumeService {
/**
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 1e3c4ca..3c14d4e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -158,6 +158,8 @@
<module>patches</module>
<module>client</module>
<module>test</module>
+ <module>platform</module>
+ <module>framework</module>
</modules>
<dependencies>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0a7d03c9/server/pom.xml
----------------------------------------------------------------------
diff --git a/server/pom.xml b/server/pom.xml
index ff7755e..29922b6 100644
--- a/server/pom.xml
+++ b/server/pom.xml
@@ -26,11 +26,6 @@
<version>4.1.0-SNAPSHOT</version>
</parent>
<dependencies>
- <dependency>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-platform-api</artifactId>
- <version>${project.version}</version>
- </dependency>
<dependency>
<groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-core</artifactId>