Friday, 2022-07-22

opendevreviewhuang liujie proposed openstack/openstacksdk master: Replace deprecated failUnlessEqual with assertEqual  https://review.opendev.org/c/openstack/openstacksdk/+/85070803:08
*** undefined is now known as Guest569305:12
gtemajm1: 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 it05:36
gtemaOn 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 it05:37
jm1gtema: 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 neutron06:31
gtemaGood06:39
*** arxcruz is now known as arxcruz|rover06:54
opendevreviewJakob Meng proposed openstack/ansible-collections-openstack master: Refactored server and server_info modules  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84942307:05
jm1gtema: here it is: https://review.opendev.org/c/openstack/ansible-collections-openstack/+/849423/7/plugins/modules/server.py#112207:13
jm1gtema: if you replace sg with sg['id'] then it throws this "Security group name cannot be empty" error07:14
jm1gtema: 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#114607:15
jm1gtema: replace server['id'] with server to get the error07:15
gtema🤦‍♂️07:15
gtemaright07:15
gtema_get_resource is not an analogue to find07:16
gtemaso in this case doc that it accepts name is wrong 07:16
gtemayou can pass object or dict{name:'my_tricky_name'} though07:16
gtemaperhaps passing dict you may need to add id, but afair it should work also without07:17
jm1gtema: ack i just pass the whole sg object since i retrieved it anyway07:20
gtemabut a side note, it may be good to move biggest part of the module into the sdk itself07:20
opendevreviewYusuke Niimi proposed openstack/keystoneauth master: OAuth2.0 Client Credentials Grant Flow Support  https://review.opendev.org/c/openstack/keystoneauth/+/83073407:26
jm1gtema: which parts to which location in the sdk?07:29
gtemaI 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/etc07:31
opendevreviewJakob Meng proposed openstack/ansible-collections-openstack master: Refactored port and port_info modules  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/85062707:31
jm1gtema: but there is currently no equivalent idempotent functionality in sdk, is it?07:33
jm1gtema: it would require a new kind of function, maybe in cloud layer?07:33
gtemaidempotency in cloud resources is anyway a "thing"07:33
gtemaI 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_server07:35
gtemaits just in the case of server big part of logic is common also to OSC07:35
jm1gtema: 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
gtemayeah, and this is what I mean - this part of idempotency implementation may be moved into sdk07:36
gtemato keep module simple, to have less passes between sdk and ansible (including all the conversions) and have possibility to reuse it in osc07:36
jm1gtema: 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
gtemawe may move it there once it is created and tested here in ACO or instead do brand new dev in sdk first07:37
gtemasure07:37
jm1gtema: 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/+/85062707:38
gtemai know, this is a relatively exceptional case (because of its complexity)07:38
gtemabut on the other side this approach may be then applied for other modules by moving implemented logic to sdk07:39
jm1gtema: 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 sdk07:41
gtemacool07:41
opendevreviewJakob Meng proposed openstack/ansible-collections-openstack master: Refactored server and server_info modules  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84942309:08
opendevreviewJakob Meng proposed openstack/ansible-collections-openstack master: Remove deprecated stuff from baremetal_node  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84966809:24
opendevreviewJakob 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/+/85046009:48
*** Guest5693 is now known as rcastillo13:09
opendevreviewMerged openstack/ansible-collections-openstack master: Dropped symbolic links and plugin routing for deprecated module names  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/85046013:47
opendevreviewJakob Meng proposed openstack/ansible-collections-openstack master: Remove deprecated stuff from baremetal_node  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84966814:02
opendevreviewRafael Castillo proposed openstack/ansible-collections-openstack master: Update router for 2.0.0  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84644614:05
opendevreviewRafael Castillo proposed openstack/ansible-collections-openstack master: Update router for 2.0.0  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84644614:25
opendevreviewRafael Castillo proposed openstack/ansible-collections-openstack master: Move keypair module to proxy layer  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84796014:50
*** undefined is now known as Guest575115:26
*** Guest5751 is now known as rcastillo_15:26
*** headphoneJames_ is now known as headphoneJames15:27
*** johnsom_ is now known as johnsom15:27
opendevreviewMerged openstack/ansible-collections-openstack master: Remove deprecated stuff from baremetal_node  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84966816:13
*** rcastillo_ is now known as rcastillo17:54
opendevreviewJakob Meng proposed openstack/ansible-collections-openstack master: Refactored server and server_info modules  https://review.opendev.org/c/openstack/ansible-collections-openstack/+/84942318:22
opendevreviewJakob 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/+/85046318:24
jm1gtema: out for today, have a nice weekend :)18:41
gtemagreat 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/!