The rest API allows to create a network provider without all the required data. It is possible to submit a query: POST http://localhost:8080/ovirt-engine/api/openstacknetworkproviders <openstack_network_provider> <type>NEUTRON</type> <name>x1</name> <url>http://localhost:9696</url> </openstack_network_provider> This will create an openstack provider without 'tenant' or 'plugin type'. This should be validated.
This is a business logic rule, so it should be validated by the backend's AddProvider command. It should generate the appropriate error message. The API will then return it to the caller.
Bug tickets must have version flags set prior to targeting them to a release. Please ask maintainer to set the correct version flags and only then set the target milestone.
How can this patch be merged in 4.0 and targeted to 4.1.0?
I don't really know why Marcin rushed to backport this to 4.0, but it's even better as it is. Let's keep it there.
Marcin, the validation working only for plugin type. <fault> <detail>[Openstack Neutron provider requires a plugin type.]</detail> <reason>Operation Failed</reason> </fault> But it is still possible to create network provider without username, password, tenant, auth-url <openstack_network_provider> <type>NEUTRON</type> <name>x2</name> <plugin_type>open_vswitch</plugin_type> <url>http://localhost:9696</url> </openstack_network_provider> <openstack_network_providerhref="/ovirt-engine/api/openstacknetworkproviders/ad6a4f89-4d02-4b5c-b51c-c7d4229dbba7"id="ad6a4f89-4d02-4b5c-b51c-c7d4229dbba7"> <actions> <linkhref="/ovirt-engine/api/openstacknetworkproviders/ad6a4f89-4d02-4b5c-b51c-c7d4229dbba7/testconnectivity"rel="testconnectivity"/> <linkhref="/ovirt-engine/api/openstacknetworkproviders/ad6a4f89-4d02-4b5c-b51c-c7d4229dbba7/importcertificates"rel="importcertificates"/> </actions> <name>x2</name> <linkhref="/ovirt-engine/api/openstacknetworkproviders/ad6a4f89-4d02-4b5c-b51c-c7d4229dbba7/networks"rel="networks"/> <linkhref="/ovirt-engine/api/openstacknetworkproviders/ad6a4f89-4d02-4b5c-b51c-c7d4229dbba7/certificates"rel="certificates"/> <requires_authentication>false</requires_authentication> <url>http://localhost:9696</url> <plugin_type>open_vswitch</plugin_type> <type>neutron</type> </openstack_network_provider> - Is this is OK? isn't should fail even if we not sending <requires_authentication>true</requires_authentication> ? I thought that the authentication is required.. Waiting for your response to decide if it's failed QA..Thanks)
Authentication is not always required. The user could have a network provider setup which does not require authentication, and in this case you don't have do specify user/password/url The flag which tells us if it is required is: <requires_authentication>true</requires_authentication> If this is set to TRUE, then we must have user/password/url If it is not present or FALSE, then no authentication data is necessary. Also note that for external providers tenant id is not required. Tenant is a openstack entity, so some implementations could not have this. Note that in the UI you can also uncheck the requires authentication, and not specify user/...
Thank you Marcin, Base on comments 5 and 6 this is verified on - 4.0.2.3-0.1.el7ev