cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [3/5] git commit: more changes
Date Wed, 05 Sep 2012 21:17:46 GMT
more changes


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

Branch: refs/heads/javelin
Commit: 2a4872eb8831a6c41ca94677dc47d92ffe9c7202
Parents: e41cb9f
Author: Alex Huang <alex.huang@citrix.com>
Authored: Wed Sep 5 13:39:10 2012 -0700
Committer: Alex Huang <alex.huang@citrix.com>
Committed: Wed Sep 5 13:39:33 2012 -0700

----------------------------------------------------------------------
 .../platform/cloud/entity/api/NetworkEntity.java   |    4 +-
 .../platform/cloud/entity/api/SnapshotEntity.java  |   22 ++++++++
 .../platform/cloud/entity/api/VolumeEntity.java    |   42 ++++++++++++++-
 .../service/api/JobsManagementService.java         |   35 ------------
 .../platform/service/api/OrchestrationService.java |   13 +----
 5 files changed, 67 insertions(+), 49 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2a4872eb/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/NetworkEntity.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/NetworkEntity.java
b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/NetworkEntity.java
index 3092905..ce7be7c 100755
--- a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/NetworkEntity.java
+++ b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/NetworkEntity.java
@@ -20,5 +20,7 @@ package org.apache.cloudstack.platform.cloud.entity.api;
 
 import org.apache.cloudstack.platform.entity.api.CloudEntity;
 
-public interface NetworkEntity extends CloudEntity {
+import com.cloud.network.Network;
+
+public interface NetworkEntity extends CloudEntity, Network {
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2a4872eb/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/SnapshotEntity.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/SnapshotEntity.java
b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/SnapshotEntity.java
index 13bc727..bb80f91 100755
--- a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/SnapshotEntity.java
+++ b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/SnapshotEntity.java
@@ -23,5 +23,27 @@ import org.apache.cloudstack.platform.entity.api.CloudEntity;
 import com.cloud.storage.Snapshot;
 
 public interface SnapshotEntity extends CloudEntity, Snapshot {
+    /**
+     * Make a reservation for backing up this snapshot
+     * @param expiration time in seconds to expire the reservation
+     * @return reservation token
+     */
+    String reserveForBackup(int expiration);
 
+    /**
+     * Perform the backup according to the reservation token
+     * @param reservationToken token returned by reserveForBackup
+     */
+    void backup(String reservationToken);
+
+    /**
+     * restore this snapshot to this vm.
+     * @param vm
+     */
+    void restore(String vm);
+
+    /**
+     * Destroy this snapshot.
+     */
+    void destroy();
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2a4872eb/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VolumeEntity.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VolumeEntity.java
b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VolumeEntity.java
index 4ba204c..99e4c82 100755
--- a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VolumeEntity.java
+++ b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VolumeEntity.java
@@ -27,8 +27,48 @@ public interface VolumeEntity extends CloudEntity, Volume {
     /**
      * Take a snapshot of the volume
      */
-    void takeSnapshotOf();
+    SnapshotEntity takeSnapshotOf(boolean full);
 
+    /**
+     * Make a reservation to do storage migration
+     * 
+     * @param expirationTime time in seconds the reservation is cancelled 
+     * @return reservation token
+     */
+    String reserveForMigration(long expirationTime);
+
+    /**
+     * Migrate using a reservation.
+     * @param reservationToken reservation token 
+     */
+    void migrate(String reservationToken);
+
+    /**
+     * Setup for a copy of this volume.
+     * @return destination to copy to
+     */
+    VolumeEntity setupForCopy();
+
+    /**
+     * Perform the copy
+     * @param dest copy to this volume
+     */
+    void copy(VolumeEntity dest);
 
+    /**
+     * Attach to the vm
+     * @param vm vm to attach to
+     * @param deviceId device id to use
+     */
+    void attachTo(String vm, long deviceId);
 
+    /**
+     * Detach from the vm
+     */
+    void detachFrom();
+
+    /**
+     * Destroy the volume
+     */
+    void destroy();
 }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2a4872eb/platform/api/src/org/apache/cloudstack/platform/service/api/JobsManagementService.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/service/api/JobsManagementService.java
b/platform/api/src/org/apache/cloudstack/platform/service/api/JobsManagementService.java
deleted file mode 100755
index ed1c4c0..0000000
--- a/platform/api/src/org/apache/cloudstack/platform/service/api/JobsManagementService.java
+++ /dev/null
@@ -1,35 +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.service.api;
-
-import java.util.List;
-
-import com.cloud.async.AsyncJob;
-
-public interface JobsManagementService {
-    List<AsyncJob> listJobs();
-
-    List<AsyncJob> listJobsInProgress();
-
-    List<AsyncJob> listJobsCompleted(Long from);
-
-    List<AsyncJob> listJobsInWaiting();
-
-    void cancelJob(String job);
-}

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2a4872eb/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
b/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
index 09edd9f..13133e2 100755
--- a/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
+++ b/platform/api/src/org/apache/cloudstack/platform/service/api/OrchestrationService.java
@@ -24,6 +24,7 @@ import java.util.Map;
 
 import com.cloud.exception.InsufficientCapacityException;
 import com.cloud.hypervisor.Hypervisor;
+import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.vm.VirtualMachine;
 
 public interface OrchestrationService {
@@ -102,10 +103,6 @@ public interface OrchestrationService {
 
     void joinNetwork(String network1, String network2);
 
-    void attachNetwork(String network, String vm);
-
-    void detachNetwork(String network, String vm);
-
     void attachVolume(String vm, String vol);
 
     void createNetwork();
@@ -114,13 +111,5 @@ public interface OrchestrationService {
 
     void createVolume();
 
-    void destroyVolume();
-
-    void snapshotVirtualMachine(String vm);
-
-    void snapshotVolume(String volume);
-
-    void backup(String snapshot);
-
     void registerTemplate(String name, URL path, String os, Hypervisor hypervisor);
 }


Mime
View raw message