/** * Ensures that the network interface profile is returned. */ @Test public void testGetWithPassthrough() { VnicProfile result = dao .get(FixturesTool.VM_NETWORK_INTERFACE_PASSTHROUGH_PROFILE); assertNotNull(result); assertEquals(FixturesTool.VM_NETWORK_INTERFACE_PASSTHROUGH_PROFILE, result.getId()); assertTrue(result.isPassthrough()); assertFalse(result.isMigratable()); }
@Override public String toString() { return ToStringBuilder.forInstance(this) .append("id", getId()) .append("networkId", getNetworkId()) .append("networkQosId", getNetworkQosId()) .append("portMirroring", isPortMirroring()) .append("passthrough", isPassthrough()) .append("migratable", isMigratable()) .append("customProperties", getCustomProperties()) .append("description", getDescription()) .append("networkFilterId", getNetworkFilterId()) .build(); } }
@Override protected MapSqlParameterSource createFullParametersMapper(VnicProfile profile) { return createIdParameterMapper(profile.getId()) .addValue("name", profile.getName()) .addValue("network_id", profile.getNetworkId()) .addValue("network_qos_id", profile.getNetworkQosId()) .addValue("port_mirroring", profile.isPortMirroring()) .addValue("passthrough", profile.isPassthrough()) .addValue("migratable", profile.isMigratable()) .addValue("description", profile.getDescription()) .addValue("custom_properties", SerializationFactory.getSerializer().serialize(profile.getCustomProperties())) .addValue("network_filter_id", profile.getNetworkFilterId()); }
public EditVnicProfileModel(SearchableListModel<?, ?> sourceModel, VnicProfile profile, Guid dcId, boolean customPropertiesVisible) { super(sourceModel, customPropertiesVisible, dcId, profile.getNetworkQosId()); setTitle(constants.vnicProfileTitle()); setHelpTag(HelpTag.edit_vnic_profile); setHashName("edit_vnic_profile"); //$NON-NLS-1$ setProfile(profile); getName().setEntity(profile.getName()); getDescription().setEntity(profile.getDescription()); getPassthrough().setEntity(getProfile().isPassthrough()); getMigratable().setEntity(!getProfile().isPassthrough() || getProfile().isMigratable()); getPortMirroring().setEntity(getProfile().isPortMirroring()); getPublicUse().setIsAvailable(false); updateChangabilityIfVmsUsingTheProfile(); }
model.setMigratable(entity.isMigratable());