Skip to content

Commit 3174134

Browse files
committed
get nonoss built
1 parent 4f709ab commit 3174134

4 files changed

Lines changed: 86 additions & 88 deletions

File tree

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/VmwareServerDiscoverer.java

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,20 +23,21 @@
2323
import java.util.Map;
2424
import java.util.UUID;
2525

26-
import javax.annotation.PostConstruct;
2726
import javax.ejb.Local;
2827
import javax.inject.Inject;
2928
import javax.naming.ConfigurationException;
3029

3130
import org.apache.log4j.Logger;
31+
32+
import com.vmware.vim25.ClusterDasConfigInfo;
33+
import com.vmware.vim25.ManagedObjectReference;
34+
3235
import org.apache.cloudstack.api.ApiConstants;
33-
import org.springframework.beans.NullValueInNestedPathException;
3436

3537
import com.cloud.agent.api.StartupCommand;
3638
import com.cloud.agent.api.StartupRoutingCommand;
3739
import com.cloud.alert.AlertManager;
3840
import com.cloud.configuration.Config;
39-
import com.cloud.configuration.dao.ConfigurationDao;
4041
import com.cloud.dc.ClusterDetailsDao;
4142
import com.cloud.dc.ClusterVO;
4243
import com.cloud.dc.DataCenter.NetworkType;
@@ -67,7 +68,6 @@
6768
import com.cloud.network.VmwareTrafficLabel;
6869
import com.cloud.network.dao.CiscoNexusVSMDeviceDao;
6970
import com.cloud.network.element.CiscoNexusVSMElement;
70-
import com.cloud.network.element.CiscoNexusVSMElementService;
7171
import com.cloud.resource.Discoverer;
7272
import com.cloud.resource.DiscovererBase;
7373
import com.cloud.resource.ResourceManager;
@@ -81,9 +81,6 @@
8181
import com.cloud.user.Account;
8282
import com.cloud.utils.UriUtils;
8383

84-
import com.vmware.vim25.ClusterDasConfigInfo;
85-
import com.vmware.vim25.ManagedObjectReference;
86-
8784

8885
@Local(value = Discoverer.class)
8986
public class VmwareServerDiscoverer extends DiscovererBase implements
@@ -129,7 +126,7 @@ public VmwareServerDiscoverer() {
129126
}
130127

131128
@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,
133130
String username, String password, List<String> hostTags) throws DiscoveryException {
134131

135132
if(s_logger.isInfoEnabled())
@@ -364,7 +361,7 @@ public Map<? extends ServerResource, Map<String, String>> find(long dcId, Long p
364361
details.put("url", hostMo.getHostName());
365362
details.put("username", username);
366363
details.put("password", password);
367-
String guid = morHost.getType() + ":" + morHost.getPresetParams()
364+
String guid = morHost.getType() + ":" + morHost.getValue()
368365
+ "@" + url.getHost();
369366
details.put("guid", guid);
370367

@@ -490,7 +487,7 @@ private boolean validateDiscoveredHosts(VmwareContext context,
490487
"ClusterComputeResource"))
491488
return false;
492489

493-
if (!morParent.getPresetParams().equals(morCluster.getPresetParams()))
490+
if (!morParent.getValue().equals(morCluster.getValue()))
494491
return false;
495492
}
496493
}
@@ -713,7 +710,7 @@ private VirtualSwitchType getDefaultVirtualSwitchType() {
713710
return VirtualSwitchType.NexusDistributedVirtualSwitch;
714711
else if(useDVS)
715712
return VirtualSwitchType.VMwareDistributedVirtualSwitch;
716-
else
713+
else
717714
return VirtualSwitchType.StandardVirtualSwitch;
718715
}
719716

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ public Answer execute(VmwareHostService hostService, PrimaryStorageDownloadComma
243243
try {
244244
VmwareHypervisorHost hyperHost = hostService.getHyperHost(context, cmd);
245245

246-
String templateUuidName = UUID.nameUUIDFromBytes((templateName + "@" + cmd.getPoolUuid() + "-" + hyperHost.getMor().getPresetParams()).getBytes()).toString();
246+
String templateUuidName = UUID.nameUUIDFromBytes((templateName + "@" + cmd.getPoolUuid() + "-" + hyperHost.getMor().getValue()).getBytes()).toString();
247247
// truncate template name to 32 chars to ensure they work well with vSphere API's.
248248
templateUuidName = templateUuidName.replace("-", "");
249249

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/resource/VmwareResource.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -557,14 +557,14 @@ public Answer executeRequest(Command cmd) {
557557

558558
synchronized (this) {
559559
try {
560-
JmxUtil.registerMBean("VMware " + _morHyperHost.getPresetParams(), "Command " + cmdSequence + "-" + cmd.getClass().getSimpleName(), mbean);
560+
JmxUtil.registerMBean("VMware " + _morHyperHost.getValue(), "Command " + cmdSequence + "-" + cmd.getClass().getSimpleName(), mbean);
561561
_cmdMBeans.add(mbean);
562562

563563
if (_cmdMBeans.size() >= MAX_CMD_MBEAN) {
564564
PropertyMapDynamicBean mbeanToRemove = _cmdMBeans.get(0);
565565
_cmdMBeans.remove(0);
566566

567-
JmxUtil.unregisterMBean("VMware " + _morHyperHost.getPresetParams(), "Command " + mbeanToRemove.getProp("Sequence") + "-" + mbeanToRemove.getProp("Name"));
567+
JmxUtil.unregisterMBean("VMware " + _morHyperHost.getValue(), "Command " + mbeanToRemove.getProp("Sequence") + "-" + mbeanToRemove.getProp("Name"));
568568
}
569569
} catch (Exception e) {
570570
if(s_logger.isTraceEnabled())
@@ -4955,7 +4955,8 @@ private List<StartupStorageCommand> initializeLocalStorage() {
49554955

49564956
DatastoreSummary dsSummary = dsMo.getSummary();
49574957
String address = hostMo.getHostName();
4958-
StoragePoolInfo pInfo = new StoragePoolInfo(poolUuid, address, dsMo.getMor().getPresetParams(), "", StoragePoolType.LVM, dsSummary.getCapacity(), dsSummary.getFreeSpace());
4958+
StoragePoolInfo pInfo = new StoragePoolInfo(poolUuid, address, dsMo.getMor().getValue(), "", StoragePoolType.LVM, dsSummary.getCapacity(),
4959+
dsSummary.getFreeSpace());
49594960
StartupStorageCommand cmd = new StartupStorageCommand();
49604961
cmd.setName(poolUuid);
49614962
cmd.setPoolInfo(pInfo);
@@ -5460,11 +5461,11 @@ private HashMap<String, VmStatsEntry> getVmStats(List<String> vmNames) throws Ex
54605461
int endMs = infos.get(infos.size()-1).getTimestamp().getSecond() * 1000 + infos.get(infos.size()-1).getTimestamp().getMillisecond();
54615462
int beginMs = infos.get(0).getTimestamp().getSecond() * 1000 + infos.get(0).getTimestamp().getMillisecond();
54625463
sampleDuration = (endMs - beginMs) /1000;
5463-
List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getPresetParams();
5464+
List<PerfMetricSeries> vals = ((PerfEntityMetric)values.get(i)).getValue();
54645465
for(int vi = 0; ((vals!= null) && (vi < vals.size())); ++vi){
54655466
if(vals.get(vi) instanceof PerfMetricIntSeries) {
54665467
PerfMetricIntSeries val = (PerfMetricIntSeries)vals.get(vi);
5467-
List<Long> perfValues = val.getPresetParams();
5468+
List<Long> perfValues = val.getValue();
54685469
if (vals.get(vi).getId().getCounterId() == rxPerfCounterInfo.getKey()) {
54695470
networkReadKBs = sampleDuration * perfValues.get(3); //get the average RX rate multiplied by sampled duration
54705471
}

0 commit comments

Comments
 (0)