mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
more changes
This commit is contained in:
parent
2307117a24
commit
87b3378cdc
@ -16,7 +16,6 @@
|
|||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.network.element;
|
package com.cloud.network.element;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@ -41,15 +40,15 @@ import com.cloud.vm.VirtualMachineProfile;
|
|||||||
* Represents one network element that exists in a network.
|
* Represents one network element that exists in a network.
|
||||||
*/
|
*/
|
||||||
public interface NetworkElement extends Adapter {
|
public interface NetworkElement extends Adapter {
|
||||||
|
|
||||||
Map<Service, Map<Capability, String>> getCapabilities();
|
Map<Service, Map<Capability, String>> getCapabilities();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* NOTE:
|
* 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.
|
* 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();
|
Provider getProvider();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implement the network configuration as specified.
|
* Implement the network configuration as specified.
|
||||||
* @param config fully specified network configuration.
|
* @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.
|
* @return true if network configuration is now usable; false if not; null if not handled by this element.
|
||||||
* @throws InsufficientNetworkCapacityException TODO
|
* @throws InsufficientNetworkCapacityException TODO
|
||||||
*/
|
*/
|
||||||
|
@Ipc(topic="implement")
|
||||||
boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
|
boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context)
|
||||||
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
|
throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Prepare for a nic to be added into this network.
|
* Prepare for a nic to be added into this network.
|
||||||
* @param network
|
* @param network
|
||||||
@ -75,7 +75,7 @@ public interface NetworkElement extends Adapter {
|
|||||||
boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
|
boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||||
DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
|
DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
|
||||||
ResourceUnavailableException, InsufficientCapacityException;
|
ResourceUnavailableException, InsufficientCapacityException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A nic is released from this network.
|
* A nic is released from this network.
|
||||||
* @param network
|
* @param network
|
||||||
@ -88,7 +88,7 @@ public interface NetworkElement extends Adapter {
|
|||||||
*/
|
*/
|
||||||
boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
|
boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm,
|
||||||
ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
|
ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The network is being shutdown.
|
* The network is being shutdown.
|
||||||
* @param network
|
* @param network
|
||||||
@ -100,7 +100,7 @@ public interface NetworkElement extends Adapter {
|
|||||||
*/
|
*/
|
||||||
boolean shutdown(Network network, ReservationContext context, boolean cleanup)
|
boolean shutdown(Network network, ReservationContext context, boolean cleanup)
|
||||||
throws ConcurrentOperationException, ResourceUnavailableException;
|
throws ConcurrentOperationException, ResourceUnavailableException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The network is being destroyed.
|
* The network is being destroyed.
|
||||||
* @param network
|
* @param network
|
||||||
@ -108,14 +108,14 @@ public interface NetworkElement extends Adapter {
|
|||||||
* @throws ConcurrentOperationException
|
* @throws ConcurrentOperationException
|
||||||
*/
|
*/
|
||||||
boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException;
|
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.
|
* Check if the instances of this Element are configured to be used on the physical network referred by this provider.
|
||||||
* @param provider
|
* @param provider
|
||||||
* @return boolean true/false
|
* @return boolean true/false
|
||||||
*/
|
*/
|
||||||
boolean isReady(PhysicalNetworkServiceProvider provider);
|
boolean isReady(PhysicalNetworkServiceProvider provider);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The network service provider is being shutdown. This should shutdown all instances of this element deployed for this provider.
|
* The network service provider is being shutdown. This should shutdown all instances of this element deployed for this provider.
|
||||||
* @param context
|
* @param context
|
||||||
@ -126,13 +126,13 @@ public interface NetworkElement extends Adapter {
|
|||||||
*/
|
*/
|
||||||
boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context)
|
boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context)
|
||||||
throws ConcurrentOperationException, ResourceUnavailableException;
|
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.
|
* 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
|
* @return true/false
|
||||||
*/
|
*/
|
||||||
boolean canEnableIndividualServices();
|
boolean canEnableIndividualServices();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Would return true if the service combination is supported by the provider
|
* Would return true if the service combination is supported by the provider
|
||||||
* @param services
|
* @param services
|
||||||
|
|||||||
@ -243,6 +243,8 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, S
|
|||||||
*/
|
*/
|
||||||
public long getTemplateId();
|
public long getTemplateId();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the guest OS ID
|
* returns the guest OS ID
|
||||||
*
|
*
|
||||||
@ -290,6 +292,6 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, S
|
|||||||
HypervisorType getHypervisorType();
|
HypervisorType getHypervisorType();
|
||||||
|
|
||||||
public Map<String, String> getDetails();
|
public Map<String, String> getDetails();
|
||||||
|
|
||||||
boolean canPlugNics();
|
boolean canPlugNics();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<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">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.cloud</groupId>
|
<groupId>org.apache</groupId>
|
||||||
<artifactId>cloudstack</artifactId>
|
<artifactId>cloudstack</artifactId>
|
||||||
<version>4.0.0-SNAPSHOT</version>
|
<version>4.0.0-SNAPSHOT</version>
|
||||||
<relativePath>../pom.xml</relativePath>
|
<relativePath>../pom.xml</relativePath>
|
||||||
|
|||||||
@ -4,14 +4,14 @@
|
|||||||
<artifactId>cloud-platform-api</artifactId>
|
<artifactId>cloud-platform-api</artifactId>
|
||||||
<name>Apache CloudStack platform API</name>
|
<name>Apache CloudStack platform API</name>
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>com.cloud</groupId>
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
<artifactId>cloud-parent</artifactId>
|
<artifactId>cloud-parent</artifactId>
|
||||||
<version>4.0.0-SNAPSHOT</version>
|
<version>${project.version}</version>
|
||||||
<relativePath>../../parent/pom.xml</relativePath>
|
<relativePath>../../parent/pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.cloud</groupId>
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
<artifactId>cloud-api</artifactId>
|
<artifactId>cloud-api</artifactId>
|
||||||
<version>${project.version}</version>
|
<version>${project.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|||||||
@ -31,7 +31,14 @@ import com.cloud.vm.VirtualMachine;
|
|||||||
* Platform.
|
* 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
|
* @return the list of tags associated with the virtual machine
|
||||||
|
|||||||
@ -18,8 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
package org.apache.cloudstack.compute;
|
package org.apache.cloudstack.compute;
|
||||||
|
|
||||||
import org.apache.cloudstack.framework.ipc.Ipc;
|
import java.util.logging.Handler;
|
||||||
import org.apache.cloudstack.framework.ipc.IpcParam;
|
|
||||||
|
|
||||||
public interface ComputeOrchestrator {
|
public interface ComputeOrchestrator {
|
||||||
/**
|
/**
|
||||||
@ -27,7 +26,8 @@ public interface ComputeOrchestrator {
|
|||||||
* @param vm vm
|
* @param vm vm
|
||||||
* @param reservationId
|
* @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")
|
@Ipc(topic="cs.compute.cancel")
|
||||||
void cancel(@IpcParam String reservationId);
|
void cancel(@IpcParam String reservationId);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user