1616// under the License.
1717package com .cloud .network .element ;
1818
19- import java .util .List ;
2019import java .util .Map ;
2120import java .util .Set ;
2221
4140 * Represents one network element that exists in a network.
4241 */
4342public 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
0 commit comments