[RFE] Plugin support for API resource attribute extensions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Won't Fix
|
Wishlist
|
Unassigned | ||
python-openstackclient |
New
|
Undecided
|
Unassigned |
Bug Description
NOTE:
On 11/28/2017 I removed the old description from this bug and replaced with a simpler more consolidated version based on an example. It seems the old description's verbose nature may cause elongated understanding of the issue.
PROBLEM:
Neutron plugin API extensions that add attributes to existing API resources have no proper way to extend the python-
EXAMPLE:
a) We have a plugin that extends an existing API resource [1]; in this example we add a 'logging' attribute to the existing 'security_groups' API resource.
b) Now we want to add CLI support for the 'logging' attribute. But there's not clean way with OSC today:
..1) To get the new 'logging' attribute to even show up (parse from API and display on output), we need to update the sdk [2]. Traditionally this has not been something done for "non-stadium projects".
..2) The python-
..3) As a result we need to duplicate the OSC code [3] for security_groups to add our custom logic [4]. Now we have to try and keep [4] in sync with [3] which is less than optimal.
Some existing plugins that have resource attribute extensions today: [1][5][6][7][8]
MITIGATION:
Today we can still use the python-
For example with neutron client you can do something like:
neutron security-
and the client will pass logging=blah to the API allowing the extension to function properly. In addition the neutronclient will display the value(s) of 'logging' in the CLI output without and code changes to the python-
That said the current mitigation is to use the neutronclient.
CONSIDERATIONS:
- If the longer term goal is to move away from API extensions in neutron (like nova did [9]), then maybe we just support neutronclient until that time.
- While the current support we have for these extensions in neutronclient maybe a "side effect" (e.g. loose kwarg passing and CLI input/output), I know we have existing deployments relying on this support. So removing such support would leave them with no options.
- There maybe some middle ground to get support in OSC in the shorter-term, but in general it's my understanding that the SDK/OSC has few reviewers and maybe undergoing a "restructure" [10].
[1] https:/
[2] https:/
[3] https:/
[4] https:/
[5] http://
[6] http://
[7] http://
[8] http://
[9] https:/
[10] http://
Changed in neutron: | |
status: | New → Confirmed |
importance: | Undecided → Wishlist |
Changed in python-openstacksdk: | |
status: | New → Won't Fix |
no longer affects: | python-openstacksdk |
description: | updated |
description: | updated |
I plan to let this age a little here, and then I'll try to get a slot on the OSC meeting to discuss; say in about 2 weeks time.
Again I'm willing to do this work, but want some agreement that the work can land in some form before investing the time hacking on some code.
There are obviously many ways to solve this problem; I have some ideas, but would prefer to get some input form those who have a history with this code.
Thanks