|
| 1 | +/* |
| 2 | + * Licensed to the Apache Software Foundation (ASF) under one |
| 3 | + * or more contributor license agreements. See the NOTICE file |
| 4 | + * distributed with this work for additional information |
| 5 | + * regarding copyright ownership. The ASF licenses this file |
| 6 | + * to you under the Apache License, Version 2.0 (the |
| 7 | + * "License"); you may not use this file except in compliance |
| 8 | + * with the License. You may obtain a copy of the License at |
| 9 | + * |
| 10 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | + * |
| 12 | + * Unless required by applicable law or agreed to in writing, |
| 13 | + * software distributed under the License is distributed on an |
| 14 | + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 15 | + * KIND, either express or implied. See the License for the |
| 16 | + * specific language governing permissions and limitations |
| 17 | + * under the License. |
| 18 | + */ |
| 19 | + |
| 20 | +package com.cloud.network.element; |
| 21 | + |
| 22 | +import com.cloud.deploy.DeployDestination; |
| 23 | +import com.cloud.exception.ConcurrentOperationException; |
| 24 | +import com.cloud.exception.InsufficientCapacityException; |
| 25 | +import com.cloud.exception.ResourceUnavailableException; |
| 26 | +import com.cloud.network.Network; |
| 27 | +import com.cloud.network.Network.Capability; |
| 28 | +import com.cloud.network.Network.Provider; |
| 29 | +import com.cloud.network.Network.Service; |
| 30 | +import com.cloud.network.PhysicalNetworkServiceProvider; |
| 31 | +import com.cloud.offering.NetworkOffering; |
| 32 | +import com.cloud.utils.component.AdapterBase; |
| 33 | +import com.cloud.utils.component.PluggableService; |
| 34 | +import com.cloud.vm.NicProfile; |
| 35 | +import com.cloud.vm.ReservationContext; |
| 36 | +import com.cloud.vm.VirtualMachine; |
| 37 | +import com.cloud.vm.VirtualMachineProfile; |
| 38 | +import org.apache.log4j.Logger; |
| 39 | + |
| 40 | +import javax.ejb.Local; |
| 41 | +import java.util.Map; |
| 42 | +import java.util.Set; |
| 43 | + |
| 44 | +/** |
| 45 | + * User: tomoe |
| 46 | + * Date: 8/8/12 |
| 47 | + * Time: 1:38 PM |
| 48 | + */ |
| 49 | + |
| 50 | +@Local(value = NetworkElement.class) |
| 51 | +public class MidokuraMidonetElement extends AdapterBase implements ConnectivityProvider, PluggableService { |
| 52 | + private static final Logger s_logger = Logger.getLogger(MidokuraMidonetElement.class); |
| 53 | + |
| 54 | + @Override |
| 55 | + public Map<Service, Map<Capability, String>> getCapabilities() { |
| 56 | + // TODO: implement this. |
| 57 | + return null; |
| 58 | + } |
| 59 | + |
| 60 | + @Override |
| 61 | + public Provider getProvider() { |
| 62 | + // TODO: implement this. |
| 63 | + return null; |
| 64 | + } |
| 65 | + |
| 66 | + @Override |
| 67 | + public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, |
| 68 | + ReservationContext context) |
| 69 | + throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { |
| 70 | + // TODO: implement this. |
| 71 | + return false; |
| 72 | + } |
| 73 | + |
| 74 | + @Override |
| 75 | + public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, |
| 76 | + DeployDestination dest, ReservationContext context) |
| 77 | + throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { |
| 78 | + // TODO: implement this. |
| 79 | + return false; |
| 80 | + } |
| 81 | + |
| 82 | + @Override |
| 83 | + public boolean release(Network network, NicProfile nic, VirtualMachineProfile<? extends VirtualMachine> vm, |
| 84 | + ReservationContext context) |
| 85 | + throws ConcurrentOperationException, ResourceUnavailableException { |
| 86 | + // TODO: implement this. |
| 87 | + return false; |
| 88 | + } |
| 89 | + |
| 90 | + @Override |
| 91 | + public boolean shutdown(Network network, ReservationContext context, boolean cleanup) |
| 92 | + throws ConcurrentOperationException, ResourceUnavailableException { |
| 93 | + // TODO: implement this. |
| 94 | + return false; |
| 95 | + } |
| 96 | + |
| 97 | + @Override |
| 98 | + public boolean destroy(Network network) throws ConcurrentOperationException, ResourceUnavailableException { |
| 99 | + // TODO: implement this. |
| 100 | + return false; |
| 101 | + } |
| 102 | + |
| 103 | + @Override |
| 104 | + public boolean isReady(PhysicalNetworkServiceProvider provider) { |
| 105 | + // TODO: implement this. |
| 106 | + return false; |
| 107 | + } |
| 108 | + |
| 109 | + @Override |
| 110 | + public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) |
| 111 | + throws ConcurrentOperationException, ResourceUnavailableException { |
| 112 | + // TODO: implement this. |
| 113 | + return false; |
| 114 | + } |
| 115 | + |
| 116 | + @Override |
| 117 | + public boolean canEnableIndividualServices() { |
| 118 | + // TODO: implement this. |
| 119 | + return false; |
| 120 | + } |
| 121 | + |
| 122 | + @Override |
| 123 | + public boolean verifyServicesCombination(Set<Service> services) { |
| 124 | + // TODO: implement this. |
| 125 | + return false; |
| 126 | + } |
| 127 | + |
| 128 | + @Override |
| 129 | + public String getPropertiesFile() { |
| 130 | + // TODO: implement this. |
| 131 | + return null; |
| 132 | + } |
| 133 | +} |
0 commit comments