opendevreview | Steve Baker proposed openstack/openstacksdk master: [baremetal] Add missing owner attribute to allocation https://review.opendev.org/c/openstack/openstacksdk/+/898882 | 01:24 |
---|---|---|
opendevreview | Steve Baker proposed openstack/openstacksdk master: [baremetal] driver add missing firmware interface https://review.opendev.org/c/openstack/openstacksdk/+/898883 | 01:24 |
opendevreview | Steve Baker proposed openstack/openstacksdk master: [baremetal] port add shard, is_smartnic, name https://review.opendev.org/c/openstack/openstacksdk/+/898884 | 01:24 |
opendevreview | Pierre-Samuel Le Stang proposed openstack/keystoneauth master: Allow setting retriable status codes for Adapter via configuration options https://review.opendev.org/c/openstack/keystoneauth/+/898826 | 08:06 |
chris218 | Hi, question, should Backup.list(conn.block_storage) retrieve same data as conn.list_volume_backups() in openstacksdk? | 10:51 |
gtema | chris218 - you should "never" invoke Backup.XXX methods directly. Instead you should use conn.block_storage.backups(). The conn.list_volume_backups() is a so called "cloud" layer and should not be necessary unless some very hard conditions of combining multiple API calls into 1 operation | 11:25 |
chris218 | Well conn.list function returned nothing and Backup.list returned a backup I made so I'll have to investigate further why is that | 11:27 |
gtema | "conn.list" != "conn.block_storage.backups" | 11:28 |
gtema | unless you know SDK very good you should avoid using any function on the conn directly or function on the resource itself. You should ONLY use "conn.<SERVICE>.<METHOD>" | 11:29 |
chris218 | I think I tried both but in a while I'll try again and if I still get nothing I'll get back to you | 11:29 |
chris218 | So why does stuff like conn.list_servers exist? | 11:30 |
gtema | historical and as I mentioned - special cases | 11:30 |
chris218 | Ooh ok good to know | 11:30 |
gtema | "conn.<method>" is there to normally get a wrapper around multiple API calls, i.e for provisioning server you need to query networks/images/volumes, create server and wait for it to go up | 11:31 |
gtema | this is not a single API operation and thus is done separately. "conn.<service>.<method>" is a representation of a single rest operation (with few exceptions) | 11:32 |
chris218 | Oh smart | 11:34 |
chris218 | Ok it looks like I just passed all_projects into backups() and it errored without me realising, my bad :/ | 12:09 |
chris218 | Also is there a way to pass a subparser to openstack.connect(options=) without openstack cli messing up argparsers help message? | 13:09 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!