)]}'
{"kuryr_kubernetes/controller/drivers/vif_pool.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"624b34157ff8e602bfa6fa52a5d909a2945d652a","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if config.CONF.neutron_defaults.resource_tags:"},{"line_number":682,"context_line":"            tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"        trunks \u003d os_net.trunks(tags\u003dtags)"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        for trunk in trunks:"},{"line_number":687,"context_line":"            for sp in trunk.sub_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_1add3012","line":684,"range":{"start_line":684,"start_character":31,"end_line":684,"end_character":40},"updated":"2020-01-28 09:57:31.000000000","message":"To make sure this is 100% an equivalent you need to keep lines above as is and here do:\n\n trunks \u003d os_net.trunks(**args)","commit_id":"6cc473ba50932a4ae1314b3526c265ef6bf8d208"},{"author":{"_account_id":13692,"name":"Roman Dobosz","email":"gryf73@gmail.com","username":"gryf"},"change_message_id":"eb7bca6e16ad8eb6b8445ee8790f45057dd784cb","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if config.CONF.neutron_defaults.resource_tags:"},{"line_number":682,"context_line":"            tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"        trunks \u003d os_net.trunks(tags\u003dtags)"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        for trunk in trunks:"},{"line_number":687,"context_line":"            for sp in trunk.sub_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_3a002c03","line":684,"range":{"start_line":684,"start_character":31,"end_line":684,"end_character":40},"in_reply_to":"3fa7e38b_1add3012","updated":"2020-01-28 10:24:35.000000000","message":"This is 100% the equivalent for the previous implementation.\n\n1. we only have args created here for a reason to have (or not) tag key\n2. default value for trunk argument is an empty list[1], and giving an empty list as the trunk parameter, we get all of the trunks here.\n3. explicit is better than implicit ;)\n\nAs for behavior of trunks() method. Suppose we have three trunks, where first have tags \u0027a\u0027 and \u0027b\u0027, and the second \u0027b\u0027, and third \u0027a\u0027 and \u0027c\u0027:\n\n  \u003e\u003e\u003e len(list(os_net.trunks()))\n  3\n  \u003e\u003e\u003e len(list(os_net.trunks(tags\u003d[])))\n  3\n  \u003e\u003e\u003e len(list(os_net.trunks(tags\u003d[\u0027a\u0027])))\n  2\n  \u003e\u003e\u003e len(list(os_net.trunks(tags\u003d[\u0027b\u0027])))\n  2\n  \u003e\u003e\u003e len(list(os_net.trunks(tags\u003d[\u0027c\u0027])))\n  1\n  \u003e\u003e\u003e len(list(os_net.trunks(tags\u003d[\u0027c\u0027, \u0027a\u0027])))\n  1\n\n[1] https://github.com/openstack/openstacksdk/blob/0.36.0/openstack/resource.py#L1783","commit_id":"6cc473ba50932a4ae1314b3526c265ef6bf8d208"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"15fb6e153b7e6664901b55468bdb218b7895e8b4","unresolved":false,"context_lines":[{"line_number":681,"context_line":"        if config.CONF.neutron_defaults.resource_tags:"},{"line_number":682,"context_line":"            tags \u003d config.CONF.neutron_defaults.resource_tags"},{"line_number":683,"context_line":""},{"line_number":684,"context_line":"        trunks \u003d os_net.trunks(tags\u003dtags)"},{"line_number":685,"context_line":""},{"line_number":686,"context_line":"        for trunk in trunks:"},{"line_number":687,"context_line":"            for sp in trunk.sub_ports:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_e30430c7","line":684,"range":{"start_line":684,"start_character":31,"end_line":684,"end_character":40},"in_reply_to":"3fa7e38b_3a002c03","updated":"2020-01-28 11:43:03.000000000","message":"Okay, if tags\u003d[] returns everything anyway, it\u0027ll be fine.","commit_id":"6cc473ba50932a4ae1314b3526c265ef6bf8d208"}]}
