Closed acxadoom closed 8 years ago
Hi, we have a problem using NAS Datastore in Virtual center, for resolve this issue i add this code into getDatastores method :
//Correction by Andrea for trap the NasDatastoreInfo if (d.getInfo() instanceof NasDatastoreInfo) { NasDatastoreInfo dsInfo = (NasDatastoreInfo) d.getInfo(); if ( dsInfo != null ) { HostNasVolume naaName = dsInfo.getNas(); JsonObject jObject = new JsonObject(); jObject.addProperty("{#DATASTORE}", d.getName()); //jObject.addProperty("{#UUID}", uuid); jObject.addProperty("{#UUID}", "N/A"); jObject.addProperty("{#CLUSTER}", d.getParent().getName()); jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess); jObject.addProperty("{#NAA}", naaName.getName()); jArray.add(jObject); } } else { VmfsDatastoreInfo dsInfo = (VmfsDatastoreInfo) d.getInfo(); if ( dsInfo != null ) { HostScsiDiskPartition[] naaName = dsInfo.getVmfs().extent; JsonObject jObject = new JsonObject(); jObject.addProperty("{#DATASTORE}", d.getName()); //jObject.addProperty("{#UUID}", uuid); jObject.addProperty("{#UUID}", dsInfo.getVmfs().getUuid()); jObject.addProperty("{#CLUSTER}", d.getParent().getName()); jObject.addProperty("{#LOCAL}", !d.getSummary().multipleHostAccess); jObject.addProperty("{#NAA}", naaName[0].getDiskName()); jArray.add(jObject); } }
If is correct for you add this code into branch code.
Bye.
Andrea
Hi, I've just uploaded the version 2.0 which integrates your changes. Thank you !
Ok perfect.
Thanks.
Hi, we have a problem using NAS Datastore in Virtual center, for resolve this issue i add this code into getDatastores method :
If is correct for you add this code into branch code.
Bye.