You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ja...@apache.org on 2014/11/14 07:43:08 UTC

[1/5] git commit: updated refs/heads/master to 7fd1e8e

Repository: cloudstack
Updated Branches:
  refs/heads/master cfe5a6fcb -> 7fd1e8e23


CLOUDSTACK-7645: UI: Fix method for extending dictionary

Instead of mapping both dictionary JSP files to separate objects, extend
dictionary2's object onto single 'dictionary' object.

-- The previous approach was causing issues on certain dialogs, which were not
opening due to possible missing labels.

Conflicts:
	ui/dictionary2.jsp


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

Branch: refs/heads/master
Commit: 8ec26fb531eedc8fdb9f4731900c047760178fb6
Parents: b3faab6
Author: Brian Federle <br...@citrix.com>
Authored: Wed Nov 12 09:55:27 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Nov 13 15:20:17 2014 -0800

----------------------------------------------------------------------
 ui/dictionary2.jsp       | 4 ++--
 ui/scripts/cloudStack.js | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ec26fb5/ui/dictionary2.jsp
----------------------------------------------------------------------
diff --git a/ui/dictionary2.jsp b/ui/dictionary2.jsp
index 28b4f05..a76ba3b 100644
--- a/ui/dictionary2.jsp
+++ b/ui/dictionary2.jsp
@@ -24,7 +24,7 @@ under the License.
 <fmt:setBundle basename="resources/messages"/>
 <% long now = System.currentTimeMillis(); %>
 <script type="text/javascript">
-dictionary2 = {
+$.extend(dictionary, {
 'label.rules': '<fmt:message key="label.rules" />',
 'label.running.vms': '<fmt:message key="label.running.vms" />',
 'label.s3.access_key': '<fmt:message key="label.s3.access_key" />',
@@ -1013,5 +1013,5 @@ dictionary2 = {
 'label.na': '<fmt:message key="label.na" />',
 'label.added.network.offering': '<fmt:message key="label.added.network.offering" />',
 'label.no': '<fmt:message key="label.no" />'
-};
+});
 </script>

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8ec26fb5/ui/scripts/cloudStack.js
----------------------------------------------------------------------
diff --git a/ui/scripts/cloudStack.js b/ui/scripts/cloudStack.js
index a76e101..7a59882 100644
--- a/ui/scripts/cloudStack.js
+++ b/ui/scripts/cloudStack.js
@@ -407,9 +407,9 @@
         // Localization
         if (!$.isFunction(cloudStack.localizationFn)) { // i.e., localize is overridden by a plugin/module
             cloudStack.localizationFn = function(str) {
-                // look in dictionary first; if not found, try dictionary2
                 var localized = dictionary[str];
-                return localized ? localized : dictionary2[str]; 
+
+                return localized ? localized : str;
             };
         }
 


[3/5] git commit: updated refs/heads/master to 7fd1e8e

Posted by ja...@apache.org.
CLOUDSTACK-7910: UI > Instance Wizard > declare serviceOfferingObjs before using it.


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

Branch: refs/heads/master
Commit: 03505901bccd507a391955a3850a876194b15246
Parents: 2ee3d42
Author: Jessica Wang <je...@apache.org>
Authored: Thu Nov 13 16:24:41 2014 -0800
Committer: Jessica Wang <je...@apache.org>
Committed: Thu Nov 13 16:24:41 2014 -0800

----------------------------------------------------------------------
 ui/scripts/instanceWizard.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/03505901/ui/scripts/instanceWizard.js
----------------------------------------------------------------------
diff --git a/ui/scripts/instanceWizard.js b/ui/scripts/instanceWizard.js
index 3a588e7..0baad4f 100644
--- a/ui/scripts/instanceWizard.js
+++ b/ui/scripts/instanceWizard.js
@@ -16,7 +16,7 @@
 // under the License.
 
 (function($, cloudStack) {
-    var zoneObjs, hypervisorObjs, featuredTemplateObjs, communityTemplateObjs, myTemplateObjs, featuredIsoObjs, community, networkObjs;
+    var zoneObjs, hypervisorObjs, featuredTemplateObjs, communityTemplateObjs, myTemplateObjs, featuredIsoObjs, serviceOfferingObjs, community, networkObjs;
     var selectedZoneObj, selectedTemplateObj, selectedHypervisor, selectedDiskOfferingObj;
     var selectedTemplateOrIso; //'select-template', 'select-iso'
     var step6ContainerType = 'nothing-to-select'; //'nothing-to-select', 'select-network', 'select-security-group', 'select-advanced-sg'(advanced sg-enabled zone)


[4/5] git commit: updated refs/heads/master to 7fd1e8e

Posted by ja...@apache.org.
CLOUDSTACK-7877: The NET.IPRELEASE events are not added to usage_event on IP range deletion from Physical Networks.

Signed-off-by: Jayapal <ja...@apache.org>


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

Branch: refs/heads/master
Commit: 7e6ec2ce826969aeb79ddb1113cdc45289bc89d3
Parents: 0350590
Author: Damodar <da...@citrix.com>
Authored: Tue Nov 11 11:25:03 2014 +0530
Committer: Jayapal <ja...@apache.org>
Committed: Fri Nov 14 10:31:46 2014 +0530

----------------------------------------------------------------------
 .../configuration/ConfigurationManagerImpl.java | 107 +++++++++----------
 1 file changed, 52 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7e6ec2ce/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
index 1f71c0f..628cbc7 100755
--- a/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
+++ b/server/src/com/cloud/configuration/ConfigurationManagerImpl.java
@@ -3159,69 +3159,66 @@ public class ConfigurationManagerImpl extends ManagerBase implements Configurati
         }
 
         // Check if the VLAN has any allocated public IPs
-        long allocIpCount = _publicIpAddressDao.countIPs(vlanRange.getDataCenterId(), vlanDbId, true);
         List<IPAddressVO> ips = _publicIpAddressDao.listByVlanId(vlanDbId);
-        boolean success = true;
-        if (allocIpCount > 0) {
-            if (isAccountSpecific) {
-                try {
-                    vlanRange = _vlanDao.acquireInLockTable(vlanDbId, 30);
-                    if (vlanRange == null) {
-                        throw new CloudRuntimeException("Unable to acquire vlan configuration: " + vlanDbId);
-                    }
-
-                    if (s_logger.isDebugEnabled()) {
-                        s_logger.debug("lock vlan " + vlanDbId + " is acquired");
-                    }
-                    for (IPAddressVO ip : ips) {
-                        if (ip.isOneToOneNat()) {
-                            throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip
-                                            + " belonging to the range is used for static nat purposes. Cleanup the rules first");
-                        }
-
-                        if (ip.isSourceNat()) {
-                            throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip
-                                    + " belonging to the range is a source nat ip for the network id=" + ip.getSourceNetworkId()
-                                            + ". IP range with the source nat ip address can be removed either as a part of Network, or account removal");
-                        }
+        if (isAccountSpecific) {
+          try {
+            vlanRange = _vlanDao.acquireInLockTable(vlanDbId, 30);
+            if (vlanRange == null) {
+              throw new CloudRuntimeException("Unable to acquire vlan configuration: " + vlanDbId);
+            }
 
-                        if (_firewallDao.countRulesByIpId(ip.getId()) > 0) {
-                            throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip
-                                    + " belonging to the range has firewall rules applied. Cleanup the rules first");
-                        }
-                        // release public ip address here
-                        success = success && _ipAddrMgr.disassociatePublicIpAddress(ip.getId(), userId, caller);
-                    }
-                    if (!success) {
-                        s_logger.warn("Some ip addresses failed to be released as a part of vlan " + vlanDbId + " removal");
-                    } else {
-                        for (IPAddressVO ip : ips) {
-                            UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE, acctVln.get(0).getId(), ip.getDataCenterId(), ip.getId(),
-                                    ip.getAddress().toString(), ip.isSourceNat(), vlanRange.getVlanType().toString(), ip.getSystem(), ip.getClass().getName(), ip.getUuid());
-                        }
-                    }
-                } finally {
-                    _vlanDao.releaseFromLockTable(vlanDbId);
-                }
-            } else {   // !isAccountSpecific
-                NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(vlanRange.getVlanGateway(), vlanRange.getNetworkId(), NicIpAlias.state.active);
-                //check if the ipalias belongs to the vlan range being deleted.
-                if (ipAlias != null && vlanDbId == _publicIpAddressDao.findByIpAndSourceNetworkId(vlanRange.getNetworkId(), ipAlias.getIp4Address()).getVlanId()) {
-                    throw new InvalidParameterValueException("Cannot delete vlan range " + vlanDbId + " as " + ipAlias.getIp4Address()
-                            + "is being used for providing dhcp service in this subnet. Delete all VMs in this subnet and try again");
-                }
-                allocIpCount = _publicIpAddressDao.countIPs(vlanRange.getDataCenterId(), vlanDbId, true);
-                if (allocIpCount > 0) {
-                    throw new InvalidParameterValueException(allocIpCount + "  Ips are in use. Cannot delete this vlan");
-                }
+            if (s_logger.isDebugEnabled()) {
+              s_logger.debug("lock vlan " + vlanDbId + " is acquired");
             }
+            for (IPAddressVO ip : ips) {
+              boolean success = true;
+              if (ip.isOneToOneNat()) {
+                throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip
+                        + " belonging to the range is used for static nat purposes. Cleanup the rules first");
+              }
+
+              if (ip.isSourceNat()) {
+                throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip
+                        + " belonging to the range is a source nat ip for the network id=" + ip.getSourceNetworkId()
+                        + ". IP range with the source nat ip address can be removed either as a part of Network, or account removal");
+              }
+
+              if (_firewallDao.countRulesByIpId(ip.getId()) > 0) {
+                throw new InvalidParameterValueException("Can't delete account specific vlan " + vlanDbId + " as ip " + ip
+                        + " belonging to the range has firewall rules applied. Cleanup the rules first");
+              }
+              if(ip.getAllocatedTime() != null) {// This means IP is allocated
+                // release public ip address here
+                success = _ipAddrMgr.disassociatePublicIpAddress(ip.getId(), userId, caller);
+              }
+              if (!success) {
+                s_logger.warn("Some ip addresses failed to be released as a part of vlan " + vlanDbId + " removal");
+              } else {
+                  UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE, acctVln.get(0).getAccountId(), ip.getDataCenterId(), ip.getId(),
+                          ip.getAddress().toString(), ip.isSourceNat(), vlanRange.getVlanType().toString(), ip.getSystem(), ip.getClass().getName(), ip.getUuid());
+              }
+            }
+          } finally {
+            _vlanDao.releaseFromLockTable(vlanDbId);
+          }
+        } else {   // !isAccountSpecific
+          NicIpAliasVO ipAlias = _nicIpAliasDao.findByGatewayAndNetworkIdAndState(vlanRange.getVlanGateway(), vlanRange.getNetworkId(), NicIpAlias.state.active);
+          //check if the ipalias belongs to the vlan range being deleted.
+          if (ipAlias != null && vlanDbId == _publicIpAddressDao.findByIpAndSourceNetworkId(vlanRange.getNetworkId(), ipAlias.getIp4Address()).getVlanId()) {
+            throw new InvalidParameterValueException("Cannot delete vlan range " + vlanDbId + " as " + ipAlias.getIp4Address()
+                    + "is being used for providing dhcp service in this subnet. Delete all VMs in this subnet and try again");
+          }
+          long allocIpCount = _publicIpAddressDao.countIPs(vlanRange.getDataCenterId(), vlanDbId, true);
+          if (allocIpCount > 0) {
+            throw new InvalidParameterValueException(allocIpCount + "  Ips are in use. Cannot delete this vlan");
+          }
         }
 
         Transaction.execute(new TransactionCallbackNoReturn() {
             @Override
             public void doInTransactionWithoutResult(TransactionStatus status) {
-        _publicIpAddressDao.deletePublicIPRange(vlanDbId);
-        _vlanDao.remove(vlanDbId);
+              _publicIpAddressDao.deletePublicIPRange(vlanDbId);
+              _vlanDao.remove(vlanDbId);
             }
         });
 


[5/5] git commit: updated refs/heads/master to 7fd1e8e

Posted by ja...@apache.org.
Merge branch '4.5'


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

Branch: refs/heads/master
Commit: 7fd1e8e239cc9a1080dc861a053786b218e37c93
Parents: cfe5a6f 7e6ec2c
Author: Jayapal <ja...@apache.org>
Authored: Fri Nov 14 12:12:07 2014 +0530
Committer: Jayapal <ja...@apache.org>
Committed: Fri Nov 14 12:12:07 2014 +0530

----------------------------------------------------------------------
 .../configuration/ConfigurationManagerImpl.java | 107 +++++++++----------
 1 file changed, 52 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


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


[2/5] git commit: updated refs/heads/master to 7fd1e8e

Posted by ja...@apache.org.
CLOUDSTACK-7645: UI: Fix dictionary JSP include order

-Places dictionary JSP includes at top of script includes, to help solve
a potential issue where the dictionary may not always be loaded before
the UI initializes


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

Branch: refs/heads/master
Commit: 2ee3d4258e52f2f2ef2b14e818f95b3d11a49139
Parents: 8ec26fb
Author: Brian Federle <br...@citrix.com>
Authored: Thu Nov 13 15:25:12 2014 -0800
Committer: Brian Federle <br...@citrix.com>
Committed: Thu Nov 13 15:25:12 2014 -0800

----------------------------------------------------------------------
 ui/index.jsp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/2ee3d425/ui/index.jsp
----------------------------------------------------------------------
diff --git a/ui/index.jsp b/ui/index.jsp
index 42973f7..bab00eb 100644
--- a/ui/index.jsp
+++ b/ui/index.jsp
@@ -1692,6 +1692,10 @@
         <script src="lib/jquery.md5.js" type="text/javascript" ></script>
         <script src="lib/require.js" type="text/javascript"></script>
 
+        <!-- localized messages -->
+        <jsp:include page="dictionary.jsp" />
+        <jsp:include page="dictionary2.jsp" />
+
         <script src="lib/excanvas.js" type="text/javascript"></script>
         <script src="lib/flot/jquery.flot.js" type="text/javascript"></script>
         <script src="lib/flot/jquery.colorhelpers.js" type="text/javascript"></script>
@@ -1776,9 +1780,5 @@
         <script type="text/javascript" src="plugins/plugins.js?t=<%=now%>"></script>
         <script type="text/javascript" src="modules/modules.js?t=<%=now%>"></script>
         <script type="text/javascript" src="scripts/plugins.js?t=<%=now%>"></script>
-
-        <!-- localized messages -->
-        <jsp:include page="dictionary.jsp" />
-	<jsp:include page="dictionary2.jsp" />
     </body>
 </html>