Removed missing class from application context

This commit is contained in:
Alex Huang 2013-08-16 10:42:14 -07:00
parent 9f62df580e
commit f23f1530e7
5 changed files with 117 additions and 128 deletions

View File

@ -61,8 +61,8 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public static final Service Connectivity = new Service("Connectivity"); public static final Service Connectivity = new Service("Connectivity");
private String name; private final String name;
private Capability[] caps; private final Capability[] caps;
public Service(String name, Capability... caps) { public Service(String name, Capability... caps) {
this.name = name; this.name = name;
@ -123,13 +123,13 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public static final Provider SecurityGroupProvider = new Provider("SecurityGroupProvider", false); public static final Provider SecurityGroupProvider = new Provider("SecurityGroupProvider", false);
public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false); public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false);
public static final Provider None = new Provider("None", false); public static final Provider None = new Provider("None", false);
// NiciraNvp is not an "External" provider, otherwise we get in trouble with NetworkServiceImpl.providersConfiguredForExternalNetworking // NiciraNvp is not an "External" provider, otherwise we get in trouble with NetworkServiceImpl.providersConfiguredForExternalNetworking
public static final Provider NiciraNvp = new Provider("NiciraNvp", false); public static final Provider NiciraNvp = new Provider("NiciraNvp", false);
public static final Provider InternalLbVm = new Provider("InternalLbVm", false); public static final Provider InternalLbVm = new Provider("InternalLbVm", false);
public static final Provider CiscoVnmc = new Provider("CiscoVnmc", true); public static final Provider CiscoVnmc = new Provider("CiscoVnmc", true);
private String name; private final String name;
private boolean isExternal; private final boolean isExternal;
public Provider(String name, boolean isExternal) { public Provider(String name, boolean isExternal) {
this.name = name; this.name = name;
@ -182,7 +182,7 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public static final Capability LbSchemes = new Capability("LbSchemes"); public static final Capability LbSchemes = new Capability("LbSchemes");
public static final Capability DhcpAccrossMultipleSubnets = new Capability("DhcpAccrossMultipleSubnets"); public static final Capability DhcpAccrossMultipleSubnets = new Capability("DhcpAccrossMultipleSubnets");
private String name; private final String name;
public Capability(String name) { public Capability(String name) {
this.name = name; this.name = name;
@ -247,8 +247,8 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
private String ip6Address; private String ip6Address;
public IpAddresses(String ip4Address, String ip6Address) { public IpAddresses(String ip4Address, String ip6Address) {
this.setIp4Address(ip4Address); setIp4Address(ip4Address);
this.setIp6Address(ip6Address); setIp6Address(ip6Address);
} }
public String getIp4Address() { public String getIp4Address() {
@ -297,6 +297,7 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
long getNetworkOfferingId(); long getNetworkOfferingId();
@Override
State getState(); State getState();
long getRelated(); long getRelated();
@ -325,6 +326,8 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
boolean getDisplayNetwork(); boolean getDisplayNetwork();
String getGuruName();
/** /**
* @return * @return
*/ */

View File

@ -23,68 +23,70 @@ import com.cloud.network.Networks.Mode;
import com.cloud.network.Networks.TrafficType; import com.cloud.network.Networks.TrafficType;
public class NetworkProfile implements Network { public class NetworkProfile implements Network {
private long id; private final long id;
private String uuid; private final String uuid;
private long dataCenterId; private final long dataCenterId;
private long ownerId; private final long ownerId;
private long domainId; private final long domainId;
private String dns1; private String dns1;
private String dns2; private String dns2;
private URI broadcastUri; private URI broadcastUri;
private State state; private final State state;
private String name; private final String name;
private Mode mode; private final Mode mode;
private BroadcastDomainType broadcastDomainType; private final BroadcastDomainType broadcastDomainType;
private TrafficType trafficType; private TrafficType trafficType;
private String gateway; private final String gateway;
private String cidr; private final String cidr;
private String networkCidr; private final String networkCidr;
private String ip6Gateway; private final String ip6Gateway;
private String ip6Cidr; private final String ip6Cidr;
private long networkOfferingId; private final long networkOfferingId;
private long related; private final long related;
private String displayText; private final String displayText;
private String reservationId; private final String reservationId;
private String networkDomain; private final String networkDomain;
private Network.GuestType guestType; private final Network.GuestType guestType;
private Long physicalNetworkId; private Long physicalNetworkId;
private ACLType aclType; private final ACLType aclType;
private boolean restartRequired; private final boolean restartRequired;
private boolean specifyIpRanges; private final boolean specifyIpRanges;
private Long vpcId; private final Long vpcId;
private boolean displayNetwork; private final boolean displayNetwork;
private Long networkAclId; private Long networkAclId;
private final String guruName;
public NetworkProfile(Network network) { public NetworkProfile(Network network) {
this.id = network.getId(); id = network.getId();
this.uuid = network.getUuid(); uuid = network.getUuid();
this.broadcastUri = network.getBroadcastUri(); broadcastUri = network.getBroadcastUri();
this.dataCenterId = network.getDataCenterId(); dataCenterId = network.getDataCenterId();
this.ownerId = network.getAccountId(); ownerId = network.getAccountId();
this.state = network.getState(); state = network.getState();
this.name = network.getName(); name = network.getName();
this.mode = network.getMode(); mode = network.getMode();
this.broadcastDomainType = network.getBroadcastDomainType(); broadcastDomainType = network.getBroadcastDomainType();
this.trafficType = network.getTrafficType(); trafficType = network.getTrafficType();
this.gateway = network.getGateway(); gateway = network.getGateway();
this.cidr = network.getCidr(); cidr = network.getCidr();
this.networkCidr = network.getNetworkCidr(); networkCidr = network.getNetworkCidr();
this.ip6Gateway = network.getIp6Gateway(); ip6Gateway = network.getIp6Gateway();
this.ip6Cidr = network.getIp6Cidr(); ip6Cidr = network.getIp6Cidr();
this.networkOfferingId = network.getNetworkOfferingId(); networkOfferingId = network.getNetworkOfferingId();
this.related = network.getRelated(); related = network.getRelated();
this.displayText = network.getDisplayText(); displayText = network.getDisplayText();
this.reservationId = network.getReservationId(); reservationId = network.getReservationId();
this.networkDomain = network.getNetworkDomain(); networkDomain = network.getNetworkDomain();
this.domainId = network.getDomainId(); domainId = network.getDomainId();
this.guestType = network.getGuestType(); guestType = network.getGuestType();
this.physicalNetworkId = network.getPhysicalNetworkId(); physicalNetworkId = network.getPhysicalNetworkId();
this.aclType = network.getAclType(); aclType = network.getAclType();
this.restartRequired = network.isRestartRequired(); restartRequired = network.isRestartRequired();
this.specifyIpRanges = network.getSpecifyIpRanges(); specifyIpRanges = network.getSpecifyIpRanges();
this.vpcId = network.getVpcId(); vpcId = network.getVpcId();
this.displayNetwork = network.getDisplayNetwork(); displayNetwork = network.getDisplayNetwork();
this.networkAclId = network.getNetworkACLId(); networkAclId = network.getNetworkACLId();
guruName = network.getGuruName();
} }
public String getDns1() { public String getDns1() {
@ -103,6 +105,11 @@ public class NetworkProfile implements Network {
this.dns2 = dns2; this.dns2 = dns2;
} }
@Override
public String getGuruName() {
return guruName;
}
public void setBroadcastUri(URI broadcastUri) { public void setBroadcastUri(URI broadcastUri) {
this.broadcastUri = broadcastUri; this.broadcastUri = broadcastUri;
} }
@ -252,12 +259,12 @@ public class NetworkProfile implements Network {
@Override @Override
public void setNetworkACLId(Long networkACLId) { public void setNetworkACLId(Long networkACLId) {
this.networkAclId = networkACLId; networkAclId = networkACLId;
} }
@Override @Override
public void setTrafficType(TrafficType type) { public void setTrafficType(TrafficType type) {
this.trafficType = type; trafficType = type;
} }
@Override @Override

View File

@ -848,7 +848,6 @@
<bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl" /> <bean id="storagePoolAutomationImpl" class="com.cloud.storage.StoragePoolAutomationImpl" />
<bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" /> <bean id="usageEventUtils" class="com.cloud.event.UsageEventUtils" />
<bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" /> <bean id="vMEntityManagerImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VMEntityManagerImpl" />
<bean id="virtualMachineEntityFactory" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityFactory" />
<bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" /> <bean id="virtualMachineEntityImpl" class="org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl" />
<bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" /> <bean id="virtualMachineRestService" class="org.apache.cloudstack.engine.rest.service.api.VirtualMachineRestService" />
<bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" /> <bean id="volumeRestService" class="org.apache.cloudstack.engine.rest.service.api.VolumeRestService" />

View File

@ -33,7 +33,6 @@ import com.cloud.exception.ResourceAllocationException;
import com.cloud.exception.ResourceUnavailableException; import com.cloud.exception.ResourceUnavailableException;
import com.cloud.network.Network.Provider; import com.cloud.network.Network.Provider;
import com.cloud.network.Network.Service; import com.cloud.network.Network.Service;
import com.cloud.network.dao.NetworkVO;
import com.cloud.network.element.DhcpServiceProvider; import com.cloud.network.element.DhcpServiceProvider;
import com.cloud.network.element.LoadBalancingServiceProvider; import com.cloud.network.element.LoadBalancingServiceProvider;
import com.cloud.network.element.StaticNatServiceProvider; import com.cloud.network.element.StaticNatServiceProvider;
@ -41,13 +40,11 @@ import com.cloud.network.element.UserDataServiceProvider;
import com.cloud.network.guru.NetworkGuru; import com.cloud.network.guru.NetworkGuru;
import com.cloud.network.rules.LoadBalancerContainer.Scheme; import com.cloud.network.rules.LoadBalancerContainer.Scheme;
import com.cloud.offering.NetworkOffering; import com.cloud.offering.NetworkOffering;
import com.cloud.offerings.NetworkOfferingVO;
import com.cloud.user.Account; import com.cloud.user.Account;
import com.cloud.user.User; import com.cloud.user.User;
import com.cloud.utils.Pair; import com.cloud.utils.Pair;
import com.cloud.vm.Nic; import com.cloud.vm.Nic;
import com.cloud.vm.NicProfile; import com.cloud.vm.NicProfile;
import com.cloud.vm.NicVO;
import com.cloud.vm.ReservationContext; import com.cloud.vm.ReservationContext;
import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.Type; import com.cloud.vm.VirtualMachine.Type;
@ -57,22 +54,20 @@ import com.cloud.vm.VirtualMachineProfile;
* NetworkManager manages the network for the different end users. * NetworkManager manages the network for the different end users.
* *
*/ */
public interface NetworkManager { public interface NetworkManager {
List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault)
throws ConcurrentOperationException;
List<NetworkVO> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, String displayText, boolean isDefault) List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, Network predefined, DeploymentPlan plan, String name, String displayText,
throws ConcurrentOperationException; boolean errorIfAlreadySetup, Long domainId, ACLType aclType, Boolean subdomainAccess, Long vpcId, Boolean isDisplayNetworkEnabled) throws ConcurrentOperationException;
List<NetworkVO> setupNetwork(Account owner, NetworkOffering offering, Network predefined, DeploymentPlan plan, String name, String displayText, boolean errorIfAlreadySetup, Long domainId,
ACLType aclType, Boolean subdomainAccess, Long vpcId, Boolean isDisplayNetworkEnabled) throws ConcurrentOperationException;
void allocate(VirtualMachineProfile vm, LinkedHashMap<? extends Network, ? extends NicProfile> networks) throws InsufficientCapacityException, ConcurrentOperationException; void allocate(VirtualMachineProfile vm, LinkedHashMap<? extends Network, ? extends NicProfile> networks) throws InsufficientCapacityException, ConcurrentOperationException;
void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) throws InsufficientCapacityException, ConcurrentOperationException, void prepare(VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) throws InsufficientCapacityException, ConcurrentOperationException,
ResourceUnavailableException; ResourceUnavailableException;
void release(VirtualMachineProfile vmProfile, boolean forced) throws void release(VirtualMachineProfile vmProfile, boolean forced) throws ConcurrentOperationException, ResourceUnavailableException;
ConcurrentOperationException, ResourceUnavailableException;
void cleanupNics(VirtualMachineProfile vm); void cleanupNics(VirtualMachineProfile vm);
@ -80,8 +75,8 @@ public interface NetworkManager {
List<NicProfile> getNicProfiles(VirtualMachine vm); List<NicProfile> getNicProfiles(VirtualMachine vm);
Pair<NetworkGuru, NetworkVO> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, Pair<? extends NetworkGuru, ? extends Network> implementNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException,
InsufficientCapacityException; ResourceUnavailableException, InsufficientCapacityException;
/** /**
* prepares vm nic change for migration * prepares vm nic change for migration
@ -116,17 +111,16 @@ public interface NetworkManager {
boolean destroyNetwork(long networkId, ReservationContext context); boolean destroyNetwork(long networkId, ReservationContext context);
Network createGuestNetwork(long networkOfferingId, String name, String displayText, String gateway, String cidr, Network createGuestNetwork(long networkOfferingId, String name, String displayText, String gateway, String cidr, String vlanId, String networkDomain, Account owner,
String vlanId, String networkDomain, Account owner, Long domainId, PhysicalNetwork physicalNetwork, Long domainId, PhysicalNetwork physicalNetwork, long zoneId, ACLType aclType, Boolean subdomainAccess, Long vpcId, String ip6Gateway, String ip6Cidr,
long zoneId, ACLType aclType, Boolean subdomainAccess, Long vpcId, String ip6Gateway, String ip6Cidr, Boolean displayNetworkEnabled, String isolatedPvlan) throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException;
Boolean displayNetworkEnabled, String isolatedPvlan)
throws ConcurrentOperationException, InsufficientCapacityException, ResourceAllocationException;
UserDataServiceProvider getPasswordResetProvider(Network network); UserDataServiceProvider getPasswordResetProvider(Network network);
UserDataServiceProvider getSSHKeyResetProvider(Network network); UserDataServiceProvider getSSHKeyResetProvider(Network network);
boolean startNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; boolean startNetwork(long networkId, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException,
InsufficientCapacityException;
boolean reallocate(VirtualMachineProfile vm, DataCenterDeployment dest) throws InsufficientCapacityException, ConcurrentOperationException; boolean reallocate(VirtualMachineProfile vm, DataCenterDeployment dest) throws InsufficientCapacityException, ConcurrentOperationException;
@ -141,10 +135,8 @@ public interface NetworkManager {
* @throws InsufficientAddressCapacityException * @throws InsufficientAddressCapacityException
* @throws ConcurrentOperationException * @throws ConcurrentOperationException
*/ */
Pair<NicProfile,Integer> allocateNic(NicProfile requested, Network network, Boolean isDefaultNic, int deviceId, Pair<NicProfile, Integer> allocateNic(NicProfile requested, Network network, Boolean isDefaultNic, int deviceId, VirtualMachineProfile vm)
VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapcityException, throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException;
InsufficientAddressCapacityException, ConcurrentOperationException;
/** /**
* @param vmProfile * @param vmProfile
@ -159,10 +151,9 @@ public interface NetworkManager {
* @throws InsufficientCapacityException * @throws InsufficientCapacityException
* @throws ResourceUnavailableException * @throws ResourceUnavailableException
*/ */
NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination dest, ReservationContext context, long nicId, Network network)
ReservationContext context, long nicId, NetworkVO network) throws InsufficientVirtualNetworkCapcityException, throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException; ResourceUnavailableException;
/** /**
* @param vm * @param vm
@ -170,7 +161,6 @@ public interface NetworkManager {
*/ */
void removeNic(VirtualMachineProfile vm, Nic nic); void removeNic(VirtualMachineProfile vm, Nic nic);
/** /**
* @param network * @param network
* @param provider * @param provider
@ -178,16 +168,13 @@ public interface NetworkManager {
*/ */
boolean setupDns(Network network, Provider provider); boolean setupDns(Network network, Provider provider);
/** /**
* @param vmProfile * @param vmProfile
* @param nic TODO * @param nic TODO
* @throws ConcurrentOperationException * @throws ConcurrentOperationException
* @throws ResourceUnavailableException * @throws ResourceUnavailableException
*/ */
void releaseNic(VirtualMachineProfile vmProfile, Nic nic) void releaseNic(VirtualMachineProfile vmProfile, Nic nic) throws ConcurrentOperationException, ResourceUnavailableException;
throws ConcurrentOperationException, ResourceUnavailableException;
/** /**
* @param network * @param network
@ -203,9 +190,8 @@ public interface NetworkManager {
* @throws ResourceUnavailableException * @throws ResourceUnavailableException
*/ */
NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare) NicProfile createNicForVm(Network network, NicProfile requested, ReservationContext context, VirtualMachineProfile vmProfile, boolean prepare)
throws InsufficientVirtualNetworkCapcityException, throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException,
InsufficientAddressCapacityException, ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException; ResourceUnavailableException;
NetworkProfile convertNetworkToNetworkProfile(long networkId); NetworkProfile convertNetworkToNetworkProfile(long networkId);
@ -213,28 +199,21 @@ public interface NetworkManager {
* @return * @return
*/ */
int getNetworkLockTimeout(); int getNetworkLockTimeout();
boolean restartNetwork(Long networkId, Account callerAccount, boolean restartNetwork(Long networkId, Account callerAccount, User callerUser, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException,
User callerUser, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; InsufficientCapacityException;
boolean shutdownNetworkElementsAndResources(ReservationContext context, boolean b, Network network);
boolean shutdownNetworkElementsAndResources(ReservationContext context, void implementNetworkElementsAndResources(DeployDestination dest, ReservationContext context, Network network, NetworkOffering findById) throws ConcurrentOperationException,
boolean b, NetworkVO network); InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException;
Map<String, String> finalizeServicesAndProvidersForNetwork(NetworkOffering offering, Long physicalNetworkId);
void implementNetworkElementsAndResources(DeployDestination dest,
ReservationContext context, NetworkVO network,
NetworkOfferingVO findById) throws ConcurrentOperationException, InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException;
Map<String, String> finalizeServicesAndProvidersForNetwork(NetworkOffering offering,
Long physicalNetworkId);
List<Provider> getProvidersForServiceInNetwork(Network network, Service service); List<Provider> getProvidersForServiceInNetwork(Network network, Service service);
StaticNatServiceProvider getStaticNatProviderForNetwork(Network network); StaticNatServiceProvider getStaticNatProviderForNetwork(Network network);
boolean isNetworkInlineMode(Network network); boolean isNetworkInlineMode(Network network);
LoadBalancingServiceProvider getLoadBalancingProviderForNetwork(Network network, Scheme lbScheme); LoadBalancingServiceProvider getLoadBalancingProviderForNetwork(Network network, Scheme lbScheme);
@ -242,9 +221,10 @@ public interface NetworkManager {
boolean isSecondaryIpSetForNic(long nicId); boolean isSecondaryIpSetForNic(long nicId);
List<? extends Nic> listVmNics(Long vmId, Long nicId); List<? extends Nic> listVmNics(Long vmId, Long nicId);
NicVO savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType); Nic savePlaceholderNic(Network network, String ip4Address, String ip6Address, Type vmType);
DhcpServiceProvider getDhcpServiceProvider(Network network); DhcpServiceProvider getDhcpServiceProvider(Network network);
void removeDhcpServiceInSubnet(NicVO nic);
void removeDhcpServiceInSubnet(Nic nic);
} }

View File

@ -611,7 +611,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
} }
@Override @Override
public List<NetworkVO> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name, public List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, DeploymentPlan plan, String name,
String displayText, boolean isDefault) String displayText, boolean isDefault)
throws ConcurrentOperationException { throws ConcurrentOperationException {
return setupNetwork(owner, offering, null, plan, name, displayText, false, null, null, null, null, true); return setupNetwork(owner, offering, null, plan, name, displayText, false, null, null, null, null, true);
@ -619,7 +619,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
@Override @Override
@DB @DB
public List<NetworkVO> setupNetwork(Account owner, NetworkOffering offering, Network predefined, DeploymentPlan public List<? extends Network> setupNetwork(Account owner, NetworkOffering offering, Network predefined, DeploymentPlan
plan, String name, String displayText, boolean errorIfAlreadySetup, Long domainId, plan, String name, String displayText, boolean errorIfAlreadySetup, Long domainId,
ACLType aclType, Boolean subdomainAccess, Long vpcId, Boolean isDisplayNetworkEnabled) throws ConcurrentOperationException { ACLType aclType, Boolean subdomainAccess, Long vpcId, Boolean isDisplayNetworkEnabled) throws ConcurrentOperationException {
@ -1024,7 +1024,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
@Override @Override
public void implementNetworkElementsAndResources(DeployDestination dest, ReservationContext context, public void implementNetworkElementsAndResources(DeployDestination dest, ReservationContext context,
NetworkVO network, NetworkOfferingVO offering) Network network, NetworkOffering offering)
throws ConcurrentOperationException, InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException { throws ConcurrentOperationException, InsufficientAddressCapacityException, ResourceUnavailableException, InsufficientCapacityException {
// Associate a source NAT IP (if one isn't already associated with the network) if this is a // Associate a source NAT IP (if one isn't already associated with the network) if this is a
@ -1093,7 +1093,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
} }
// This method re-programs the rules/ips for existing network // This method re-programs the rules/ips for existing network
protected boolean reprogramNetworkRules(long networkId, Account caller, NetworkVO network) throws ResourceUnavailableException { protected boolean reprogramNetworkRules(long networkId, Account caller, Network network) throws ResourceUnavailableException {
boolean success = true; boolean success = true;
// associate all ip addresses // associate all ip addresses
if (!_ipAddrMgr.applyIpAssociations(network, false)) { if (!_ipAddrMgr.applyIpAssociations(network, false)) {
@ -1176,7 +1176,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
return success; return success;
} }
protected boolean prepareElement(NetworkElement element, NetworkVO network, protected boolean prepareElement(NetworkElement element, Network network,
NicProfile profile, VirtualMachineProfile vmProfile, NicProfile profile, VirtualMachineProfile vmProfile,
DeployDestination dest, ReservationContext context) throws InsufficientCapacityException, DeployDestination dest, ReservationContext context) throws InsufficientCapacityException,
ConcurrentOperationException, ResourceUnavailableException { ConcurrentOperationException, ResourceUnavailableException {
@ -1257,7 +1257,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
@Override @Override
public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination public NicProfile prepareNic(VirtualMachineProfile vmProfile, DeployDestination
dest, ReservationContext context, long nicId, NetworkVO network) dest, ReservationContext context, long nicId, Network network)
throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException,
ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException {
@ -1553,7 +1553,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
@DB @DB
@Override @Override
public void removeDhcpServiceInSubnet(NicVO nic) { public void removeDhcpServiceInSubnet(Nic nic) {
Network network = _networksDao.findById(nic.getNetworkId()); Network network = _networksDao.findById(nic.getNetworkId());
DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network); DhcpServiceProvider dhcpServiceProvider = getDhcpServiceProvider(network);
try { try {
@ -1869,8 +1869,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
} }
} }
List<NetworkVO> networks = setupNetwork(owner, ntwkOff, userNetwork, plan, name, displayText, true, domainId, List<? extends Network> networks = setupNetwork(owner, ntwkOff, userNetwork, plan, name, displayText, true, domainId, aclType, subdomainAccess, vpcId,
aclType, subdomainAccess, vpcId, isDisplayNetworkEnabled); isDisplayNetworkEnabled);
Network network = null; Network network = null;
if (networks == null || networks.isEmpty()) { if (networks == null || networks.isEmpty()) {
@ -1988,7 +1988,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
} }
@Override @Override
public boolean shutdownNetworkElementsAndResources(ReservationContext context, boolean cleanupElements, NetworkVO network) { public boolean shutdownNetworkElementsAndResources(ReservationContext context, boolean cleanupElements, Network network) {
// 1) Cleanup all the rules for the network. If it fails, just log the failure and proceed with shutting down // 1) Cleanup all the rules for the network. If it fails, just log the failure and proceed with shutting down
// the elements // the elements
boolean cleanupResult = true; boolean cleanupResult = true;