*** dmsimard6 is now known as dmsimard | 06:38 | |
opendevreview | Shnaidman Sagi (Sergey) proposed openstack/ansible-collections-openstack master: Write tests log to a separate file https://review.opendev.org/c/openstack/ansible-collections-openstack/+/826454 | 11:19 |
---|---|---|
sshnaidm|afk | gtema, hey | 11:35 |
*** sshnaidm|afk is now known as sshnaidm | 11:35 | |
gtema | hey ya | 11:36 |
sshnaidm | gtema, I've extracted all methods from collection, how do I know what is cloud method and should be replaced? https://hackmd.io/zO7en3bARtylB4noldCAnw | 11:36 |
gtema | the ones 2 level (conn.XXX) are cloud layer, while 3 level (conn.xxx.yyy) are proxy layer | 11:37 |
sshnaidm | gtema, ack, greart | 11:37 |
gtema | but you will not be able to replace all to use proxy, i.e. creating server will not work | 11:37 |
sshnaidm | gtema, I think we should replace only retrieving information? | 11:38 |
gtema | and in reality recommended, but not mandatory | 11:38 |
gtema | what is required is maybe something like `return res.to_dict() if isinstance(res, openstack.Resource) else res` | 11:38 |
gtema | https://opendev.org/openstack/ansible-collections-openstack/src/branch/master/plugins/modules/volume_backup_info.py#L110 - here is one of the most commonly used ways how to deal with response of sdk | 11:40 |
gtema | it's just that for compatibility we might do this conditionally | 11:40 |
gtema | if the proxy level was used - this conversion is a must. If cloud level was used - older sdk might return Munch objects, newer will return Resource object | 11:41 |
sshnaidm | I did a first try something like that: https://review.opendev.org/c/openstack/ansible-collections-openstack/+/825291/8/plugins/modules/networks_info.py | 11:41 |
gtema | looks ok. I might however add some arg in to_dict so that it produces both sdk and server side attributes (duplicated) | 11:43 |
sshnaidm | yeah | 11:44 |
sshnaidm | probably we can make like "return res.to_dict() is hasattr(res, "to_dict") else res" | 11:45 |
gtema | I need to return some things for nodepool back and will add this also | 11:45 |
gtema | Yeah, us also a way | 11:45 |
opendevreview | Shnaidman Sagi (Sergey) proposed openstack/ansible-collections-openstack master: Write tests log to a separate file https://review.opendev.org/c/openstack/ansible-collections-openstack/+/826454 | 13:53 |
opendevreview | Shnaidman Sagi (Sergey) proposed openstack/ansible-collections-openstack master: Add zuul artifact https://review.opendev.org/c/openstack/ansible-collections-openstack/+/826746 | 17:40 |
opendevreview | Shnaidman Sagi (Sergey) proposed openstack/ansible-collections-openstack master: Add zuul artifact https://review.opendev.org/c/openstack/ansible-collections-openstack/+/826746 | 18:01 |
*** sshnaidm is now known as sshnaidm|afk | 18:13 | |
opendevreview | Merged openstack/ansible-collections-openstack master: Write tests log to a separate file https://review.opendev.org/c/openstack/ansible-collections-openstack/+/826454 | 19:01 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!