)]}'
{"tripleoclient/constants.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ec3ca63774fb93c5e80e3ee248bb4204d185eff0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                      \u0027--tags online_upgrade\u0027,"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"ODL_SERVICE \u003d \"OS::TripleO::Services::OpenDaylightApi: \" \\"},{"line_number":110,"context_line":"              \"../../docker/services/opendaylight-api.yaml\""},{"line_number":111,"context_line":"ODL_DEPRECATED_MESSAGE \u003d \"You are using OpenDaylight as your networking\" \\"},{"line_number":112,"context_line":"                         \" driver for OpenStack. OpenDaylight is deprecated\" \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_87e97981","line":109,"range":{"start_line":109,"start_character":0,"end_line":109,"end_character":11},"updated":"2019-05-06 07:25:18.000000000","message":"this isn\u0027t really the \u0027Service\u0027... its the exact line we are looking for in tripleo heat templates resource registry but anyway see comment below lets move this into a hash?","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ec3ca63774fb93c5e80e3ee248bb4204d185eff0","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                      \u0027--tags online_upgrade\u0027,"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"ODL_SERVICE \u003d \"OS::TripleO::Services::OpenDaylightApi: \" \\"},{"line_number":110,"context_line":"              \"../../docker/services/opendaylight-api.yaml\""},{"line_number":111,"context_line":"ODL_DEPRECATED_MESSAGE \u003d \"You are using OpenDaylight as your networking\" \\"},{"line_number":112,"context_line":"                         \" driver for OpenStack. OpenDaylight is deprecated\" \\"},{"line_number":113,"context_line":"                         \" starting from OSP14 and there is no upgrade or \" \\"},{"line_number":114,"context_line":"                         \"migration path from OpenDaylight to another \" \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_a7d59dbb","line":111,"range":{"start_line":109,"start_character":4,"end_line":111,"end_character":8},"updated":"2019-05-06 07:25:18.000000000","message":"perhaps this should be a hash with key being the service file and value being the deprecation message. we expect there will be more added for any service that wants to use this? e.g.\n\ndeprecated_services\u003d{ \"OS::TripleO::Services::OpenDaylightApi: ../../docker/services/opendaylight-api.yaml\": \"You are using OpenDaylight as your networking ETC\", \"other service\": \"other service message\" ... }","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11d3184130dc951e50f608af0e53990e3575ac92","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                      \u0027--tags online_upgrade\u0027,"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"ODL_SERVICE \u003d \"OS::TripleO::Services::OpenDaylightApi: \" \\"},{"line_number":110,"context_line":"              \"../../docker/services/opendaylight-api.yaml\""},{"line_number":111,"context_line":"ODL_DEPRECATED_MESSAGE \u003d \"You are using OpenDaylight as your networking\" \\"},{"line_number":112,"context_line":"                         \" driver for OpenStack. OpenDaylight is deprecated\" \\"},{"line_number":113,"context_line":"                         \" starting from OSP14 and there is no upgrade or \" \\"},{"line_number":114,"context_line":"                         \"migration path from OpenDaylight to another \" \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_55f0fdc9","line":111,"range":{"start_line":109,"start_character":4,"end_line":111,"end_character":8},"in_reply_to":"dfbec78f_78c2e487","updated":"2019-05-07 07:26:26.000000000","message":"i don\u0027t see how it is more complex to have \n\ncheck_service_is_enabled(parsed_args.environment_files, constants.HASH(KEY), constants.HASH(VALUE)) \n\nvs\n\ncheck_service_is_enabled(parsed_args.environment_files, constants.SERVICE1, constants.MESSAGE1)\n\nI would argue that the second way is more complex since I have to ensure I am using the right message for the given service, whereas if they are in a hash there is no confusion.\n\nReally you\u0027d probably need both a list of services and then a hash or service\u003c-\u003emessage\n\ndeprecated_service_list\u003d[\"OS::TripleO::Services::OpenDaylightApi: ../../docker/services/opendaylight-api.yaml\", ... ]\n\ndeprecated_service_messages\u003d{ \"OS::TripleO::Services::OpenDaylightApi: ../../docker/services/opendaylight-api.yaml\": \"You are using OpenDaylight as your networking ETC\"}\n\n-----\n\nIf we keep it as you have it now what happens when someone else adds a service? How will you check both services in https://review.opendev.org/#/c/656765/3/tripleoclient/v1/overcloud_deploy.py for example? Having a hash or other data structure to iterate over will make it easier to check all services you want to check using a for loop, rather than having to explicitly add multiple \"check_service_is_enabled\" calls","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"b65902ce9b3cc21a88009cf1904250cf26105b84","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                      \u0027--tags online_upgrade\u0027,"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"ODL_SERVICE \u003d \"OS::TripleO::Services::OpenDaylightApi: \" \\"},{"line_number":110,"context_line":"              \"../../docker/services/opendaylight-api.yaml\""},{"line_number":111,"context_line":"ODL_DEPRECATED_MESSAGE \u003d \"You are using OpenDaylight as your networking\" \\"},{"line_number":112,"context_line":"                         \" driver for OpenStack. OpenDaylight is deprecated\" \\"},{"line_number":113,"context_line":"                         \" starting from OSP14 and there is no upgrade or \" \\"},{"line_number":114,"context_line":"                         \"migration path from OpenDaylight to another \" \\"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_78c2e487","line":111,"range":{"start_line":109,"start_character":4,"end_line":111,"end_character":8},"in_reply_to":"dfbec78f_a7d59dbb","updated":"2019-05-06 10:41:48.000000000","message":"Thats a good idea but would make accessing the key and value more complicated. Developer will have to access the \"other service message\" via \"other service\". \n\ncheck_service_is_enabled(parsed_args.environment_files, constants.HASH(KEY), constants.HASH(VALUE))\n\nWith the current implementation, a new deprecated service enablement (or any general service) can be checked by\n\ncheck_service_is_enabled(parsed_args.environment_files, constants.SERVICE1, constants.MESSAGE1)","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"0581fc85c5237d829eb1dcd0e66e3de96ec864c4","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                      \u0027--tags online_upgrade\u0027,"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"# Key-value pair of deprecated service and its warning service"},{"line_number":110,"context_line":"DEPRECATED_SERVICES \u003d {\"OS::TripleO::Services::OpenDaylightApi: \""},{"line_number":111,"context_line":"                       \"../../docker/services/opendaylight-api.yaml\":"},{"line_number":112,"context_line":"                       \"You are using OpenDaylight as your networking\""}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_30fe7c37","line":109,"range":{"start_line":109,"start_character":55,"end_line":109,"end_character":62},"updated":"2019-05-10 07:07:29.000000000","message":"message","commit_id":"9d1b5bef01357294375d567409f9ec57d359fc69"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"41325e03924011e006b4d9a8927c73c3258c6838","unresolved":false,"context_lines":[{"line_number":106,"context_line":"                      \u0027--tags online_upgrade\u0027,"},{"line_number":107,"context_line":"}"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"# Key-value pair of deprecated service and its warning service"},{"line_number":110,"context_line":"DEPRECATED_SERVICES \u003d {\"OS::TripleO::Services::OpenDaylightApi: \""},{"line_number":111,"context_line":"                       \"../../docker/services/opendaylight-api.yaml\":"},{"line_number":112,"context_line":"                       \"You are using OpenDaylight as your networking\""}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_72de0512","line":109,"range":{"start_line":109,"start_character":55,"end_line":109,"end_character":62},"in_reply_to":"dfbec78f_30fe7c37","updated":"2019-05-14 06:55:31.000000000","message":"Done","commit_id":"9d1b5bef01357294375d567409f9ec57d359fc69"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"0581fc85c5237d829eb1dcd0e66e3de96ec864c4","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                       \" driver for OpenStack. OpenDaylight is deprecated\""},{"line_number":114,"context_line":"                       \" starting from OSP14 and there is no upgrade or \""},{"line_number":115,"context_line":"                       \"migration path from OpenDaylight to another \""},{"line_number":116,"context_line":"                       \"networking backend. We recommend you talk to Red\""},{"line_number":117,"context_line":"                       \" Hat representative to understand the other \""},{"line_number":118,"context_line":"                       \"networking alternatives you have. However do you\""},{"line_number":119,"context_line":"                       \" wish to continue deployment with OpenDaylight\""},{"line_number":120,"context_line":"                       \" [y/N]? \"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_b0b82c76","line":117,"range":{"start_line":116,"start_character":69,"end_line":117,"end_character":28},"updated":"2019-05-10 07:07:29.000000000","message":"let\u0027s avoid this it should not be specific to any company.\nperhaps remove this sentence (its the kind of thing we\u0027d put in the product. could be a downstream client patch if you want it to say \u0027Red Hat\u0027","commit_id":"9d1b5bef01357294375d567409f9ec57d359fc69"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"41325e03924011e006b4d9a8927c73c3258c6838","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                       \" driver for OpenStack. OpenDaylight is deprecated\""},{"line_number":114,"context_line":"                       \" starting from OSP14 and there is no upgrade or \""},{"line_number":115,"context_line":"                       \"migration path from OpenDaylight to another \""},{"line_number":116,"context_line":"                       \"networking backend. We recommend you talk to Red\""},{"line_number":117,"context_line":"                       \" Hat representative to understand the other \""},{"line_number":118,"context_line":"                       \"networking alternatives you have. However do you\""},{"line_number":119,"context_line":"                       \" wish to continue deployment with OpenDaylight\""},{"line_number":120,"context_line":"                       \" [y/N]? \"}"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_92e379d9","line":117,"range":{"start_line":116,"start_character":69,"end_line":117,"end_character":28},"in_reply_to":"dfbec78f_b0b82c76","updated":"2019-05-14 06:55:31.000000000","message":"Done","commit_id":"9d1b5bef01357294375d567409f9ec57d359fc69"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"89ada56d8e15ce9db02c9f4ec02c8a4e5a2a00ea","unresolved":false,"context_lines":[{"line_number":110,"context_line":"DEPRECATED_SERVICES \u003d {\"OS::TripleO::Services::OpenDaylightApi\":"},{"line_number":111,"context_line":"                       \"You are using OpenDaylight as your networking\""},{"line_number":112,"context_line":"                       \" driver for OpenStack. OpenDaylight is deprecated\""},{"line_number":113,"context_line":"                       \" starting from OSP14 and there is no upgrade or \""},{"line_number":114,"context_line":"                       \"migration path from OpenDaylight to another \""},{"line_number":115,"context_line":"                       \"networking backend. We recommend you understand\""},{"line_number":116,"context_line":"                       \"other networking alternatives you have like OVS or \""}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_0d02083e","line":113,"range":{"start_line":113,"start_character":25,"end_line":113,"end_character":44},"updated":"2019-05-14 07:37:09.000000000","message":"Rocky - again OSP is product thing","commit_id":"f6e636b55b95e083895c16fccd1a02fb6d4bfd44"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"581ce08ec09a43ef6e868af1aee358139059dd89","unresolved":false,"context_lines":[{"line_number":110,"context_line":"DEPRECATED_SERVICES \u003d {\"OS::TripleO::Services::OpenDaylightApi\":"},{"line_number":111,"context_line":"                       \"You are using OpenDaylight as your networking\""},{"line_number":112,"context_line":"                       \" driver for OpenStack. OpenDaylight is deprecated\""},{"line_number":113,"context_line":"                       \" starting from OSP14 and there is no upgrade or \""},{"line_number":114,"context_line":"                       \"migration path from OpenDaylight to another \""},{"line_number":115,"context_line":"                       \"networking backend. We recommend you understand\""},{"line_number":116,"context_line":"                       \"other networking alternatives you have like OVS or \""}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_6d64e422","line":113,"range":{"start_line":113,"start_character":25,"end_line":113,"end_character":44},"in_reply_to":"dfbec78f_0d02083e","updated":"2019-05-14 10:02:58.000000000","message":"Done","commit_id":"f6e636b55b95e083895c16fccd1a02fb6d4bfd44"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"89ada56d8e15ce9db02c9f4ec02c8a4e5a2a00ea","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                       \" starting from OSP14 and there is no upgrade or \""},{"line_number":114,"context_line":"                       \"migration path from OpenDaylight to another \""},{"line_number":115,"context_line":"                       \"networking backend. We recommend you understand\""},{"line_number":116,"context_line":"                       \"other networking alternatives you have like OVS or \""},{"line_number":117,"context_line":"                       \"OVN. However do you wish to continue deployment with\""},{"line_number":118,"context_line":"                       \"OpenDaylight [y/N]? \"}"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_6d9624f3","line":116,"range":{"start_line":116,"start_character":54,"end_line":116,"end_character":67},"updated":"2019-05-14 07:37:09.000000000","message":"please consider replacing with \"such as\"","commit_id":"f6e636b55b95e083895c16fccd1a02fb6d4bfd44"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"581ce08ec09a43ef6e868af1aee358139059dd89","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                       \" starting from OSP14 and there is no upgrade or \""},{"line_number":114,"context_line":"                       \"migration path from OpenDaylight to another \""},{"line_number":115,"context_line":"                       \"networking backend. We recommend you understand\""},{"line_number":116,"context_line":"                       \"other networking alternatives you have like OVS or \""},{"line_number":117,"context_line":"                       \"OVN. However do you wish to continue deployment with\""},{"line_number":118,"context_line":"                       \"OpenDaylight [y/N]? \"}"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_8d6918fa","line":116,"range":{"start_line":116,"start_character":54,"end_line":116,"end_character":67},"in_reply_to":"dfbec78f_6d9624f3","updated":"2019-05-14 10:02:58.000000000","message":"Done","commit_id":"f6e636b55b95e083895c16fccd1a02fb6d4bfd44"}],"tripleoclient/utils.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ec3ca63774fb93c5e80e3ee248bb4204d185eff0","unresolved":false,"context_lines":[{"line_number":1648,"context_line":"                    return True"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"def check_service_is_enabled(environment_files, service, message):"},{"line_number":1652,"context_line":"    # If stack to be deployed/updated/upgraded has any deprecated service"},{"line_number":1653,"context_line":"    # enabled, throw a warning about its deprecation and ask the user"},{"line_number":1654,"context_line":"    # whether to proceed with deployment despite deprecation."}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_27fa0d42","line":1651,"range":{"start_line":1651,"start_character":4,"end_line":1651,"end_character":28},"updated":"2019-05-06 07:25:18.000000000","message":"please lets add deprecated into this name\n\nit is exactly about checking if a *deprecated* service is enabled, not any service","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"b65902ce9b3cc21a88009cf1904250cf26105b84","unresolved":false,"context_lines":[{"line_number":1648,"context_line":"                    return True"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"def check_service_is_enabled(environment_files, service, message):"},{"line_number":1652,"context_line":"    # If stack to be deployed/updated/upgraded has any deprecated service"},{"line_number":1653,"context_line":"    # enabled, throw a warning about its deprecation and ask the user"},{"line_number":1654,"context_line":"    # whether to proceed with deployment despite deprecation."}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_ddbd0269","line":1651,"range":{"start_line":1651,"start_character":4,"end_line":1651,"end_character":28},"in_reply_to":"dfbec78f_27fa0d42","updated":"2019-05-06 10:41:48.000000000","message":"Well, I was thinking this function could be reused for any other use and not just for deprecated services so kept the name generic.","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11d3184130dc951e50f608af0e53990e3575ac92","unresolved":false,"context_lines":[{"line_number":1648,"context_line":"                    return True"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"def check_service_is_enabled(environment_files, service, message):"},{"line_number":1652,"context_line":"    # If stack to be deployed/updated/upgraded has any deprecated service"},{"line_number":1653,"context_line":"    # enabled, throw a warning about its deprecation and ask the user"},{"line_number":1654,"context_line":"    # whether to proceed with deployment despite deprecation."}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_b57a9921","line":1651,"range":{"start_line":1651,"start_character":4,"end_line":1651,"end_character":28},"in_reply_to":"dfbec78f_ddbd0269","updated":"2019-05-07 07:26:26.000000000","message":"i find it confusing like this - imo we can make it generic if we need to use it for something else, but right now you are using it for checking a deprecated service","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"345130a19db3e10da6bb579fb6a1212231fa4c7a","unresolved":false,"context_lines":[{"line_number":1648,"context_line":"                    return True"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"def check_service_is_enabled(environment_files, service, message):"},{"line_number":1652,"context_line":"    # If stack to be deployed/updated/upgraded has any deprecated service"},{"line_number":1653,"context_line":"    # enabled, throw a warning about its deprecation and ask the user"},{"line_number":1654,"context_line":"    # whether to proceed with deployment despite deprecation."},{"line_number":1655,"context_line":""},{"line_number":1656,"context_line":"    service_enabled \u003d service"},{"line_number":1657,"context_line":"    for env_file in environment_files:"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_186de897","line":1654,"range":{"start_line":1651,"start_character":66,"end_line":1654,"end_character":61},"updated":"2019-05-06 10:42:47.000000000","message":"I can change this comment to reflect more clearer intentions.","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"11d3184130dc951e50f608af0e53990e3575ac92","unresolved":false,"context_lines":[{"line_number":1656,"context_line":"    service_enabled \u003d service"},{"line_number":1657,"context_line":"    for env_file in environment_files:"},{"line_number":1658,"context_line":"        if check_file_for_enabled_service(env_file, service_enabled):"},{"line_number":1659,"context_line":"            confirm \u003d prompt_user_for_confirmation(message\u003dmessage, logger\u003dLOG)"},{"line_number":1660,"context_line":"            if not confirm:"},{"line_number":1661,"context_line":"                raise oscexc.CommandError(\"Action not confirmed, exiting.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_d5986d6b","line":1659,"range":{"start_line":1659,"start_character":22,"end_line":1659,"end_character":50},"updated":"2019-05-07 07:26:26.000000000","message":"i didn\u0027t realise you were using this and just checked more closely... looks like that method actually waits for user input before proceeding. I thought it would be more like \u0027warning\u0027 ... my main concern is that this would break CI (cos of that bit https://opendev.org/openstack/python-tripleoclient/src/branch/master/tripleoclient/utils.py#L834 ) but having said that we aren\u0027t exercising this in tripleo ci jobs afaik so won\u0027t affect us.","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"5429460c6f8b4a65bf48021cf5561ca179d1117b","unresolved":false,"context_lines":[{"line_number":1656,"context_line":"    service_enabled \u003d service"},{"line_number":1657,"context_line":"    for env_file in environment_files:"},{"line_number":1658,"context_line":"        if check_file_for_enabled_service(env_file, service_enabled):"},{"line_number":1659,"context_line":"            confirm \u003d prompt_user_for_confirmation(message\u003dmessage, logger\u003dLOG)"},{"line_number":1660,"context_line":"            if not confirm:"},{"line_number":1661,"context_line":"                raise oscexc.CommandError(\"Action not confirmed, exiting.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_bf4ca29e","line":1659,"range":{"start_line":1659,"start_character":22,"end_line":1659,"end_character":50},"in_reply_to":"dfbec78f_d5986d6b","updated":"2019-05-08 07:21:30.000000000","message":"to be clear not blocking on this. if we ever need/want to use it in ci (i.e. someone else adds a deprecation for some service that we are deploying in a job) it would break that job so we\u0027d need to change it to warn instead of prompt\n\nideally this could be an option into the check_service method, i.e. prompt or just warn. but I won\u0027t block on it here since as I wrote above, it will only affect us if someone uses it to add deprecation for a service we are running. AFAIK we aren\u0027t running odl in any tripleo ci jobs currently.","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"0581fc85c5237d829eb1dcd0e66e3de96ec864c4","unresolved":false,"context_lines":[{"line_number":1642,"context_line":"def check_file_for_enabled_service(env_file, service):"},{"line_number":1643,"context_line":"    if os.path.exists(env_file):"},{"line_number":1644,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1645,"context_line":"                if service in env_file.read():"},{"line_number":1646,"context_line":"                    LOG.warn(\"service \" + service + \" is enabled in \""},{"line_number":1647,"context_line":"                             + str(env_file))"},{"line_number":1648,"context_line":"                    return True"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_101ed86f","line":1645,"range":{"start_line":1645,"start_character":19,"end_line":1645,"end_character":44},"updated":"2019-05-10 07:07:29.000000000","message":"you could improve this a bit more - but it could be a follow up. It is slightly fragile to check explicitly for \"OS::TripleO::Services::OpenDaylightApi: ../../docker/services/opendaylight-api.yaml\" \n\nwhat if they don\u0027t have the ../../ in their environment file because for _reasons_ they put an environment file in any other directory (but still pointing to opendaylight-api.yaml\n\nIdeally you want to do something like\n\n\"OS::TripleO::Services::OpenDaylightApi: *docker/services/opendaylight-api.yaml\"\n\nyou can use regex to do that and if you explore this you\u0027ll have to change the contants DEPRECATED_SERVICES slightly so it contains the match (i.e. OS::TripleO::Services::OpenDaylightApi: *docker/services/opendaylight-api.yaml instead of the ../../ version)\n\nit could be a followup patch but imo it could also go here and make the solution much more robust.","commit_id":"9d1b5bef01357294375d567409f9ec57d359fc69"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"89ada56d8e15ce9db02c9f4ec02c8a4e5a2a00ea","unresolved":false,"context_lines":[{"line_number":1649,"context_line":"    # ODL is enabled."},{"line_number":1650,"context_line":"    if os.path.exists(env_file):"},{"line_number":1651,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1652,"context_line":"            enabled_services \u003d re.findall(service + \u0027.*\u0027, env_file.read(),"},{"line_number":1653,"context_line":"                                          re.MULTILINE)"},{"line_number":1654,"context_line":"            for enabled_service in enabled_services:"},{"line_number":1655,"context_line":"                if \"OS::Heat::None\" not in enabled_service:"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_8df6f862","line":1652,"range":{"start_line":1652,"start_character":53,"end_line":1652,"end_character":55},"updated":"2019-05-14 07:37:09.000000000","message":"what about making this .*.yaml then you don\u0027t have to check for OS::Heat::None with the extra loop?","commit_id":"f6e636b55b95e083895c16fccd1a02fb6d4bfd44"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"581ce08ec09a43ef6e868af1aee358139059dd89","unresolved":false,"context_lines":[{"line_number":1649,"context_line":"    # ODL is enabled."},{"line_number":1650,"context_line":"    if os.path.exists(env_file):"},{"line_number":1651,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1652,"context_line":"            enabled_services \u003d re.findall(service + \u0027.*\u0027, env_file.read(),"},{"line_number":1653,"context_line":"                                          re.MULTILINE)"},{"line_number":1654,"context_line":"            for enabled_service in enabled_services:"},{"line_number":1655,"context_line":"                if \"OS::Heat::None\" not in enabled_service:"}],"source_content_type":"text/x-python","patch_set":7,"id":"dfbec78f_03e4183b","line":1652,"range":{"start_line":1652,"start_character":53,"end_line":1652,"end_character":55},"in_reply_to":"dfbec78f_8df6f862","updated":"2019-05-14 10:02:58.000000000","message":"Done","commit_id":"f6e636b55b95e083895c16fccd1a02fb6d4bfd44"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"967f90ec693ba5ce969a208e219a07fead15d3fb","unresolved":false,"context_lines":[{"line_number":1650,"context_line":"    if os.path.exists(env_file):"},{"line_number":1651,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1652,"context_line":"            content \u003d env_file.read()"},{"line_number":1653,"context_line":"            if (service in content and re.findall(service + \u0027.*.yaml\u0027,"},{"line_number":1654,"context_line":"                                                  content, re.MULTILINE)):"},{"line_number":1655,"context_line":"                LOG.warn(\"service \" + service + \" is enabled in \""},{"line_number":1656,"context_line":"                         + str(env_file))"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_c3c84023","line":1653,"updated":"2019-05-14 10:22:04.000000000","message":"If for some reason, the mapping has been provided like below, this would fail to catch.\n\nOS::TripleO::Services::OpenDaylightApi: \n\t/usr/share/tempate/opendaylight.yaml","commit_id":"a280080cafbca2eae226de22eef0928c26ccedde"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"a203fb92065c28a07bb59e17d4de187eee7e58c5","unresolved":false,"context_lines":[{"line_number":1650,"context_line":"    if os.path.exists(env_file):"},{"line_number":1651,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1652,"context_line":"            content \u003d env_file.read()"},{"line_number":1653,"context_line":"            if (service in content and re.findall(service + \u0027.*.yaml\u0027,"},{"line_number":1654,"context_line":"                                                  content, re.MULTILINE)):"},{"line_number":1655,"context_line":"                LOG.warn(\"service \" + service + \" is enabled in \""},{"line_number":1656,"context_line":"                         + str(env_file))"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_ea82e3ff","line":1653,"in_reply_to":"dfbec78f_0a2417ae","updated":"2019-05-15 09:01:32.000000000","message":"if we use yaml load sure we can easily \u0027match\u0027 and get the value for a particular key, but we\u0027d still need regex even when checking the value. I mean it could still be \"../../opendaylight.yaml\" or \"/usr/share/opendaylight.yaml\" etc\n\nmaybe a combination of the two so load with yaml load (which makes sense, it is a yaml file) and then keep the regex match for the value.\n\njanki wdyt? do you agree? Do you want to play with it here? Do you want to start a patch on top of it to do that?","commit_id":"a280080cafbca2eae226de22eef0928c26ccedde"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"f17c769a51ac322707c88a5c4935c8b35d1f8018","unresolved":false,"context_lines":[{"line_number":1650,"context_line":"    if os.path.exists(env_file):"},{"line_number":1651,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1652,"context_line":"            content \u003d env_file.read()"},{"line_number":1653,"context_line":"            if (service in content and re.findall(service + \u0027.*.yaml\u0027,"},{"line_number":1654,"context_line":"                                                  content, re.MULTILINE)):"},{"line_number":1655,"context_line":"                LOG.warn(\"service \" + service + \" is enabled in \""},{"line_number":1656,"context_line":"                         + str(env_file))"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_0a2417ae","line":1653,"in_reply_to":"dfbec78f_87a6c2aa","updated":"2019-05-15 08:38:16.000000000","message":"May be we should load the file using yaml.load and check the value, rather than regex matching. And we could do that only when the deprecated service is found in a file.","commit_id":"a280080cafbca2eae226de22eef0928c26ccedde"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"3582818c9ab2d3a9fe52b2e251412304aaeb945a","unresolved":false,"context_lines":[{"line_number":1650,"context_line":"    if os.path.exists(env_file):"},{"line_number":1651,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1652,"context_line":"            content \u003d env_file.read()"},{"line_number":1653,"context_line":"            if (service in content and re.findall(service + \u0027.*.yaml\u0027,"},{"line_number":1654,"context_line":"                                                  content, re.MULTILINE)):"},{"line_number":1655,"context_line":"                LOG.warn(\"service \" + service + \" is enabled in \""},{"line_number":1656,"context_line":"                         + str(env_file))"}],"source_content_type":"text/x-python","patch_set":8,"id":"dfbec78f_87a6c2aa","line":1653,"in_reply_to":"dfbec78f_c3c84023","updated":"2019-05-15 08:20:23.000000000","message":"ack agree, but then see my comment on v9 wdyt? Or is there some easy way we can do that, with lookahead (though if its a new line i don\u0027t know if lookahead will match).","commit_id":"a280080cafbca2eae226de22eef0928c26ccedde"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"a9a3c02f4ab3703a942340a0e2f82b887db4f73e","unresolved":false,"context_lines":[{"line_number":1649,"context_line":"    if os.path.exists(env_file):"},{"line_number":1650,"context_line":"        with open(env_file, \"r\") as env_file:"},{"line_number":1651,"context_line":"            content \u003d env_file.read()"},{"line_number":1652,"context_line":"            if (service in content and re.findall(service + \u0027.*.yaml\u0027,"},{"line_number":1653,"context_line":"                                                  content, re.MULTILINE)):"},{"line_number":1654,"context_line":"                LOG.warn(\"service \" + service + \" is enabled in \""},{"line_number":1655,"context_line":"                         + str(env_file))"}],"source_content_type":"text/x-python","patch_set":9,"id":"dfbec78f_2792764d","line":1652,"range":{"start_line":1652,"start_character":62,"end_line":1652,"end_character":63},"updated":"2019-05-15 08:19:30.000000000","message":"ack this seems to work well enough just tried it like \n\nenv_file\u003d\"/home/m/Downloads/env_file.yaml\"\nwith open(env_file, \"r\") as env_file:\n    content \u003d env_file.read()\n    if (\"OS::TripleO::Services::OpenDaylightApi\" in content and re.findall(\"OS::TripleO::Services::OpenDaylightApi\" + \u0027.*.yaml\u0027, content, re.MULTILINE)):\n        print \"wooW\"\n\n\nI was playing with it to see if I could address Saravanan comment in v8. While I agree that it *could* happen, an environment file like\n\n  1 OS::TripleO::Services::OpenDaylightApi:$                                       \n  2     /usr/share/tempate/opendaylight.yaml$                                      \n\nis a broken environment file. We *could* and have tried to guard against pebcak in the past so if it is something very common we might consider accomodating for it.\n\nWe can for example try and include the \\n in the match. But then, how many newlines are acceptable. Is this OK:\n\n  1 OS::TripleO::Services::OpenDaylightApi:$                                       \n  2\n  3     /usr/share/tempate/opendaylight.yaml$                                      \n\nIn any case IMO I don\u0027t think we should block on that","commit_id":"ad82c48cddcbb893734eb6ef6179eab8711cd900"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"29ec87030bf0e0fd0644aab1ea9972f85ddb7ad7","unresolved":false,"context_lines":[{"line_number":1640,"context_line":""},{"line_number":1641,"context_line":""},{"line_number":1642,"context_line":"def check_file_for_enabled_service(env_file):"},{"line_number":1643,"context_line":"    # This function checks environment file for the said service."},{"line_number":1644,"context_line":"    # If stack to be deployed/updated/upgraded has any deprecated service"},{"line_number":1645,"context_line":"    # enabled, throw a warning about its deprecation and ask the user"},{"line_number":1646,"context_line":"    # whether to proceed with deployment despite deprecation."}],"source_content_type":"text/x-python","patch_set":11,"id":"dfbec78f_7b6794b8","line":1643,"range":{"start_line":1643,"start_character":4,"end_line":1643,"end_character":5},"updated":"2019-05-16 10:01:49.000000000","message":"since you\u0027ve gone to the trouble of writing this, if you update make it docstring with \"\"\" \"\"\"","commit_id":"1fee54b9be6e877040a7d62183d72a35948767e0"}],"tripleoclient/v1/overcloud_deploy.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a0cd15a279fd107848ae0900d7ac9e10de2a345f","unresolved":false,"context_lines":[{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        if (parsed_args.environment_files and"},{"line_number":887,"context_line":"                \"/usr/share/openstack-tripleo-heat-templates/environments/\""},{"line_number":888,"context_line":"                \"services/neutron-opendaylight.yaml\" in"},{"line_number":889,"context_line":"                parsed_args.environment_files):"},{"line_number":890,"context_line":"            confirm \u003d utils.prompt_user_for_confirmation("},{"line_number":891,"context_line":"                message\u003d_(\"You are using OpenDaylight as your networking \""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_56ef1c1d","line":888,"updated":"2019-05-02 12:03:09.000000000","message":"I think people can copy env files and pass them in from any location. Wouldn\u0027t it be better to loop over parsed_args.environment_files and checking if opendaylight is in any of them?\n\nOr preferably, if it\u0027s possible, add a pre-deploy validation that looks at the ML2 mech drivers and log the warning then.","commit_id":"e09388639c433f190faf54953bafb1bb31e9a875"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"1d00e4505df9e9f2337fe96a8bd79f0d641d5f82","unresolved":false,"context_lines":[{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        if (parsed_args.environment_files and"},{"line_number":887,"context_line":"                \"/usr/share/openstack-tripleo-heat-templates/environments/\""},{"line_number":888,"context_line":"                \"services/neutron-opendaylight.yaml\" in"},{"line_number":889,"context_line":"                parsed_args.environment_files):"},{"line_number":890,"context_line":"            confirm \u003d utils.prompt_user_for_confirmation("},{"line_number":891,"context_line":"                message\u003d_(\"You are using OpenDaylight as your networking \""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_d6f6acd7","line":888,"in_reply_to":"ffb9cba7_56ef1c1d","updated":"2019-05-02 12:23:49.000000000","message":"\u003e I think people can copy env files and pass them in from any location. Wouldn\u0027t it be better to loop over parsed_args.environment_files and checking if opendaylight is in any of them?\n\nYes, thats a good point. I will change.\n\n\u003e Or preferably, if it\u0027s possible, add a pre-deploy validation that looks at the ML2 mech drivers and log the warning then.\n\nI thought of using mech driver for validation earlier but not sure if that info is very easily available anywhere. And parsing it from someplace is like adding unnecessary complications.","commit_id":"e09388639c433f190faf54953bafb1bb31e9a875"},{"author":{"_account_id":18575,"name":"Saravanan KR","email":"krsacme@gmail.com","username":"saravanankr"},"change_message_id":"faba894c275dc43b8775fbd3097d8e4642cb5c43","unresolved":false,"context_lines":[{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        if (parsed_args.environment_files and"},{"line_number":887,"context_line":"                \"/usr/share/openstack-tripleo-heat-templates/environments/\""},{"line_number":888,"context_line":"                \"services/neutron-opendaylight.yaml\" in"},{"line_number":889,"context_line":"                parsed_args.environment_files):"},{"line_number":890,"context_line":"            confirm \u003d utils.prompt_user_for_confirmation("},{"line_number":891,"context_line":"                message\u003d_(\"You are using OpenDaylight as your networking \""}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_9670340a","line":888,"in_reply_to":"ffb9cba7_d6f6acd7","updated":"2019-05-02 13:10:15.000000000","message":"For deprecated parameters warning, there is a workflow added to parse the heat templates and get the output. Ideal way is to use something like that to get the parameter or service mapping.","commit_id":"e09388639c433f190faf54953bafb1bb31e9a875"},{"author":{"_account_id":20866,"name":"Janki Chhatbar","email":"jchhatba@redhat.com","username":"janki"},"change_message_id":"a43cd2e4f563497f1750ac9b45cc1ba2cab0dab0","unresolved":false,"context_lines":[{"line_number":895,"context_line":"                          \"networking backend. We recommend you talk to \""},{"line_number":896,"context_line":"                          \"Red Hat representative to understand the other \""},{"line_number":897,"context_line":"                          \"networking alternatives you have. However do you \""},{"line_number":898,"context_line":"                          \"wish to continue deployment with OpenDaylight\""},{"line_number":899,"context_line":"                          \"[y/N]? \"),"},{"line_number":900,"context_line":"                logger\u003dself.log)"},{"line_number":901,"context_line":"            if not confirm:"}],"source_content_type":"text/x-python","patch_set":1,"id":"ffb9cba7_d6ac6cee","line":898,"range":{"start_line":898,"start_character":72,"end_line":898,"end_character":73},"updated":"2019-05-02 11:55:45.000000000","message":"Missing a space here. Will add it while addressing other comments (if any)","commit_id":"e09388639c433f190faf54953bafb1bb31e9a875"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"ec3ca63774fb93c5e80e3ee248bb4204d185eff0","unresolved":false,"context_lines":[{"line_number":885,"context_line":""},{"line_number":886,"context_line":"        # Throw deprecation warning if ODL is enabled."},{"line_number":887,"context_line":"        if parsed_args.environment_files:"},{"line_number":888,"context_line":"            utils.check_service_is_enabled(parsed_args.environment_files,"},{"line_number":889,"context_line":"                                           constants.ODL_SERVICE,"},{"line_number":890,"context_line":"                                           constants.ODL_DEPRECATED_MESSAGE)"},{"line_number":891,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dfbec78f_875bb985","line":888,"range":{"start_line":888,"start_character":19,"end_line":888,"end_character":39},"updated":"2019-05-06 07:25:18.000000000","message":"please add deprecated into this name e.g. \n\nwarn_deprecated_service_enabled(","commit_id":"20ec1535d2144920f90fdc095ef30fb5971d253d"},{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"0581fc85c5237d829eb1dcd0e66e3de96ec864c4","unresolved":false,"context_lines":[{"line_number":886,"context_line":"        # Throw warning if deprecated service is enabled and"},{"line_number":887,"context_line":"        # ask user if deployment should still be continued."},{"line_number":888,"context_line":"        if parsed_args.environment_files:"},{"line_number":889,"context_line":"            for service in constants.DEPRECATED_SERVICES:"},{"line_number":890,"context_line":"                utils.check_deprecated_service_is_enabled("},{"line_number":891,"context_line":"                    parsed_args.environment_files, service,"},{"line_number":892,"context_line":"                    constants.DEPRECATED_SERVICES[service])"}],"source_content_type":"text/x-python","patch_set":6,"id":"dfbec78f_d049208b","line":889,"range":{"start_line":889,"start_character":13,"end_line":889,"end_character":28},"updated":"2019-05-10 07:07:29.000000000","message":"nice thanks","commit_id":"9d1b5bef01357294375d567409f9ec57d359fc69"}],"tripleoclient/v1/overcloud_update.py":[{"author":{"_account_id":8449,"name":"Marios Andreou","email":"marios.andreou@gmail.com","username":"marios"},"change_message_id":"cec39deb91c2a7f510a6c015068b6780ed87fb6c","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            for service in constants.DEPRECATED_SERVICES:"},{"line_number":71,"context_line":"                oooutils.check_deprecated_service_is_enabled("},{"line_number":72,"context_line":"                    parsed_args.environment_files, service,"},{"line_number":73,"context_line":"                    constants.DEPRECATED_SERVICES[service])"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        super(UpdatePrepare, self).take_action(parsed_args)"},{"line_number":76,"context_line":"        package_update.update(clients, container\u003dstack_name)"}],"source_content_type":"text/x-python","patch_set":10,"id":"dfbec78f_9ee59bde","line":73,"updated":"2019-05-16 06:43:01.000000000","message":"just a thought but I know you will likely hit me :) but anyway here goes:\n\nwhy not move these 5 lines into utils.py, into a function like:\n\n    def check_envfiles_deprecated_services(parsed_args)\n    ... those lines go here \n\nand then in this file and in overcloud_upgrade or overcloud_deploy.py you\u0027d just have to do:\n\n    oooutils.check_envfiles_deprecated_services(parsed_args)\n\ni.e. one line - wdyt? :D","commit_id":"5b1ca7ef893444ebe89feef88c671bcdb70acd11"}]}
