ArrayList<QueryType> queryTypes = new ArrayList<>(); for (Object networkQoS : sourceListModel.getSelectedItems()) { QueryParametersBase parameter = new IdQueryParameters(((NetworkQoS) networkQoS).getId()); parameters.add(parameter); queryTypes.add(QueryType.GetVnicProfilesByNetworkQosId);
/** * used to set qos's href (requires dc id). */ private void handleQosDataCenterLinks(Map<Guid, Qos> qosMap) { if (!qosMap.isEmpty()) { List<NetworkQoS> list = getBackendCollection( NetworkQoS.class, QueryType.GetAllQosByType, new QosQueryParameterBase(null, QosType.NETWORK)); for (NetworkQoS networkQoS : list) { Qos qos = qosMap.get(networkQoS.getId()); if (qos != null) { qos.setDataCenter(new DataCenter()); qos.getDataCenter().setId(networkQoS.getStoragePoolId().toString()); } } } }
public void flush() { if (vnicProfile == null) { vnicProfile = new VnicProfile(); } vnicProfile.setName(getName().getEntity()); Network network = getNetwork().getSelectedItem(); vnicProfile.setNetworkId(network != null ? network.getId() : null); NetworkQoS networkQoS = getNetworkQoS().getSelectedItem(); vnicProfile.setNetworkQosId(networkQoS != null && networkQoS.getId() != null && !networkQoS.getId().equals(Guid.Empty) ? networkQoS.getId() : null); NetworkFilter networkFilter = getNetworkFilter().getSelectedItem(); vnicProfile.setNetworkFilterId(networkFilter != null ? networkFilter.getId() : null); vnicProfile.setPortMirroring(getPortMirroring().getEntity()); vnicProfile.setPassthrough(getPassthrough().getEntity()); if (vnicProfile.isPassthrough()) { vnicProfile.setMigratable(getMigratable().getEntity()); } if (customPropertiesVisible) { vnicProfile.setCustomProperties(KeyValueModel.convertProperties(getCustomPropertySheet().serialize())); } else { vnicProfile.setCustomProperties(null); } vnicProfile.setDescription(getDescription().getEntity()); }