Alona Kaplan has uploaded a new change for review. Change subject: restapi: adding custom properties to vm interface (wip) ......................................................................
restapi: adding custom properties to vm interface (wip) In Device custom properties feature we are adding custom properties to a vnic. It works in the same way custom properties of vm work. When getting the vnic it will be displayed in the following way- <custom_properties> <custom_property name="prop_name" value="prop_value"/> </custom_properties> When adding/updating a vnic the custom properties are parsed to a string and set on VmNetworkInterface. Change-Id: Ie7f5daae4b0b2117d0cadceb2bb292fabf445c3c Signed-off-by: Alona Kaplan <alkap...@redhat.com> --- 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 2 files changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/01/15101/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 c57c0a3..e5d8d87 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 @@ -2464,6 +2464,7 @@ <xs:element name="plugged" type="xs:boolean" minOccurs="0"/> <xs:element ref="port_mirroring" minOccurs="0" maxOccurs="1"/> <xs:element ref="reported_devices" minOccurs="0" maxOccurs="1"/> + <xs:element name="custom_properties" type="CustomProperties" minOccurs="0"/> </xs:sequence> </xs:extension> </xs:complexContent> 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 5cc2f7a..f670601 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 @@ -447,7 +447,7 @@ parameterType: NIC signatures: - mandatoryArguments: {} - optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.name: 'xs:string', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}, nic.plugged: 'xs:boolean'} + optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.name: 'xs:string', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}, nic.plugged: 'xs:boolean', nic.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} urlparams: {} headers: Content-Type: {value: application/xml|json, required: true} @@ -476,7 +476,7 @@ parameterType: NIC signatures: - mandatoryArguments: {nic.name: 'xs:string'} - optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}, nic.plugged: 'xs:boolean'} + optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}, nic.plugged: 'xs:boolean', nic.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} urlparams: {} headers: Content-Type: {value: application/xml|json, required: true} @@ -2502,7 +2502,7 @@ parameterType: NIC signatures: - mandatoryArguments: {nic.name: 'xs:string'} - optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}} + optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}, nic.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} urlparams: {} headers: Content-Type: {value: application/xml|json, required: true} @@ -2530,7 +2530,7 @@ parameterType: NIC signatures: - mandatoryArguments: {} - optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.name: 'xs:string', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}} + optionalArguments: {nic.network.id|name: 'xs:string', nic.linked: 'xs:boolean', nic.name: 'xs:string', nic.mac.address: 'xs:string', nic.interface: 'xs:string', nic.port_mirroring.networks.network--COLLECTION: {network.id: 'xs:string'}, nic.custom_properties.custom_property--COLLECTION: {custom_property.name: 'xs:string', custom_property.value: 'xs:string'}} urlparams: {} headers: Content-Type: {value: application/xml|json, required: true} -- To view, visit http://gerrit.ovirt.org/15101 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ie7f5daae4b0b2117d0cadceb2bb292fabf445c3c Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alona Kaplan <alkap...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches