incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chirad...@apache.org
Subject [33/39] Merge branch 'master' into network-refactor-merge2
Date Fri, 18 Jan 2013 01:01:22 GMT
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/api/src/com/cloud/network/NetworkService.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/network/NetworkService.java
index b93be6f,b3332a3..786afb1
--- a/api/src/com/cloud/network/NetworkService.java
+++ b/api/src/com/cloud/network/NetworkService.java
@@@ -17,11 -17,13 +17,11 @@@
  package com.cloud.network;
  
  import java.util.List;
 -import java.util.Map;
 -import java.util.Set;
  
- import com.cloud.api.commands.CreateNetworkCmd;
- import com.cloud.api.commands.ListNetworksCmd;
- import com.cloud.api.commands.ListTrafficTypeImplementorsCmd;
- import com.cloud.api.commands.RestartNetworkCmd;
+ import org.apache.cloudstack.api.command.admin.usage.ListTrafficTypeImplementorsCmd;
+ import org.apache.cloudstack.api.command.user.network.RestartNetworkCmd;
+ import org.apache.cloudstack.api.command.user.network.CreateNetworkCmd;
+ import org.apache.cloudstack.api.command.user.network.ListNetworksCmd;
  import com.cloud.exception.ConcurrentOperationException;
  import com.cloud.exception.InsufficientAddressCapacityException;
  import com.cloud.exception.InsufficientCapacityException;
@@@ -62,20 -60,34 +61,22 @@@ public interface NetworkService 
  
      Network getNetwork(long networkId);
  
+     Network getNetwork(String networkUuid);
+ 
      IpAddress getIp(long id);
  
 -    NetworkProfile convertNetworkToNetworkProfile(long networkId);
 -
 -    Map<Service, Map<Capability, String>> getNetworkCapabilities(long networkId);
 -
 -    boolean isNetworkAvailableInDomain(long networkId, long domainId);
 -
 -    Long getDedicatedNetworkDomain(long networkId);
  
      Network updateGuestNetwork(long networkId, String name, String displayText, Account
callerAccount, User callerUser,
              String domainSuffix, Long networkOfferingId, Boolean changeCidr);
  
 -    Integer getNetworkRate(long networkId, Long vmId);
  
 -    Network getSystemNetworkByZoneAndTrafficType(long zoneId, TrafficType trafficType);
 -
 -    Map<Service, Set<Provider>> getNetworkOfferingServiceProvidersMap(long networkOfferingId);
 -
 -    PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed,
 +    PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed,

              List<String> isolationMethods, String broadcastDomainRange, Long domainId,
List<String> tags, String name);
  
-     Pair<List<? extends PhysicalNetwork>, Integer> searchPhysicalNetworks(Long
id, Long zoneId, String keyword, 
+     Pair<List<? extends PhysicalNetwork>, Integer> searchPhysicalNetworks(Long
id, Long zoneId, String keyword,
              Long startIndex, Long pageSize, String name);
  
-     PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String>
tags, 
+     PhysicalNetwork updatePhysicalNetwork(Long id, String networkSpeed, List<String>
tags,
              String newVnetRangeString, String state);
  
      boolean deletePhysicalNetwork(Long id);
@@@ -146,12 -163,16 +147,12 @@@
       * @param networkOwnerId
       * @param vpcId TODO
       * @return
-      * @throws InsufficientCapacityException 
-      * @throws ConcurrentOperationException 
-      * @throws ResourceAllocationException 
+      * @throws InsufficientCapacityException
+      * @throws ConcurrentOperationException
+      * @throws ResourceAllocationException
       */
      Network createPrivateNetwork(String networkName, String displayText, long physicalNetworkId,
String vlan,
-             String startIp, String endIP, String gateway, String netmask, long networkOwnerId,
Long vpcId) 
+             String startIp, String endIP, String gateway, String netmask, long networkOwnerId,
Long vpcId)
                      throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException;
 -    /**
 -     * @param network
 -     * @return
 -     */
 -    boolean canUseForDeploy(Network network);
 + 
  }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/api/src/com/cloud/network/element/IpDeployer.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/network/element/IpDeployer.java
index 8036d4b,55b21ab..c92d3e3
--- a/api/src/com/cloud/network/element/IpDeployer.java
+++ b/api/src/com/cloud/network/element/IpDeployer.java
@@@ -21,11 -21,11 +21,12 @@@ import java.util.Set
  
  import com.cloud.exception.ResourceUnavailableException;
  import com.cloud.network.Network;
+ import com.cloud.network.Network.Provider;
  import com.cloud.network.Network.Service;
  import com.cloud.network.PublicIpAddress;
 +import com.cloud.utils.component.Adapter;
  
 -public interface IpDeployer {
 +public interface IpDeployer extends Adapter{
      /**
       * Apply ip addresses to this network
       * @param network

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/api/src/com/cloud/network/element/RemoteAccessVPNServiceProvider.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/api/src/com/cloud/network/element/Site2SiteVpnServiceProvider.java
----------------------------------------------------------------------
diff --cc api/src/com/cloud/network/element/Site2SiteVpnServiceProvider.java
index eadf801,a61273a..dd45132
--- a/api/src/com/cloud/network/element/Site2SiteVpnServiceProvider.java
+++ b/api/src/com/cloud/network/element/Site2SiteVpnServiceProvider.java
@@@ -17,11 -17,11 +17,11 @@@
  package com.cloud.network.element;
  
  import com.cloud.exception.ResourceUnavailableException;
 -import com.cloud.network.Network;
  import com.cloud.network.Site2SiteVpnConnection;
 +import com.cloud.utils.component.Adapter;
  
 -public interface Site2SiteVpnServiceProvider extends NetworkElement {
 +public interface Site2SiteVpnServiceProvider extends Adapter {
      boolean startSite2SiteVpn(Site2SiteVpnConnection conn) throws ResourceUnavailableException;
-     
+ 
      boolean stopSite2SiteVpn(Site2SiteVpnConnection conn) throws ResourceUnavailableException;
  }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/client/tomcatconf/components.xml.in
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/plugins/network-elements/elastic-loadbalancer/src/com/cloud/network/lb/ElasticLoadBalancerManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
----------------------------------------------------------------------
diff --cc plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
index 4c557cc,70faacc..2e6f6e7
--- a/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
+++ b/plugins/network-elements/f5/src/com/cloud/network/element/F5ExternalLoadBalancerElement.java
@@@ -61,9 -65,10 +65,10 @@@ import com.cloud.network.Network.Capabi
  import com.cloud.network.Network.Provider;
  import com.cloud.network.Network.Service;
  import com.cloud.network.NetworkExternalLoadBalancerVO;
 -import com.cloud.network.NetworkManager;
 +import com.cloud.network.NetworkModel;
  import com.cloud.network.NetworkVO;
  import com.cloud.network.Networks.TrafficType;
+ import com.cloud.network.PhysicalNetwork;
  import com.cloud.network.PhysicalNetworkServiceProvider;
  import com.cloud.network.PhysicalNetworkVO;
  import com.cloud.network.PublicIpAddress;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
----------------------------------------------------------------------
diff --cc plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
index c6cac55,ead2af9..5038cc8
--- a/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
+++ b/plugins/network-elements/juniper-srx/src/com/cloud/network/element/JuniperSRXExternalFirewallElement.java
@@@ -61,8 -64,9 +64,9 @@@ import com.cloud.network.Network.Capabi
  import com.cloud.network.Network.Provider;
  import com.cloud.network.Network.Service;
  import com.cloud.network.NetworkExternalFirewallVO;
 -import com.cloud.network.NetworkManager;
 +import com.cloud.network.NetworkModel;
  import com.cloud.network.NetworkVO;
+ import com.cloud.network.PhysicalNetwork;
  import com.cloud.network.PhysicalNetworkServiceProvider;
  import com.cloud.network.PhysicalNetworkVO;
  import com.cloud.network.PublicIpAddress;
@@@ -88,11 -93,9 +93,11 @@@ import com.cloud.vm.ReservationContext
  import com.cloud.vm.VirtualMachine;
  import com.cloud.vm.VirtualMachineProfile;
  
 -@Local(value = NetworkElement.class)
 +@Local(value = {NetworkElement.class, FirewallServiceProvider.class, 
 +		PortForwardingServiceProvider.class, IpDeployer.class, 
 +		SourceNatServiceProvider.class, RemoteAccessVPNServiceProvider.class})
  public class JuniperSRXExternalFirewallElement extends ExternalFirewallDeviceManagerImpl
implements SourceNatServiceProvider, FirewallServiceProvider,
-         PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer, JuniperSRXFirewallElementService
{
+         PortForwardingServiceProvider, RemoteAccessVPNServiceProvider, IpDeployer, JuniperSRXFirewallElementService,
StaticNatServiceProvider {
  
      private static final Logger s_logger = Logger.getLogger(JuniperSRXExternalFirewallElement.class);
  

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
----------------------------------------------------------------------
diff --cc plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
index 18bee32,c0f91bb..c2dc1e0
--- a/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
+++ b/plugins/network-elements/netscaler/src/com/cloud/network/element/NetscalerElement.java
@@@ -73,9 -77,10 +77,10 @@@ import com.cloud.network.Network.Capabi
  import com.cloud.network.Network.Provider;
  import com.cloud.network.Network.Service;
  import com.cloud.network.NetworkExternalLoadBalancerVO;
 -import com.cloud.network.NetworkManager;
 +import com.cloud.network.NetworkModel;
  import com.cloud.network.NetworkVO;
  import com.cloud.network.Networks.TrafficType;
+ import com.cloud.network.PhysicalNetwork;
  import com.cloud.network.PhysicalNetworkServiceProvider;
  import com.cloud.network.PhysicalNetworkVO;
  import com.cloud.network.PublicIpAddress;

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
----------------------------------------------------------------------
diff --cc plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
index de6a629,6bcaeee..de03fa2
--- a/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
+++ b/plugins/network-elements/nicira-nvp/src/com/cloud/network/element/NiciraNvpElement.java
@@@ -881,9 -890,9 +887,9 @@@ public class NiciraNvpElement extends A
  			return false;
  		}
  
- 		List<StaticNatRuleTO> staticNatRules = new ArrayList<StaticNatRuleTO>(); 
+ 		List<StaticNatRuleTO> staticNatRules = new ArrayList<StaticNatRuleTO>();
          for (StaticNat rule : rules) {
 -            IpAddress sourceIp = _networkManager.getIp(rule.getSourceIpAddressId());
 +            IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
              // Force the nat rule into the StaticNatRuleTO, no use making a new TO object
              // we only need the source and destination ip. Unfortunately no mention if a
rule
              // is new.
@@@ -928,10 -937,10 +934,10 @@@
  					+ network.getDisplayText());
  			return false;
  		}
- 		
- 		List<PortForwardingRuleTO> portForwardingRules = new ArrayList<PortForwardingRuleTO>();

+ 
+ 		List<PortForwardingRuleTO> portForwardingRules = new ArrayList<PortForwardingRuleTO>();
          for (PortForwardingRule rule : rules) {
 -            IpAddress sourceIp = _networkManager.getIp(rule.getSourceIpAddressId());
 +            IpAddress sourceIp = _networkModel.getIp(rule.getSourceIpAddressId());
              Vlan vlan = _vlanDao.findById(sourceIp.getVlanId());
              PortForwardingRuleTO ruleTO = new PortForwardingRuleTO((PortForwardingRule)
rule, vlan.getVlanTag(), sourceIp.getAddress().addr());
              portForwardingRules.add(ruleTO);

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/acl/DomainChecker.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/acl/DomainChecker.java
index ca7be92,9bb1cce..24f632b
--- a/server/src/com/cloud/acl/DomainChecker.java
+++ b/server/src/com/cloud/acl/DomainChecker.java
@@@ -39,16 -40,22 +40,16 @@@ import com.cloud.user.dao.AccountDao
  import com.cloud.utils.component.AdapterBase;
  import com.cloud.utils.component.Inject;
  
- @Local(value=SecurityChecker.class)
+ @Local(value = SecurityChecker.class)
  public class DomainChecker extends AdapterBase implements SecurityChecker {
 -
 -    @Inject
 -    DomainDao _domainDao;
 -    @Inject
 -    AccountDao _accountDao;
 -    @Inject
 -    LaunchPermissionDao _launchPermissionDao;
 -    @Inject
 -    ProjectManager _projectMgr;
 -    @Inject
 -    ProjectAccountDao _projecAccountDao;
 -    @Inject
 -    NetworkManager _networkMgr;
 -
 +    
 +    @Inject DomainDao _domainDao;
 +    @Inject AccountDao _accountDao;
 +    @Inject LaunchPermissionDao _launchPermissionDao;
 +    @Inject ProjectManager _projectMgr;
 +    @Inject ProjectAccountDao _projecAccountDao;
 +    @Inject NetworkModel _networkMgr;
 +    
      protected DomainChecker() {
          super();
      }

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/api/ApiDBUtils.java
index d2abc29,5e8a044..dfdeb9c
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@@ -833,13 -974,13 +977,13 @@@ public class ApiDBUtils 
      public static Map<Service, Set<Provider>> listVpcOffServices(long vpcOffId)
{
          return _vpcMgr.getVpcOffSvcProvidersMap(vpcOffId);
      }
-     
+ 
      public static List<? extends Network> listVpcNetworks(long vpcId) {
 -        return _networkMgr.listNetworksByVpc(vpcId);
 +        return _networkModel.listNetworksByVpc(vpcId);
      }
-     
+ 
      public static boolean canUseForDeploy(Network network) {
 -        return _networkMgr.canUseForDeploy(network);
 +        return _networkModel.canUseForDeploy(network);
      }
  
      public static String getUuid(String resourceId, TaggedResourceType resourceType) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/baremetal/BareMetalVmManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/configuration/DefaultComponentLibrary.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/consoleproxy/ConsoleProxyManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
index 6b05e25,42cdc74..582e86b
--- a/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalFirewallDeviceManagerImpl.java
@@@ -377,14 -414,14 +414,14 @@@ public abstract class ExternalFirewallD
          }
  
          Account account = _accountDao.findByIdIncludingRemoved(network.getAccountId());
-         
-         NetworkOffering offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
     
+ 
+         NetworkOffering offering = _networkOfferingDao.findById(network.getNetworkOfferingId());
          boolean sharedSourceNat = offering.getSharedSourceNat();
-         
+ 
          IPAddressVO sourceNatIp = null;
          if (!sharedSourceNat) {
 -            // Get the source NAT IP address for this account
 -            List<IPAddressVO> sourceNatIps = _networkMgr.listPublicIpsAssignedToAccount(network.getAccountId(),
 +            // Get the source NAT IP address for this account          
 +            List<? extends IpAddress> sourceNatIps = _networkMgr.listPublicIpsAssignedToAccount(network.getAccountId(),

                      zoneId, true);
  
              if (sourceNatIps.size() != 1) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
index 97c6306,4f9404e..718f130
--- a/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
+++ b/server/src/com/cloud/network/ExternalLoadBalancerDeviceManagerImpl.java
@@@ -803,65 -861,16 +863,16 @@@ public abstract class ExternalLoadBalan
              String protocol = rule.getProtocol();
              String algorithm = rule.getAlgorithm();
              String uuid = rule.getUuid();
 -            String srcIp = _networkMgr.getIp(rule.getSourceIpAddressId()).getAddress().addr();
 +            String srcIp = _networkModel.getIp(rule.getSourceIpAddressId()).getAddress().addr();
              int srcPort = rule.getSourcePortStart();
              List<LbDestination> destinations = rule.getDestinations();
-             List<String> sourceCidrs = rule.getSourceCidrList();
  
              if (externalLoadBalancerIsInline) {
-                 InlineLoadBalancerNicMapVO mapping = _inlineLoadBalancerNicMapDao.findByPublicIpAddress(srcIp);
-                 NicVO loadBalancingIpNic = null;
-                 HostVO firewallProviderHost = null;
- 
-                 if (externalLoadBalancerIsInline) {
-                     firewallProviderHost = getFirewallProviderForNetwork(network);
-                 }
- 
-                 if (!revoked) {
-                     if (mapping == null) {
-                         // Acquire a new guest IP address and save it as the load balancing
IP address
-                         String loadBalancingIpAddress = _networkMgr.acquireGuestIpAddress(network,
null);
- 
-                         if (loadBalancingIpAddress == null) {
-                             String msg = "Ran out of guest IP addresses.";
-                             s_logger.error(msg);
-                             throw new ResourceUnavailableException(msg, DataCenter.class,
network.getDataCenterId());
-                         }
- 
-                         // If a NIC doesn't exist for the load balancing IP address, create
one
-                         loadBalancingIpNic = _nicDao.findByIp4AddressAndNetworkId(loadBalancingIpAddress,
network.getId());
-                         if (loadBalancingIpNic == null) {
-                             loadBalancingIpNic = savePlaceholderNic(network, loadBalancingIpAddress);
-                         }
- 
-                         // Save a mapping between the source IP address and the load balancing
IP address NIC
-                         mapping = new InlineLoadBalancerNicMapVO(rule.getId(), srcIp, loadBalancingIpNic.getId());
-                         _inlineLoadBalancerNicMapDao.persist(mapping);
- 
-                         // On the firewall provider for the network, create a static NAT
rule between the source IP
- // address and the load balancing IP address
-                         applyStaticNatRuleForInlineLBRule(zone, network, firewallProviderHost,
revoked, srcIp, loadBalancingIpNic.getIp4Address());
-                     } else {
-                         loadBalancingIpNic = _nicDao.findById(mapping.getNicId());
-                     }
-                 } else {
-                     if (mapping != null) {
-                         // Find the NIC that the mapping refers to
-                         loadBalancingIpNic = _nicDao.findById(mapping.getNicId());
- 
-                         // On the firewall provider for the network, delete the static NAT
rule between the source IP
- // address and the load balancing IP address
-                         applyStaticNatRuleForInlineLBRule(zone, network, firewallProviderHost,
revoked, srcIp, loadBalancingIpNic.getIp4Address());
- 
-                         // Delete the mapping between the source IP address and the load
balancing IP address
-                         _inlineLoadBalancerNicMapDao.expunge(mapping.getId());
- 
-                         // Delete the NIC
-                         _nicDao.expunge(loadBalancingIpNic.getId());
-                     } else {
-                         s_logger.debug("Revoking a rule for an inline load balancer that
has not been programmed yet.");
-                         continue;
-                     }
+                 MappingNic nic = getLoadBalancingIpNic(zone, network, rule.getSourceIpAddressId(),
revoked, null);
+                 mappingStates.add(nic.getState());
+                 NicVO loadBalancingIpNic = nic.getNic();
+                 if (loadBalancingIpNic == null) {
+                     continue;
                  }
  
                  // Change the source IP address for the load balancing rule to be the load
balancing IP address
@@@ -932,9 -970,15 +972,15 @@@
          long guestVlanTag = Long.parseLong(guestConfig.getBroadcastUri().getHost());
          String selfIp = null;
          String guestVlanNetmask = NetUtils.cidr2Netmask(guestConfig.getCidr());
 -        Integer networkRate = _networkMgr.getNetworkRate(guestConfig.getId(), null);
 +        Integer networkRate = _networkModel.getNetworkRate(guestConfig.getId(), null);
  
          if (add) {
+ 		    // on restart network, network could have already been implemented. If already implemented
then return
+             NicVO selfipNic = getPlaceholderNic(guestConfig);
+             if (selfipNic != null) {
+ 		    return true;
+             }
+ 
              // Acquire a self-ip address from the guest network IP address range
              selfIp = _networkMgr.acquireGuestIpAddress(guestConfig, null);
              if (selfIp == null) {

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/network/ExternalNetworkDeviceManagerImpl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/cadca5fc/server/src/com/cloud/network/NetworkManager.java
----------------------------------------------------------------------
diff --cc server/src/com/cloud/network/NetworkManager.java
index d4a9b5c,0ca28f8..546f1bf
--- a/server/src/com/cloud/network/NetworkManager.java
+++ b/server/src/com/cloud/network/NetworkManager.java
@@@ -16,11 -16,14 +16,11 @@@
  // under the License.
  package com.cloud.network;
  
 -import java.util.ArrayList;
  import java.util.List;
  import java.util.Map;
 -import java.util.Set;
  
- import com.cloud.acl.ControlledEntity.ACLType;
+ import org.apache.cloudstack.acl.ControlledEntity.ACLType;
  import com.cloud.dc.DataCenter;
 -import com.cloud.dc.Vlan;
  import com.cloud.dc.Vlan.VlanType;
  import com.cloud.deploy.DataCenterDeployment;
  import com.cloud.deploy.DeployDestination;
@@@ -31,8 -34,17 +31,11 @@@ import com.cloud.exception.Insufficient
  import com.cloud.exception.InsufficientVirtualNetworkCapcityException;
  import com.cloud.exception.ResourceAllocationException;
  import com.cloud.exception.ResourceUnavailableException;
 -import com.cloud.hypervisor.Hypervisor.HypervisorType;
 -import com.cloud.network.Network.Capability;
  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.element.LoadBalancingServiceProvider;
 -import com.cloud.network.element.NetworkElement;
 -import com.cloud.network.element.RemoteAccessVPNServiceProvider;
 -import com.cloud.network.element.Site2SiteVpnServiceProvider;
+ import com.cloud.network.element.StaticNatServiceProvider;
  import com.cloud.network.element.UserDataServiceProvider;
  import com.cloud.network.guru.NetworkGuru;
  import com.cloud.network.rules.FirewallRule;
@@@ -291,29 -484,12 +294,37 @@@ public interface NetworkManager  
       */
      int getNetworkLockTimeout();
  
 +
 +    boolean cleanupIpResources(long addrId, long userId, Account caller);
 +
 +
 +    boolean restartNetwork(Long networkId, Account callerAccount,
 +            User callerUser, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException,
InsufficientCapacityException;
 +
 +
 +    boolean shutdownNetworkElementsAndResources(ReservationContext context,
 +            boolean b, NetworkVO network);
 +
 +
 +	void implementNetworkElementsAndResources(DeployDestination dest,
 +			ReservationContext context, NetworkVO network,
 +			NetworkOfferingVO findById) throws ConcurrentOperationException, InsufficientAddressCapacityException,
ResourceUnavailableException, InsufficientCapacityException;
 +
 +
- 	IpAddress allocateIp(Account ipOwner, boolean isSystem, Account caller,
++	IpAddress allocateIp(Account ipOwner, boolean isSystem, Account caller, long callerId,
 +			DataCenter zone) throws ConcurrentOperationException, ResourceAllocationException, InsufficientAddressCapacityException;
 +
 +
 +	Map<String, String> finalizeServicesAndProvidersForNetwork(NetworkOffering offering,
 +			Long physicalNetworkId);
 +
 +
+     List<Provider> getProvidersForServiceInNetwork(Network network, Service service);
+ 
+     StaticNatServiceProvider getStaticNatProviderForNetwork(Network network);
+     boolean isNetworkInlineMode(Network network);
+ 
+     int getRuleCountForIp(Long addressId, FirewallRule.Purpose purpose, FirewallRule.State
state);
+ 
+     LoadBalancingServiceProvider getLoadBalancingProviderForNetwork(Network network);
  }


Mime
View raw message