yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #79242
[Bug 1836263] [NEW] doc: PUT /ports/{port_id} updates selectively
Public bug reported:
Based on noted usage in Nova [1], it appears as though PUT
/v2/ports/{port_id} [2] with a payload like
{ "port":
"foo": ...,
}
will update only port.foo on the server, leaving all the other contents
of the port untouched.
That is, you can GET-extract-PUT rather than GET-modify-PUT.
I assume (but am not certain) this is restricted to the top-level keys
listed in the table in the API reference. So for example, if the port
previously looked like
{ "port":
...,
"dns_assignment": {
"hostname": "myport",
"ip_address": "20.20.0.4",
"fqdn": "myport.my-domain.org"
},
...,
}
and I PUT /v2/ports/{port_id} with
{ "port":
"dns_assignment": {
"ip_address": "10.10.0.4",
},
}
I will wind up with no "hostname" or "fqdn" in my port.dns_assignment.
I'm also not certain what happens if I send a `null`
{ "port":
"binding:profile": null
}
Do I wind up with port.binding:profile == {}, null, or absent?
===================
This bug is to request that the API reference documentation be enhanced
to include this information for PUT /v2/ports/{port_id}.
(It's possible that similar principles apply to PUTting other resources
as well -- I didn't check -- in which case it may make sense to write a
section in the front matter explaining the principle and linking to it
from the various operations.)
[1] http://codesearch.openstack.org/?q=%5C.update_port%5C(&i=nope&files=&repos=openstack/nova
[2] https://developer.openstack.org/api-ref/network/v2/?expanded=update-port-detail#update-port
** Affects: neutron
Importance: Undecided
Status: New
** Tags: doc
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1836263
Title:
doc: PUT /ports/{port_id} updates selectively
Status in neutron:
New
Bug description:
Based on noted usage in Nova [1], it appears as though PUT
/v2/ports/{port_id} [2] with a payload like
{ "port":
"foo": ...,
}
will update only port.foo on the server, leaving all the other
contents of the port untouched.
That is, you can GET-extract-PUT rather than GET-modify-PUT.
I assume (but am not certain) this is restricted to the top-level keys
listed in the table in the API reference. So for example, if the port
previously looked like
{ "port":
...,
"dns_assignment": {
"hostname": "myport",
"ip_address": "20.20.0.4",
"fqdn": "myport.my-domain.org"
},
...,
}
and I PUT /v2/ports/{port_id} with
{ "port":
"dns_assignment": {
"ip_address": "10.10.0.4",
},
}
I will wind up with no "hostname" or "fqdn" in my port.dns_assignment.
I'm also not certain what happens if I send a `null`
{ "port":
"binding:profile": null
}
Do I wind up with port.binding:profile == {}, null, or absent?
===================
This bug is to request that the API reference documentation be
enhanced to include this information for PUT /v2/ports/{port_id}.
(It's possible that similar principles apply to PUTting other
resources as well -- I didn't check -- in which case it may make sense
to write a section in the front matter explaining the principle and
linking to it from the various operations.)
[1] http://codesearch.openstack.org/?q=%5C.update_port%5C(&i=nope&files=&repos=openstack/nova
[2] https://developer.openstack.org/api-ref/network/v2/?expanded=update-port-detail#update-port
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1836263/+subscriptions
Follow ups