Alona Kaplan has uploaded a new change for review. Change subject: restapi: adding 'pssthrough' property to vnic profile ......................................................................
restapi: adding 'pssthrough' property to vnic profile The 'passthrough' property will indicate that a VF should be directly attached to the VM. Change-Id: I9bd44a872e03b8608d7ecdf01a5e19ee412836a8 Signed-off-by: Alona Kaplan <[email protected]> --- M backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd M backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml M backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VnicProfileMapper.java 3 files changed, 8 insertions(+), 3 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/30/39530/1 diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd index 47797b3..c169d58 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/api.xsd @@ -2586,6 +2586,7 @@ <xs:sequence> <xs:element ref="network" minOccurs="0" maxOccurs="1"/> <xs:element name="port_mirroring" type="xs:boolean" minOccurs="0"/> + <xs:element name="passthrough" type="xs:boolean" minOccurs="0" maxOccurs="1"/> <xs:element ref="custom_properties" minOccurs="0"/> <xs:element ref="qos" minOccurs="0" maxOccurs="1"/> </xs:sequence> diff --git a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml index 87ce521..d14718a 100644 --- a/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml +++ b/backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml @@ -3294,7 +3294,7 @@ parameterType: VnicProfile signatures: - mandatoryArguments: {vnicprofile.name: 'xs:string'} - optionalArguments: {vnicprofile.description: 'xs:string', vnicprofile.port_mirroring: 'xs:boolean', + optionalArguments: {vnicprofile.description: 'xs:string', vnicprofile.port_mirroring: 'xs:boolean', vnicprofile.passthrough: 'xs:boolean', vnicprofile.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} description: add a new virtual network interface card profile for the network urlparams: {} @@ -3365,7 +3365,7 @@ parameterType: VnicProfile signatures: - mandatoryArguments: {} - optionalArguments: {vnicprofile.name: 'xs:string', vnicprofile.description: 'xs:string', vnicprofile.port_mirroring: 'xs:boolean', + optionalArguments: {vnicprofile.name: 'xs:string', vnicprofile.description: 'xs:string', vnicprofile.port_mirroring: 'xs:boolean', vnicprofile.passthrough: 'xs:boolean', vnicprofile.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} description: update the specified virtual network interface card profile in the system urlparams: {} @@ -3378,7 +3378,7 @@ parameterType: VnicProfile signatures: - mandatoryArguments: {vnicprofile.network.id: 'xs:string', vnicprofile.name: 'xs:string'} - optionalArguments: {vnicprofile.description: 'xs:string', vnicprofile.port_mirroring: 'xs:boolean', + optionalArguments: {vnicprofile.description: 'xs:string', vnicprofile.port_mirroring: 'xs:boolean', vnicprofile.passthrough: 'xs:boolean', vnicprofile.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} description: add a new virtual network interface card profile to the system urlparams: {} diff --git a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VnicProfileMapper.java b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VnicProfileMapper.java index a654be9..fc87bb7 100644 --- a/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VnicProfileMapper.java +++ b/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/types/VnicProfileMapper.java @@ -29,6 +29,9 @@ if (model.isSetPortMirroring()) { entity.setPortMirroring(model.isPortMirroring()); } + if (model.isSetPassthrough()) { + entity.setPassthrough(model.isPassthrough()); + } if (model.isSetCustomProperties()) { entity.setCustomProperties(DevicePropertiesUtils.getInstance() .convertProperties(CustomPropertiesParser.parse(model.getCustomProperties().getCustomProperty()))); @@ -57,6 +60,7 @@ model.getNetwork().setId(entity.getNetworkId().toString()); } model.setPortMirroring(entity.isPortMirroring()); + model.setPassthrough(entity.isPassthrough()); if (entity.getCustomProperties() != null && !entity.getCustomProperties().isEmpty()) { CustomProperties hooks = new CustomProperties(); hooks.getCustomProperty().addAll(CustomPropertiesParser.parse( -- To view, visit https://gerrit.ovirt.org/39530 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9bd44a872e03b8608d7ecdf01a5e19ee412836a8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
