Skip to content

Commit 87b3378

Browse files
author
Alex Huang
committed
more changes
1 parent 2307117 commit 87b3378

6 files changed

Lines changed: 30 additions & 21 deletions

File tree

‎api/src/com/cloud/network/element/NetworkElement.java‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
// under the License.
1717
package com.cloud.network.element;
1818

19-
import java.util.List;
2019
import java.util.Map;
2120
import java.util.Set;
2221

@@ -41,25 +40,26 @@
4140
* Represents one network element that exists in a network.
4241
*/
4342
public interface NetworkElement extends Adapter {
44-
43+
4544
Map<Service, Map<Capability, String>> getCapabilities();
46-
45+
4746
/**
4847
* NOTE:
4948
* NetworkElement -> Network.Provider is a one-to-one mapping. While adding a new NetworkElement, one must add a new Provider name to Network.Provider.
5049
*/
5150
Provider getProvider();
52-
51+
5352
/**
5453
* Implement the network configuration as specified.
5554
* @param config fully specified network configuration.
5655
* @param offering network offering that originated the network configuration.
5756
* @return true if network configuration is now usable; false if not; null if not handled by this element.
5857
* @throws InsufficientNetworkCapacityException TODO
5958
*/
59+
@Ipc(topic="implement")
6060
boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
6161
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
62-
62+
6363
/**
6464
* Prepare for a nic to be added into this network.
6565
* @param network
@@ -75,7 +75,7 @@ boolean implement(Network network, NetworkOffering offering, DeployDestination d
7575
boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
7676
DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
7777
ResourceUnavailableException, InsufficientCapacityException;
78-
78+
7979
/**
8080
* A nic is released from this network.
8181
* @param network
@@ -88,7 +88,7 @@ boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends
8888
*/
8989
boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
9090
ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
91-
91+
9292
/**
9393
* The network is being shutdown.
9494
* @param network
@@ -100,22 +100,22 @@ boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends
100100
*/
101101
boolean shutdown(Network network, ReservationContext context, boolean cleanup)
102102
throws ConcurrentOperationException, ResourceUnavailableException;
103-
103+
104104
/**
105105
* The network is being destroyed.
106106
* @param network
107107
* @return
108108
* @throws ConcurrentOperationException
109109
*/
110110
boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException;
111-
111+
112112
/**
113113
* Check if the instances of this Element are configured to be used on the physical network referred by this provider.
114114
* @param provider
115115
* @return boolean true/false
116116
*/
117117
boolean isReady(PhysicalNetworkServiceProvider provider);
118-
118+
119119
/**
120120
* The network service provider is being shutdown. This should shutdown all instances of this element deployed for this provider.
121121
* @param context
@@ -126,13 +126,13 @@ boolean shutdown(Network network, ReservationContext context, boolean cleanup)
126126
*/
127127
boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context)
128128
throws ConcurrentOperationException, ResourceUnavailableException;
129-
129+
130130
/**
131131
* 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.
132132
* @return true/false
133133
*/
134134
boolean canEnableIndividualServices();
135-
135+
136136
/**
137137
* Would return true if the service combination is supported by the provider
138138
* @param services

‎api/src/com/cloud/vm/VirtualMachine.java‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ public static boolean isSystemVM(VirtualMachine.Type vmtype) {
243243
*/
244244
public long getTemplateId();
245245

246+
247+
246248
/**
247249
* returns the guest OS ID
248250
*
@@ -290,6 +292,6 @@ public static boolean isSystemVM(VirtualMachine.Type vmtype) {
290292
HypervisorType getHypervisorType();
291293

292294
public Map<String, String> getDetails();
293-
295+
294296
boolean canPlugNics();
295297
}

‎parent/pom.xml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
2121
<parent>
22-
<groupId>com.cloud</groupId>
22+
<groupId>org.apache</groupId>
2323
<artifactId>cloudstack</artifactId>
2424
<version>4.0.0-SNAPSHOT</version>
2525
<relativePath>../pom.xml</relativePath>

‎platform/api/pom.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
<artifactId>cloud-platform-api</artifactId>
55
<name>Apache CloudStack platform API</name>
66
<parent>
7-
<groupId>com.cloud</groupId>
7+
<groupId>org.apache.cloudstack</groupId>
88
<artifactId>cloud-parent</artifactId>
9-
<version>4.0.0-SNAPSHOT</version>
9+
<version>${project.version}</version>
1010
<relativePath>../../parent/pom.xml</relativePath>
1111
</parent>
1212
<dependencies>
1313
<dependency>
14-
<groupId>com.cloud</groupId>
14+
<groupId>org.apache.cloudstack</groupId>
1515
<artifactId>cloud-api</artifactId>
1616
<version>${project.version}</version>
1717
</dependency>

‎platform/api/src/org/apache/cloudstack/platform/cloud/entity/api/VirtualMachineEntity.java‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,14 @@
3131
* Platform.
3232
*
3333
*/
34-
public interface VirtualMachineEntity extends CloudEntity, VirtualMachine {
34+
public interface VirtualMachineEntity extends VirtualMachine, CloudEntity {
35+
36+
37+
List<VolumeEntity> getVolumes();
38+
39+
List<NicEntity> getNics();
40+
41+
TemplateEntity getTemplate();
3542

3643
/**
3744
* @return the list of tags associated with the virtual machine

‎platform/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
*/
1919
package org.apache.cloudstack.compute;
2020

21-
import org.apache.cloudstack.framework.ipc.Ipc;
22-
import org.apache.cloudstack.framework.ipc.IpcParam;
21+
import java.util.logging.Handler;
2322

2423
public interface ComputeOrchestrator {
2524
/**
2625
* start the vm
2726
* @param vm vm
2827
* @param reservationId
2928
*/
30-
void start(@IpcParam String vm, @IpcParam String reservationId);
29+
@Ipc(topic="cs.compute.start", response="cs.compute.start.response")
30+
void start(@IpcParam String vm, @IpcParam String reservationId, Handler handler);
3131

3232
@Ipc(topic="cs.compute.cancel")
3333
void cancel(@IpcParam String reservationId);

0 commit comments

Comments
 (0)