Repository: cloudstack Updated Branches: refs/heads/master d3af2dbec -> c43b56998
CLOUDSTACK-7153: addNicToVirtualMachine not BaseAsyncCreate but creates an entity Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/c43b5699 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c43b5699 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c43b5699 Branch: refs/heads/master Commit: c43b56998a7e04c3a0a0f034666aec76c585c48e Parents: d3af2db Author: Damodar <damoder.re...@citrix.com> Authored: Tue Jul 22 14:42:44 2014 +0530 Committer: Kishan Kavala <kishan.kav...@citrix.com> Committed: Wed Jul 23 09:28:32 2014 +0530 ---------------------------------------------------------------------- api/src/com/cloud/event/EventTypes.java | 3 +++ server/src/com/cloud/vm/UserVmManagerImpl.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c43b5699/api/src/com/cloud/event/EventTypes.java ---------------------------------------------------------------------- diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java index 411f620..7477152 100755 --- a/api/src/com/cloud/event/EventTypes.java +++ b/api/src/com/cloud/event/EventTypes.java @@ -31,6 +31,7 @@ import com.cloud.network.Site2SiteVpnConnection; import com.cloud.server.ResourceTag; import com.cloud.storage.snapshot.SnapshotPolicy; import com.cloud.vm.ConsoleProxy; +import com.cloud.vm.Nic; import com.cloud.vm.NicSecondaryIp; import com.cloud.vm.SecondaryStorageVm; import org.apache.cloudstack.config.Configuration; @@ -575,6 +576,8 @@ public class EventTypes { entityEventDetails.put(EVENT_FIREWALL_EGRESS_CLOSE, FirewallRule.class); entityEventDetails.put(EVENT_FIREWALL_EGRESS_UPDATE, FirewallRule.class); + // Nic Events + entityEventDetails.put(EVENT_NIC_CREATE, Nic.class); // Load Balancers entityEventDetails.put(EVENT_ASSIGN_TO_LOAD_BALANCER_RULE, FirewallRule.class); http://git-wip-us.apache.org/repos/asf/cloudstack/blob/c43b5699/server/src/com/cloud/vm/UserVmManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java index 90f37ef..ab9ebe0 100755 --- a/server/src/com/cloud/vm/UserVmManagerImpl.java +++ b/server/src/com/cloud/vm/UserVmManagerImpl.java @@ -1041,7 +1041,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir if (guestNic == null) { throw new CloudRuntimeException("Unable to add NIC to " + vmInstance); } - + CallContext.current().putContextParameter(Nic.class.getName(), guestNic.getUuid()); s_logger.debug("Successful addition of " + network + " from " + vmInstance); return _vmDao.findById(vmInstance.getId()); }