)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b18cc067101c820cd58f4d1d7ba11317ee8b6595","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Smith \u003cdansmith@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-03-14 07:10:01 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add --by-service to discover_hosts"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This allows us to discover and map compute hosts by service instead of"},{"line_number":10,"context_line":"by compute node, which will solve a major deployment ordering problem for"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"df7087c5_e2e1ca9c","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":16},"updated":"2018-03-14 14:32:17.000000000","message":"Needs a release note","commit_id":"ca931d06dad08a39f98e511aee425fcf1237e63c"}],"nova/cmd/manage.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"7c4461e73f95bca5e715ab17d7573e0e17cdc721","unresolved":false,"context_lines":[{"line_number":1335,"context_line":"          help\u003d_(\u0027Considered successful (exit code 0) only when an unmapped \u0027"},{"line_number":1336,"context_line":"                 \u0027host is discovered. Any other outcome will be considered a \u0027"},{"line_number":1337,"context_line":"                 \u0027failure (exit code 1).\u0027))"},{"line_number":1338,"context_line":"    @args(\u0027--by-service\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse, dest\u003d\u0027by_host\u0027,"},{"line_number":1339,"context_line":"          help\u003d_(\u0027Discover hosts by service instead of compute node\u0027))"},{"line_number":1340,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone, verbose\u003dFalse, strict\u003dFalse,"},{"line_number":1341,"context_line":"                       by_service\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_d62010af","line":1338,"range":{"start_line":1338,"start_character":68,"end_line":1338,"end_character":75},"updated":"2018-03-14 11:40:16.000000000","message":"you call it by_service below in the arguments list.\n\nanyway, I think we should just do both things one after the other","commit_id":"f138daaba01bac2a10519ec0accca3d8e7fe5285"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"432892ea77c52c7d6de5a9387cab0b241ad68b7d","unresolved":false,"context_lines":[{"line_number":1335,"context_line":"          help\u003d_(\u0027Considered successful (exit code 0) only when an unmapped \u0027"},{"line_number":1336,"context_line":"                 \u0027host is discovered. Any other outcome will be considered a \u0027"},{"line_number":1337,"context_line":"                 \u0027failure (exit code 1).\u0027))"},{"line_number":1338,"context_line":"    @args(\u0027--by-service\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse, dest\u003d\u0027by_host\u0027,"},{"line_number":1339,"context_line":"          help\u003d_(\u0027Discover hosts by service instead of compute node\u0027))"},{"line_number":1340,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone, verbose\u003dFalse, strict\u003dFalse,"},{"line_number":1341,"context_line":"                       by_service\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":1,"id":"df7087c5_07bad008","line":1338,"range":{"start_line":1338,"start_character":68,"end_line":1338,"end_character":75},"in_reply_to":"df7087c5_d62010af","updated":"2018-03-14 13:40:07.000000000","message":"Yeah, thanks. I just put this up for discussion, it obviously doesn\u0027t work yet :D","commit_id":"f138daaba01bac2a10519ec0accca3d8e7fe5285"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2a3caf272ffd02685430412e5787960c1b1be617","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"          help\u003d_(\u0027Considered successful (exit code 0) only when an unmapped \u0027"},{"line_number":1350,"context_line":"                 \u0027host is discovered. Any other outcome will be considered a \u0027"},{"line_number":1351,"context_line":"                 \u0027failure (exit code 1).\u0027))"},{"line_number":1352,"context_line":"    @args(\u0027--by-service\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":1353,"context_line":"          dest\u003d\u0027by_service\u0027,"},{"line_number":1354,"context_line":"          help\u003d_(\u0027Discover hosts by service instead of compute node\u0027))"},{"line_number":1355,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone, verbose\u003dFalse, strict\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_1cdbb94f","line":1352,"range":{"start_line":1352,"start_character":46,"end_line":1352,"end_character":61},"updated":"2018-03-16 20:56:00.000000000","message":"nit: I guess it is fine to remove this default value from here, because that is duplicated with the following function definition and the default values of other options(verbose, strict) are set on the definition.","commit_id":"70b3da905eeeecb28e3e0611c74c78921ec1f442"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"da4b3f2a3f7e53b1f2f0ff752fbbd21c5a220da5","unresolved":false,"context_lines":[{"line_number":1349,"context_line":"          help\u003d_(\u0027Considered successful (exit code 0) only when an unmapped \u0027"},{"line_number":1350,"context_line":"                 \u0027host is discovered. Any other outcome will be considered a \u0027"},{"line_number":1351,"context_line":"                 \u0027failure (exit code 1).\u0027))"},{"line_number":1352,"context_line":"    @args(\u0027--by-service\u0027, action\u003d\u0027store_true\u0027, default\u003dFalse,"},{"line_number":1353,"context_line":"          dest\u003d\u0027by_service\u0027,"},{"line_number":1354,"context_line":"          help\u003d_(\u0027Discover hosts by service instead of compute node\u0027))"},{"line_number":1355,"context_line":"    def discover_hosts(self, cell_uuid\u003dNone, verbose\u003dFalse, strict\u003dFalse,"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_dca0e194","line":1352,"range":{"start_line":1352,"start_character":46,"end_line":1352,"end_character":61},"in_reply_to":"df7087c5_1cdbb94f","updated":"2018-03-16 21:28:02.000000000","message":"True.","commit_id":"70b3da905eeeecb28e3e0611c74c78921ec1f442"}],"nova/objects/host_mapping.py":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"b18cc067101c820cd58f4d1d7ba11317ee8b6595","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            status_fn(_(\"Getting services from cell: %(uuid)s\") %"},{"line_number":282,"context_line":"                      {\u0027uuid\u0027: cm.uuid})"},{"line_number":283,"context_line":"        with context.target_cell(ctxt, cm) as cctxt:"},{"line_number":284,"context_line":"            services \u003d objects.ServiceList.get_by_binary(cctxt, \u0027nova-compute\u0027,"},{"line_number":285,"context_line":"                                                         include_disabled\u003dTrue)"},{"line_number":286,"context_line":"            added_hm \u003d _check_and_create_service_host_mappings(cctxt, cm,"},{"line_number":287,"context_line":"                                                               services,"},{"line_number":288,"context_line":"                                                               status_fn)"},{"line_number":289,"context_line":"            status_fn(_(\u0027Mapped %(num)s compute services in cell: %(uuid)s\u0027) %"},{"line_number":290,"context_line":"                      {\u0027num\u0027: len(added_hm),"},{"line_number":291,"context_line":"                       \u0027uuid\u0027: cm.uuid})"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_224022a5","line":288,"range":{"start_line":284,"start_character":12,"end_line":288,"end_character":73},"updated":"2018-03-14 14:32:17.000000000","message":"Since the querying is the only difference in this function from discover_hosts, rest of it being the same, to avoid code replication can we somehow reuse \"discover_hosts\" or put this check as an else condition by adding the \"by_service\" as an argument to discover_hosts; being set to None by default ?","commit_id":"ca931d06dad08a39f98e511aee425fcf1237e63c"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0464adec193c20cc360c23d74961094855ed30f2","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            status_fn(_(\"Getting services from cell: %(uuid)s\") %"},{"line_number":282,"context_line":"                      {\u0027uuid\u0027: cm.uuid})"},{"line_number":283,"context_line":"        with context.target_cell(ctxt, cm) as cctxt:"},{"line_number":284,"context_line":"            services \u003d objects.ServiceList.get_by_binary(cctxt, \u0027nova-compute\u0027,"},{"line_number":285,"context_line":"                                                         include_disabled\u003dTrue)"},{"line_number":286,"context_line":"            added_hm \u003d _check_and_create_service_host_mappings(cctxt, cm,"},{"line_number":287,"context_line":"                                                               services,"},{"line_number":288,"context_line":"                                                               status_fn)"},{"line_number":289,"context_line":"            status_fn(_(\u0027Mapped %(num)s compute services in cell: %(uuid)s\u0027) %"},{"line_number":290,"context_line":"                      {\u0027num\u0027: len(added_hm),"},{"line_number":291,"context_line":"                       \u0027uuid\u0027: cm.uuid})"}],"source_content_type":"text/x-python","patch_set":2,"id":"df7087c5_0dc0af29","line":288,"range":{"start_line":284,"start_character":12,"end_line":288,"end_character":73},"in_reply_to":"df7087c5_224022a5","updated":"2018-03-14 14:56:01.000000000","message":"It would need to be a flag so you opt into it specifically. I initially decided against that because I didn\u0027t like how complex it would make discover_hosts and I want this to be easily backportable. I hastily threw this up last night so we could discuss this (approach) at the meeting today as we have people blocked on it. If people are cool with it, I\u0027ll see about refactoring all of this to make it cleaner and less duplicative.","commit_id":"ca931d06dad08a39f98e511aee425fcf1237e63c"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"95c72886eb0e4c99c57188c9ee7ecc8b56a867b6","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    return host_mappings"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _check_and_create_host_mappings(ctxt, cm, status_fn, by_service):"},{"line_number":217,"context_line":"    from nova import objects"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    if by_service:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_5f5e03ea","line":216,"range":{"start_line":216,"start_character":0,"end_line":216,"end_character":5},"updated":"2018-03-16 21:48:18.000000000","message":"This \"if..else\" logic code was put inside this new function, without putting it directly inside discover_hosts itself to keep it clean and modular ? Or is there any particular reason on why we do this outside discover_hosts ?","commit_id":"70b3da905eeeecb28e3e0611c74c78921ec1f442"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"6dc257b15ba885da033029e3f02ec01232aab062","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    return host_mappings"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _check_and_create_host_mappings(ctxt, cm, status_fn, by_service):"},{"line_number":217,"context_line":"    from nova import objects"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    if by_service:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_628d6c29","line":216,"range":{"start_line":216,"start_character":0,"end_line":216,"end_character":5},"in_reply_to":"df7087c5_5f5e03ea","updated":"2018-03-16 22:58:32.000000000","message":"Yeah I just find it a lot easier to read this way. One of the reasons python enforces indentation rules is to help flag when the complexity within a single method becomes too large you can tell because you\u0027re wrapping all your function names because things stop fitting in 80 cols :)","commit_id":"70b3da905eeeecb28e3e0611c74c78921ec1f442"},{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"136499cdcc3e749d8b0aed868b31b545ada971de","unresolved":false,"context_lines":[{"line_number":213,"context_line":"    return host_mappings"},{"line_number":214,"context_line":""},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"def _check_and_create_host_mappings(ctxt, cm, status_fn, by_service):"},{"line_number":217,"context_line":"    from nova import objects"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    if by_service:"}],"source_content_type":"text/x-python","patch_set":3,"id":"df7087c5_22fe946b","line":216,"range":{"start_line":216,"start_character":0,"end_line":216,"end_character":5},"in_reply_to":"df7087c5_628d6c29","updated":"2018-03-16 23:09:35.000000000","message":"True, Makes total sense. Modularity \u003d Clarity.","commit_id":"70b3da905eeeecb28e3e0611c74c78921ec1f442"}],"releasenotes/notes/discover-hosts-by-service-06ee20365b895127.yaml":[{"author":{"_account_id":26936,"name":"Surya Seetharaman","email":"suryaseetharaman.9@gmail.com","username":"tssurya"},"change_message_id":"136499cdcc3e749d8b0aed868b31b545ada971de","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The nova-manage discover_hosts command now has a ``--by-service`` option which"},{"line_number":5,"context_line":"    allows discovering hosts in a cell purely by the presence of a nova-compute"},{"line_number":6,"context_line":"    binary. At this point, there is no need to use this unless you\u0027re using ironic,"},{"line_number":7,"context_line":"    as it is less efficient. However, if you are using ironic, this allows discovery"},{"line_number":8,"context_line":"    and mapping of hosts even when no ironic nodes are present."}],"source_content_type":"text/x-yaml","patch_set":4,"id":"df7087c5_023a7033","line":6,"range":{"start_line":6,"start_character":65,"end_line":6,"end_character":69},"updated":"2018-03-16 23:09:35.000000000","message":"nit: you are","commit_id":"005a66d7e0bb716e32d29a6b5c9d9f24192596e2"}]}
