Example:
When tried to modify a non existing network id the resource not found message received is not translated when another language is enabled (always returns english)
Post :https://<serverip>/openstack/network/v2.0//networks/dcea3730-ddc6-48cf-a1e9-26cea79074d0
There are 2 issues here related to GET/POST networks api
The POST call for which defect was raised is returning the webob/exc.py HTTPNotFound( HTTPClientError ) which is a 404 and is not translated.(https:/ /github. com/Pylons/ webob/blob/ master/ webob/exc. py line 702
Example:
When tried to modify a non existing network id the resource not found message received is not translated when another language is enabled (always returns english)
Post :https://<serverip> /openstack/ network/ v2.0//networks/ dcea3730- ddc6-48cf- a1e9-26cea79074 d0
Body: :{"name" :"Vlan456" ,"provider: network_ type":" vlan"," provider: physical_ network" :"default" ,"provider: segmentation_ id":457} }
{"network"
Response (using RestClient) :
<html>
<head>
<title>404 Not Found</title>
</head>
<body>
<h1>404 Not Found</h1>
The resource could not be found.<br /><br />
</body>
</html>
The GET call for invalid data is returning a NeutronError of NetworkNotFound but the message here is not translated. I think this is related to convert_ exception_ to_http_ exc in https:/ /github. com/openstack/ neutron/ blob/master/ neutron/ api/api_ common. py
Though according to https:/ /github. com/openstack/ neutron- lib/blob/ master/ neutron_ lib/exceptions. py NetworkNotFound at line 115 should be translated.
Example: network/ v2.0/networks/ dcea3730- ddc6-48cf- a1e9-26cea79074 d9
Invalid ID:
GET:https://<ip>/openstack/
Response: ddc6-48cf- a1e9-26cea79074 d9 could not be found.",
{
"NeutronError":
{
"message": "Network dcea3730-
"type": "NetworkNotFound",
"detail": ""
}
}
"Network dcea3730- ddc6-48cf- a1e9-26cea79074 d9 could not be found." message should get translated to other language and not always return english.
We need both these to translated.