|
23 | 23 | import java.util.Map; |
24 | 24 | import java.util.UUID; |
25 | 25 |
|
26 | | -import javax.annotation.PostConstruct; |
27 | 26 | import javax.ejb.Local; |
28 | 27 | import javax.inject.Inject; |
29 | 28 | import javax.naming.ConfigurationException; |
30 | 29 |
|
31 | 30 | import org.apache.log4j.Logger; |
| 31 | + |
| 32 | +import com.vmware.vim25.ClusterDasConfigInfo; |
| 33 | +import com.vmware.vim25.ManagedObjectReference; |
| 34 | + |
32 | 35 | import org.apache.cloudstack.api.ApiConstants; |
33 | | -import org.springframework.beans.NullValueInNestedPathException; |
34 | 36 |
|
35 | 37 | import com.cloud.agent.api.StartupCommand; |
36 | 38 | import com.cloud.agent.api.StartupRoutingCommand; |
37 | 39 | import com.cloud.alert.AlertManager; |
38 | 40 | import com.cloud.configuration.Config; |
39 | | -import com.cloud.configuration.dao.ConfigurationDao; |
40 | 41 | import com.cloud.dc.ClusterDetailsDao; |
41 | 42 | import com.cloud.dc.ClusterVO; |
42 | 43 | import com.cloud.dc.DataCenter.NetworkType; |
|
67 | 68 | import com.cloud.network.VmwareTrafficLabel; |
68 | 69 | import com.cloud.network.dao.CiscoNexusVSMDeviceDao; |
69 | 70 | import com.cloud.network.element.CiscoNexusVSMElement; |
70 | | -import com.cloud.network.element.CiscoNexusVSMElementService; |
71 | 71 | import com.cloud.resource.Discoverer; |
72 | 72 | import com.cloud.resource.DiscovererBase; |
73 | 73 | import com.cloud.resource.ResourceManager; |
|
81 | 81 | import com.cloud.user.Account; |
82 | 82 | import com.cloud.utils.UriUtils; |
83 | 83 |
|
84 | | -import com.vmware.vim25.ClusterDasConfigInfo; |
85 | | -import com.vmware.vim25.ManagedObjectReference; |
86 | | - |
87 | 84 |
|
88 | 85 | @Local(value = Discoverer.class) |
89 | 86 | public class VmwareServerDiscoverer extends DiscovererBase implements |
@@ -129,7 +126,7 @@ public VmwareServerDiscoverer() { |
129 | 126 | } |
130 | 127 |
|
131 | 128 | @Override |
132 | | - public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long podId, Long clusterId, URI url, |
| 129 | + public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long podId, Long clusterId, URI url, |
133 | 130 | String username, String password, List<String> hostTags) throws DiscoveryException { |
134 | 131 |
|
135 | 132 | if(s_logger.isInfoEnabled()) |
@@ -364,7 +361,7 @@ public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long p |
364 | 361 | details.put("url", hostMo.getHostName()); |
365 | 362 | details.put("username", username); |
366 | 363 | details.put("password", password); |
367 | | - String guid = morHost.getType() + ":" + morHost.getPresetParams() |
| 364 | + String guid = morHost.getType() + ":" + morHost.getValue() |
368 | 365 | + "@" + url.getHost(); |
369 | 366 | details.put("guid", guid); |
370 | 367 |
|
@@ -490,7 +487,7 @@ private boolean validateDiscoveredHosts(VmwareContext context, |
490 | 487 | "ClusterComputeResource")) |
491 | 488 | return false; |
492 | 489 |
|
493 | | - if (!morParent.getPresetParams().equals(morCluster.getPresetParams())) |
| 490 | + if (!morParent.getValue().equals(morCluster.getValue())) |
494 | 491 | return false; |
495 | 492 | } |
496 | 493 | } |
@@ -713,7 +710,7 @@ private VirtualSwitchType getDefaultVirtualSwitchType() { |
713 | 710 | return VirtualSwitchType.NexusDistributedVirtualSwitch; |
714 | 711 | else if(useDVS) |
715 | 712 | return VirtualSwitchType.VMwareDistributedVirtualSwitch; |
716 | | - else |
| 713 | + else |
717 | 714 | return VirtualSwitchType.StandardVirtualSwitch; |
718 | 715 | } |
719 | 716 |
|
|
0 commit comments