use of com.vmware.vim25.RetrieveResult in project photon-model by vmware.
the class GetMoRef method populate.
public static String populate(final RetrieveResult rslts, final Map<String, ManagedObjectReference> tgtMoref) {
String token = null;
if (rslts != null) {
token = rslts.getToken();
for (ObjectContent oc : rslts.getObjects()) {
ManagedObjectReference mr = oc.getObj();
String entityNm = null;
List<DynamicProperty> dps = oc.getPropSet();
if (dps != null) {
for (DynamicProperty dp : dps) {
entityNm = (String) dp.getVal();
}
}
tgtMoref.put(entityNm, mr);
}
}
return token;
}
Aggregations