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/09/12 02:38:57 UTC
[1/50] [abbrv] git commit: more changes
Updated Branches:
refs/heads/javelin a1bd6d7eb -> 87b3378cd
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/87b3378c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/87b3378c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/87b3378c
Branch: refs/heads/javelin
Commit: 87b3378cdcd94861763050969d1d65ad646a394e
Parents: 2307117
Author: Alex Huang <al...@citrix.com>
Authored: Tue Sep 11 17:27:48 2012 -0700
Committer: Alex Huang <al...@citrix.com>
Committed: Tue Sep 11 17:38:32 2012 -0700
----------------------------------------------------------------------
.../com/cloud/network/element/NetworkElement.java | 24 +++++++-------
api/src/com/cloud/vm/VirtualMachine.java | 4 ++-
parent/pom.xml | 2 +-
platform/api/pom.xml | 6 ++--
.../cloud/entity/api/VirtualMachineEntity.java | 9 +++++-
.../cloudstack/compute/ComputeOrchestrator.java | 6 ++--
6 files changed, 30 insertions(+), 21 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/87b3378c/api/src/com/cloud/network/element/NetworkElement.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/element/NetworkElement.java b/api/src/com/cloud/network/element/NetworkElement.java
index ec8e7bc..23d909c 100644
--- a/api/src/com/cloud/network/element/NetworkElement.java
+++ b/api/src/com/cloud/network/element/NetworkElement.java
@@ -16,7 +16,6 @@
// under the License.
package com.cloud.network.element;
-import java.util.List;
import java.util.Map;
import java.util.Set;
@@ -41,15 +40,15 @@ import com.cloud.vm.VirtualMachineProfile;
* Represents one network element that exists in a network.
*/
public interface NetworkElement extends Adapter {
-
+
Map<Service, Map<Capability, String>> getCapabilities();
-
+
/**
* NOTE:
* NetworkElement -> Network.Provider is a one-to-one mapping. While adding a new NetworkElement, one must add a new Provider name to Network.Provider.
*/
Provider getProvider();
-
+
/**
* Implement the network configuration as specified.
* @param config fully specified network configuration.
@@ -57,9 +56,10 @@ public interface NetworkElement extends Adapter {
* @return true if network configuration is now usable; false if not; null if not handled by this element.
* @throws InsufficientNetworkCapacityException TODO
*/
+ @Ipc(topic="implement")
boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
-
+
/**
* Prepare for a nic to be added into this network.
* @param network
@@ -75,7 +75,7 @@ public interface NetworkElement extends Adapter {
boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
ResourceUnavailableException, InsufficientCapacityException;
-
+
/**
* A nic is released from this network.
* @param network
@@ -88,7 +88,7 @@ public interface NetworkElement extends Adapter {
*/
boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
-
+
/**
* The network is being shutdown.
* @param network
@@ -100,7 +100,7 @@ public interface NetworkElement extends Adapter {
*/
boolean shutdown(Network network, ReservationContext context, boolean cleanup)
throws ConcurrentOperationException, ResourceUnavailableException;
-
+
/**
* The network is being destroyed.
* @param network
@@ -108,14 +108,14 @@ public interface NetworkElement extends Adapter {
* @throws ConcurrentOperationException
*/
boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException;
-
+
/**
* Check if the instances of this Element are configured to be used on the physical network referred by this provider.
* @param provider
* @return boolean true/false
*/
boolean isReady(PhysicalNetworkServiceProvider provider);
-
+
/**
* The network service provider is being shutdown. This should shutdown all instances of this element deployed for this provider.
* @param context
@@ -126,13 +126,13 @@ public interface NetworkElement extends Adapter {
*/
boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context)
throws ConcurrentOperationException, ResourceUnavailableException;
-
+
/**
* This should return true if out of multiple services provided by this element, only some can be enabled. If all the services MUST be provided, this should return false.
* @return true/false
*/
boolean canEnableIndividualServices();
-
+
/**
* Would return true if the service combination is supported by the provider
* @param services
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/87b3378c/api/src/com/cloud/vm/VirtualMachine.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/vm/VirtualMachine.java b/api/src/com/cloud/vm/VirtualMachine.java
index 1fa16c3..9214fa4 100755
--- a/api/src/com/cloud/vm/VirtualMachine.java
+++ b/api/src/com/cloud/vm/VirtualMachine.java
@@ -243,6 +243,8 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, S
*/
public long getTemplateId();
+
+
/**
* returns the guest OS ID
*
@@ -290,6 +292,6 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, S
HypervisorType getHypervisorType();
public Map<String, String> getDetails();
-
+
boolean canPlugNics();
}
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/87b3378c/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 9564572..94ff236 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -19,7 +19,7 @@
<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/maven-v4_0_0.xsd">
<parent>
- <groupId>com.cloud</groupId>
+ <groupId>org.apache</groupId>
<artifactId>cloudstack</artifactId>
<version>4.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/87b3378c/platform/api/pom.xml
----------------------------------------------------------------------
diff --git a/platform/api/pom.xml b/platform/api/pom.xml
index fadb9af..cfabe3b 100644
--- a/platform/api/pom.xml
+++ b/platform/api/pom.xml
@@ -4,14 +4,14 @@
<artifactId>cloud-platform-api</artifactId>
<name>Apache CloudStack platform API</name>
<parent>
- <groupId>com.cloud</groupId>
+ <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-parent</artifactId>
- <version>4.0.0-SNAPSHOT</version>
+ <version>${project.version}</version>
<relativePath>../../parent/pom.xml</relativePath>
</parent>
<dependencies>
<dependency>
- <groupId>com.cloud</groupId>
+ <groupId>org.apache.cloudstack</groupId>
<artifactId>cloud-api</artifactId>
<version>${project.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/87b3378c/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VirtualMachineEntity.java
----------------------------------------------------------------------
diff --git a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VirtualMachineEntity.java b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VirtualMachineEntity.java
index 75fdaee..23d1dad 100755
--- a/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VirtualMachineEntity.java
+++ b/platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VirtualMachineEntity.java
@@ -31,7 +31,14 @@ import com.cloud.vm.VirtualMachine;
* Platform.
*
*/
-public interface VirtualMachineEntity extends CloudEntity, VirtualMachine {
+public interface VirtualMachineEntity extends VirtualMachine, CloudEntity {
+
+
+ List<VolumeEntity> getVolumes();
+
+ List<NicEntity> getNics();
+
+ TemplateEntity getTemplate();
/**
* @return the list of tags associated with the virtual machine
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/87b3378c/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
index 1018f96..8c1c91b 100755
--- a/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
+++ b/platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java
@@ -18,8 +18,7 @@
*/
package org.apache.cloudstack.compute;
-import org.apache.cloudstack.framework.ipc.Ipc;
-import org.apache.cloudstack.framework.ipc.IpcParam;
+import java.util.logging.Handler;
public interface ComputeOrchestrator {
/**
@@ -27,7 +26,8 @@ public interface ComputeOrchestrator {
* @param vm vm
* @param reservationId
*/
- void start(@IpcParam String vm, @IpcParam String 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);