| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-sdks - 2017-02-22 | |||
| 16:11:54 | ankur-gupta-f1 | swatson_: hey, what you looking into. I can help out. | |
| 16:12:01 | swatson_ | Is adding support for that in openstackclient similar to plugging in our python-magnumclient in some way, or is all the work done inside python-openstackclient? | |
| 16:12:57 | swatson_ | ankur-gupta-f1: Hey :) I've already done some work with our python-magnumclient, and a lot of the openstackclient looks similar, but I'm trying to find a good starting point so I don't go down the wrong path to begin with | |
| 16:14:18 | ankur-gupta-f1 | yea I am looking at it. It depends on if you want to plug python-magnumclient into OSC (thus you have full control over the client) or you want to bring the commands into OSC native repo | |
| 16:14:51 | ankur-gupta-f1 | https://docs.openstack.org/developer/python-openstackclient/plugins.html | |
| 16:15:24 | swatson_ | I think we want to go down the path of a plugin | |
| 16:16:09 | ankur-gupta-f1 | well in that case look at that link it shows how to get started. | |
| 16:16:30 | swatson_ | ankur-gupta-f1 thanks! | |
| 16:16:39 | ankur-gupta-f1 | swatson_: feel free to add me to any reviews | |
| 16:16:50 | swatson_ | ankur-gupta-f1 will do | |
| 16:18:13 | ankur-gupta-f1 | swatson_: Neutron has some of its extensions implemented as plugins https://github.com/openstack/python-neutronclient/tree/master/neutronclient/osc as with Trove https://github.com/openstack/python-troveclient/tree/master/troveclient/osc | |
| 16:21:35 | swatson_ | ankur-gupta-f1: So OSC is crawling client directories specifically for one named 'osc'? | |
| 16:22:08 | ankur-gupta-f1 | ? | |
| 16:23:51 | swatson_ | I'm just trying to figure out the mechanism OSC is using to find the plugins | |
| 16:24:13 | swatson_ | I see entry_points.txt but no openstack.cli.extension entry in that file | |
| 16:24:27 | openstackgerrit | Merged openstack/python-openstacksdk master: Fix problem with update including id https://review.openstack.org/436538 | |
| 16:27:07 | ankur-gupta-f1 | swatson_: i see. searching | |
| 16:27:10 | swatson_ | ankur-gupta-f1: I guess that's in an egg-info | |
| 16:27:44 | ankur-gupta-f1 | dtroyer: stevemar: ^^^^^^^^^^^ | |
| 16:35:43 | dtroyer | swatson_: are you at PTG? | |
| 16:35:50 | swatson_ | dtroyer: No | |
| 16:36:18 | dtroyer | ok, it would be easier to do this f2f… but I can type too :) | |
| 16:36:32 | swatson_ | :) | |
| 16:36:41 | dtroyer | I've only quckly scanned the scrollback, but the process for an OSC plugin is outlined in that link above | |
| 16:37:06 | dtroyer | the plugin registers an entrypoint via setuptools, that is what OSC scans to pick up what is installed | |
| 16:37:38 | swatson_ | ah ok | |
| 16:38:11 | swatson_ | jvgrant just showed me something that we apparently got started in magnum several weeks ago | |
| 16:38:32 | swatson_ | and ankur-gupta-f1 showed me a couple examples via neutron/trove which should be a decent starting point | |
| 16:39:25 | dtroyer | ok. my original bare-bones plugin is at https://github.com/dtroyer/osc-plugin and should still work (I haven't tested it recetnyl, but the plugin interface has not changed | |
| 16:40:11 | ankur-gupta-f1 | dtroyer: https://github.com/openstack/python-troveclient/blob/master/troveclient/osc/plugin.py its the plugin file that creates the hook right? or no? | |
| 16:40:59 | swatson_ | dtroyer: I'll check it out. Thanks! | |
| 16:41:01 | dtroyer | those are the callbacks that OSC uses after scanning the entrypoint nmespace | |
| 16:41:40 | dtroyer | one to add the global option for API version, and make_client() is what actually returns a client object of some sort to call for the REST operations | |
| 16:42:13 | dtroyer | also, all of the projects in the OSC repo itself are written as plugins using this mechanism so are useful to look at as examples | |
| 16:42:30 | dtroyer | look for the modules like compute/client.py | |
| 16:43:20 | ankur-gupta-f1 | thanks dtroyer | |
| 16:43:28 | swatson_ | dtroyer: Is there any pro/con to having the plugin defined in python-openstackclient vs the project itself aside from repo concerns? | |
| 16:44:46 | dtroyer | there isn't any real advantage anymore except for being auto-instaled, and the new "openstackclient" package in PyPi will change that, as it will install _every_ client plugin it knows about in one step | |
| 16:45:11 | dtroyer | also, we are not adding any new project into the OSC repo directly | |
| 16:45:16 | dtroyer | Neutron was the last one | |
| 16:45:24 | swatson_ | dtroyer Got it. Thanks for the pointers! | |
| 16:45:30 | swatson_ | You too, ankur-gupta-f1. Much appreciated | |
| 16:45:52 | dtroyer | let me know if you have any questions, or holler here, there is usually some around | |
| 16:45:55 | ankur-gupta-f1 | bah i try :) | |
| 16:46:01 | swatson_ | dtroyer Will do | |
| 16:49:48 | ankur-gupta-f1 | dtroyer: why the decision to not add any more projects into OSC repo directly? | |
| 17:01:22 | openstackgerrit | Shashank Kumar Shankar proposed openstack/python-openstackclient master: Introduce Neutron DHCP agent commands to OSC. https://review.openstack.org/387611 | |
| 17:06:36 | dtroyer | ankur-gupta-f1: dependencies, scale | |
| 17:07:03 | dtroyer | also, except for Neutron, that is all that existed when OSc started :) | |
| 17:13:50 | ankur-gupta-f4 | dtroyer: but that also means losing full control over how things are implemented. It would be harder to maintain syntax and current general guidelines | |
| 17:23:03 | openstackgerrit | Merged openstack/python-openstacksdk master: Add network flavor associate, disassociate to SDK https://review.openstack.org/403904 | |
| 17:32:58 | dtroyer | ankur-gupta-f1: that is correct. and that is the case, some plugins do "interesting" things. and some totally want to stay consistent with OSC. | |
| 17:34:37 | ankur-gupta-f1 | k | |
| 17:46:23 | openstackgerrit | Sindhu Devale proposed openstack/python-openstackclient master: OSC Quota List https://review.openstack.org/379813 | |
| 18:24:54 | openstackgerrit | Terry Howe proposed openstack/python-openstacksdk master: Remove unsupported telemetry create_sample method https://review.openstack.org/437053 | |
| 18:40:37 | openstackgerrit | Merged openstack/python-openstackclient master: OSC Network Flavor https://review.openstack.org/382530 | |
| 18:56:09 | openstackgerrit | Sindhu Devale proposed openstack/python-openstackclient master: OSC Quota List https://review.openstack.org/379813 | |
| 19:15:07 | openstackgerrit | Sindhu Devale proposed openstack/python-openstackclient master: "floating ip set/unset port" for OSC https://review.openstack.org/383025 | |
| 19:15:57 | elmiko | cdent, edleafe, etoews, you guys see this by chance? https://cloud.google.com/apis/design | |
| 19:20:32 | cdent | elmiko: i hadn't, no, will stick it in my read pipe | |
| 19:21:25 | cdent | elmiko: actually I think I saw it, but then forgot to read it, it looks familiar | |
| 19:21:47 | elmiko | nicely assembled, kudos to google. i'm not sure how long it has been floating around | |
| 19:25:03 | edleafe | added to my reading list | |
| 19:25:06 | edleafe | thanks elmiko | |
| 19:41:14 | reedip_1 | dtroyer: are you in PTG ? | |
| 20:04:11 | dtroyer | reedip_: yes | |
| 20:13:51 | openstackgerrit | Steve Martinelli proposed openstack/python-openstackclient master: add keystone and glance -> osc mapping https://review.openstack.org/437112 | |
| 20:24:46 | stevemar | dtroyer: this renders very nicely: https://github.com/openstack/python-openstackclient/blob/master/doc/source/data/cinder.csv | |
| 20:25:16 | openstackgerrit | Steve Martinelli proposed openstack/python-openstackclient master: minor tweaks to mapping table https://review.openstack.org/437119 | |
| 20:26:02 | ankur-gupta-f4 | stevemar: +1 nice | |
| 20:26:45 | stevemar | :) | |
| 20:35:41 | openstackgerrit | Ankur proposed openstack/python-openstackclient master: Auto allocated topology for OSC https://review.openstack.org/391331 | |
| 20:38:17 | openstackgerrit | Akihiro Motoki proposed openstack/python-openstackclient master: Auto allocated topology for OSC https://review.openstack.org/391331 | |
| 20:42:01 | reedip_1 | dtroyer : I have a query , related to a neutron specific CLI. But it may be required by other projects as well. | |
| 20:43:35 | reedip_1 | dtroyer : Neutron has a CLI which lists quotas of all tenants who have NON-Default Quotas. I am thinking of extending it OSC. But would like to know your opinion about the same. | |
| 20:45:25 | dtroyer | reedip_: is that https://review.openstack.org/#/c/379813/? | |
| 20:46:08 | reedip_1 | oh .. ok , yeah :) | |
| 20:46:18 | reedip_1 | I thought I saw it somewhere but couldnt find it | |
| 20:46:35 | reedip_1 | dtroyer: never mind, I will look into the following patch | |
| 20:57:20 | ankur-gupta-f4 | reedip_1: There is also an effort in place to expand the Neutron quotas API so if needed once that is merged we could probably do more with quota commands for network | |
| 20:57:59 | reedip_1 | ankur-gupta-f4 : link ? | |
| 20:58:03 | ankur-gupta-f4 | tho more on the usage side of things | |
| 20:58:09 | ankur-gupta-f4 | https://review.openstack.org/#/c/383673/ | |
| 20:58:46 | reedip_1 | Oh yeah, saw this ( and the accompanying email about too many emails ... and that comment is correct in a way :) ) | |
| 21:04:12 | reedip_1 | sindhu : did you see the error in http://logs.openstack.org/13/379813/18/check/gate-osc-dsvm-functional-ubuntu-xenial/6807e91/console.html#_2017-02-22_19_37_21_720417 ? | |
| 21:06:14 | openstackgerrit | Reedip proposed openstack/python-openstackclient master: OSC Quota List https://review.openstack.org/379813 | |
| 21:07:11 | reedip_1 | sindhu : I pushed a minor change to overcome the functional test issues | |
| 21:09:27 | sindhu | reedip_1: Okay cool ... thanks :) | |
| 21:11:04 | reedip_1 | :) | |
| 21:12:59 | ankur-gupta-f4 | reedip_1: u want fix some of my patches too :P | |
| 21:13:07 | ankur-gupta-f4 | Just kidding | |
| 21:24:03 | openstackgerrit | Reedip proposed openstack/python-openstackclient master: Introduce quota unset command https://review.openstack.org/376311 | |
| 21:24:05 | reedip_1 | ankur-gupta-f4 : OSC is in high demand :P | |
| 21:24:18 | reedip_1 | if you want , then I can , if I can stay awake that is :D | |
| 21:34:43 | swatson_ | dtroyer: What would be the best way to test commands from my plugin in OSC? | |
| 21:35:16 | swatson_ | i.e. how can I enable a command for my plugin that's outside OSC's repo on my machine? | |
| 21:46:06 | dtroyer | swatson_: you need to install the lib that contains the plugin | |
| 21:46:16 | dtroyer | for testing, include that in test-requirements.txt | |
| 21:49:09 | swatson_ | dtroyer: OK, cool | |
| 22:14:00 | reedip_1 | ankur-gupta-f4 : found a change to do in your patch | |