cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ni...@apache.org
Subject git commit: updated refs/heads/master to 77dadd7
Date Mon, 21 Jul 2014 21:08:59 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/master 58bad4191 -> 77dadd75c


CLOUDSTACK-6787: Publishing uuids missing in some cases, adding/correcting events in some
cases.
Also fixed a bug in the global config framework.


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

Branch: refs/heads/master
Commit: 77dadd75c49142b0cf3a4af29377d0fc54892b6a
Parents: 58bad41
Author: Nitin Mehta <nitin.mehta@citrix.com>
Authored: Mon Jul 21 14:07:41 2014 -0700
Committer: Nitin Mehta <nitin.mehta@citrix.com>
Committed: Mon Jul 21 14:08:18 2014 -0700

----------------------------------------------------------------------
 .../command/user/firewall/CreateEgressFirewallRuleCmd.java  | 1 +
 .../org/apache/cloudstack/framework/config/ConfigKey.java   | 2 +-
 server/src/com/cloud/network/as/AutoScaleManagerImpl.java   | 9 +++++----
 .../src/com/cloud/storage/snapshot/SnapshotManagerImpl.java | 3 +++
 4 files changed, 10 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77dadd75/api/src/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java
b/api/src/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java
index 1a0cfae..48ee0df 100644
--- a/api/src/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java
@@ -261,6 +261,7 @@ public class CreateEgressFirewallRuleCmd extends BaseAsyncCreateCmd implements
F
         try {
             FirewallRule result = _firewallService.createEgressFirewallRule(this);
             setEntityId(result.getId());
+            setEntityUuid(result.getUuid());
         } catch (NetworkRuleConflictException ex) {
             s_logger.info("Network rule conflict: " + ex.getMessage());
             s_logger.trace("Network Rule Conflict: ", ex);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77dadd75/framework/config/src/org/apache/cloudstack/framework/config/ConfigKey.java
----------------------------------------------------------------------
diff --git a/framework/config/src/org/apache/cloudstack/framework/config/ConfigKey.java b/framework/config/src/org/apache/cloudstack/framework/config/ConfigKey.java
index b400e6f..d39bb5d 100644
--- a/framework/config/src/org/apache/cloudstack/framework/config/ConfigKey.java
+++ b/framework/config/src/org/apache/cloudstack/framework/config/ConfigKey.java
@@ -133,7 +133,7 @@ public class ConfigKey<T> {
     public T value() {
         if (_value == null || isDynamic()) {
             ConfigurationVO vo = s_depot != null ? s_depot.global().findById(key()) : null;
-            _value = valueOf(vo != null ? vo.getValue() : defaultValue());
+            _value = valueOf((vo != null && vo.getValue() != null) ? vo.getValue()
: defaultValue());
         }
 
         return _value;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77dadd75/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
index 96d82ad..01c1486 100644
--- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
+++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
@@ -795,6 +795,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements
AutoScale
     }
 
     @Override
+    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_CREATE, eventDescription =
"creating autoscale vm group", async = true)
     public boolean configureAutoScaleVmGroup(CreateAutoScaleVmGroupCmd cmd) throws ResourceUnavailableException
{
         return configureAutoScaleVmGroup(cmd.getEntityId(), AutoScaleVmGroup.State_New);
     }
@@ -823,7 +824,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements
AutoScale
 
     @Override
     @DB
-    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_DELETE, eventDescription =
"deleting autoscale vm group")
+    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_DELETE, eventDescription =
"deleting autoscale vm group", async = true)
     public boolean deleteAutoScaleVmGroup(final long id) {
         AutoScaleVmGroupVO autoScaleVmGroupVO = getEntityInDatabase(CallContext.current().getCallingAccount(),
"AutoScale Vm Group", id, _autoScaleVmGroupDao);
 
@@ -997,7 +998,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements
AutoScale
     }
 
     @Override
-    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_UPDATE, eventDescription =
"updating autoscale vm group")
+    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_UPDATE, eventDescription =
"updating autoscale vm group", async = true)
     public AutoScaleVmGroup updateAutoScaleVmGroup(UpdateAutoScaleVmGroupCmd cmd) {
         Long vmGroupId = cmd.getId();
         Integer minMembers = cmd.getMinMembers();
@@ -1046,7 +1047,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements
AutoScale
 
     @Override
     @DB
-    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_ENABLE, eventDescription =
"enabling autoscale vm group")
+    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_ENABLE, eventDescription =
"enabling autoscale vm group", async = true)
     public AutoScaleVmGroup enableAutoScaleVmGroup(Long id) {
         AutoScaleVmGroupVO vmGroup = getEntityInDatabase(CallContext.current().getCallingAccount(),
"AutoScale Vm Group", id, _autoScaleVmGroupDao);
         boolean success = false;
@@ -1072,7 +1073,7 @@ public class AutoScaleManagerImpl<Type> extends ManagerBase implements
AutoScale
     }
 
     @Override
-    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_DISABLE, eventDescription
= "disabling autoscale vm group")
+    @ActionEvent(eventType = EventTypes.EVENT_AUTOSCALEVMGROUP_DISABLE, eventDescription
= "disabling autoscale vm group", async = true)
     @DB
     public AutoScaleVmGroup disableAutoScaleVmGroup(Long id) {
         AutoScaleVmGroupVO vmGroup = getEntityInDatabase(CallContext.current().getCallingAccount(),
"AutoScale Vm Group", id, _autoScaleVmGroupDao);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/77dadd75/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
index 5c114c5..a8b7e5f 100755
--- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
+++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java
@@ -639,6 +639,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
 
     @Override
     @DB
+    @ActionEvent(eventType = EventTypes.EVENT_SNAPSHOT_POLICY_CREATE, eventDescription =
"creating snapshot policy")
     public SnapshotPolicyVO createPolicy(CreateSnapshotPolicyCmd cmd, Account policyOwner)
{
         Long volumeId = cmd.getVolumeId();
         boolean display = cmd.isDisplay();
@@ -735,6 +736,8 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager,
             }
 
         }
+        // TODO - Make createSnapshotPolicy - BaseAsyncCreate and remove this.
+        CallContext.current().putContextParameter(SnapshotPolicy.class.getName(), policy.getUuid());
         return policy;
     }
 


Mime
View raw message