You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2012/11/05 18:23:42 UTC
[13/18] Moved platform to engine
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreLifeCycle.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreLifeCycle.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreLifeCycle.java
deleted file mode 100644
index 46be5f5..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/DataStoreLifeCycle.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public interface DataStoreLifeCycle {
- public enum DataStoreEvent {
- HOSTUP,
- HOSTDOWN,
- }
- void add();
- void delete();
- void enable();
- void disable();
- void processEvent(DataStoreEvent event, Object... objs);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/FileSystem.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/FileSystem.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/FileSystem.java
deleted file mode 100644
index 213829d..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/FileSystem.java
+++ /dev/null
@@ -1,32 +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.
- */
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public interface FileSystem {
- DataObject create(DataObject obj);
- DataObject copy(DataObject Obj, DataStore destStore);
- DataObject copy(DataObject obj, DataObject destObj);
- DataObject move(DataObject srcObj, DataObject destObj);
- boolean delete(DataObject obj);
- long getStats(DataObject obj);
- String getFileType();
- boolean isWritable(DataObject obj);
- boolean contains(DataObject obj);
- DataObject ioctl(DataObject obj, Object... objects);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/Snapshot.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/Snapshot.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/Snapshot.java
deleted file mode 100644
index 5702e4c..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/Snapshot.java
+++ /dev/null
@@ -1,23 +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.
- */
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public interface Snapshot extends DataObject {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotProfile.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotProfile.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotProfile.java
deleted file mode 100644
index bf07cec..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotProfile.java
+++ /dev/null
@@ -1,26 +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.
- */
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public class SnapshotProfile {
- private String _uri;
- public String getURI() {
- return _uri;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotStrategy.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotStrategy.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotStrategy.java
deleted file mode 100644
index f627f5a..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/SnapshotStrategy.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public interface SnapshotStrategy {
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageEvent.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageEvent.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageEvent.java
deleted file mode 100644
index 34cfb2a..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageEvent.java
+++ /dev/null
@@ -1,25 +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.
- */
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public enum StorageEvent {
- DownloadTemplateToPrimary,
- RegisterTemplate,
- CreateVolumeFromTemplate;
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageProvider.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageProvider.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageProvider.java
deleted file mode 100644
index 7bc7e30..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageProvider.java
+++ /dev/null
@@ -1,20 +0,0 @@
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cloudstack.platform.subsystem.api.storage.DataStore.StoreType;
-
-import com.cloud.hypervisor.Hypervisor.HypervisorType;
-import com.cloud.storage.StoragePool;
-import com.cloud.utils.component.Adapter;
-
-public interface StorageProvider extends Adapter {
- List<HypervisorType> supportedHypervisors();
- String getProviderName();
- List<StoreType> supportedStoreTypes();
- void configure(Map<String, String> storeProviderInfo);
- DataStore addDataStore(StoragePool sp, String uri, Map<String, String> params);
- DataStore getDataStore(StoragePool pool);
- Map<HypervisorType, Map<String,DataStoreConfigurator>> getDataStoreConfigs();
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageSubSystem.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageSubSystem.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageSubSystem.java
deleted file mode 100755
index e12ff79..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/StorageSubSystem.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-import java.net.URI;
-
-import com.cloud.org.Grouping;
-
-public interface StorageSubSystem {
- String getType();
- Class<? extends Grouping> getScope();
-
- URI grantAccess(String vol, String reservationId);
- URI RemoveAccess(String vol, String reservationId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/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
deleted file mode 100755
index 11c7e64..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateProfile.java
+++ /dev/null
@@ -1,287 +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.
-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.template.VirtualMachineTemplate;
-
-public class TemplateProfile {
- Long userId;
- String name;
- String displayText;
- Integer bits;
- Boolean passwordEnabled;
- Boolean sshKeyEnbaled;
- Boolean requiresHvm;
- String url;
- Boolean isPublic;
- Boolean featured;
- Boolean isExtractable;
- ImageFormat format;
- Long guestOsId;
- Long zoneId;
- HypervisorType hypervisorType;
- String accountName;
- Long domainId;
- Long accountId;
- String chksum;
- Boolean bootable;
- Long templateId;
- VirtualMachineTemplate template;
- String templateTag;
- Map details;
-
- public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm,
- String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId,
- HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, Map details, Boolean sshKeyEnabled) {
- this.templateId = templateId;
- this.userId = userId;
- this.name = name;
- this.displayText = displayText;
- this.bits = bits;
- this.passwordEnabled = passwordEnabled;
- this.requiresHvm = requiresHvm;
- this.url = url;
- this.isPublic = isPublic;
- this.featured = featured;
- this.isExtractable = isExtractable;
- this.format = format;
- this.guestOsId = guestOsId;
- this.zoneId = zoneId;
- this.hypervisorType = hypervisorType;
- this.accountName = accountName;
- this.domainId = domainId;
- this.accountId = accountId;
- this.chksum = chksum;
- this.bootable = bootable;
- this.details = details;
- this.sshKeyEnbaled = sshKeyEnabled;
- }
-
- public TemplateProfile(Long userId, VirtualMachineTemplate template, Long zoneId) {
- this.userId = userId;
- this.template = template;
- this.zoneId = zoneId;
- }
-
- public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm,
- String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId,
- HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, String templateTag, Map details, Boolean sshKeyEnabled) {
- this(templateId, userId, name, displayText, bits, passwordEnabled, requiresHvm, url, isPublic, featured, isExtractable, format, guestOsId, zoneId,
- hypervisorType, accountName, domainId, accountId, chksum, bootable, details, sshKeyEnabled);
- this.templateTag = templateTag;
- }
-
- public Long getTemplateId() {
- return templateId;
- }
- public void setTemplateId(Long id) {
- this.templateId = id;
- }
-
- public Long getUserId() {
- return userId;
- }
- public void setUserId(Long userId) {
- this.userId = userId;
- }
-
- public String getName() {
- return name;
- }
- public void setName(String name) {
- this.name = name;
- }
-
- public String getDisplayText() {
- return displayText;
- }
- public void setDisplayText(String text) {
- this.displayText = text;
- }
-
- public Integer getBits() {
- return bits;
- }
- public void setBits(Integer bits) {
- this.bits = bits;
- }
-
- public Boolean getPasswordEnabled() {
- return passwordEnabled;
- }
- public void setPasswordEnabled(Boolean enabled) {
- this.passwordEnabled = enabled;
- }
-
- public Boolean getRequiresHVM() {
- return requiresHvm;
- }
- public void setRequiresHVM(Boolean hvm) {
- this.requiresHvm = hvm;
- }
-
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
-
- public Boolean getIsPublic() {
- return isPublic;
- }
- public void setIsPublic(Boolean is) {
- this.isPublic = is;
- }
-
- public Boolean getFeatured() {
- return featured;
- }
- public void setFeatured(Boolean featured) {
- this.featured = featured;
- }
-
- public Boolean getIsExtractable() {
- return isExtractable;
- }
- public void setIsExtractable(Boolean is) {
- this.isExtractable = is;
- }
-
- public ImageFormat getFormat() {
- return format;
- }
- public void setFormat(ImageFormat format) {
- this.format = format;
- }
-
- public Long getGuestOsId() {
- return guestOsId;
- }
- public void setGuestOsId(Long id) {
- this.guestOsId = id;
- }
-
- public Long getZoneId() {
- return zoneId;
- }
- public void setZoneId(Long id) {
- this.zoneId = id;
- }
-
- public HypervisorType getHypervisorType() {
- return hypervisorType;
- }
- public void setHypervisorType(HypervisorType type) {
- this.hypervisorType = type;
- }
-
- public Long getDomainId() {
- return domainId;
- }
- public void setDomainId(Long id) {
- this.domainId = id;
- }
-
- public Long getAccountId() {
- return accountId;
- }
- public void setAccountId(Long id) {
- this.accountId = id;
- }
-
- public String getCheckSum() {
- return chksum;
- }
- public void setCheckSum(String chksum) {
- this.chksum = chksum;
- }
-
- public Boolean getBootable() {
- return this.bootable;
- }
- public void setBootable(Boolean bootable) {
- this.bootable = bootable;
- }
-
- public VirtualMachineTemplate getTemplate() {
- return template;
- }
- public void setTemplate(VirtualMachineTemplate template) {
- this.template = template;
- }
-
- public String getTemplateTag() {
- return templateTag;
- }
-
- public void setTemplateTag(String templateTag) {
- this.templateTag = templateTag;
- }
-
- public Map getDetails() {
- return this.details;
- }
-
- public void setDetails(Map details) {
- this.details = details;
- }
-
- public void setSshKeyEnabled(Boolean enabled) {
- this.sshKeyEnbaled = enabled;
- }
-
- 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/3dafea6e/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
deleted file mode 100644
index 61ea40a..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/TemplateStrategy.java
+++ /dev/null
@@ -1,13 +0,0 @@
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-import com.cloud.agent.api.storage.DownloadCommand.Proxy;
-
-public interface TemplateStrategy {
- TemplateProfile install(TemplateProfile tp);
- TemplateProfile get(long templateId);
- TemplateProfile register(TemplateProfile tp);
- boolean canRegister(long templateId);
- int getDownloadWait();
- long getMaxTemplateSizeInBytes();
- Proxy getHttpProxy();
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeProfile.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeProfile.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeProfile.java
deleted file mode 100644
index 236ebf5..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeProfile.java
+++ /dev/null
@@ -1,34 +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.
- */
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-public class VolumeProfile {
- private String _uri;
- public String getURI() {
- return _uri;
- }
-
- public String getPath() {
- return null;
- }
-
- public long getSize() {
- return 0;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeStrategy.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeStrategy.java b/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeStrategy.java
deleted file mode 100644
index 207bbba..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/subsystem/api/storage/VolumeStrategy.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.apache.cloudstack.platform.subsystem.api.storage;
-
-
-import com.cloud.storage.Volume;
-
-public interface VolumeStrategy {
- Volume createVolume(Volume vol);
- Volume createDataVolume(Volume vol);
- Volume copyVolumeFromBackup(VolumeProfile srcVol, Volume destVol);
- Volume createVolumeFromSnapshot(SnapshotProfile snapshot, Volume vol);
- Volume createVolumeFromTemplate(TemplateProfile template, Volume vol);
- Volume migrateVolume(Volume srcVol, Volume destVol, DataStore destStore);
- Volume createVolumeFromBaseTemplate(Volume destVol, TemplateProfile tp);
- boolean deleteVolume(Volume vol);
- VolumeProfile get(long volumeId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/compute/.project
----------------------------------------------------------------------
diff --git a/platform/compute/.project b/platform/compute/.project
deleted file mode 100755
index 6623a31..0000000
--- a/platform/compute/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>platform-compute</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/compute/pom.xml
----------------------------------------------------------------------
diff --git a/platform/compute/pom.xml b/platform/compute/pom.xml
deleted file mode 100644
index ce3de65..0000000
--- a/platform/compute/pom.xml
+++ /dev/null
@@ -1,31 +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.
--->
-<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>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-platform-compute</artifactId>
- <version>4.1.0-SNAPSHOT</version>
- <dependencies>
- <dependency>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-framework-ipc</artifactId>
- <version>4.1.0-SNAPSHOT</version>
- </dependency>
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
----------------------------------------------------------------------
diff --git a/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java b/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
deleted file mode 100755
index 8c1c91b..0000000
--- a/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
+++ /dev/null
@@ -1,37 +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.
- */
-package org.apache.cloudstack.compute;
-
-import java.util.logging.Handler;
-
-public interface ComputeOrchestrator {
- /**
- * start the vm
- * @param vm vm
- * @param reservationId
- */
- @Ipc(topic="cs.compute.start", response="cs.compute.start.response")
- void start(@IpcParam String vm, @IpcParam String reservationId, Handler handler);
-
- @Ipc(topic="cs.compute.cancel")
- void cancel(@IpcParam String reservationId);
-
- @Ipc(topic="cs.compute.stop")
- void stop(@IpcParam String vm, @IpcParam String reservationId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java b/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java
deleted file mode 100755
index 5030feb..0000000
--- a/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java
+++ /dev/null
@@ -1,41 +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.
- */
-package org.apache.cloudstack.compute;
-
-
-public class ComputeOrchestratorImpl implements ComputeOrchestrator {
-
- @Override
- public void start(String vm, String reservationId) {
- // Retrieve the VM
- // Locate the HypervisorGuru based on the VM type
- // Call HypervisorGuru to start the VM
- }
-
- @Override
- public void cancel(String reservationId) {
- }
-
- @Override
- public void stop(String vm, String reservationId) {
- // Retrieve the VM
- // Locate the HypervisorGuru based on the VM type
- // Call HypervisorGuru to stop the VM
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/network/.project
----------------------------------------------------------------------
diff --git a/platform/network/.project b/platform/network/.project
deleted file mode 100755
index 8967533..0000000
--- a/platform/network/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>platform-network</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java
----------------------------------------------------------------------
diff --git a/platform/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java b/platform/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java
deleted file mode 100755
index 82756ac..0000000
--- a/platform/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java
+++ /dev/null
@@ -1,40 +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.
- */
-package org.apache.cloudstack.network;
-
-public interface NetworkOrchestrator {
-
- /**
- * Prepares for a VM to join a network
- * @param vm vm
- * @param reservationId reservation id
- */
- void prepare(String vm, String reservationId);
-
- /**
- * Release all reservation
- */
- void release(String vm, String reservationId);
-
- /**
- * Cancel a previous reservation
- * @param reservationId
- */
- void cancel(String reservationId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/orchestration/.project
----------------------------------------------------------------------
diff --git a/platform/orchestration/.project b/platform/orchestration/.project
deleted file mode 100755
index 5963e0b..0000000
--- a/platform/orchestration/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>platform-orchestration</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.m2e.core.maven2Builder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.m2e.core.maven2Nature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/orchestration/pom.xml
----------------------------------------------------------------------
diff --git a/platform/orchestration/pom.xml b/platform/orchestration/pom.xml
deleted file mode 100755
index 00c440a..0000000
--- a/platform/orchestration/pom.xml
+++ /dev/null
@@ -1,24 +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.
--->
-<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>
- <groupId>org.apache.cloudstack</groupId>
- <artifactId>cloud-platform-orchestration</artifactId>
- <version>4.1.0-SNAPSHOT</version>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
----------------------------------------------------------------------
diff --git a/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java b/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
deleted file mode 100755
index 34154ad..0000000
--- a/platform/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java
+++ /dev/null
@@ -1,82 +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.
- */
-package org.apache.cloudstack.platform.orchestration;
-
-import java.net.URL;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.cloudstack.platform.cloud.entity.api.VirtualMachineEntity;
-import org.apache.cloudstack.platform.cloud.entity.api.VolumeEntity;
-import org.apache.cloudstack.platform.service.api.OrchestrationService;
-
-import com.cloud.exception.InsufficientCapacityException;
-import com.cloud.hypervisor.Hypervisor;
-
-
-public class CloudOrchestrator implements OrchestrationService {
-
- public VirtualMachineEntity create(String name, String template, String hostName, int cpu, int speed, long memory, List<String> networks, List<String> rootDiskTags, List<String> computeTags,
- Map<String, String> details, String owner) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public VirtualMachineEntity createFromScratch(String uuid, String iso, String os, String hypervisor, String hostName, int cpu, int speed, long memory, List<String> networks, List<String> computeTags,
- Map<String, String> details, String owner) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String reserve(String vm, String planner, Long until) throws InsufficientCapacityException {
- // TODO Auto-generated method stub
- return null;
- }
-
- public String deploy(String reservationId) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void joinNetwork(String network1, String network2) {
- // TODO Auto-generated method stub
-
- }
-
- public void createNetwork() {
- // TODO Auto-generated method stub
-
- }
-
- public void destroyNetwork() {
- // TODO Auto-generated method stub
-
- }
-
- public VolumeEntity createVolume() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void registerTemplate(String name, URL path, String os, Hypervisor hypervisor) {
- // TODO Auto-generated method stub
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/planning/.project
----------------------------------------------------------------------
diff --git a/platform/planning/.project b/platform/planning/.project
deleted file mode 100755
index c228af2..0000000
--- a/platform/planning/.project
+++ /dev/null
@@ -1,17 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>platform-planning</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/planning/src/org/apache/cloudstack/platform/planning/Concierge.java
----------------------------------------------------------------------
diff --git a/platform/planning/src/org/apache/cloudstack/platform/planning/Concierge.java b/platform/planning/src/org/apache/cloudstack/platform/planning/Concierge.java
deleted file mode 100755
index 97dfb2b..0000000
--- a/platform/planning/src/org/apache/cloudstack/platform/planning/Concierge.java
+++ /dev/null
@@ -1,36 +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.
- */
-package org.apache.cloudstack.platform.planning;
-
-import org.apache.cloudstack.framework.ipc.Ipc;
-
-public interface Concierge {
- @Ipc(topic="cs.concierge.reserve")
- String reserve(String vm, String planner, Long until);
-
- @Ipc(topic="cs.concierge.cancel")
- String cancel(String reservationId);
-
- @Ipc(topic="cs.concierge.claim")
- String claim(String reservationId);
-
- @Ipc(topic="cs.concierge.reserveAnother")
- String reserveAnother(String reservationId);
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/pom.xml
----------------------------------------------------------------------
diff --git a/platform/pom.xml b/platform/pom.xml
deleted file mode 100644
index 2ba8d34..0000000
--- a/platform/pom.xml
+++ /dev/null
@@ -1,40 +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.
--->
-<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/3dafea6e/platform/storage/pom.xml
----------------------------------------------------------------------
diff --git a/platform/storage/pom.xml b/platform/storage/pom.xml
deleted file mode 100644
index 614fccb..0000000
--- a/platform/storage/pom.xml
+++ /dev/null
@@ -1,80 +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. -->
-<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.1.0-SNAPSHOT</version>
- <relativePath>../../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.openjpa</groupId>
- <artifactId>openjpa</artifactId>
- <version>2.2.0</version>
- </dependency>
- <dependency>
- <groupId>mysql</groupId>
- <artifactId>mysql-connector-java</artifactId>
- <version>${cs.mysql.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-all</artifactId>
- <version>1.9.5</version>
- </dependency>
- <dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjrt</artifactId>
- <version>1.7.1</version>
-</dependency>
-<dependency>
- <groupId>org.aspectj</groupId>
- <artifactId>aspectjweaver</artifactId>
- <version>1.7.1</version>
-</dependency>
-<dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
-</dependency>
- </dependencies>
- <build>
- <defaultGoal>install</defaultGoal>
- <sourceDirectory>src</sourceDirectory>
- <testSourceDirectory>test</testSourceDirectory>
- </build>
-</project>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/BaseType.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/BaseType.java b/platform/storage/src/org/apache/cloudstack/storage/BaseType.java
deleted file mode 100644
index 12acc7d..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/BaseType.java
+++ /dev/null
@@ -1,40 +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.
- */
-package org.apache.cloudstack.storage;
-
-public abstract class BaseType {
- public boolean equals(Object that) {
- if (this == that) {
- return true;
- }
- if (that instanceof String) {
- if (this.toString().equalsIgnoreCase((String)that)) {
- return true;
- }
- } else if (that instanceof BaseType) {
- BaseType th = (BaseType)that;
- if (this.toString().equalsIgnoreCase(th.toString())) {
- return true;
- }
- } else {
- return false;
- }
- return false;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/EndPoint.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/EndPoint.java b/platform/storage/src/org/apache/cloudstack/storage/EndPoint.java
deleted file mode 100644
index 0a3dfa2..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/EndPoint.java
+++ /dev/null
@@ -1,8 +0,0 @@
-package org.apache.cloudstack.storage;
-
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-
-public interface EndPoint {
- public Answer sendMessage(Command cmd);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java b/platform/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java
deleted file mode 100644
index 8bd51c7..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java
+++ /dev/null
@@ -1,55 +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.
- */
-package org.apache.cloudstack.storage;
-
-import javax.inject.Inject;
-
-import org.apache.log4j.Logger;
-
-import com.cloud.agent.AgentManager;
-import com.cloud.agent.api.Answer;
-import com.cloud.agent.api.Command;
-import com.cloud.exception.AgentUnavailableException;
-import com.cloud.exception.OperationTimedoutException;
-
-public class HypervisorHostEndPoint implements EndPoint {
- private static final Logger s_logger = Logger.getLogger(HypervisorHostEndPoint.class);
- private long hostId;
- @Inject
- AgentManager agentMgr;
- public HypervisorHostEndPoint(long hostId) {
- this.hostId = hostId;
- }
-
- @Override
- public Answer sendMessage(Command cmd) {
- Answer answer = null;
- try {
- answer = agentMgr.send(hostId, cmd);
- } catch (AgentUnavailableException e) {
- s_logger.debug("Unable to send command:" + cmd + ", due to: " + e.toString());
- } catch (OperationTimedoutException e) {
- s_logger.debug("Unable to send command:" + cmd + ", due to: " + e.toString());
- } catch (Exception e) {
- s_logger.debug("Unable to send command:" + cmd + ", due to: " + e.toString());
- }
- return answer;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestrator.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestrator.java b/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestrator.java
deleted file mode 100755
index 691c413..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestrator.java
+++ /dev/null
@@ -1,59 +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.
- */
-package org.apache.cloudstack.storage;
-
-import java.util.List;
-
-import com.cloud.deploy.DeploymentPlan;
-
-public interface StorageOrchestrator {
-
- /**
- * Prepares all storage ready for a VM to start
- * @param vm
- * @param reservationId
- */
- void prepare(long vmId, DeploymentPlan plan, String reservationId);
-
- /**
- * Releases all storage that were used for a VM shutdown
- * @param vm
- * @param disks
- * @param reservationId
- */
- void release(long vmId, String reservationId);
-
- /**
- * Destroy all disks
- * @param disks
- * @param reservationId
- */
- void destroy(List<Long> disks, String reservationId);
-
- /**
- * Cancel a reservation
- * @param reservationId reservation to
- */
- void cancel(String reservationId);
-
- /**
- * If attaching a volume in allocated state to a running vm, need to create this volume
- */
- void prepareAttachDiskToVM(long diskId, long vmId, String reservationId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestratorImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestratorImpl.java b/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestratorImpl.java
deleted file mode 100644
index 7c88cae..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/StorageOrchestratorImpl.java
+++ /dev/null
@@ -1,315 +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.
- */
-package org.apache.cloudstack.storage;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.cloudstack.platform.subsystem.api.storage.DataObjectBackupStorageOperationState;
-import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
-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.VolumeProfile;
-import org.apache.cloudstack.platform.subsystem.api.storage.VolumeStrategy;
-import org.apache.cloudstack.storage.image.ImageManager;
-import org.apache.cloudstack.storage.manager.BackupStorageManager;
-import org.apache.cloudstack.storage.manager.SecondaryStorageManager;
-import org.apache.cloudstack.storage.volume.VolumeManager;
-import org.apache.log4j.Logger;
-
-import com.cloud.deploy.DeploymentPlan;
-import com.cloud.exception.InvalidParameterValueException;
-import com.cloud.offering.DiskOffering;
-import com.cloud.storage.DiskOfferingVO;
-import com.cloud.storage.StoragePool;
-import com.cloud.storage.Volume;
-import com.cloud.storage.VolumeVO;
-import com.cloud.storage.dao.DiskOfferingDao;
-import com.cloud.storage.dao.StoragePoolDao;
-import com.cloud.storage.dao.VMTemplateDao;
-import com.cloud.storage.dao.VolumeDao;
-import com.cloud.storage.dao.VolumeHostDao;
-import com.cloud.template.VirtualMachineTemplate;
-import com.cloud.utils.component.Inject;
-import com.cloud.utils.db.DB;
-import com.cloud.utils.db.Transaction;
-import com.cloud.utils.exception.CloudRuntimeException;
-import com.cloud.utils.fsm.NoTransitionException;
-import com.cloud.vm.VirtualMachine;
-import com.cloud.vm.dao.VMInstanceDao;
-
-public class StorageOrchestratorImpl implements StorageOrchestrator {
- private static final Logger s_logger = Logger.getLogger(StorageOrchestratorImpl.class);
- @Inject
- StoragePoolDao _storagePoolDao;
- @Inject
- StorageProviderManager _spManager;
- @Inject
- VolumeDao _volumeDao;
- @Inject
- VMInstanceDao _vmDao;
- @Inject
- DiskOfferingDao _diskOfferingDao;
- @Inject
- VolumeHostDao _volumeHostDao;
- @Inject
- StorageProviderManager _storageProviderMgr;
- @Inject
- VolumeManager _volumeMgr;
- @Inject
- SecondaryStorageManager _secondaryStorageMgr;
- @Inject
- ImageManager _templateMgr;
- @Inject
- VMTemplateDao _templateDao;
-
- @DB
- protected Volume copyVolumeFromBackupStorage(VolumeVO volume, DataStore destStore, String reservationId) throws NoTransitionException {
- DataStore ds = _secondaryStorageMgr.getStore(volume);
- if (!ds.contains(volume)) {
- throw new CloudRuntimeException("volume: " + volume + "doesn't exist on backup storage");
- }
-
- VolumeProfile vp = ds.prepareVolume(volume, destStore);
-
- VolumeStrategy vs = destStore.getVolumeStrategy();
-
- Transaction txn = Transaction.currentTxn();
- volume.setReservationId(reservationId);
- _volumeMgr.processEvent(volume, Volume.Event.CopyRequested);
- VolumeVO destVolume = _volumeMgr.allocateDuplicateVolume(volume);
- destVolume = _volumeMgr.processEvent(destVolume, Volume.Event.CreateRequested);
- txn.commit();
-
- vs.copyVolumeFromBackup(vp, destVolume);
-
- txn.start();
- volume = _volumeMgr.processEvent(volume, Volume.Event.OperationSucceeded);
- destVolume = _volumeMgr.processEvent(destVolume, Volume.Event.OperationSucceeded);
- txn.commit();
-
- return destVolume;
- }
-
- @DB
- protected Volume migrateVolume(VolumeVO volume, DataStore srcStore, DataStore destStore, String reservationId) throws NoTransitionException {
- Transaction txn = Transaction.currentTxn();
- txn.start();
- volume.setReservationId(reservationId);
- volume = _volumeMgr.processEvent(volume, Volume.Event.MigrationRequested);
- Volume destVolume = _volumeMgr.allocateDuplicateVolume(volume);
- destVolume = _volumeMgr.processEvent(destVolume, Volume.Event.CreateRequested);
- txn.commit();
-
- VolumeStrategy vs = srcStore.getVolumeStrategy();
- vs.migrateVolume(volume, destVolume, destStore);
-
- txn.start();
- volume = _volumeMgr.processEvent(volume, Volume.Event.OperationSucceeded);
- destVolume = _volumeMgr.processEvent(destVolume, Volume.Event.OperationSucceeded);
- txn.commit();
-
- volume = _volumeMgr.processEvent(volume, Volume.Event.DestroyRequested);
-
- vs.deleteVolume(volume);
-
- _volumeMgr.processEvent(volume, Volume.Event.OperationSucceeded);
- return destVolume;
- }
-
- @DB
- protected Volume recreateVolume(VolumeVO srcVolume, DataStore destStore, String reservationId) throws NoTransitionException {
- Transaction txn = Transaction.currentTxn();
- txn.start();
- srcVolume.setReservationId(reservationId);
- srcVolume = _volumeMgr.processEvent(srcVolume, Volume.Event.CopyRequested);
- Volume destVolume = _volumeMgr.allocateDuplicateVolume(srcVolume);
- destVolume = _volumeMgr.processEvent(destVolume, Volume.Event.CreateRequested);
- txn.commit();
-
- DataStore srcStore = _storageProviderMgr.getDataStore(srcVolume.getPoolId());
- VolumeStrategy vs = srcStore.getVolumeStrategy();
-
- vs.migrateVolume(srcVolume, destVolume, destStore);
-
- txn.start();
- srcVolume = _volumeMgr.processEvent(srcVolume, Volume.Event.OperationSucceeded);
- destVolume = _volumeMgr.processEvent(destVolume, Volume.Event.OperationSucceeded);
- txn.commit();
-
- srcVolume = _volumeMgr.processEvent(srcVolume, Volume.Event.DestroyRequested);
-
- vs.deleteVolume(srcVolume);
-
- _volumeMgr.processEvent(srcVolume, Volume.Event.OperationSucceeded);
-
- return destVolume;
- }
-
- protected Volume createVolumeOnStorage(Volume volume, DataStore destStore, String reservationId) throws NoTransitionException {
- VolumeStrategy vs = destStore.getVolumeStrategy();
- volume.setReservationId(reservationId);
- volume = _volumeMgr.processEvent(volume, Volume.Event.CreateRequested);
-
- if (volume.getTemplateId() != null) {
- DataStore ds = _secondaryStorageMgr.getImageStore(destStore);
- TemplateProfile tp = ds.prepareTemplate(volume.getTemplateId(), destStore);
- if (!destStore.contains(tp)) {
- tp = _templateMgr.AssociateTemplateStoragePool(tp, destStore);
- tp = destStore.getTemplateStrategy().install(tp);
- } else {
- tp = destStore.getTemplateStrategy().get(tp.getId());
- }
- volume = vs.createVolumeFromBaseTemplate(volume, tp);
- } else {
- volume = vs.createDataVolume(volume);
- }
-
- volume = _volumeMgr.processEvent(volume, Volume.Event.OperationSucceeded);
- return volume;
- }
-
- @DB
- protected void prepareVolumes(List<VolumeVO> vols, Long destPoolId, String reservationId) throws NoTransitionException {
- DataStore destStore = null;
- if (destPoolId != null) {
- destStore = _storageProviderMgr.getDataStore(destPoolId);
- }
-
- for (VolumeVO volume : vols) {
- if (volume.getPoolId() == null && destStore == null) {
- throw new CloudRuntimeException("Volume has no pool associate and also no storage pool assigned in DeployDestination, Unable to create.");
- }
- if (destStore == null) {
- continue;
- }
-
- DataStore srcStore = _storageProviderMgr.getDataStore(volume.getPoolId());
- boolean needToCreateVolume = false;
- boolean needToRecreateVolume = false;
- boolean needToMigrateVolume = false;
- boolean needToCopyFromSec = false;
-
- Volume.State state = volume.getState();
- if (state == Volume.State.Allocated) {
- needToCreateVolume = true;
- } else if (state == Volume.State.UploadOp) {
- needToCopyFromSec = true;
- } else if (destStore.getId() != srcStore.getId()) {
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Mismatch in storage pool " + destStore.getId() + " assigned by deploymentPlanner and the one associated with volume " + volume);
- }
-
- if (volume.isRecreatable()) {
- needToRecreateVolume = true;
- } else {
- if (Volume.Type.ROOT == volume.getVolumeType()) {
- needToMigrateVolume = true;
- } else {
- if (destStore.getCluterId() != srcStore.getCluterId()) {
- needToMigrateVolume = true;
- } else if (!srcStore.isSharedStorage() && srcStore.getId() != destStore.getId()) {
- needToMigrateVolume = true;
- } else {
- continue;
- }
- }
- }
- } else {
- continue;
- }
-
-
- if (needToCreateVolume) {
- createVolumeOnStorage(volume, destStore, reservationId);
- } else if (needToMigrateVolume) {
- migrateVolume(volume, srcStore, destStore, reservationId);
- } else if (needToCopyFromSec) {
- copyVolumeFromBackupStorage(volume, destStore, reservationId);
- } else if (needToRecreateVolume) {
- recreateVolume(volume, destStore, reservationId);
- }
- }
- }
-
- public void prepare(long vmId, DeploymentPlan plan, String reservationId) {
- VirtualMachine vm = _vmDao.findById(vmId);
-
-
- List<VolumeVO> vols = _volumeDao.findUsableVolumesForInstance(vm.getId());
- if (s_logger.isDebugEnabled()) {
- s_logger.debug("Prepare " + vols.size() + " volumes for " + vm.getInstanceName());
- }
-
- try {
- prepareVolumes(vols, plan.getPoolId(), reservationId);
- } catch (NoTransitionException e) {
- s_logger.debug("Failed to prepare volume: " + e.toString());
- }
- }
-
-
- public void release(long vmId, String reservationId) {
- // TODO Auto-generated method stub
-
- }
-
- public void destroy(List<Long> disks, String reservationId) {
- // TODO Auto-generated method stub
-
- }
-
- public void cancel(String reservationId) {
- // TODO Auto-generated method stub
-
- }
-
- public void prepareAttachDiskToVM(long diskId, long vmId, String reservationId) {
- VirtualMachine vm = _vmDao.findById(vmId);
-
- if (vm == null || vm.getState() != VirtualMachine.State.Running) {
- return;
- }
-
- VolumeVO volume = _volumeDao.findById(diskId);
- if (volume.getInstanceId() != null) {
- if (volume.getInstanceId() != vmId) {
- throw new InvalidParameterValueException("Volume " + volume + "already attached to " + volume.getInstanceId());
- } else {
- return;
- }
- }
-
- List<VolumeVO> vols = new ArrayList<VolumeVO>();
- vols.add(volume);
-
- List<VolumeVO> rootDisks = _volumeDao.findByInstanceAndType(vmId, Volume.Type.ROOT);
- VolumeVO rootDisk = rootDisks.get(0);
- try {
- prepareVolumes(vols, rootDisk.getPoolId(), reservationId);
- } catch (NoTransitionException e) {
- s_logger.debug("Failed to prepare volume: " + volume + ", due to" + e.toString());
- throw new CloudRuntimeException(e.toString());
- }
-
- volume = _volumeDao.findById(diskId);
- volume.setInstanceId(vmId);
- _volumeDao.update(volume.getId(), volume);
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManager.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManager.java b/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManager.java
deleted file mode 100644
index e7b03a7..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManager.java
+++ /dev/null
@@ -1,11 +0,0 @@
-package org.apache.cloudstack.storage;
-
-import org.apache.cloudstack.platform.subsystem.api.storage.DataStore;
-import org.apache.cloudstack.platform.subsystem.api.storage.StorageProvider;
-
-public interface StorageProviderManager {
- StorageProvider getProvider(String uuid);
- StorageProvider getProvider(long poolId);
- StorageProvider getBackupStorageProvider(long zoneId);
- DataStore getDataStore(long poolId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/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
deleted file mode 100644
index 6bfdf1d..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/StorageProviderManagerImpl.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.apache.cloudstack.storage;
-
-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;
-
-public class StorageProviderManagerImpl implements StorageProviderManager, Manager {
-
- public StorageProvider getProvider(String uuid) {
- // TODO Auto-generated method stub
- return null;
- }
-
- public boolean configure(String name, Map<String, Object> params)
- throws ConfigurationException {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean start() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public boolean stop() {
- // TODO Auto-generated method stub
- return false;
- }
-
- public String getName() {
- // TODO Auto-generated method stub
- 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/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/VolumeBackupRef.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/VolumeBackupRef.java b/platform/storage/src/org/apache/cloudstack/storage/VolumeBackupRef.java
deleted file mode 100644
index 64402d3..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/VolumeBackupRef.java
+++ /dev/null
@@ -1,66 +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.
- */
-package org.apache.cloudstack.storage;
-
-import java.util.Date;
-
-import org.apache.cloudstack.platform.subsystem.api.storage.DataObjectBackupStorageOperationState;
-
-import com.cloud.storage.Storage;
-import com.cloud.storage.VMTemplateStorageResourceAssoc;
-import com.cloud.storage.Storage.ImageFormat;
-import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
-
-public interface VolumeBackupRef {
- public DataObjectBackupStorageOperationState getOperationState();
-
- public String getInstallPath();
-
- public long getHostId();
-
- public long getVolumeId();
-
- public long getZoneId();
-
- public int getDownloadPercent();
-
- public long getVolumeSize();
-
- public Storage.ImageFormat getFormat();
-
- public String getDownloadUrl();
-
- public boolean getDestroyed();
-
- public long getPhysicalSize();
-
- public long getSize();
-
- public String getLocalDownloadPath();
-
- public String getChecksum();
-
- public Status getDownloadState();
-
- public Date getLastUpdated();
-
- public Date getCreated();
-
- public long getId();
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/backup/BackupMotionService.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/backup/BackupMotionService.java b/platform/storage/src/org/apache/cloudstack/storage/backup/BackupMotionService.java
deleted file mode 100644
index 5105e25..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/backup/BackupMotionService.java
+++ /dev/null
@@ -1,23 +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.
- */
-package org.apache.cloudstack.storage.backup;
-
-public interface BackupMotionService {
- boolean copySnapshot(String snapshotUri, String destSnapshotUri);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/backup/BackupService.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/backup/BackupService.java b/platform/storage/src/org/apache/cloudstack/storage/backup/BackupService.java
deleted file mode 100644
index 198247d..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/backup/BackupService.java
+++ /dev/null
@@ -1,24 +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.
- */
-package org.apache.cloudstack.storage.backup;
-
-public interface BackupService {
- String grantAccessSnapshot(long snapshotId, long endpointId);
- boolean revokeAccessSnapshot(long snapshotId, long endpointId);
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeAnswer.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeAnswer.java b/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeAnswer.java
deleted file mode 100644
index e75307c..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeAnswer.java
+++ /dev/null
@@ -1,36 +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.
- */
-package org.apache.cloudstack.storage.command;
-
-import com.cloud.agent.api.Answer;
-
-public class CreateVolumeAnswer extends Answer {
- private String volumeUuid;
- protected CreateVolumeAnswer() {
- super();
- }
-
- public CreateVolumeAnswer(String volumeUuid) {
- this.volumeUuid = volumeUuid;
- }
-
- public String getVolumeUuid() {
- return this.volumeUuid;
- }
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeCommand.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeCommand.java b/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeCommand.java
deleted file mode 100644
index 243e016..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/command/CreateVolumeCommand.java
+++ /dev/null
@@ -1,42 +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.
- */
-package org.apache.cloudstack.storage.command;
-
-import org.apache.cloudstack.storage.volume.VolumeInfo;
-
-import com.cloud.agent.api.Command;
-
-public class CreateVolumeCommand extends Command {
- protected VolumeInfo volumeInfo;
- public CreateVolumeCommand(VolumeInfo volumeInfo) {
- super();
- this.volumeInfo = volumeInfo;
- }
-
- protected CreateVolumeCommand() {
- super();
- }
-
- @Override
- public boolean executeInSequence() {
- // TODO Auto-generated method stub
- return false;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/datastore/DataStoreStatus.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/datastore/DataStoreStatus.java b/platform/storage/src/org/apache/cloudstack/storage/datastore/DataStoreStatus.java
deleted file mode 100644
index 65f46b1..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/datastore/DataStoreStatus.java
+++ /dev/null
@@ -1,29 +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.
- */
-package org.apache.cloudstack.storage.datastore;
-
-public enum DataStoreStatus {
- Creating,
- Up,
- PrepareForMaintenance,
- ErrorInMaintenance,
- CancelMaintenance,
- Maintenance,
- Removed;
-}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/3dafea6e/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
deleted file mode 100644
index 0e7bb60..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultDataStore.java
+++ /dev/null
@@ -1,229 +0,0 @@
-package org.apache.cloudstack.storage.datastore;
-
-import org.apache.cloudstack.platform.subsystem.api.storage.BackupStrategy;
-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.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;
- protected BackupStrategy _backupStrategy;
- protected TemplateStrategy _templateStrategy;
- protected String _uri;
- protected String _uuid;
- protected StoreType _type;
- protected StoreScope _scope;
- protected long _poolId;
- protected DataStoreDriver _driverRef;
- protected DataStoreEndPointSelector _selector;
- protected FileSystem _fs;
- protected VolumeStrategy _volumeSt;
- protected SnapshotStrategy _snapshotSt;
- protected BackupStrategy _backupSt;
- protected long _id;
- protected DataStoreLifeCycle _dslf;
-
- public DefaultDataStore(
- ) {
- }
-
- public String getURI() {
- // TODO Auto-generated method stub
- return null;
- }
-
- public void setURI(String uri) {
- this._uri = uri;
- }
-
- public String getUUID() {
- return this._uuid;
- }
-
- public void setUUID(String uuid) {
- this._uuid = uuid;
- }
-
- public StoreType getType() {
- return this._type;
- }
-
- public void setType(StoreType type) {
- this._type = type;
- }
-
- public StoreScope getScope() {
- return this._scope;
- }
-
- public void setScope(StoreScope scope) {
- this._scope = scope;
- }
-
- public Long getId() {
- return this._id;
- }
-
- public void setId(long id) {
- this._id = id;
- }
-
- public DataStoreDriver getDataStoreDriver() {
- return this._driverRef;
- }
-
- public void setDataStoreDriver(DataStoreDriver drv) {
- this._driverRef = drv;
- }
-
- public void setEndPointSelector(DataStoreEndPointSelector selector) {
- this._selector = selector;
- }
-
- public DataStoreEndPointSelector getSelector() {
- return this._selector;
- }
-
- public FileSystem getFileSystem() {
- return this._fs;
- }
-
- public void setFileSystem(FileSystem fs) {
- this._fs = fs;
- }
-
- public VolumeStrategy getVolumeStrategy() {
- return this._volumeSt;
- }
-
- public void setVolumeStrategy(VolumeStrategy vs) {
- this._volumeSt = vs;
- }
-
- public SnapshotStrategy getSnapshotStrategy() {
- return this._snapshotSt;
- }
-
- public void setSnapshotStrategy(SnapshotStrategy ss) {
- this._snapshotSt = ss;
- }
-
- public BackupStrategy getBackupStrategy() {
- return this._backupSt;
- }
-
- public void setBackupStrategy(BackupStrategy bs) {
- this._backupSt = bs;
- }
-
- public TemplateStrategy getTemplateStrategy() {
- return this._templateStrategy;
- }
-
- public void setTemplateStrategy(TemplateStrategy ts) {
- this._templateStrategy = ts;
- }
-
- public DataStoreLifeCycle getLifeCycle() {
- return this._dslf;
- }
-
- 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/3dafea6e/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStoreImpl.java
----------------------------------------------------------------------
diff --git a/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStoreImpl.java b/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStoreImpl.java
deleted file mode 100644
index ea22b23..0000000
--- a/platform/storage/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStoreImpl.java
+++ /dev/null
@@ -1,118 +0,0 @@
-package org.apache.cloudstack.storage.datastore;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.inject.Inject;
-
-import org.apache.cloudstack.storage.EndPoint;
-import org.apache.cloudstack.storage.HypervisorHostEndPoint;
-import org.apache.cloudstack.storage.datastore.db.DataStoreVO;
-import org.apache.cloudstack.storage.datastore.driver.PrimaryDataStoreDriver;
-import org.apache.cloudstack.storage.volume.Volume;
-import org.apache.cloudstack.storage.volume.VolumeEvent;
-import org.apache.cloudstack.storage.volume.db.VolumeDao;
-import org.apache.cloudstack.storage.volume.db.VolumeVO;
-import org.apache.cloudstack.storage.volume.disktype.VolumeDiskType;
-import org.apache.log4j.Logger;
-
-import com.cloud.host.HostVO;
-import com.cloud.host.dao.HostDao;
-import com.cloud.utils.component.ComponentInject;
-import com.cloud.utils.exception.CloudRuntimeException;
-
-import edu.emory.mathcs.backport.java.util.Collections;
-
-public class DefaultPrimaryDataStoreImpl implements PrimaryDataStore {
- private static final Logger s_logger = Logger.getLogger(DefaultPrimaryDataStoreImpl.class);
- protected PrimaryDataStoreDriver driver;
- protected DataStoreVO pdsv;
- protected PrimaryDataStoreInfo pdsInfo;
- @Inject
- private VolumeDao volumeDao;
- @Inject
- private HostDao hostDao;
- public DefaultPrimaryDataStoreImpl(PrimaryDataStoreDriver driver, DataStoreVO pdsv, PrimaryDataStoreInfo pdsInfo) {
- this.driver = driver;
- this.pdsv = pdsv;
- this.pdsInfo = pdsInfo;
- }
-
- @Override
- public Volume getVolume(long id) {
- VolumeVO volumeVO = volumeDao.findById(id);
- Volume vol = new Volume(this, volumeVO);
- return vol;
- }
-
- @Override
- public List<Volume> getVolumes() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public boolean deleteVolume(long id) {
- // TODO Auto-generated method stub
- return false;
- }
-
- @Override
- public Volume createVolume(long id, VolumeDiskType diskType) {
- Volume vol = this.getVolume(id);
- if (vol == null) {
- return null;
- }
-
- if (!pdsInfo.isVolumeDiskTypeSupported(diskType)) {
- return null;
- }
-
- boolean result = vol.stateTransit(VolumeEvent.CreateRequested);
- if (!result) {
- return null;
- }
-
- try {
- vol.setVolumeDiskType(diskType);
- result = this.driver.createVolume(vol);
- vol.update();
- return vol;
- } catch (Exception e) {
- result = false;
- s_logger.debug("Failed to create volume: " + e.toString());
- throw new CloudRuntimeException(e.toString());
- } finally {
- if (result == true) {
- vol.stateTransit(VolumeEvent.OperationSucceeded);
- } else {
- vol.stateTransit(VolumeEvent.OperationFailed);
- }
- }
-
- }
-
- @Override
- public List<EndPoint> getEndPoints() {
- Long clusterId = pdsv.getClusterId();
- if (clusterId == null) {
- return null;
- }
- List<EndPoint> endpoints = new ArrayList<EndPoint>();
- List<HostVO> hosts = hostDao.findHypervisorHostInCluster(clusterId);
- for (HostVO host : hosts) {
- HypervisorHostEndPoint ep = new HypervisorHostEndPoint(host.getId());
- ComponentInject.inject(ep);
- endpoints.add(ep);
- }
- Collections.shuffle(endpoints);
- return endpoints;
- }
-
- @Override
- public PrimaryDataStoreInfo getDataStoreInfo() {
- // TODO Auto-generated method stub
- return null;
- }
-}