Comment 2 for bug 1836263

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

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.