Skip to content

Commit

Permalink
CS-16330 VM deployment not working and Exception on SSVM
Browse files Browse the repository at this point in the history
status CS-16330: resolved fixed
reviewed-by: Kelven
  • Loading branch information
sateesh committed Sep 24, 2012
1 parent fab0ff7 commit 5b8d72b
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
package com.cloud.storage.resource;

import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

import com.cloud.hypervisor.vmware.util.VmwareContext;
Expand Down Expand Up @@ -56,10 +57,11 @@ public static VmwareContext create(String vCenterAddress, String vCenterUserName

public static void invalidate(VmwareContext context) {
synchronized(s_contextMap) {
for(Map.Entry<String, VmwareContext> entry : s_contextMap.entrySet()) {
if(entry.getValue() == context) {
s_contextMap.remove(entry.getKey());
}
for(Iterator<Map.Entry<String, VmwareContext>> entryIter = s_contextMap.entrySet().iterator(); entryIter.hasNext();) {
Map.Entry<String, VmwareContext> entry = entryIter.next();
if(entry.getValue() == context) {
entryIter.remove();
}
}
}

Expand Down

0 comments on commit 5b8d72b

Please sign in to comment.