mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Submit Midokura SDN controller stubs
This commit is contained in:
		
							parent
							
								
									2c9e9eef0a
								
							
						
					
					
						commit
						ce12d0d70d
					
				| @ -121,6 +121,7 @@ public interface Network extends ControlledEntity { | ||||
|         public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false); | ||||
|         public static final Provider None = new Provider("None", false); | ||||
|         public static final Provider NiciraNvp = new Provider("NiciraNvp", true); | ||||
|         public static final Provider MidokuraMidonet = new Provider("MidokuraMidonet", true); | ||||
| 
 | ||||
|         private String name; | ||||
|         private boolean isExternal; | ||||
|  | ||||
							
								
								
									
										0
									
								
								plugins/network-elements/midokura-midonet/build.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								plugins/network-elements/midokura-midonet/build.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,133 @@ | ||||
| /* | ||||
|  * 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 com.cloud.network.element; | ||||
| 
 | ||||
| import com.cloud.deploy.DeployDestination; | ||||
| import com.cloud.exception.ConcurrentOperationException; | ||||
| import com.cloud.exception.InsufficientCapacityException; | ||||
| import com.cloud.exception.ResourceUnavailableException; | ||||
| import com.cloud.network.Network; | ||||
| import com.cloud.network.Network.Capability; | ||||
| import com.cloud.network.Network.Provider; | ||||
| import com.cloud.network.Network.Service; | ||||
| import com.cloud.network.PhysicalNetworkServiceProvider; | ||||
| import com.cloud.offering.NetworkOffering; | ||||
| import com.cloud.utils.component.AdapterBase; | ||||
| import com.cloud.utils.component.PluggableService; | ||||
| import com.cloud.vm.NicProfile; | ||||
| import com.cloud.vm.ReservationContext; | ||||
| import com.cloud.vm.VirtualMachine; | ||||
| import com.cloud.vm.VirtualMachineProfile; | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import javax.ejb.Local; | ||||
| import java.util.Map; | ||||
| import java.util.Set; | ||||
| 
 | ||||
| /** | ||||
|  * User: tomoe | ||||
|  * Date: 8/8/12 | ||||
|  * Time: 1:38 PM | ||||
|  */ | ||||
| 
 | ||||
| @Local(value = NetworkElement.class) | ||||
| public class MidokuraMidonetElement extends AdapterBase implements ConnectivityProvider, PluggableService { | ||||
|     private static final Logger s_logger = Logger.getLogger(MidokuraMidonetElement.class); | ||||
| 
 | ||||
|     @Override | ||||
|     public Map<Service, Map<Capability, String>> getCapabilities() { | ||||
|         // TODO: implement this. | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public Provider getProvider() { | ||||
|         // TODO: implement this. | ||||
|         return null; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, | ||||
|                              ReservationContext context) | ||||
|             throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, | ||||
|                            DeployDestination dest, ReservationContext context) | ||||
|             throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, | ||||
|                            ReservationContext context) | ||||
|             throws ConcurrentOperationException, ResourceUnavailableException { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean shutdown(Network network, ReservationContext context, boolean cleanup) | ||||
|             throws ConcurrentOperationException, ResourceUnavailableException { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean isReady(PhysicalNetworkServiceProvider provider) { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) | ||||
|             throws ConcurrentOperationException, ResourceUnavailableException { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean canEnableIndividualServices() { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public boolean verifyServicesCombination(Set<Service> services) { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public String getPropertiesFile() { | ||||
|         // TODO: implement this. | ||||
|         return null; | ||||
|     } | ||||
| } | ||||
| @ -0,0 +1,46 @@ | ||||
| /* | ||||
|  * 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 com.cloud.network.guru; | ||||
| 
 | ||||
| import com.cloud.dc.DataCenter.NetworkType; | ||||
| import com.cloud.network.PhysicalNetwork; | ||||
| import com.cloud.offering.NetworkOffering; | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import javax.ejb.Local; | ||||
| 
 | ||||
| /** | ||||
|  * User: tomoe | ||||
|  * Date: 8/8/12 | ||||
|  * Time: 10:46 AM | ||||
|  */ | ||||
| 
 | ||||
| @Local(value = NetworkGuru.class) | ||||
| public class MidokuraMidonetGuestNetworkGuru extends GuestNetworkGuru { | ||||
|     private static final Logger s_logger = Logger.getLogger(MidokuraMidonetGuestNetworkGuru.class); | ||||
| 
 | ||||
| 
 | ||||
|     @Override | ||||
|     protected boolean canHandle(NetworkOffering offering, NetworkType networkType, | ||||
|                                 PhysicalNetwork physicalNetwork) { | ||||
|         // TODO: implement this. | ||||
|         return false; | ||||
|     } | ||||
| } | ||||
| @ -40,8 +40,8 @@ public interface ExternalNetworkDeviceManager extends Manager { | ||||
|         public static final NetworkDevice F5BigIpLoadBalancer = new NetworkDevice("F5BigIpLoadBalancer", Network.Provider.F5BigIp.getName()); | ||||
|         public static final NetworkDevice JuniperSRXFirewall = new NetworkDevice("JuniperSRXFirewall", Network.Provider.JuniperSRX.getName()); | ||||
|         public static final NetworkDevice NiciraNvp = new NetworkDevice("NiciraNvp", Network.Provider.NiciraNvp.getName()); | ||||
|          | ||||
|          | ||||
|         public static final NetworkDevice MidokuraMidonet = new NetworkDevice("MidokuraMidonet", Network.Provider.MidokuraMidonet.getName()); | ||||
| 
 | ||||
|         public NetworkDevice(String deviceName, String ntwkServiceprovider) { | ||||
|             _name = deviceName; | ||||
|             _provider = ntwkServiceprovider; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user