@Override protected VnicProfile createVnicProfileEntity() { return new VnicProfile(); } }
public void newProfile() { if (getWindow() != null) { return; } NewVnicProfileModel model = new NewVnicProfileModel(this, getEntity().getDataCenterId()); setWindow(model); VnicProfile profile = new VnicProfile(); profile.setNetworkId(getEntity().getId()); model.setProfile(profile); }
@Override protected VnicProfile generateNewEntity() { VnicProfile vnicProfile = new VnicProfile(); vnicProfile.setId(Guid.newGuid()); vnicProfile.setName("new_profile"); vnicProfile.setNetworkId(FixturesTool.NETWORK_ENGINE); vnicProfile.setNetworkQosId(FixturesTool.NETWORK_QOS); vnicProfile.setPortMirroring(false); vnicProfile.setPassthrough(false); vnicProfile.setNetworkFilterId(FixturesTool.VNIC_PROFILE_NETWORK_FILTER); vnicProfile.setMigratable(true); vnicProfile.setCustomProperties(Collections.emptyMap()); return vnicProfile; }
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()); }
org.ovirt.engine.core.common.businessentities.network.VnicProfile template) { org.ovirt.engine.core.common.businessentities.network.VnicProfile entity = template != null ? template : new org.ovirt.engine.core.common.businessentities.network.VnicProfile(); if (model.isSetId()) { entity.setId(GuidUtils.asGuid(model.getId()));