opendevreview | huang liujie proposed openstack/openstacksdk master: Replace deprecated failUnlessEqual with assertEqual https://review.opendev.org/c/openstack/openstacksdk/+/850708 | 03:08 |
---|---|---|
*** undefined is now known as Guest5693 | 05:12 | |
gtema | jm1: it claims it accepts Id or name or object. Looking at the code I can't understand where it may fail, therefore I would need to see how you invoke it | 05:36 |
gtema | On the other side, once you have server object (created or fetched via cloud layer) you can fully use proxy/resource layer to do further stuff on it | 05:37 |
jm1 | gtema: let me update the patch for openstack.cloud.server and then its easier to pin down. found some other funny issues as well, which are probably in neutron | 06:31 |
gtema | Good | 06:39 |
*** arxcruz is now known as arxcruz|rover | 06:54 | |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Refactored server and server_info modules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849423 | 07:05 |
jm1 | gtema: here it is: https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849423/7/plugins/modules/server.py#1122 | 07:13 |
jm1 | gtema: if you replace sg with sg['id'] then it throws this "Security group name cannot be empty" error | 07:14 |
jm1 | gtema: here is the code that triggers the other issue with "Additional properties are not allowed ('security_groups' was unexpected)" https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849423/7/plugins/modules/server.py#1146 | 07:15 |
jm1 | gtema: replace server['id'] with server to get the error | 07:15 |
gtema | 🤦♂️ | 07:15 |
gtema | right | 07:15 |
gtema | _get_resource is not an analogue to find | 07:16 |
gtema | so in this case doc that it accepts name is wrong | 07:16 |
gtema | you can pass object or dict{name:'my_tricky_name'} though | 07:16 |
gtema | perhaps passing dict you may need to add id, but afair it should work also without | 07:17 |
jm1 | gtema: ack i just pass the whole sg object since i retrieved it anyway | 07:20 |
gtema | but a side note, it may be good to move biggest part of the module into the sdk itself | 07:20 |
opendevreview | Yusuke Niimi proposed openstack/keystoneauth master: OAuth2.0 Client Credentials Grant Flow Support https://review.opendev.org/c/openstack/keystoneauth/+/830734 | 07:26 |
jm1 | gtema: which parts to which location in the sdk? | 07:29 |
gtema | I would not say most, but it would be generally good in the module to have just a single call to sdk. At least not really dealing with fetching networks/volumes/SGs/etc | 07:31 |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Refactored port and port_info modules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/850627 | 07:31 |
jm1 | gtema: but there is currently no equivalent idempotent functionality in sdk, is it? | 07:33 |
jm1 | gtema: it would require a new kind of function, maybe in cloud layer? | 07:33 |
gtema | idempotency in cloud resources is anyway a "thing" | 07:33 |
gtema | I can image module doing: get_server (to fetch it/check presence), create_server (brand new), update_server (all updates, eventually with "check" mode) and delete_server | 07:35 |
gtema | its just in the case of server big part of logic is common also to OSC | 07:35 |
jm1 | gtema: what i mean is, the sdk has create, update, delete operations but no "ensure it is in this state no matter what it is atm" function. | 07:35 |
gtema | yeah, and this is what I mean - this part of idempotency implementation may be moved into sdk | 07:36 |
gtema | to keep module simple, to have less passes between sdk and ansible (including all the conversions) and have possibility to reuse it in osc | 07:36 |
jm1 | gtema: i agree that it should belong to the sdk. but maybe first we want to finish aoc and remove some issues with sdk ;) | 07:37 |
gtema | we may move it there once it is created and tested here in ACO or instead do brand new dev in sdk first | 07:37 |
gtema | sure | 07:37 |
jm1 | gtema: i am trying to follow this style used in server module in other modules as well: https://review.opendev.org/c/openstack/ansible-collections-openstack/+/850627 | 07:38 |
gtema | i know, this is a relatively exceptional case (because of its complexity) | 07:38 |
gtema | but on the other side this approach may be then applied for other modules by moving implemented logic to sdk | 07:39 |
jm1 | gtema: yes. i am trying to figure out a module structure that works across all (resource) modules, from which we could probably derive a generic module impl and then move parts over to sdk | 07:41 |
gtema | cool | 07:41 |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Refactored server and server_info modules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849423 | 09:08 |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Remove deprecated stuff from baremetal_node https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849668 | 09:24 |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Dropped symbolic links and plugin routing for deprecated module names https://review.opendev.org/c/openstack/ansible-collections-openstack/+/850460 | 09:48 |
*** Guest5693 is now known as rcastillo | 13:09 | |
opendevreview | Merged openstack/ansible-collections-openstack master: Dropped symbolic links and plugin routing for deprecated module names https://review.opendev.org/c/openstack/ansible-collections-openstack/+/850460 | 13:47 |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Remove deprecated stuff from baremetal_node https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849668 | 14:02 |
opendevreview | Rafael Castillo proposed openstack/ansible-collections-openstack master: Update router for 2.0.0 https://review.opendev.org/c/openstack/ansible-collections-openstack/+/846446 | 14:05 |
opendevreview | Rafael Castillo proposed openstack/ansible-collections-openstack master: Update router for 2.0.0 https://review.opendev.org/c/openstack/ansible-collections-openstack/+/846446 | 14:25 |
opendevreview | Rafael Castillo proposed openstack/ansible-collections-openstack master: Move keypair module to proxy layer https://review.opendev.org/c/openstack/ansible-collections-openstack/+/847960 | 14:50 |
*** undefined is now known as Guest5751 | 15:26 | |
*** Guest5751 is now known as rcastillo_ | 15:26 | |
*** headphoneJames_ is now known as headphoneJames | 15:27 | |
*** johnsom_ is now known as johnsom | 15:27 | |
opendevreview | Merged openstack/ansible-collections-openstack master: Remove deprecated stuff from baremetal_node https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849668 | 16:13 |
*** rcastillo_ is now known as rcastillo | 17:54 | |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Refactored server and server_info modules https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849423 | 18:22 |
opendevreview | Jakob Meng proposed openstack/ansible-collections-openstack master: Bumped minimum supported Ansible release to 2.11 and dropped older jobs https://review.opendev.org/c/openstack/ansible-collections-openstack/+/850463 | 18:24 |
jm1 | gtema: out for today, have a nice weekend :) | 18:41 |
gtema | great work, nice weekend to you too | 18:42 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!