Removed some useless methods

This commit is contained in:
Alex Huang 2011-11-01 16:57:22 -07:00
parent 9560e92015
commit da78937d30
3 changed files with 11 additions and 13 deletions

View File

@ -37,10 +37,13 @@ import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile;
/**
* NetworkGuru takes a network offering requested and figures
* out the correct network configuration needed to add
* to the account in order to support this network.
*
* NetworkGuru has the following functionalities
* - Issues the ip address for the network that it is responsible for.
* - Designs a virtual network depending on the network offering.
* - Implements the virtual network when a virtual machine requires the network to be started.
*
* NetworkManager is responsible for figuring which NetworkGuru to use when
* networks are created and nics are designed.
*/
public interface NetworkGuru extends Adapter {
/**

View File

@ -33,15 +33,13 @@ import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service;
import com.cloud.network.Networks.TrafficType;
import com.cloud.network.addr.PublicIp;
import com.cloud.network.dao.PhysicalNetworkServiceProviderVO;
import com.cloud.network.element.UserDataServiceProvider;
import com.cloud.network.element.RemoteAccessVPNServiceProvider;
import com.cloud.network.element.UserDataServiceProvider;
import com.cloud.network.guru.NetworkGuru;
import com.cloud.network.rules.FirewallRule;
import com.cloud.network.rules.StaticNat;
import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.user.Account;
import com.cloud.user.AccountVO;
import com.cloud.utils.Pair;
import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile;
@ -131,10 +129,6 @@ public interface NetworkManager extends NetworkService {
List<NicProfile> getNicProfiles(VirtualMachine vm);
AccountVO getNetworkOwner(long configurationId);
List<NetworkVO> getNetworksforOffering(long offeringId, long dataCenterId, long accountId);
String getNextAvailableMacAddressInNetwork(long networkConfigurationId) throws InsufficientAddressCapacityException;
boolean applyRules(List<? extends FirewallRule> rules, boolean continueOnError) throws ResourceUnavailableException;

View File

@ -1559,7 +1559,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
return releasePublicIpAddress(ipAddressId, userId, caller);
}
@Override
@Deprecated // No one is using this method.
public AccountVO getNetworkOwner(long networkId) {
SearchCriteria<AccountVO> sc = AccountsUsingNetworkSearch.create();
sc.setJoinParameters("nc", "config", networkId);
@ -1568,7 +1568,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
return accounts.size() != 0 ? accounts.get(0) : null;
}
@Override
@Deprecated // No one is using this method.
public List<NetworkVO> getNetworksforOffering(long offeringId, long dataCenterId, long accountId) {
return _networksDao.getNetworksForOffering(offeringId, dataCenterId, accountId);
}
@ -4339,6 +4339,7 @@ public class NetworkManagerImpl implements NetworkManager, NetworkService, Manag
}
@Override
@ActionEvent(eventType = EventTypes.EVENT_TRAFFIC_TYPE_CREATE, eventDescription = "Creating Physical Network TrafficType", async = true)
public PhysicalNetworkTrafficType getPhysicalNetworkTrafficType(Long id){
return _pNTrafficTypeDao.findById(id);