I checked this case with sending "null" and it ended up with {}, please look:
[10:21:29] vagrant@devstack-ubuntu-ovs:/opt/stack/neutron$ curl -g -i -X PUT http://10.120.0.30/networking/v2.0/ports/d3d2e4b4-d3ca-4990-aa44-0dae17bce7b5 -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-neutronclient" -H "X-Auth-Token: $token" -d '{"port": {"binding:profile": null}}' HTTP/1.1 200 OK Date: Fri, 12 Jul 2019 08:21:33 GMT Server: Apache/2.4.29 (Ubuntu) Content-Type: application/json Content-Length: 1164 x-openstack-request-id: req-ec1da9dc-f280-4157-b3bc-d44e3616a810 Connection: close
{"port":{"id":"d3d2e4b4-d3ca-4990-aa44-0dae17bce7b5","name":"test","network_id":"8e8f7b14-9e1e-4ff9-b2c8-246724f50574","tenant_id":"ce5659eb5e504ff796b546138874ef6f","mac_address":"fa:16:3e:3d:ff:66","admin_state_up":true,"status":"DOWN","fixed_ips":[{"subnet_id":"207078c9-baee-418c-a71b-323093db99a5","ip_address":"192.168.0.2"}],"device_id":"dhcpf3db79e0-7113-530b-8d71-7cf272128298-8e8f7b14-9e1e-4ff9-b2c8-246724f50574","device_owner":"network:dhcp","allowed_address_pairs":[],"extra_dhcp_opts":[],"security_groups":[],"description":"","binding:vnic_type":"normal","binding:profile":{},"binding:host_id":"devstack-ubuntu-ovs","binding:vif_type":"ovs","binding:vif_details":{"connectivity":"l2","port_filter":true,"ovs_hybrid_plug":false,"datapath_type":"system","bridge_name":"br-int"},"port_security_enabled":false,"qos_policy_id":null,"dns_name":"","dns_assignment":[{"ip_address":"192.168.0.2","hostname":"host-192-168-0-2","fqdn":"host-192-168-0-2.example.org."}],"dns_domain":"","resource_request":null,"tags":[],"created_at":"2019-06-29T21:31:58Z","updated_at":"2019-07-12T08:21[10:21:34] vagrant@devstack-ubuntu-ovs:/opt/stack/neutron$ neutron port-show d3d2e4b4-d3ca-4990-aa44-0dae17bce7b5 neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead. +-----------------------+---------------------------------------------------------------------------------------------------------------------------+ | Field | Value | +-----------------------+---------------------------------------------------------------------------------------------------------------------------+ | admin_state_up | True | | allowed_address_pairs | | | binding:host_id | devstack-ubuntu-ovs | | binding:profile | {} | | binding:vif_details | {"connectivity": "l2", "port_filter": true, "ovs_hybrid_plug": false, "datapath_type": "system", "bridge_name": "br-int"} | | binding:vif_type | ovs | | binding:vnic_type | normal | | created_at | 2019-06-29T21:31:58Z | | description | | | device_id | dhcpf3db79e0-7113-530b-8d71-7cf272128298-8e8f7b14-9e1e-4ff9-b2c8-246724f50574 | | device_owner | network:dhcp | | dns_assignment | {"ip_address": "192.168.0.2", "hostname": "host-192-168-0-2", "fqdn": "host-192-168-0-2.example.org."} | | dns_domain | | | dns_name | | | extra_dhcp_opts | | | fixed_ips | {"subnet_id": "207078c9-baee-418c-a71b-323093db99a5", "ip_address": "192.168.0.2"} | | id | d3d2e4b4-d3ca-4990-aa44-0dae17bce7b5 | | mac_address | fa:16:3e:3d:ff:66 | | name | test | | network_id | 8e8f7b14-9e1e-4ff9-b2c8-246724f50574 | | port_security_enabled | False | | project_id | ce5659eb5e504ff796b546138874ef6f | | qos_policy_id | | | resource_request | | | revision_number | 16 | | security_groups | | | status | ACTIVE | | tags | | | tenant_id | ce5659eb5e504ff796b546138874ef6f | | updated_at | 2019-07-12T08:21:36Z | +-----------------------+---------------------------------------------------------------------------------------------------------------------------+
But the first part of Your report is true. We definitely should update our docs if it's not written there.
I checked this case with sending "null" and it ended up with {}, please look:
[10:21:29] vagrant@ devstack- ubuntu- ovs:/opt/ stack/neutron$ curl -g -i -X PUT http:// 10.120. 0.30/networking /v2.0/ports/ d3d2e4b4- d3ca-4990- aa44-0dae17bce7 b5 -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python- neutronclient" -H "X-Auth-Token: $token" -d '{"port": {"binding:profile": null}}' request- id: req-ec1da9dc- f280-4157- b3bc-d44e3616a8 10
HTTP/1.1 200 OK
Date: Fri, 12 Jul 2019 08:21:33 GMT
Server: Apache/2.4.29 (Ubuntu)
Content-Type: application/json
Content-Length: 1164
x-openstack-
Connection: close
{"port" :{"id": "d3d2e4b4- d3ca-4990- aa44-0dae17bce7 b5","name" :"test" ,"network_ id":"8e8f7b14- 9e1e-4ff9- b2c8-246724f505 74","tenant_ id":"ce5659eb5e 504ff796b546138 874ef6f" ,"mac_address" :"fa:16: 3e:3d:ff: 66","admin_ state_up" :true," status" :"DOWN" ,"fixed_ ips":[{ "subnet_ id":"207078c9- baee-418c- a71b-323093db99 a5","ip_ address" :"192.168. 0.2"}], "device_ id":"dhcpf3db79 e0-7113- 530b-8d71- 7cf272128298- 8e8f7b14- 9e1e-4ff9- b2c8-246724f505 74","device_ owner": "network: dhcp"," allowed_ address_ pairs": [],"extra_ dhcp_opts" :[],"security_ groups" :[],"descriptio n":""," binding: vnic_type" :"normal" ,"binding: profile" :{},"binding: host_id" :"devstack- ubuntu- ovs","binding: vif_type" :"ovs", "binding: vif_details" :{"connectivity ":"l2", "port_filter" :true," ovs_hybrid_ plug":false, "datapath_ type":" system" ,"bridge_ name":" br-int" },"port_ security_ enabled" :false, "qos_policy_ id":null, "dns_name" :"","dns_ assignment" :[{"ip_ address" :"192.168. 0.2","hostname" :"host- 192-168- 0-2","fqdn" :"host- 192-168- 0-2.example. org."}] ,"dns_domain" :"","resource_ request" :null," tags":[ ],"created_ at":"2019- 06-29T21: 31:58Z" ,"updated_ at":"2019- 07-12T08: 21[10:21: 34] vagrant@ devstack- ubuntu- ovs:/opt/ stack/neutron$ neutron port-show d3d2e4b4- d3ca-4990- aa44-0dae17bce7 b5 ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+ address_ pairs | | 29T21:31: 58Z | 7113-530b- 8d71-7cf2721282 98-8e8f7b14- 9e1e-4ff9- b2c8-246724f505 74 | 168-0-2. example. org."} | baee-418c- a71b-323093db99 a5", "ip_address": "192.168.0.2"} | d3ca-4990- aa44-0dae17bce7 b5 | 9e1e-4ff9- b2c8-246724f505 74 | enabled | False | 796b546138874ef 6f | 796b546138874ef 6f | 12T08:21: 36Z | ------- ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- -+
neutron CLI is deprecated and will be removed in the future. Use openstack CLI instead.
+------
| Field | Value |
+------
| admin_state_up | True |
| allowed_
| binding:host_id | devstack-ubuntu-ovs |
| binding:profile | {} |
| binding:vif_details | {"connectivity": "l2", "port_filter": true, "ovs_hybrid_plug": false, "datapath_type": "system", "bridge_name": "br-int"} |
| binding:vif_type | ovs |
| binding:vnic_type | normal |
| created_at | 2019-06-
| description | |
| device_id | dhcpf3db79e0-
| device_owner | network:dhcp |
| dns_assignment | {"ip_address": "192.168.0.2", "hostname": "host-192-168-0-2", "fqdn": "host-192-
| dns_domain | |
| dns_name | |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "207078c9-
| id | d3d2e4b4-
| mac_address | fa:16:3e:3d:ff:66 |
| name | test |
| network_id | 8e8f7b14-
| port_security_
| project_id | ce5659eb5e504ff
| qos_policy_id | |
| resource_request | |
| revision_number | 16 |
| security_groups | |
| status | ACTIVE |
| tags | |
| tenant_id | ce5659eb5e504ff
| updated_at | 2019-07-
+------
But the first part of Your report is true. We definitely should update our docs if it's not written there.