)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"c8952eb94a9cef1d65b9d1c970622f30270a22c7","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Generating a rdp file for a windows instance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a instance is running and has the windows metadata. The functionality"},{"line_number":10,"context_line":"of creating a rdp file is provided as a action option. Once the action"},{"line_number":11,"context_line":"is selected, Horizon uploads to the user a rdp file with a public IP"},{"line_number":12,"context_line":"associated to the instance. If none are found then it returns with the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1abeadc6_28941336","line":9,"updated":"2014-08-19 20:01:25.000000000","message":"\"metadata, the...\"","commit_id":"c35e2f2f91ceb93cfb3b46d7ab717d2c7b88041e"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"c8952eb94a9cef1d65b9d1c970622f30270a22c7","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Generating a rdp file for a windows instance."},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a instance is running and has the windows metadata. The functionality"},{"line_number":10,"context_line":"of creating a rdp file is provided as a action option. Once the action"},{"line_number":11,"context_line":"is selected, Horizon uploads to the user a rdp file with a public IP"},{"line_number":12,"context_line":"associated to the instance. If none are found then it returns with the"},{"line_number":13,"context_line":"first IP associated."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"1abeadc6_88a447a7","line":10,"updated":"2014-08-19 20:01:25.000000000","message":"an action","commit_id":"c35e2f2f91ceb93cfb3b46d7ab717d2c7b88041e"}],"openstack_dashboard/dashboards/project/instances/tables.py":[{"author":{"_account_id":5623,"name":"David Lyle","email":"dklyle0@gmail.com","username":"david-lyle"},"change_message_id":"1cc80ee27feeb0a6efce55d99c63aa74041a982c","unresolved":false,"context_lines":[{"line_number":419,"context_line":"    name \u003d \u0027rdp_file\u0027"},{"line_number":420,"context_line":"    verbose_name \u003d _(\u0027Generate RDP file\u0027)"},{"line_number":421,"context_line":"    url \u003d \u0027horizon:project:instances:rdp_download\u0027"},{"line_number":422,"context_line":""},{"line_number":423,"context_line":"    def allowed(self, request, instance):"},{"line_number":424,"context_line":"        return ((instance.status in ACTIVE_STATES"},{"line_number":425,"context_line":"                 or instance.status \u003d\u003d \u0027SHUTOFF\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_b3d2dd59","line":422,"updated":"2014-07-14 22:29:25.000000000","message":"you need to add  add policy_rules \u003d ((\"compute\", \"compute:?\"),) or remove the get_policy_target method.","commit_id":"916f0e92370f72c461a233b7c2912126e5491d6f"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"c8952eb94a9cef1d65b9d1c970622f30270a22c7","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    def get_policy_target(self, request, datum\u003dNone):"},{"line_number":447,"context_line":"        project_id \u003d None"},{"line_number":448,"context_line":"        if datum:"},{"line_number":449,"context_line":"            project_id \u003d getattr(datum, \u0027tenant_id\u0027, None)"},{"line_number":450,"context_line":"        return {\"project_id\": project_id}"},{"line_number":451,"context_line":""},{"line_number":452,"context_line":"    def get_link_url(self, datum\u003dNone):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_683a8b37","line":449,"updated":"2014-08-19 20:01:25.000000000","message":"Once you checked datum before, I don\u0027t this is necessary. You could remove the check","commit_id":"c35e2f2f91ceb93cfb3b46d7ab717d2c7b88041e"},{"author":{"_account_id":9981,"name":"Doug Fish","email":"drfish@us.ibm.com","username":"doug-fish"},"change_message_id":"1e07034bf977bc16dd61dd1bb48ab254510774e5","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from django.conf import settings"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_9e9fa44f","side":"PARENT","line":15,"updated":"2014-12-03 21:31:28.000000000","message":"should avoid white space only changes in files.  This potentially adds to merge conflicts and complicates back ports.\n\nTo be clear, I have no problem with the change itself.  Would be better to have it in a separate patch.","commit_id":"0392b84236003080133074223703d7e929e860ce"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"c2be975b581281ba70aadada6c9db5a7d6b713e0","unresolved":false,"context_lines":[{"line_number":12,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":13,"context_line":"#    under the License."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import logging"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from django.conf import settings"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a890539_6f0757ca","side":"PARENT","line":15,"in_reply_to":"5a890539_9e9fa44f","updated":"2014-12-05 22:11:33.000000000","message":"Done","commit_id":"0392b84236003080133074223703d7e929e860ce"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"aef71c38391a5170030cad6441e6890d9f4c1a6b","unresolved":false,"context_lines":[{"line_number":484,"context_line":""},{"line_number":485,"context_line":"class RdpConfFile(tables.LinkAction):"},{"line_number":486,"context_line":"    name \u003d \u0027rdp_file\u0027"},{"line_number":487,"context_line":"    verbose_name \u003d _(\u0027Generate RDP file\u0027)"},{"line_number":488,"context_line":"    url \u003d \u0027horizon:project:instances:rdp_download\u0027"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def allowed(self, request, instance):"}],"source_content_type":"text/x-python","patch_set":24,"id":"9a80dd14_8dd025f9","line":487,"updated":"2015-03-04 06:43:35.000000000","message":"NIT: use double quotes(\") to align with other action classes.","commit_id":"b28ba5af61c0bc06e25d1e384bc979d3a4d43d71"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"5cb4324d7eaae35536c1b43772ccd6c6a1918320","unresolved":false,"context_lines":[{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def allowed(self, request, instance):"},{"line_number":510,"context_line":"        return ((instance.status in ACTIVE_STATES"},{"line_number":511,"context_line":"                 or instance.status \u003d\u003d \u0027SHUTOFF\u0027)"},{"line_number":512,"context_line":"                and not is_deleting(instance)"},{"line_number":513,"context_line":"                and utils.is_mswindows(instance))"},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_81a5f4a2","line":511,"updated":"2015-07-01 23:52:18.000000000","message":"do we really want to allow download of RDP too for instance that is already shutdown?","commit_id":"50d09c2b7a854d84ca0bd3948e655f885bc14761"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"59a57b94fd2d347ccc1fc530f08ad1da6dd2741c","unresolved":false,"context_lines":[{"line_number":508,"context_line":""},{"line_number":509,"context_line":"    def allowed(self, request, instance):"},{"line_number":510,"context_line":"        return ((instance.status in ACTIVE_STATES"},{"line_number":511,"context_line":"                 or instance.status \u003d\u003d \u0027SHUTOFF\u0027)"},{"line_number":512,"context_line":"                and not is_deleting(instance)"},{"line_number":513,"context_line":"                and utils.is_mswindows(instance))"},{"line_number":514,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_c31af6c5","line":511,"in_reply_to":"ba3cc151_81a5f4a2","updated":"2015-07-02 18:01:03.000000000","message":"This is an optimistic condition. Since the file can be for future use.","commit_id":"50d09c2b7a854d84ca0bd3948e655f885bc14761"},{"author":{"_account_id":1941,"name":"Lin Hua Cheng","email":"os.lcheng@gmail.com","username":"lin-hua-cheng"},"change_message_id":"5cb4324d7eaae35536c1b43772ccd6c6a1918320","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                and not is_deleting(instance)"},{"line_number":513,"context_line":"                and utils.is_mswindows(instance))"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def get_policy_target(self, request, datum\u003dNone):"},{"line_number":516,"context_line":"        project_id \u003d None"},{"line_number":517,"context_line":"        if datum:"},{"line_number":518,"context_line":"            project_id \u003d getattr(datum, \u0027tenant_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_c17f7c15","line":515,"updated":"2015-07-01 23:52:18.000000000","message":"method not need since there is no policy_rule to enforce","commit_id":"50d09c2b7a854d84ca0bd3948e655f885bc14761"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"59a57b94fd2d347ccc1fc530f08ad1da6dd2741c","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                and not is_deleting(instance)"},{"line_number":513,"context_line":"                and utils.is_mswindows(instance))"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"    def get_policy_target(self, request, datum\u003dNone):"},{"line_number":516,"context_line":"        project_id \u003d None"},{"line_number":517,"context_line":"        if datum:"},{"line_number":518,"context_line":"            project_id \u003d getattr(datum, \u0027tenant_id\u0027, None)"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba3cc151_435ca67c","line":515,"in_reply_to":"ba3cc151_c17f7c15","updated":"2015-07-02 18:01:03.000000000","message":"Done","commit_id":"50d09c2b7a854d84ca0bd3948e655f885bc14761"}],"openstack_dashboard/dashboards/project/instances/utils.py":[{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"d4185c336eaed099959927877f97fcfffcc6f611","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        return ip \u0026 net \u003d\u003d net"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    ip \u003d dottedQuadToNum(ipv4)"},{"line_number":85,"context_line":"    networks \u003d [networkMask(x, y) for x, y in subnets]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    return any([addressInNetwork(ip, sub) for sub in networks])"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_1ace8ab4","line":85,"updated":"2014-05-15 19:51:52.000000000","message":"The any() call below will be (potentially) much faster if networks is a generator-expression instead of a list-comprehension.","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"439856224db48216911a9d40a023db92588fcd9c","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        return ip \u0026 net \u003d\u003d net"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    ip \u003d dottedQuadToNum(ipv4)"},{"line_number":85,"context_line":"    networks \u003d [networkMask(x, y) for x, y in subnets]"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    return any([addressInNetwork(ip, sub) for sub in networks])"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_dc8a5f1a","line":85,"in_reply_to":"7adec928_1ace8ab4","updated":"2014-05-15 21:12:30.000000000","message":"Done","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"d4185c336eaed099959927877f97fcfffcc6f611","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    for address in addresses.itervalues():"},{"line_number":96,"context_line":"        public_ip \u003d next((x[\u0027addr\u0027] for x in address"},{"line_number":97,"context_line":"                          if not is_valid_ip(x[\u0027addr\u0027], private_networks)),"},{"line_number":98,"context_line":"                         None)"},{"line_number":99,"context_line":"        if public_ip:"},{"line_number":100,"context_line":"            return public_ip"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_7aab0e75","line":98,"updated":"2014-05-15 19:51:52.000000000","message":"This block is crazy confusing.  :-)  Why not just a simple for-loop around the generator expression?\n\nfor public_ip in (\u003cgenerator stuff here\u003e):\n    return public_ip\n\nThat avoids the obfuscation of the next call potentially leading to a None which must be tested for.","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"439856224db48216911a9d40a023db92588fcd9c","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    for address in addresses.itervalues():"},{"line_number":96,"context_line":"        public_ip \u003d next((x[\u0027addr\u0027] for x in address"},{"line_number":97,"context_line":"                          if not is_valid_ip(x[\u0027addr\u0027], private_networks)),"},{"line_number":98,"context_line":"                         None)"},{"line_number":99,"context_line":"        if public_ip:"},{"line_number":100,"context_line":"            return public_ip"},{"line_number":101,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_7cd06bf6","line":98,"in_reply_to":"7adec928_7aab0e75","updated":"2014-05-15 21:12:30.000000000","message":"The full expansion of this statement is:\n\nfor addresses in addresses.itervalues():\n    for address in addresses:\n         if not is_valid_ip(address[\u0027addr\u0027], private_networks)):\n             return address[\u0027addr\u0027]\nreturn None\n\nI was concerned that this was too verbose.","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"d4185c336eaed099959927877f97fcfffcc6f611","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    # Return the first floating IP"},{"line_number":103,"context_line":"    public_ip \u003d next((i[\u0027addr\u0027] for x in addresses.itervalues()"},{"line_number":104,"context_line":"                     for i in x if i.get(\u0027OS-EXT-IPS:type\u0027) \u003d\u003d \u0027floating\u0027),"},{"line_number":105,"context_line":"                     None)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    if public_ip:"},{"line_number":108,"context_line":"        return public_ip"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_9aa8da78","line":105,"updated":"2014-05-15 19:51:52.000000000","message":"Same here.","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"d4185c336eaed099959927877f97fcfffcc6f611","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    # Return the first IP address found"},{"line_number":111,"context_line":"    return next(i[\u0027addr\u0027] for x in addresses.itervalues()"},{"line_number":112,"context_line":"                          for i in x)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def is_mswindows(instance):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_9aed3aba","line":112,"updated":"2014-05-15 19:51:52.000000000","message":"If this generator expression is empty, next will raise a StopIteration exception.  I doubt this is the type of exception we\u0027d want to raise here.","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"439856224db48216911a9d40a023db92588fcd9c","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    # Return the first IP address found"},{"line_number":111,"context_line":"    return next(i[\u0027addr\u0027] for x in addresses.itervalues()"},{"line_number":112,"context_line":"                          for i in x)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def is_mswindows(instance):"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_fc671b4b","line":112,"in_reply_to":"7adec928_9aed3aba","updated":"2014-05-15 21:12:30.000000000","message":"You are right. I assumed that a instance can not run without a valid IP address. Is there a case there is can be false?","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"d4185c336eaed099959927877f97fcfffcc6f611","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def is_mswindows(instance):"},{"line_number":116,"context_line":"    return instance.metadata.get(\u0027os_distro\u0027) is \u0027windows\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_7a1eaebc","line":116,"updated":"2014-05-15 19:51:52.000000000","message":"This should likely be an \u0027\u003d\u003d\u0027 comparison.  Using \u0027is\u0027 with strings is potentially bad.\nhttp://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"439856224db48216911a9d40a023db92588fcd9c","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":""},{"line_number":115,"context_line":"def is_mswindows(instance):"},{"line_number":116,"context_line":"    return instance.metadata.get(\u0027os_distro\u0027) is \u0027windows\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_bcd673ef","line":116,"in_reply_to":"7adec928_7a1eaebc","updated":"2014-05-15 21:12:30.000000000","message":"Done","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"9ba48c91c9d9b7d551eb48dacb89198142a03bed","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # Return the first IP address found or None"},{"line_number":106,"context_line":"    return next((addr[\u0027addr\u0027] for addresses in addresses.itervalues()"},{"line_number":107,"context_line":"                          for addr in addresses), None)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def is_mswindows(instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_42bae46e","line":107,"updated":"2014-05-16 03:06:07.000000000","message":"The for-loops above are much clearer.  I\u0027d just do the same thing, and if they don\u0027t return, put an explicit return None at the end.\n\nHey, thanks for the changes above.  I hope it hasn\u0027t been too pedantic.","commit_id":"fc64f3c05a59d832a9ab3026110ac7a19d521605"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"89654e200aa2cdb8923ad24cb4b22f3974794e35","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # Return the first IP address found or None"},{"line_number":106,"context_line":"    return next((addr[\u0027addr\u0027] for addresses in addresses.itervalues()"},{"line_number":107,"context_line":"                          for addr in addresses), None)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def is_mswindows(instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_79d0721f","line":107,"in_reply_to":"7adec928_42bae46e","updated":"2014-05-16 14:20:51.000000000","message":"No, I wish more reviews were like yours. I get mostly \"This is no good\" and -1.\n\nAs for the final return, are you suggesting to wrap the for loops into a try catch?","commit_id":"fc64f3c05a59d832a9ab3026110ac7a19d521605"},{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"8750e3cdf6e6b39076aeeaa8302b5f3ce3179f28","unresolved":false,"context_lines":[{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    # Return the first IP address found or None"},{"line_number":106,"context_line":"    return next((addr[\u0027addr\u0027] for addresses in addresses.itervalues()"},{"line_number":107,"context_line":"                          for addr in addresses), None)"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"def is_mswindows(instance):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7adec928_d7e22d2e","line":107,"in_reply_to":"7adec928_79d0721f","updated":"2014-05-16 15:30:26.000000000","message":"I\u0027m envisioning this loop looking just like the others:\n\n# First Not private IP\nfor \u003cblah\u003e:\n    for \u003cinner blah\u003e:\n        if \u003csomething\u003e:\n            return ______\n\n# First Floating IP\nfor \u003cblah\u003e:\n    for \u003cinner blah\u003e:\n        if \u003csomething\u003e:\n            return ______\n\n# First IP Address found\nfor \u003cblah\u003e:\n    for \u003cinner blah\u003e:\n        if \u003csomething\u003e:\n            return ______\n\n# Didn\u0027t find anything at all so ...\nreturn None\n\n\nI THINK that type of thing would work here, but I could be entirely wrong.","commit_id":"fc64f3c05a59d832a9ab3026110ac7a19d521605"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"c8952eb94a9cef1d65b9d1c970622f30270a22c7","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"def is_valid_ip(ipv4, subnets):"},{"line_number":69,"context_line":"    def makeMask(n):"},{"line_number":70,"context_line":"        \"return a mask of n bits as a long integer\""},{"line_number":71,"context_line":"        return (2L \u003c\u003c n - 1) - 1"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def dottedQuadToNum(ip):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_e81cdbc3","line":70,"updated":"2014-08-19 20:01:25.000000000","message":"Shouldn\u0027t this be a comment?","commit_id":"c35e2f2f91ceb93cfb3b46d7ab717d2c7b88041e"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"c8952eb94a9cef1d65b9d1c970622f30270a22c7","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        return (2L \u003c\u003c n - 1) - 1"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def dottedQuadToNum(ip):"},{"line_number":74,"context_line":"        \"convert decimal dotted quad string to long integer\""},{"line_number":75,"context_line":"        return struct.unpack(\u0027I\u0027, socket.inet_aton(ip))[0]"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def networkMask(ip, bits):"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_6888cbe7","line":74,"updated":"2014-08-19 20:01:25.000000000","message":"and this... \nand so on...","commit_id":"c35e2f2f91ceb93cfb3b46d7ab717d2c7b88041e"},{"author":{"_account_id":10046,"name":"Henrique Truta","email":"henrique@lsd.ufcg.edu.br","username":"henriquetruta"},"change_message_id":"c8952eb94a9cef1d65b9d1c970622f30270a22c7","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        return dottedQuadToNum(ip) \u0026 makeMask(bits)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def addressInNetwork(ip, net):"},{"line_number":82,"context_line":"        return ip \u0026 net \u003d\u003d net"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    ip \u003d dottedQuadToNum(ipv4)"},{"line_number":85,"context_line":"    networks \u003d (networkMask(x, y) for x, y in subnets)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1abeadc6_a8aca336","line":82,"updated":"2014-08-19 20:01:25.000000000","message":"Pretty confusing this statement. Don\u0027t you just want to return ip? Or maybe you can put parenthesis","commit_id":"c35e2f2f91ceb93cfb3b46d7ab717d2c7b88041e"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"0e9c344f1d05747682042cd305c9130ac010604d","unresolved":false,"context_lines":[{"line_number":162,"context_line":"def is_valid_ip(ipv4, subnets):"},{"line_number":163,"context_line":"    def makeMask(n):"},{"line_number":164,"context_line":"        # Return a mask of n bits as a long integer."},{"line_number":165,"context_line":"        return (2L \u003c\u003c n - 1) - 1"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"    def dottedQuadToNum(ip):"},{"line_number":168,"context_line":"        # Convert decimal dotted quad string to long integer."}],"source_content_type":"text/x-python","patch_set":33,"id":"7a740942_edc6f398","line":165,"updated":"2015-12-14 10:07:38.000000000","message":"Not compatible with python3","commit_id":"dd9a0378b3fc242536a53100fb9798f0437f24ae"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"0e9c344f1d05747682042cd305c9130ac010604d","unresolved":false,"context_lines":[{"line_number":191,"context_line":"            for address in addrs:"},{"line_number":192,"context_line":"                if address.get(\u0027OS-EXT-IPS:type\u0027) \u003d\u003d \u0027floating\u0027:"},{"line_number":193,"context_line":"                    return address[\u0027addr\u0027]"},{"line_number":194,"context_line":"                if is_valid_ip(address[\u0027addr\u0027], public_subnets):"},{"line_number":195,"context_line":"                    return address[\u0027addr\u0027]"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        # Return the first IP address found or None"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a740942_aa2d31a9","line":194,"updated":"2015-12-14 10:07:38.000000000","message":"Any reasoning on why are you doing all this checks for a simple IP?","commit_id":"dd9a0378b3fc242536a53100fb9798f0437f24ae"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"0e9c344f1d05747682042cd305c9130ac010604d","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                if is_valid_ip(address[\u0027addr\u0027], public_subnets):"},{"line_number":195,"context_line":"                    return address[\u0027addr\u0027]"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        # Return the first IP address found or None"},{"line_number":198,"context_line":"        return next((addr[\u0027addr\u0027] for addrs in addresses.itervalues()"},{"line_number":199,"context_line":"                     for addr in addrs), None)"},{"line_number":200,"context_line":""}],"source_content_type":"text/x-python","patch_set":33,"id":"7a740942_2d55dbf8","line":197,"updated":"2015-12-14 10:07:38.000000000","message":"Shouldnt this raise some error instead of returning None?","commit_id":"dd9a0378b3fc242536a53100fb9798f0437f24ae"}],"openstack_dashboard/dashboards/project/instances/views.py":[{"author":{"_account_id":9659,"name":"Matt Wood","email":"matt.wood@hpe.com","username":"woodm1979"},"change_message_id":"d4185c336eaed099959927877f97fcfffcc6f611","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    try:"},{"line_number":196,"context_line":"        instance \u003d api.nova.server_get(request, instance_id)"},{"line_number":197,"context_line":"        if not project_utils.is_mswindows(instance):"},{"line_number":198,"context_line":"            raise Exception(\"Instance is not a windows OS\")"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        public_ip \u003d project_utils.get_public_ip(request, instance.addresses)"},{"line_number":201,"context_line":"        rdp_content \u003d (\u0027auto connect:i:1\\r\\nfull address:s:{0}\\r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_7a4ceec8","line":198,"updated":"2014-05-15 19:51:52.000000000","message":"Raising a generic Exception is generally bad.  I\u0027d probably make this a ValueError.","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"439856224db48216911a9d40a023db92588fcd9c","unresolved":false,"context_lines":[{"line_number":195,"context_line":"    try:"},{"line_number":196,"context_line":"        instance \u003d api.nova.server_get(request, instance_id)"},{"line_number":197,"context_line":"        if not project_utils.is_mswindows(instance):"},{"line_number":198,"context_line":"            raise Exception(\"Instance is not a windows OS\")"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        public_ip \u003d project_utils.get_public_ip(request, instance.addresses)"},{"line_number":201,"context_line":"        rdp_content \u003d (\u0027auto connect:i:1\\r\\nfull address:s:{0}\\r\\n\u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"7adec928_5c79efc6","line":198,"in_reply_to":"7adec928_7a4ceec8","updated":"2014-05-15 21:12:30.000000000","message":"Done","commit_id":"9603ec20fdccad8d9d550c036e5ffbfbebc37c1c"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"074d9d80f8c488ab619c29df263406260f57591a","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        response[\u0027Content-Disposition\u0027] \u003d (\u0027attachment; filename\u003d{0}.\u0027"},{"line_number":213,"context_line":"                                           \u0027rdp\u0027.format(instance.name))"},{"line_number":214,"context_line":"        return response"},{"line_number":215,"context_line":"    except Exception:"},{"line_number":216,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":217,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file for \"%s\".\u0027) % instance_id"},{"line_number":218,"context_line":"        exceptions.handle(request, msg, redirect\u003dredirect)"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa81d914_cc3562dc","line":215,"updated":"2015-01-29 11:40:15.000000000","message":"(nit)this is catching the \u0027ValueError\u0027 and displaying the common error message.\nthe specific error message is not used(which is given in line #204)\nso if we catch the ValueError separately and showing the specific error message will be very nice.","commit_id":"e6afd1d7651e6611ab3aeda14b67b584dac64bcf"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"80435945f15ed80f537fd07ad5e4b41dd88b8e3f","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        response[\u0027Content-Disposition\u0027] \u003d (\u0027attachment; filename\u003d{0}.\u0027"},{"line_number":213,"context_line":"                                           \u0027rdp\u0027.format(instance.name))"},{"line_number":214,"context_line":"        return response"},{"line_number":215,"context_line":"    except Exception:"},{"line_number":216,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":217,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file for \"%s\".\u0027) % instance_id"},{"line_number":218,"context_line":"        exceptions.handle(request, msg, redirect\u003dredirect)"}],"source_content_type":"text/x-python","patch_set":18,"id":"da86d52c_3bed468c","line":215,"in_reply_to":"fa81d914_cc3562dc","updated":"2015-02-03 15:58:35.000000000","message":"You are right.","commit_id":"e6afd1d7651e6611ab3aeda14b67b584dac64bcf"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"aef71c38391a5170030cad6441e6890d9f4c1a6b","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        return response"},{"line_number":218,"context_line":"    except ValueError:"},{"line_number":219,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":220,"context_line":"        exceptions.handle(request, redirect\u003dredirect)"},{"line_number":221,"context_line":"    except Exception:"},{"line_number":222,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":223,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file for \"%s\".\u0027) % instance_id"}],"source_content_type":"text/x-python","patch_set":24,"id":"9a80dd14_6d9e9158","line":220,"updated":"2015-03-04 06:43:35.000000000","message":"it is good to pass the message also to the handle.","commit_id":"b28ba5af61c0bc06e25d1e384bc979d3a4d43d71"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"f7156c768915b6522dbd0d6efb3ea53b42c8e1b8","unresolved":false,"context_lines":[{"line_number":215,"context_line":"        response[\u0027Content-Disposition\u0027] \u003d (\u0027attachment; filename\u003d{0}.\u0027"},{"line_number":216,"context_line":"                                           \u0027rdp\u0027.format(instance.name))"},{"line_number":217,"context_line":"        return response"},{"line_number":218,"context_line":"    except Exception:"},{"line_number":219,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":220,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file for \"%s\".\u0027) % instance_id"},{"line_number":221,"context_line":"        exceptions.handle(request, msg, redirect\u003dredirect)"}],"source_content_type":"text/x-python","patch_set":25,"id":"dac4157f_4d046b7d","line":218,"updated":"2015-04-20 08:42:59.000000000","message":"check my comment in patch set 18, you have fixed that and removed it in this patch, any reason?","commit_id":"e78c97debf9833f80a55eeee5c092dbd20f9c84e"},{"author":{"_account_id":10442,"name":"Masco Kaliyamoorthy","email":"mkaliyam@redhat.com","username":"masco"},"change_message_id":"a169d1d61740f6473c697164efcd6ff2edb8d6d8","unresolved":false,"context_lines":[{"line_number":222,"context_line":"        return response"},{"line_number":223,"context_line":"    except ValueError:"},{"line_number":224,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":225,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file. \"%s\" is not a windows instance\u0027)"},{"line_number":226,"context_line":"        msg \u003d msg % instance_id"},{"line_number":227,"context_line":"        exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":228,"context_line":"    except Exception:"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba3cc151_dd6ffcfa","line":225,"updated":"2015-07-10 06:20:13.000000000","message":"nit- usually the message ends with a period.","commit_id":"8e3c2e79b2e00df00d633ba8e869ad73e60b872d"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"0e9c344f1d05747682042cd305c9130ac010604d","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file. \"%s\" is not a windows instance\u0027)"},{"line_number":227,"context_line":"        msg \u003d msg % instance_id"},{"line_number":228,"context_line":"        exceptions.handle(request, msg, redirect\u003dredirect)"},{"line_number":229,"context_line":"    except Exception:"},{"line_number":230,"context_line":"        redirect \u003d reverse(\"horizon:project:instances:index\")"},{"line_number":231,"context_line":"        msg \u003d _(\u0027Unable to create a RDP file for \"%s\".\u0027) % instance_id"},{"line_number":232,"context_line":"        exceptions.handle(request, msg, redirect\u003dredirect)"}],"source_content_type":"text/x-python","patch_set":33,"id":"7a740942_0dad7fe8","line":229,"updated":"2015-12-14 10:07:38.000000000","message":"Should log the error so if it fails the operator has something to check","commit_id":"dd9a0378b3fc242536a53100fb9798f0437f24ae"}],"openstack_dashboard/local/local_settings.py.example":[{"author":{"_account_id":3185,"name":"Alessandro Pilotti","email":"apilotti@cloudbasesolutions.com","username":"alexpilotti"},"change_message_id":"8f4cfbfb78972690a2ac315e24672021f4c1c122","unresolved":false,"context_lines":[{"line_number":50,"context_line":"# Set to None explicitly if you want to deactivate the console."},{"line_number":51,"context_line":"# CONSOLE_TYPE \u003d \"AUTO\""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"# Default OpenStack Dashboard configuration."},{"line_number":54,"context_line":"HORIZON_CONFIG \u003d {"},{"line_number":55,"context_line":"    \u0027user_home\u0027: \u0027openstack_dashboard.views.get_user_home\u0027,"},{"line_number":56,"context_line":"    \u0027ajax_queue_limit\u0027: 10,"}],"source_content_type":"application/octet-stream","patch_set":15,"id":"5a890539_e94b9584","side":"PARENT","line":53,"updated":"2014-12-03 20:20:35.000000000","message":"I\u0027d add an option to enable this feature, .e.g. ENABLE_RDP_DOWNLOAD, with True as default, allowing users to disable it if they don\u0027t want it.","commit_id":"0392b84236003080133074223703d7e929e860ce"},{"author":{"_account_id":8984,"name":"George Peristerakis","email":"gperiste@redhat.com","username":"peristeri"},"change_message_id":"c2be975b581281ba70aadada6c9db5a7d6b713e0","unresolved":false,"context_lines":[{"line_number":50,"context_line":"# Set to None explicitly if you want to deactivate the console."},{"line_number":51,"context_line":"# CONSOLE_TYPE \u003d \"AUTO\""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"# Default OpenStack Dashboard configuration."},{"line_number":54,"context_line":"HORIZON_CONFIG \u003d {"},{"line_number":55,"context_line":"    \u0027user_home\u0027: \u0027openstack_dashboard.views.get_user_home\u0027,"},{"line_number":56,"context_line":"    \u0027ajax_queue_limit\u0027: 10,"}],"source_content_type":"application/octet-stream","patch_set":15,"id":"5a890539_a071400e","side":"PARENT","line":53,"in_reply_to":"5a890539_e94b9584","updated":"2014-12-05 22:11:33.000000000","message":"Can you add your comments to the blueprint for discussion?","commit_id":"0392b84236003080133074223703d7e929e860ce"},{"author":{"_account_id":12281,"name":"Itxaka","email":"igarcia@suse.com","username":"itxaka"},"change_message_id":"0e9c344f1d05747682042cd305c9130ac010604d","unresolved":false,"context_lines":[{"line_number":272,"context_line":"    # Set which VNIC types are supported for port binding. Only the VNIC"},{"line_number":273,"context_line":"    # types in this list will be available to choose from when creating a"},{"line_number":274,"context_line":"    # port."},{"line_number":275,"context_line":"    # VNIC types include \u0027normal\u0027, \u0027macvtap\u0027 and \u0027direct\u0027."},{"line_number":276,"context_line":"    \u0027supported_vnic_types\u0027: [\u0027*\u0027]"},{"line_number":277,"context_line":"}"},{"line_number":278,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":33,"id":"7a740942_0ddb3f7d","line":275,"updated":"2015-12-14 10:07:38.000000000","message":"Why remove this line?","commit_id":"dd9a0378b3fc242536a53100fb9798f0437f24ae"}]}
