fog-openstack
fog-openstack copied to clipboard
when i use fog-openstack 0.1.17,the router udpate method returns an error.
When i update a router,there is an error as below. Error: test_neutron_routers_create_get_delete_update(Debug): Excon::Error::BadRequest: Expected(200) <=> Actual(400 Bad Request) excon.error.response :body => "{"NeutronError":{"message":"Unrecognized attribute(s ) 'eserializ'","type":"HTTPBadRequest","detail":""}}" :cookies => [ ] :headers => { "Accept-Ranges" => "bytes" "Cache-Control" => "no-cache" "Connection" => "keep-alive" "Content-Type" => "application/json" "Date" => "Mon, 28 Nov 2016 09:24:17 GMT" "Server" => "Web Server"
and i catch the api usage info,i found there is a duplicated network_id keyword in the request body as below: {"router":{"name":"fog-router","admin_state_up":true,"external_gateway_info":{"network_id":{"network_id":"0a2228f2-7f8a-45f1-8e09-9039e1d09975"}}}}HTTP/1.1 400 Bad Request Server: Web Server Date: Mon, 28 Nov 2016 08:52:16 GMT Content-Type: application/json Transfer-Encoding: chunked Connection: keep-alive Accept-Ranges: bytes Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept X-Frame-Options: SAMEORIGIN Cache-Control: no-cache X-Content-Type-Options: nosniff X-Download-Options: noopen X-XSS-Protection: 1; mode=block {"NeutronError":{"message":"Unrecognized attribute(s) 'eserializ'","type":"HTTPBadRequest","detail":""}}
my testCode is as below:

I found there are tow network_id within the request body,i think it is an fog error.
I agree, I think the culprit is here on the update: https://github.com/fog/fog-openstack/blob/v0.1.17/lib/fog/network/openstack/models/router.rb#L53
If you would like to provide a fixing pull request, I'm happy to review.