cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [50/50] git commit: updated refs/heads/internallb to ed0cb2f
Date Wed, 10 Apr 2013 23:10:13 GMT
InternalLB:

1) Added new set of Interfaces - including the new VO - for the internal load balancer
2) DB change - added source_ip_address/source_ip_address_network_id/scheme (Internal/Public)
fields to the load_balancer table


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ed0cb2f3
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ed0cb2f3
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ed0cb2f3

Branch: refs/heads/internallb
Commit: ed0cb2f37b696079b91cfa767efb57c4bebd85bf
Parents: c4411af
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Thu Apr 4 09:26:21 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Wed Apr 10 16:04:10 2013 -0700

----------------------------------------------------------------------
 api/src/com/cloud/network/NetworkModel.java        |    4 ++--
 .../CreateApplicationLoadBalancerCmd.java          |    3 +--
 .../DeleteApplicationLoadBalancerCmd.java          |    2 +-
 server/src/com/cloud/network/NetworkModelImpl.java |    9 ++-------
 .../network/lb/LoadBalancingRulesManagerImpl.java  |    1 -
 setup/db/db/schema-410to420.sql                    |    7 +++++++
 6 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed0cb2f3/api/src/com/cloud/network/NetworkModel.java
----------------------------------------------------------------------
diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java
index 6842ebb..a74888d 100644
--- a/api/src/com/cloud/network/NetworkModel.java
+++ b/api/src/com/cloud/network/NetworkModel.java
@@ -263,7 +263,7 @@ public interface NetworkModel {
     boolean isProviderEnabledInZone(long zoneId, String provider);
 
     Nic getPlaceholderNicForRouter(Network network, Long podId);
-    
-    IpAddress getPublicIpAddress(String ipAddress, long zoneId);
+        
+    IpAddress getPublicIpAddress(String ipAddress, long networkId);
 
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed0cb2f3/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
index 54b3f83..3a30438 100644
--- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java
@@ -223,8 +223,7 @@ public class CreateApplicationLoadBalancerCmd extends BaseAsyncCreateCmd
{
     @Override
     public void create() {
         try {
-            
-            ApplicationLoadBalancerRule result = _appLbService.createApplicationLoadBalancer(getName(),
getDescription(), getScheme(),
+        ApplicationLoadBalancerRule result = _appLbService.createApplicationLoadBalancer(getName(),
getDescription(), getScheme(),
                     getSourceIpNetworkId(), getSourceIp(), getSourcePort(), getInstancePort(),
getAlgorithm(), getNetworkId(), getEntityOwnerId());
             this.setEntityId(result.getId());
             this.setEntityUuid(result.getUuid());

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed0cb2f3/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java
b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java
index ffd44ca..1ce5897 100644
--- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java
@@ -32,7 +32,7 @@ import com.cloud.event.EventTypes;
 import com.cloud.exception.InvalidParameterValueException;
 import com.cloud.user.UserContext;
 
-@APICommand(name = "deleteLoadBalancer", description="Deletes a load balancer", responseObject=SuccessResponse.class,
since="4.2.0")
+@APICommand(name = "deleteLoadBalancer", description="Deletes a load balancer", responseObject=SuccessResponse.class)
 public class DeleteApplicationLoadBalancerCmd extends BaseAsyncCmd {
     public static final Logger s_logger = Logger.getLogger(DeleteApplicationLoadBalancerCmd.class.getName());
     private static final String s_name = "deleteloadbalancerresponse";

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed0cb2f3/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index 0a82e09..d7108db 100644
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -2035,12 +2035,7 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel
{
     }
     
     @Override
-    public IpAddress getPublicIpAddress(String ipAddress, long zoneId) {
-        List<? extends Network> networks = _networksDao.listByZoneAndTrafficType(zoneId,
TrafficType.Public);
-        if (networks.isEmpty() || networks.size() > 1) {
-            throw new CloudRuntimeException("Can't find public network in the zone specified");
-        }
-        
-        return _ipAddressDao.findByIpAndSourceNetworkId(networks.get(0).getId(), ipAddress);
+    public IpAddress getPublicIpAddress(String ipAddress, long networkId) {
+        return _ipAddressDao.findByIpAndSourceNetworkId(networkId, ipAddress);
     }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed0cb2f3/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
index 0a9c5b6..e4f3e07 100755
--- a/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
+++ b/server/src/com/cloud/network/lb/LoadBalancingRulesManagerImpl.java
@@ -1387,7 +1387,6 @@ public class LoadBalancingRulesManagerImpl<Type> extends ManagerBase
implements
             ex.addProxyObject(ipAddr, sourceIpId, "sourceIpId");
             throw ex;
         }
-        
         NetworkVO network = _networkDao.findById(networkId);
         // verify that lb service is supported by the network
         if (!_networkModel.areServicesSupportedInNetwork(network.getId(), Service.Lb)) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ed0cb2f3/setup/db/db/schema-410to420.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-410to420.sql b/setup/db/db/schema-410to420.sql
index 7bc6d56..e8f7603 100644
--- a/setup/db/db/schema-410to420.sql
+++ b/setup/db/db/schema-410to420.sql
@@ -454,3 +454,10 @@ CREATE TABLE `cloud`.`vm_snapshots` (
 ALTER TABLE `cloud`.`hypervisor_capabilities` ADD COLUMN `vm_snapshot_enabled` tinyint(1)
DEFAULT 0 NOT NULL COMMENT 'Whether VM snapshot is supported by hypervisor';
 UPDATE `cloud`.`hypervisor_capabilities` SET `vm_snapshot_enabled`=1 WHERE `hypervisor_type`
in ('VMware', 'XenServer');
 
+
+ALTER TABLE `cloud`.`load_balancing_rules` ADD COLUMN `source_ip_address` varchar(40) COMMENT
'source ip address for the load balancer rule';
+ALTER TABLE `cloud`.`load_balancing_rules` ADD COLUMN `source_ip_address_network_id` varchar(40)
COMMENT 'the UUID of the network where source ip belongs to';
+ALTER TABLE `cloud`.`load_balancing_rules` ADD COLUMN `scheme` varchar(40) NOT NULL COMMENT
'load balancer scheme; can be Internal or Public';
+UPDATE `cloud`.`load_balancing_rules` SET `scheme`='Public';
+
+


Mime
View raw message