)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e99c6993a31af5ac5388a0e8bfccabe32545ef03","unresolved":false,"context_lines":[{"line_number":9,"context_line":"If using nova-network, \"create a security group\" API call fails"},{"line_number":10,"context_line":"unless specifying name or description. On the other hand, if calling"},{"line_number":11,"context_line":"Neutron API directly without Nova proxy, we can create a security"},{"line_number":12,"context_line":"group without name or description."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch enforces to specify both name and description even if using"},{"line_number":15,"context_line":"Neutron for consistent validation behavior between nova-network and"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":15,"id":"da20952f_7b1b04cb","line":12,"updated":"2015-09-03 01:27:44.000000000","message":"name is optional? Appears to be required in neutronclient:\n\nhttp://docs.openstack.org/cli-reference/content/neutronclient_commands.html#neutronclient_subcommand_security-group-create\n\nAnd the API docs don\u0027t say that it\u0027s optional:\n\nhttp://developer.openstack.org/api-ref-networking-v2-ext.html","commit_id":"91e46f7c85a750eb8df92652d83dcf5b79db97cd"}],"nova/api/openstack/compute/contrib/security_groups.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d9f1c45b8cfd0f9faaad7fba244fdfede4f56c44","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":203,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        # NOTE: If the parameters are specified, here alrady confirmed these"},{"line_number":206,"context_line":"        # values are string type. So if the following get() returns None, that"},{"line_number":207,"context_line":"        # means the parameters are not specified."},{"line_number":208,"context_line":"        group_name \u003d security_group.get(\u0027name\u0027, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_0e513e62","line":205,"updated":"2015-06-16 18:27:59.000000000","message":"attonit: \"already\"","commit_id":"738f1fd81bf6c6d120ca47f4b200342f9c05e22e"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"08ce3666c4bf7950fee75c67577bf881cd5f4e15","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":203,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        # NOTE: If the parameters are specified, here alrady confirmed these"},{"line_number":206,"context_line":"        # values are string type. So if the following get() returns None, that"},{"line_number":207,"context_line":"        # means the parameters are not specified."},{"line_number":208,"context_line":"        group_name \u003d security_group.get(\u0027name\u0027, None)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_41f62cfa","line":205,"in_reply_to":"fa32b979_0e513e62","updated":"2015-06-16 23:35:11.000000000","message":"thanks, done","commit_id":"738f1fd81bf6c6d120ca47f4b200342f9c05e22e"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"507c1636998e15f502126078b2603e49e387868d","unresolved":false,"context_lines":[{"line_number":200,"context_line":"        if not isinstance(security_group.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":201,"context_line":"                          six.string_types):"},{"line_number":202,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":203,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        # NOTE: If the parameters are specified, here already confirmed these"},{"line_number":206,"context_line":"        # values are string type. So if the following get() returns None, that"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba3cc151_9f480f5e","line":203,"updated":"2015-07-08 02:34:50.000000000","message":"This part will be ported to v2.1 API side in the next patch for fixing the problem without the depending JSON-Schema patch.","commit_id":"a22b8d257bf665cc6fd897fd8fa8f17f2049bfc6"}],"nova/api/openstack/compute/plugins/v3/security_groups.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"d6c06d2f98b548b25224083c739d675ebd8d27bc","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        security_group \u003d self._from_body(body, \u0027security_group\u0027)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        if not isinstance(security_group.get(\u0027name\u0027, \u0027\u0027), six.string_types):"},{"line_number":185,"context_line":"            msg \u003d _(\"The value of \u0027name\u0027 should be string.\")"},{"line_number":186,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_6fdcc646","line":184,"updated":"2015-07-17 13:53:22.000000000","message":"I quite liked depending on the schema addition, but OK.","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"90d192378feb4b291a4a99c59f9361780e4fb02a","unresolved":false,"context_lines":[{"line_number":181,"context_line":""},{"line_number":182,"context_line":"        security_group \u003d self._from_body(body, \u0027security_group\u0027)"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"        if not isinstance(security_group.get(\u0027name\u0027, \u0027\u0027), six.string_types):"},{"line_number":185,"context_line":"            msg \u003d _(\"The value of \u0027name\u0027 should be string.\")"},{"line_number":186,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_9419117c","line":184,"in_reply_to":"9a41bdd9_6fdcc646","updated":"2015-07-21 04:25:44.000000000","message":"I am trying to test this case with https://review.openstack.org/#/c/187427/ and this test case should succeed to run on master and stable branches.\n\nIf this patch depends on jsonschema patch, we will need to backport both this patch and jsonschema patch to some stable branches.\n\nMaybe that would be difficult to merge both of them.\nAt this time, I feel it is nice to merge this patch first for backporting this patch.","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e094f453b1cee036a95389b7c7f1b5647f910a94","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not isinstance(security_group.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":189,"context_line":"                          six.string_types):"},{"line_number":190,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":191,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        # NOTE: If the parameters are specified, here already confirmed these"},{"line_number":194,"context_line":"        # values are string type. So if the following get() returns None, that"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a41bdd9_68fee0af","line":191,"updated":"2015-07-18 07:55:12.000000000","message":"For nova-network, self.security_group_api.validate_property will validate the input again. If we didn\u0027t put into json-schema we should put validation into \"self.security_group_api.validate_property\"\n\nBut I prefer this patch merged first https://review.openstack.org/#/c/189544/\n\nOr just remove those validation code, let https://review.openstack.org/#/c/189544/ fix it.","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"0c60921a36d69ade120c0138baa207d7f38bc5ff","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not isinstance(security_group.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":189,"context_line":"                          six.string_types):"},{"line_number":190,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":191,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        # NOTE: If the parameters are specified, here already confirmed these"},{"line_number":194,"context_line":"        # values are string type. So if the following get() returns None, that"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_90b75984","line":191,"in_reply_to":"3a50d1a3_557543c8","updated":"2015-07-29 05:45:39.000000000","message":"I think self.security_group_api.validate_property cannot cover this bug case, because of line 196 and 197.\n\nBefore passing values of name and description, here should get values from a request body. After that, nova cannot distinguish whether None value comes from a client or the client doesn\u0027t specify the value.\n\nTo avoid this situation, this patch checks the values before extracting.","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"e2d13cc917582e86042ae4d7c3a22e69b78e9005","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not isinstance(security_group.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":189,"context_line":"                          six.string_types):"},{"line_number":190,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":191,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        # NOTE: If the parameters are specified, here already confirmed these"},{"line_number":194,"context_line":"        # values are string type. So if the following get() returns None, that"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_3010beff","line":191,"in_reply_to":"3a50d1a3_90b75984","updated":"2015-07-29 08:49:56.000000000","message":"ok, I see now, thanks","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"86ac549e57ea0be6ab854684e8908ed5801447f8","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not isinstance(security_group.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":189,"context_line":"                          six.string_types):"},{"line_number":190,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":191,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        # NOTE: If the parameters are specified, here already confirmed these"},{"line_number":194,"context_line":"        # values are string type. So if the following get() returns None, that"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_557543c8","line":191,"in_reply_to":"3a50d1a3_d4ca396e","updated":"2015-07-29 05:15:14.000000000","message":"thanks for the explain!, one more question, why not put the validation in the elf.security_group_api.validate_property? Otherwise nova-network will check the input double times.","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"90d192378feb4b291a4a99c59f9361780e4fb02a","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if not isinstance(security_group.get(\u0027description\u0027, \u0027\u0027),"},{"line_number":189,"context_line":"                          six.string_types):"},{"line_number":190,"context_line":"            msg \u003d _(\"The value of \u0027description\u0027 should be string.\")"},{"line_number":191,"context_line":"            raise exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"        # NOTE: If the parameters are specified, here already confirmed these"},{"line_number":194,"context_line":"        # values are string type. So if the following get() returns None, that"}],"source_content_type":"text/x-python","patch_set":10,"id":"3a50d1a3_d4ca396e","line":191,"in_reply_to":"9a41bdd9_68fee0af","updated":"2015-07-21 04:25:44.000000000","message":"as I said the above, this patch is nice to be merged first.\nSo https://review.openstack.org/#/c/189544/ will be changed.","commit_id":"6e5bdd8e58771f236b504850b060aedd2be83977"}],"nova/network/security_group/neutron_driver.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d9f1c45b8cfd0f9faaad7fba244fdfede4f56c44","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def create_security_group(self, context, name\u003dNone, description\u003dNone):"},{"line_number":50,"context_line":"        \"\"\"Create a security group."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        @param context: Nova auth context."},{"line_number":53,"context_line":"        @param name: Security group name. If None, don\u0027t pass the value."},{"line_number":54,"context_line":"        @param description: The description. If None, don\u0027t pass the value."},{"line_number":55,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_aefdb23b","line":52,"updated":"2015-06-16 18:27:59.000000000","message":"I thought we were pretty much uniformly using the \":param context:\" style as opposed to \"@param context:\".","commit_id":"738f1fd81bf6c6d120ca47f4b200342f9c05e22e"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"08ce3666c4bf7950fee75c67577bf881cd5f4e15","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    def create_security_group(self, context, name\u003dNone, description\u003dNone):"},{"line_number":50,"context_line":"        \"\"\"Create a security group."},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"        @param context: Nova auth context."},{"line_number":53,"context_line":"        @param name: Security group name. If None, don\u0027t pass the value."},{"line_number":54,"context_line":"        @param description: The description. If None, don\u0027t pass the value."},{"line_number":55,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_21c8c8a7","line":52,"in_reply_to":"fa32b979_aefdb23b","updated":"2015-06-16 23:35:11.000000000","message":"ah, I see.","commit_id":"738f1fd81bf6c6d120ca47f4b200342f9c05e22e"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"d9f1c45b8cfd0f9faaad7fba244fdfede4f56c44","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    def _make_neutron_security_group_dict(self, name, description):"},{"line_number":239,"context_line":"        sgroup_dict \u003d {\u0027security_group\u0027: {}}"},{"line_number":240,"context_line":"        if name is not None:"},{"line_number":241,"context_line":"            sgroup_dict[\u0027security_group\u0027].update({\u0027name\u0027: name})"},{"line_number":242,"context_line":"        if description is not None:"},{"line_number":243,"context_line":"            sgroup_dict[\u0027security_group\u0027].update({\u0027description\u0027: description})"},{"line_number":244,"context_line":"        return sgroup_dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_4ebae66f","line":241,"updated":"2015-06-16 18:27:59.000000000","message":"Why use update here?  Why not make this:\n\n    if name is not None:\n        sgroup_dict[\u0027security_group\u0027][\u0027name\u0027] \u003d name","commit_id":"738f1fd81bf6c6d120ca47f4b200342f9c05e22e"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"08ce3666c4bf7950fee75c67577bf881cd5f4e15","unresolved":false,"context_lines":[{"line_number":238,"context_line":"    def _make_neutron_security_group_dict(self, name, description):"},{"line_number":239,"context_line":"        sgroup_dict \u003d {\u0027security_group\u0027: {}}"},{"line_number":240,"context_line":"        if name is not None:"},{"line_number":241,"context_line":"            sgroup_dict[\u0027security_group\u0027].update({\u0027name\u0027: name})"},{"line_number":242,"context_line":"        if description is not None:"},{"line_number":243,"context_line":"            sgroup_dict[\u0027security_group\u0027].update({\u0027description\u0027: description})"},{"line_number":244,"context_line":"        return sgroup_dict"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_a1bcd806","line":241,"in_reply_to":"fa32b979_4ebae66f","updated":"2015-06-16 23:35:11.000000000","message":"oops, nice catch.\nwill change here.","commit_id":"738f1fd81bf6c6d120ca47f4b200342f9c05e22e"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"344998397e24135f19f8e2a81a253a7fb0d38b2f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :param value:    the value to validate, as a string or unicode"},{"line_number":94,"context_line":"        :param property: the property, either \u0027name\u0027 or \u0027description\u0027"},{"line_number":95,"context_line":"        :param allowed:  the range of characters allowed, but not used because"},{"line_number":96,"context_line":"                         Neutron is allowing any characters."},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_4849ec5f","line":96,"updated":"2015-07-30 08:07:45.000000000","message":"ec2 api depend this https://github.com/openstack/nova/blob/master/nova/api/ec2/cloud.py#L737\n\ndo we need take care of it?","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"c40770e243a68994e9e0572c4497ebf14f1e320f","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :param value:    the value to validate, as a string or unicode"},{"line_number":94,"context_line":"        :param property: the property, either \u0027name\u0027 or \u0027description\u0027"},{"line_number":95,"context_line":"        :param allowed:  the range of characters allowed, but not used because"},{"line_number":96,"context_line":"                         Neutron is allowing any characters."},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_185398e3","line":96,"in_reply_to":"1a4dcd0f_6f045d49","updated":"2015-08-06 07:22:56.000000000","message":"EC2 API code is already deprecated, so I am not sure the additional code only for EC2 is really worth now.","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"41bb4cec339771ffa6d50b9da54bda4532808ee5","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :param value:    the value to validate, as a string or unicode"},{"line_number":94,"context_line":"        :param property: the property, either \u0027name\u0027 or \u0027description\u0027"},{"line_number":95,"context_line":"        :param allowed:  the range of characters allowed, but not used because"},{"line_number":96,"context_line":"                         Neutron is allowing any characters."},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_6de5acda","line":96,"in_reply_to":"3a50d1a3_4849ec5f","updated":"2015-07-31 02:50:20.000000000","message":"Hi Alex,\n\nyeah, you are right.\n\nand if nova-network, ec2 api validation was nova-network one like\n\nhttps://github.com/openstack/nova/blob/master/nova/api/ec2/cloud.py#L2015\n\nThis patch make ec2 api validation of neutron also the similar to nova-network\u0027s one. that seems acceptable on this patch purpose.","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"cfded818ff42e5d6a8f8614b603236547d47808a","unresolved":false,"context_lines":[{"line_number":93,"context_line":"        :param value:    the value to validate, as a string or unicode"},{"line_number":94,"context_line":"        :param property: the property, either \u0027name\u0027 or \u0027description\u0027"},{"line_number":95,"context_line":"        :param allowed:  the range of characters allowed, but not used because"},{"line_number":96,"context_line":"                         Neutron is allowing any characters."},{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_6f045d49","line":96,"in_reply_to":"3a50d1a3_6de5acda","updated":"2015-08-06 03:00:53.000000000","message":"Hi, I mean EC2 APi code depend on \u0027allowed\u0027 parameter, so we better implement it.","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"5ea1825a110573a23c3bd867c2707165f475e37c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # if using Neutron, Nova has allowed empty string as its history."},{"line_number":106,"context_line":"        # So this min_length should be 0 for passing the existing requests."},{"line_number":107,"context_line":"        utils.check_string_length(val, name\u003dproperty, min_length\u003d0,"},{"line_number":108,"context_line":"                                  max_length\u003d255)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _convert_to_nova_security_group_format(self, security_group):"},{"line_number":111,"context_line":"        nova_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_083524a7","line":108,"updated":"2015-07-30 08:12:57.000000000","message":"https://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/v3/security_groups.py#L26\n\nwill len\u003d0 will lead to validation error?","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":13663,"name":"heijlong","email":"jhei@redhat.com","username":"parklong"},"change_message_id":"a16bded74757fa48018f965c58d24cf17ca14f2c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # if using Neutron, Nova has allowed empty string as its history."},{"line_number":106,"context_line":"        # So this min_length should be 0 for passing the existing requests."},{"line_number":107,"context_line":"        utils.check_string_length(val, name\u003dproperty, min_length\u003d0,"},{"line_number":108,"context_line":"                                  max_length\u003d255)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _convert_to_nova_security_group_format(self, security_group):"},{"line_number":111,"context_line":"        nova_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_f180e0c1","line":108,"in_reply_to":"3a50d1a3_083524a7","updated":"2015-07-30 08:52:08.000000000","message":"@jichenjc\n\nI think this schemas works for api layer, it could NOT cover this neutron-driver...\n\nplease ignore if I am wrong","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"cde1eed6c3882575d26ba1e78455f270b9111602","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # if using Neutron, Nova has allowed empty string as its history."},{"line_number":106,"context_line":"        # So this min_length should be 0 for passing the existing requests."},{"line_number":107,"context_line":"        utils.check_string_length(val, name\u003dproperty, min_length\u003d0,"},{"line_number":108,"context_line":"                                  max_length\u003d255)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _convert_to_nova_security_group_format(self, security_group):"},{"line_number":111,"context_line":"        nova_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"1a4dcd0f_fb1ee66e","line":108,"in_reply_to":"3a50d1a3_cdf1606c","updated":"2015-08-06 08:02:58.000000000","message":"ok,  removed my -1, thanks","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"0411901a27f6bac37f3fbcfe8fcb8b2d5e84fd7d","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # if using Neutron, Nova has allowed empty string as its history."},{"line_number":106,"context_line":"        # So this min_length should be 0 for passing the existing requests."},{"line_number":107,"context_line":"        utils.check_string_length(val, name\u003dproperty, min_length\u003d0,"},{"line_number":108,"context_line":"                                  max_length\u003d255)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _convert_to_nova_security_group_format(self, security_group):"},{"line_number":111,"context_line":"        nova_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_f4576e58","line":108,"in_reply_to":"3a50d1a3_f180e0c1","updated":"2015-07-30 09:12:52.000000000","message":"yes, what I mean is API layer forbid len \u003d0 \nhow can we check in neutron layer? \n\nAPI layer will raise exception direclty?","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"41bb4cec339771ffa6d50b9da54bda4532808ee5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        # if using Neutron, Nova has allowed empty string as its history."},{"line_number":106,"context_line":"        # So this min_length should be 0 for passing the existing requests."},{"line_number":107,"context_line":"        utils.check_string_length(val, name\u003dproperty, min_length\u003d0,"},{"line_number":108,"context_line":"                                  max_length\u003d255)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _convert_to_nova_security_group_format(self, security_group):"},{"line_number":111,"context_line":"        nova_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_cdf1606c","line":108,"in_reply_to":"3a50d1a3_f4576e58","updated":"2015-07-31 02:50:20.000000000","message":"Hi jichenjc,\n\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/schemas/v3/security_groups.py#L26\n\ndoesn\u0027t work on this api.\nIt just works on \"create a server\" api.","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6d176f7bb0c4b533e37d5e60451bc3ed9fc8ec5","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            val \u003d value.strip()"},{"line_number":101,"context_line":"        except AttributeError:"},{"line_number":102,"context_line":"            msg \u003d _(\"Security group %s is not a string or unicode\") % property"},{"line_number":103,"context_line":"            self.raise_invalid_property(msg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_d05d8f49","line":100,"updated":"2015-09-01 21:43:27.000000000","message":"Just call utils.check_string_length here - if it\u0027s not a string or unicode you\u0027ll get an InvalidInput raised:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/utils.py#n1089\n\nWhich you could handle in the try/except here and call self.raise_invalid_property and use the message from that exception.","commit_id":"4d0a80cd0f035e44d2bf94645adee785f2f74f4a"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"2d72152e8605665c06ae546046a79f2a1da2ce44","unresolved":false,"context_lines":[{"line_number":97,"context_line":"        \"\"\""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        try:"},{"line_number":100,"context_line":"            val \u003d value.strip()"},{"line_number":101,"context_line":"        except AttributeError:"},{"line_number":102,"context_line":"            msg \u003d _(\"Security group %s is not a string or unicode\") % property"},{"line_number":103,"context_line":"            self.raise_invalid_property(msg)"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_b84a3954","line":100,"in_reply_to":"da20952f_d05d8f49","updated":"2015-09-02 01:20:17.000000000","message":"Nice catch, thanks.\n\nYeah, we can remove some lines here.","commit_id":"4d0a80cd0f035e44d2bf94645adee785f2f74f4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"42581dadfc3e8c6e08c982bb15f3ee0165ff8060","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        # if using Neutron, Nova has allowed empty string as its history."},{"line_number":101,"context_line":"        # So this min_length should be 0 for passing the existing requests."},{"line_number":102,"context_line":"        utils.check_string_length(value, name\u003dproperty, min_length\u003d0,"},{"line_number":103,"context_line":"                                  max_length\u003d255)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def _convert_to_nova_security_group_format(self, security_group):"},{"line_number":106,"context_line":"        nova_group \u003d {}"}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_cefdac6f","line":103,"updated":"2015-09-03 01:52:53.000000000","message":"Confirmed the 255 max length:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/api/v2/attributes.py#L39","commit_id":"91e46f7c85a750eb8df92652d83dcf5b79db97cd"}],"nova/tests/unit/network/security_group/test_neutron_driver.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"5ea1825a110573a23c3bd867c2707165f475e37c","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        sg_api.validate_property(\u0027foo\u0027, \u0027name\u0027, None)"},{"line_number":315,"context_line":"        sg_api.validate_property(\u0027\u0027, \u0027name\u0027, None)"},{"line_number":316,"context_line":"        self.assertRaises(exception.Invalid, sg_api.validate_property,"},{"line_number":317,"context_line":"                          \u0027a\u0027 * 256, \u0027name\u0027, None)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_a890b04f","line":317,"updated":"2015-07-30 08:12:57.000000000","message":"Just curious:\ngiven we have 2 validations (schema, and the new validation)\nshould we use wsgi to verify it works well?","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"41bb4cec339771ffa6d50b9da54bda4532808ee5","unresolved":false,"context_lines":[{"line_number":314,"context_line":"        sg_api.validate_property(\u0027foo\u0027, \u0027name\u0027, None)"},{"line_number":315,"context_line":"        sg_api.validate_property(\u0027\u0027, \u0027name\u0027, None)"},{"line_number":316,"context_line":"        self.assertRaises(exception.Invalid, sg_api.validate_property,"},{"line_number":317,"context_line":"                          \u0027a\u0027 * 256, \u0027name\u0027, None)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_2d3ec429","line":317,"in_reply_to":"3a50d1a3_a890b04f","updated":"2015-07-31 02:50:20.000000000","message":"We don\u0027t have schema validation yet for this api now.\n\nIn long-term, schema validation for every api is the best, I feel.\nbut for this api, it is difficult to do that at this time because there are some differences between nova-network\u0027s one and neutron\u0027s one.","commit_id":"55a8b4c8eb68d75995040a187c09902ed1d6f98f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e99c6993a31af5ac5388a0e8bfccabe32545ef03","unresolved":false,"context_lines":[{"line_number":401,"context_line":"        self.assertEqual([], result)"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":""},{"line_number":404,"context_line":"class TestNeutronDriverWithoutMock(test.NoDBTestCase):"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    def test_validate_property(self):"},{"line_number":407,"context_line":"        sg_api \u003d neutron_driver.SecurityGroupAPI()"}],"source_content_type":"text/x-python","patch_set":15,"id":"da20952f_3bb90ccc","line":404,"updated":"2015-09-03 01:27:44.000000000","message":"I\u0027m not sure we need a new test class for this, but OK.","commit_id":"91e46f7c85a750eb8df92652d83dcf5b79db97cd"}]}
