| Posted | Nick | Remark | |
|---|---|---|---|
| #openstack-sdks - 2024-10-18 | |||
| 09:58:57 | opendevreview | Rodolfo Alonso proposed openstack/python-openstackclient master: Add the trunk subports information to the port list command https://review.opendev.org/c/openstack/python-openstackclient/+/926611 | |
| 10:07:20 | opendevreview | Rodolfo Alonso proposed openstack/python-openstackclient master: Add the trunk subports information to the port list command https://review.opendev.org/c/openstack/python-openstackclient/+/926611 | |
| 11:27:49 | stephenfin | ralonsoh: I'm slightly concerned that we now have two similarly named methods that will only work with some services | |
| 11:28:15 | stephenfin | How come neutron is using POST instead of PUT? Is PUT an option? | |
| 11:28:32 | stephenfin | And what happens if you POST multiple times? Does that result in it being overridden or...? | |
| 11:38:10 | ralonsoh | stephenfin, PUT was the initial implementation. Was used to add a single tag to a resource. But there are some problems with the tag names, for example if you use slash / | |
| 11:38:41 | ralonsoh | post multiple times: that is tested in the patch. This is idempotent | |
| 11:38:59 | ralonsoh | you can post several times the same tag but it will be created once only | |
| 11:39:29 | ralonsoh | POST is the new method and in the CLI it will replace PUT | |
| 11:40:23 | stephenfin | I thought the issue was that we were passing the parameters in the URI rather than in the body? | |
| 11:40:29 | ralonsoh | yes | |
| 11:40:30 | stephenfin | (btw, I realize I'm straying into Neutron API design rather than openstacksdk stuff here, but I'd like to understand this so please bear with me :)) | |
| 11:40:44 | stephenfin | Okay, how come we didn't just...start passing it in the body? | |
| 11:40:54 | stephenfin | iiuc, that's what nova et al do? | |
| 11:40:55 | ralonsoh | that is the main reason: not to add the tag name in the URL | |
| 11:41:15 | stephenfin | https://docs.openstack.org/api-ref/compute/#replace-tags | |
| 11:42:07 | ralonsoh | that is different: with this call you will replace the existing tag list with the new one passed | |
| 11:42:18 | ralonsoh | with post you'll only create the non existing ones | |
| 11:42:53 | ralonsoh | in the Neutron CLI we are currently reading the current tags and creating the new tag list | |
| 11:43:13 | ralonsoh | instead with this it won't be needed first to read the tag list, you can directly POST the new tags | |
| 11:43:39 | stephenfin | Okay, gotcha. And I'm guessing it's still not possible to PUT with a body? | |
| 11:43:48 | ralonsoh | (and yes, another option could have been updating the neutron PUT command) | |
| 11:43:59 | ralonsoh | yes, this is another option too | |
| 11:44:19 | ralonsoh | I didn't go this way | |
| 11:44:33 | ralonsoh | but of course I can implement that too | |
| 11:45:06 | stephenfin | I'd be interested in knowing how many, if any, of the current methods in the TagMixin actually work with neutron resources | |
| 11:45:11 | stephenfin | i.e. https://review.opendev.org/c/openstack/openstacksdk/+/927779/7/openstack/common/tag.py | |
| 11:45:32 | stephenfin | If the answer is zero, or nearly zero, I wonder if neutron should have it's own TagMixin? | |
| 11:45:55 | ralonsoh | stephenfin, sorry, I don't understand the question | |
| 11:46:20 | ralonsoh | all Neutron resources that have tags (except for the bug with qos policies) work with these methods | |
| 11:46:30 | stephenfin | Can I do e.g. x = network.find('foo'); x.add_tag(session, 'bar') | |
| 11:46:42 | stephenfin | or x.remove_tag(session, 'bar') | |
| 11:46:53 | stephenfin | or x.check_tag(session, 'bar') | |
| 11:47:28 | ralonsoh | that must work, for sure, this patch has the corresponding functional tests | |
| 11:47:42 | ralonsoh | and I think we are testing all these methods | |
| 11:48:39 | ralonsoh | well, we are not testing all of them | |
| 11:48:57 | ralonsoh | let me add this in my TODO list: add FTs for Neutron resources in SDK | |
| 11:49:18 | ralonsoh | add FTs for tags for Neutron resources in SDK* | |
| 11:49:34 | ralonsoh | stephenfin, is that ok for you? | |
| 11:50:43 | stephenfin | sure | |
| 11:51:40 | greatgatsby | Hello. Is it possible to have the openstack commandline client perform pagination automatically, or force it to return all the results in some way? I believe --limit -1 does not work anymore? Thanks for your help. | |
| 11:53:51 | stephenfin | greatgatsby: Pagination should happen automatically. Could you test with OSC < 6.1.0 (when we switched from novaclient to SDK under the hood). I don't have an environment with enough VMs running to test. | |
| 11:56:30 | greatgatsby | stephenfin: thanks, I'll test that version. With 6.3.0, I get a 400 Client Error Invalid input for query parameters limit, Value -1 does not match '^[0-9]*$'. So it looks like it's the API that does not support this anymore, but OSC still shows -1 as a valid argument in the help. | |
| 11:58:25 | greatgatsby | this could also apply to listing volumes, for example, so I'm not sure it's specific to novaclient | |
| 11:59:50 | stephenfin | ralonsoh: Mea culpa. I misunderstood the bug /o\ I assumed this was a replacement for 'set_tag' method, but in reality you are using this as a replacement for the 'add_tag' method (and an alternative to 'set_tag' if you want to keep the extend rather than replace the existing tags) | |
| 12:00:01 | stephenfin | Right? | |
| 12:00:36 | stephenfin | greatgatsby: I'd have to go back and check, but my guess is the server never supported this and instead the client was doing something special if -1 was provided. | |
| 12:01:34 | stephenfin | actually, that was a quick grep. Yeah, this is a client-side thing https://github.com/openstack/python-novaclient/blob/3add6476fb265626d77704f7828dacc21cff81d9/novaclient/v2/servers.py#L1042-L1043 | |
| 12:02:24 | greatgatsby | oh interesting. So this is possibly something that could get "fixed" in the current OSC? | |
| 12:03:03 | stephenfin | greatgatsby: what happens if you omit --limit entirely? From reading that it appears if no limit parameter is provided then everything would have been returned. | |
| 12:03:29 | stephenfin | i.e. --limit -1 is identical to not providing --limit | |
| 12:04:39 | greatgatsby | with 6.3.0 I'm 99% sure we have to use pagination. If we don't provide limit or marker, we get a subset of all the servers | |
| 12:04:41 | ralonsoh | stephenfin, yes, we want to replace set_tag with add_tag, that is idempotent | |
| 12:07:03 | stephenfin | ralonsoh: Okay, Apologies for the confusion. In that case, new suggestion: s/create_tags/add_tags/ (plural) Tags aren't really a resource in their own right so you're not really "creating" anything, anymore than you'd be "creating" a name or name alias. | |
| 12:07:30 | stephenfin | I'd also still be in favour of providing a Neutron-specific TagMixin subclass with this in it, since afaik no other service has this API currently | |
| 12:08:13 | stephenfin | greatgatsby: Right you are. There's also this code https://github.com/openstack/python-novaclient/blob/3add6476fb265626d77704f7828dacc21cff81d9/novaclient/v2/servers.py#L1068-L1069 | |
| 12:08:50 | stephenfin | So the behavior now is that pagination will happen by default because that's what SDK default to. You'd have to opt-in to a limit if you wanted one | |
| 12:09:30 | ralonsoh | stephenfin, I'll update the patch today | |
| 12:10:03 | greatgatsby | stephenfin: ok, thanks a lot for the quick feedback. I'll look deeper into the SDK and investigate my options. Cheers. | |
| 12:11:03 | stephenfin | We should definitely re-add support for -1, at least temporarily. Whether we want to revert to pagination by default is a more difficult thing to decide. IMO, you'd always want to get everything unless you're in a huge environment, in which case you'll quickly learn to pass --limit | |
| 12:11:23 | stephenfin | greatgatsby: nw. If you can file a bug, please do. Links to the bug trackers are in the channel description | |
| 12:17:01 | greatgatsby | stephenfin: will do, thanks again | |
| 15:46:25 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1.discover https://review.opendev.org/c/openstack/keystoneauth/+/928814 | |
| 15:46:27 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1.plugin https://review.opendev.org/c/openstack/keystoneauth/+/930762 | |
| 15:53:10 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1.session https://review.opendev.org/c/openstack/keystoneauth/+/930763 | |
| 15:58:31 | opendevreview | Merged openstack/keystoneauth master: trivial: Consistent f prefixes https://review.opendev.org/c/openstack/keystoneauth/+/930764 | |
| 15:58:33 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1.adapter https://review.opendev.org/c/openstack/keystoneauth/+/930765 | |
| 16:08:54 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1._fair_semaphore https://review.opendev.org/c/openstack/keystoneauth/+/930766 | |
| 16:10:08 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate various plugin modules https://review.opendev.org/c/openstack/keystoneauth/+/930767 | |
| 16:10:09 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1._utils https://review.opendev.org/c/openstack/keystoneauth/+/930768 | |
| 16:10:11 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1.exceptions https://review.opendev.org/c/openstack/keystoneauth/+/930769 | |
| 21:14:09 | opendevreview | Oria Weng proposed openstack/python-openstackclient master: Identity: Migrate 'role' commands to SDK https://review.opendev.org/c/openstack/python-openstackclient/+/929712 | |
| #openstack-sdks - 2024-10-19 | |||
| 07:50:19 | opendevreview | Beomseok Kim proposed openstack/python-openstackclient master: Add a column to all_projects tag of server list cmd https://review.opendev.org/c/openstack/python-openstackclient/+/931573 | |
| 22:38:46 | opendevreview | Amir Nikpour proposed openstack/ansible-collections-openstack master: Add target_all_project option https://review.opendev.org/c/openstack/ansible-collections-openstack/+/932822 | |
| #openstack-sdks - 2024-10-20 | |||
| 05:01:34 | opendevreview | Beomseok Kim proposed openstack/python-openstackclient master: Add a column to all_projects tag of server list cmd https://review.opendev.org/c/openstack/python-openstackclient/+/931573 | |
| 06:19:48 | opendevreview | ahnseongeun proposed openstack/openstacksdk master: title: add get_zone_export_text method https://review.opendev.org/c/openstack/openstacksdk/+/932825 | |
| 10:33:18 | opendevreview | yosef proposed openstack/openstacksdk master: Add options property to User https://review.opendev.org/c/openstack/openstacksdk/+/932829 | |
| 10:45:15 | opendevreview | yosef proposed openstack/python-openstackclient master: options field not included in openstack user https://review.opendev.org/c/openstack/python-openstackclient/+/932830 | |
| 13:45:26 | opendevreview | Amir Nikpour proposed openstack/ansible-collections-openstack master: Add target_all_project option https://review.opendev.org/c/openstack/ansible-collections-openstack/+/932822 | |
| #openstack-sdks - 2024-10-21 | |||
| 08:38:10 | opendevreview | Rodolfo Alonso proposed openstack/openstacksdk master: Add functional test for tags in Neutron resources https://review.opendev.org/c/openstack/openstacksdk/+/932846 | |
| 09:10:03 | opendevreview | Rodolfo Alonso proposed openstack/openstacksdk master: Add method to create network resource tags https://review.opendev.org/c/openstack/openstacksdk/+/927779 | |
| 10:06:15 | opendevreview | Stephen Finucane proposed openstack/keystoneauth master: typing: Annotate keystoneauth1.access.service_providers https://review.opendev.org/c/openstack/keystoneauth/+/930771 | |
| 10:06:16 | opendevreview | Stephen Finucane proposed openstack/keystoneauth master: access: Add more helper attributes to AccessInfoV3 https://review.opendev.org/c/openstack/keystoneauth/+/930772 | |
| 10:06:17 | opendevreview | Stephen Finucane proposed openstack/keystoneauth master: access: Remove use of _missingproperty wrapper https://review.opendev.org/c/openstack/keystoneauth/+/930773 | |
| 10:06:18 | opendevreview | Stephen Finucane proposed openstack/keystoneauth master: typing: Annotate keystoneauth1.access.access https://review.opendev.org/c/openstack/keystoneauth/+/930774 | |
| 10:07:42 | opendevreview | Rodolfo Alonso proposed openstack/openstacksdk master: Add functional test for tags in Neutron resources https://review.opendev.org/c/openstack/openstacksdk/+/932846 | |
| 13:04:46 | opendevreview | Merged openstack/keystoneauth master: typing: Annotate keystoneauth1.access.service_catalog https://review.opendev.org/c/openstack/keystoneauth/+/930770 | |
| 14:35:38 | opendevreview | Merged openstack/openstacksdk master: Add options property to User https://review.opendev.org/c/openstack/openstacksdk/+/932829 | |
| 14:35:40 | opendevreview | Merged openstack/openstacksdk master: compute: Add locked filter for Server https://review.opendev.org/c/openstack/openstacksdk/+/932400 | |
| 14:45:58 | opendevreview | Rodolfo Alonso proposed openstack/openstacksdk master: Add functional test for tags in Neutron resources https://review.opendev.org/c/openstack/openstacksdk/+/932846 | |
| 14:46:02 | opendevreview | Rodolfo Alonso proposed openstack/openstacksdk master: Add method to create network resource tags https://review.opendev.org/c/openstack/openstacksdk/+/927779 | |
| 16:05:56 | opendevreview | Rodolfo Alonso proposed openstack/openstacksdk master: Add method to create network resource tags https://review.opendev.org/c/openstack/openstacksdk/+/927779 | |
| 16:07:46 | opendevreview | Andreas Gocht-Zech proposed openstack/keystoneauth master: Fixing bug #1808550, add lxml as dependency https://review.opendev.org/c/openstack/keystoneauth/+/932924 | |
| 17:12:30 | opendevreview | Antonia Gaete proposed openstack/python-openstackclient master: identity: Migrate `region` commands to SDK https://review.opendev.org/c/openstack/python-openstackclient/+/930937 | |
| 18:36:29 | opendevreview | Antonia Gaete proposed openstack/python-openstackclient master: identity: Migrate 'trust' commands to SDK https://review.opendev.org/c/openstack/python-openstackclient/+/931694 | |
| 20:38:14 | opendevreview | Amir Nikpour proposed openstack/ansible-collections-openstack master: Add target_all_project option https://review.opendev.org/c/openstack/ansible-collections-openstack/+/932822 | |
| 23:04:26 | opendevreview | Oria Weng proposed openstack/openstacksdk master: Identity: Support assigning inherited roles https://review.opendev.org/c/openstack/openstacksdk/+/929578 | |
| 23:05:20 | opendevreview | Oria Weng proposed openstack/openstacksdk master: Identity: Support assigning inherited roles https://review.opendev.org/c/openstack/openstacksdk/+/929578 | |
| 23:05:56 | opendevreview | Oria Weng proposed openstack/openstacksdk master: Identity: Support assigning inherited roles https://review.opendev.org/c/openstack/openstacksdk/+/929578 | |
| #openstack-sdks - 2024-10-22 | |||
| 06:51:35 | yosal | Hi, IRC does not have history??? | |