)]}'
{"devstack/files/monasca-api/api-config.yml":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"9bcc880df9b6300f6e8ca0ed49fc6a29efa0677e","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  useHttps: False"},{"line_number":100,"context_line":"  truststore: \"None\""},{"line_number":101,"context_line":"  truststorePassword: \"None\""},{"line_number":102,"context_line":"  connTimeout: 5000"},{"line_number":103,"context_line":"  connSSLClientAuth: False"},{"line_number":104,"context_line":"  keystore: \"None\""},{"line_number":105,"context_line":"  keystorePassword: \"None\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"1aa78d24_ea43b96a","line":102,"updated":"2016-07-08 17:17:50.000000000","message":"Is there any particular reason that this value was increased ? I am not saying that\u0027s wrong, just trying to understand the motivation here.","commit_id":"258bf943add2e82de0c6982edd418678efebb873"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"7e02bd548560a897ad88311a088510517331a7fe","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  useHttps: False"},{"line_number":100,"context_line":"  truststore: \"None\""},{"line_number":101,"context_line":"  truststorePassword: \"None\""},{"line_number":102,"context_line":"  connTimeout: 5000"},{"line_number":103,"context_line":"  connSSLClientAuth: False"},{"line_number":104,"context_line":"  keystore: \"None\""},{"line_number":105,"context_line":"  keystorePassword: \"None\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"1aa78d24_c0fdf96f","line":102,"in_reply_to":"1aa78d24_2a001caa","updated":"2016-07-08 19:39:05.000000000","message":"Ok, Got it. It is from rebase of previous commit \"Fix Alaram definition test by Craig Bryant\"","commit_id":"258bf943add2e82de0c6982edd418678efebb873"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"32abbe2ceeb1c006eab77ba43087a0208ae45e1e","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  useHttps: False"},{"line_number":100,"context_line":"  truststore: \"None\""},{"line_number":101,"context_line":"  truststorePassword: \"None\""},{"line_number":102,"context_line":"  connTimeout: 5000"},{"line_number":103,"context_line":"  connSSLClientAuth: False"},{"line_number":104,"context_line":"  keystore: \"None\""},{"line_number":105,"context_line":"  keystorePassword: \"None\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"1aa78d24_93e03bfc","line":102,"in_reply_to":"1aa78d24_c0fdf96f","updated":"2016-07-11 10:38:13.000000000","message":"Sorry, I thought that you were the one who wrote that.\nSorry :)","commit_id":"258bf943add2e82de0c6982edd418678efebb873"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e230fced0762b8c18a353e66aa3eaff7d9d9823a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"  useHttps: False"},{"line_number":100,"context_line":"  truststore: \"None\""},{"line_number":101,"context_line":"  truststorePassword: \"None\""},{"line_number":102,"context_line":"  connTimeout: 5000"},{"line_number":103,"context_line":"  connSSLClientAuth: False"},{"line_number":104,"context_line":"  keystore: \"None\""},{"line_number":105,"context_line":"  keystorePassword: \"None\""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"1aa78d24_2a001caa","line":102,"in_reply_to":"1aa78d24_ea43b96a","updated":"2016-07-08 18:44:09.000000000","message":"I don\u0027t get you. Which value? I just rebased it with master","commit_id":"258bf943add2e82de0c6982edd418678efebb873"}],"java/src/main/java/monasca/api/app/command/CreateNotificationMethodCommand.java":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"  public CreateNotificationMethodCommand() {this.period \u003d \"0\";}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"  public CreateNotificationMethodCommand(String name, String  pNotificationMethodType, String address, String period) {"},{"line_number":38,"context_line":"    this.name \u003d name;"},{"line_number":39,"context_line":"    this.type \u003d pNotificationMethodType;"},{"line_number":40,"context_line":"    this.address \u003d address;"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_4b1f455f","line":37,"range":{"start_line":37,"start_character":62,"end_line":37,"end_character":85},"updated":"2016-06-23 04:32:57.000000000","message":"Monasca does not follow p{argument_name} convention. Just use \n \n notificationMethodType","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"1d269b0d3e0f45e76659d52f6c01a5786195f416","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"  public CreateNotificationMethodCommand() {this.period \u003d \"0\";}"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"  public CreateNotificationMethodCommand(String name, String  pNotificationMethodType, String address, String period) {"},{"line_number":38,"context_line":"    this.name \u003d name;"},{"line_number":39,"context_line":"    this.type \u003d pNotificationMethodType;"},{"line_number":40,"context_line":"    this.address \u003d address;"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_fd2841e4","line":37,"range":{"start_line":37,"start_character":62,"end_line":37,"end_character":85},"in_reply_to":"3aaa91ec_4b1f455f","updated":"2016-06-23 20:52:27.000000000","message":"Done","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":49,"context_line":"\tif (obj \u003d\u003d null)"},{"line_number":50,"context_line":"\t\treturn false;"},{"line_number":51,"context_line":"\tif (getClass() !\u003d obj.getClass())"},{"line_number":52,"context_line":"\t\treturn false;"},{"line_number":53,"context_line":"\tCreateNotificationMethodCommand other \u003d (CreateNotificationMethodCommand) obj;"},{"line_number":54,"context_line":"\tif (address \u003d\u003d null) {"},{"line_number":55,"context_line":"\t\tif (other.address !\u003d null)"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_0b153d3f","line":52,"updated":"2016-06-23 04:32:57.000000000","message":"That should be whitespaces, also if there\u0027s no need to modify this entire method - just don\u0027t. Changes here are irrelevant to the actual purpose and just make review harder.","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"1d269b0d3e0f45e76659d52f6c01a5786195f416","unresolved":false,"context_lines":[{"line_number":49,"context_line":"\tif (obj \u003d\u003d null)"},{"line_number":50,"context_line":"\t\treturn false;"},{"line_number":51,"context_line":"\tif (getClass() !\u003d obj.getClass())"},{"line_number":52,"context_line":"\t\treturn false;"},{"line_number":53,"context_line":"\tCreateNotificationMethodCommand other \u003d (CreateNotificationMethodCommand) obj;"},{"line_number":54,"context_line":"\tif (address \u003d\u003d null) {"},{"line_number":55,"context_line":"\t\tif (other.address !\u003d null)"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_1d1c2dc0","line":52,"in_reply_to":"3aaa91ec_0b153d3f","updated":"2016-06-23 20:52:27.000000000","message":"Done","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":84,"context_line":"\tint result \u003d 1;"},{"line_number":85,"context_line":"\tresult \u003d prime * result + ((address \u003d\u003d null) ? 0 : address.hashCode());"},{"line_number":86,"context_line":"\tresult \u003d prime * result + ((name \u003d\u003d null) ? 0 : name.hashCode());"},{"line_number":87,"context_line":"\tresult \u003d prime * result + ((period \u003d\u003d null) ? 0 : period.hashCode());"},{"line_number":88,"context_line":"\tresult \u003d prime * result + ((type \u003d\u003d null) ? 0 : type.hashCode());"},{"line_number":89,"context_line":"\treturn result;"},{"line_number":90,"context_line":"}"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_cb2175a1","line":87,"updated":"2016-06-23 04:32:57.000000000","message":"See comment above.","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"1d269b0d3e0f45e76659d52f6c01a5786195f416","unresolved":false,"context_lines":[{"line_number":84,"context_line":"\tint result \u003d 1;"},{"line_number":85,"context_line":"\tresult \u003d prime * result + ((address \u003d\u003d null) ? 0 : address.hashCode());"},{"line_number":86,"context_line":"\tresult \u003d prime * result + ((name \u003d\u003d null) ? 0 : name.hashCode());"},{"line_number":87,"context_line":"\tresult \u003d prime * result + ((period \u003d\u003d null) ? 0 : period.hashCode());"},{"line_number":88,"context_line":"\tresult \u003d prime * result + ((type \u003d\u003d null) ? 0 : type.hashCode());"},{"line_number":89,"context_line":"\treturn result;"},{"line_number":90,"context_line":"}"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_7d7bb1f5","line":87,"in_reply_to":"3aaa91ec_cb2175a1","updated":"2016-06-23 20:52:27.000000000","message":"Done","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"7df5872a25427fd3efc004e8cd48591107f243e0","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    return true;"},{"line_number":74,"context_line":"  }"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"public void validate(List\u003cInteger\u003e validPeriods) {"},{"line_number":77,"context_line":"    NotificationMethodValidation.validate(type, address, period, validPeriods);"},{"line_number":78,"context_line":"  }"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-java","patch_set":4,"id":"3aaa91ec_5ac34989","line":76,"range":{"start_line":76,"start_character":0,"end_line":76,"end_character":6},"updated":"2016-06-24 05:47:41.000000000","message":"Guess you lost whitespace here ;-)","commit_id":"97d32231638199cac0d5b6b45a2a4e337df7c4ff"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"879393f6f68aba8f2434009b5de9357cbc990369","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":79,"context_line":"      return false;"},{"line_number":80,"context_line":"    return true;"},{"line_number":81,"context_line":"  }"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"  public void validate(List\u003cInteger\u003e validPeriods) {"},{"line_number":84,"context_line":"    NotificationMethodValidation.validate(type, address, convertedPeriod, validPeriods);"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_69f57beb","line":81,"updated":"2016-06-24 21:32:32.000000000","message":"If equals is added then hashCode should be too. I though we just checked this in our code recently, but I guess we missed one or maybe even more than one. Would it be possible to add hashCode?","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"4cf9fe1da9d928b23a7fa150ef97dd8e9dc77c74","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":79,"context_line":"      return false;"},{"line_number":80,"context_line":"    return true;"},{"line_number":81,"context_line":"  }"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"  public void validate(List\u003cInteger\u003e validPeriods) {"},{"line_number":84,"context_line":"    NotificationMethodValidation.validate(type, address, convertedPeriod, validPeriods);"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_8c0ef5e2","line":81,"in_reply_to":"3aaa91ec_69f57beb","updated":"2016-07-05 19:53:56.000000000","message":"It is there at line 97","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"f91112295143aee19c4bd453eedd7de0a749fbba","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":79,"context_line":"      return false;"},{"line_number":80,"context_line":"    return true;"},{"line_number":81,"context_line":"  }"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"  public void validate(List\u003cInteger\u003e validPeriods) {"},{"line_number":84,"context_line":"    NotificationMethodValidation.validate(type, address, convertedPeriod, validPeriods);"}],"source_content_type":"text/x-java","patch_set":5,"id":"1aa78d24_7d28da33","line":81,"in_reply_to":"3aaa91ec_8c0ef5e2","updated":"2016-07-11 22:15:55.000000000","message":"Oh, you\u0027re right.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"}],"java/src/main/java/monasca/api/app/command/PatchNotificationMethodCommand.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"879393f6f68aba8f2434009b5de9357cbc990369","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if (type \u003d\u003d null) {"},{"line_number":62,"context_line":"            if (other.type !\u003d null)"},{"line_number":63,"context_line":"               return false;"},{"line_number":64,"context_line":"          } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":65,"context_line":"            return false;"},{"line_number":66,"context_line":"        if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":67,"context_line":"            return false;"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_0955d7c4","line":64,"range":{"start_line":64,"start_character":19,"end_line":64,"end_character":20},"updated":"2016-06-24 21:32:32.000000000","message":"Apparently we missed hashCode in more than one location. Would it be possible to add hashCode here too?","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"4cf9fe1da9d928b23a7fa150ef97dd8e9dc77c74","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if (type \u003d\u003d null) {"},{"line_number":62,"context_line":"            if (other.type !\u003d null)"},{"line_number":63,"context_line":"               return false;"},{"line_number":64,"context_line":"          } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":65,"context_line":"            return false;"},{"line_number":66,"context_line":"        if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":67,"context_line":"            return false;"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_0c0325b9","line":64,"range":{"start_line":64,"start_character":19,"end_line":64,"end_character":20},"in_reply_to":"3aaa91ec_0955d7c4","updated":"2016-07-05 19:53:56.000000000","message":"At line 91","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"f91112295143aee19c4bd453eedd7de0a749fbba","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if (type \u003d\u003d null) {"},{"line_number":62,"context_line":"            if (other.type !\u003d null)"},{"line_number":63,"context_line":"               return false;"},{"line_number":64,"context_line":"          } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":65,"context_line":"            return false;"},{"line_number":66,"context_line":"        if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":67,"context_line":"            return false;"}],"source_content_type":"text/x-java","patch_set":5,"id":"1aa78d24_f88a18be","line":64,"range":{"start_line":64,"start_character":19,"end_line":64,"end_character":20},"in_reply_to":"3aaa91ec_0c0325b9","updated":"2016-07-11 22:15:55.000000000","message":"Hmmm, I guess I was expecting to see hashCode modified because equals was modified, so it never occurred to me to look to see if it was here. The issue was that \"equals\" wasn\u0027t declared correctly as type wan\u0027t part of it until now.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"}],"java/src/main/java/monasca/api/app/command/UpdateNotificationMethodCommand.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"879393f6f68aba8f2434009b5de9357cbc990369","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if (type \u003d\u003d null) {"},{"line_number":72,"context_line":"            if (other.type !\u003d null)"},{"line_number":73,"context_line":"               return false;"},{"line_number":74,"context_line":"          } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":75,"context_line":"            return false;"},{"line_number":76,"context_line":"        if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":77,"context_line":"            return false;"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_c9758f64","line":74,"updated":"2016-06-24 21:32:32.000000000","message":"please add hashCode here too?","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"4cf9fe1da9d928b23a7fa150ef97dd8e9dc77c74","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if (type \u003d\u003d null) {"},{"line_number":72,"context_line":"            if (other.type !\u003d null)"},{"line_number":73,"context_line":"               return false;"},{"line_number":74,"context_line":"          } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":75,"context_line":"            return false;"},{"line_number":76,"context_line":"        if (convertedPeriod !\u003d other.convertedPeriod)"},{"line_number":77,"context_line":"            return false;"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_4c2fed3e","line":74,"in_reply_to":"3aaa91ec_c9758f64","updated":"2016-07-05 19:53:56.000000000","message":"At line 95","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"}],"java/src/main/java/monasca/api/app/validation/NotificationMethodValidation.java":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    public static void validate(String type, String address, String period,"},{"line_number":34,"context_line":"                                List\u003cInteger\u003e validPeriods) {"},{"line_number":35,"context_line":"        int convertedPeriod \u003d Validation.parseAndValidateNumber(period, \"period\");"},{"line_number":36,"context_line":"        if (type.equals(\"EMAIL\")) {            "},{"line_number":37,"context_line":"                if (!EmailValidator.getInstance(true).isValid(address))"},{"line_number":38,"context_line":"                    throw Exceptions.unprocessableEntity(\"Address %s is not of correct format\", address);"},{"line_number":39,"context_line":"                if (convertedPeriod !\u003d 0)"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_8b4e4d6d","line":36,"range":{"start_line":36,"start_character":35,"end_line":36,"end_character":47},"updated":"2016-06-23 04:32:57.000000000","message":"Whitespaces should be removed","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"730cf49b42b5a91b54c825f826980501d16f0474","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    public static void validate(String type, String address, int period,"},{"line_number":34,"context_line":"                                List\u003cInteger\u003e validPeriods) {"},{"line_number":35,"context_line":"        "},{"line_number":36,"context_line":"        if (type.equals(\"EMAIL\")) {"},{"line_number":37,"context_line":"                if (!EmailValidator.getInstance(true).isValid(address))"},{"line_number":38,"context_line":"                    throw Exceptions.unprocessableEntity(\"Address %s is not of correct format\", address);"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_866c1409","line":35,"updated":"2016-06-24 21:41:32.000000000","message":"whitespace.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"4cf9fe1da9d928b23a7fa150ef97dd8e9dc77c74","unresolved":false,"context_lines":[{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    public static void validate(String type, String address, int period,"},{"line_number":34,"context_line":"                                List\u003cInteger\u003e validPeriods) {"},{"line_number":35,"context_line":"        "},{"line_number":36,"context_line":"        if (type.equals(\"EMAIL\")) {"},{"line_number":37,"context_line":"                if (!EmailValidator.getInstance(true).isValid(address))"},{"line_number":38,"context_line":"                    throw Exceptions.unprocessableEntity(\"Address %s is not of correct format\", address);"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_8c25555d","line":35,"in_reply_to":"3aaa91ec_866c1409","updated":"2016-07-05 19:53:56.000000000","message":"Done","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"879393f6f68aba8f2434009b5de9357cbc990369","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                if (period !\u003d 0){"},{"line_number":48,"context_line":"                    throw Exceptions.unprocessableEntity(\"Period can not be non zero for Pagerduty\");"},{"line_number":49,"context_line":"            }"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"        if (period !\u003d 0 \u0026\u0026 !validPeriods.contains(period)){"},{"line_number":52,"context_line":"            throw Exceptions.unprocessableEntity(\"%d is not a valid period\", period);"},{"line_number":53,"context_line":"        }"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_49a4ffb8","line":50,"updated":"2016-06-24 21:32:32.000000000","message":"I realize that you are going to add several new plugins for notification methods, but some of these will still be \"relatively\" well known, such as HIPCHAT, SLACK and JIRA. I think in all of these cases if the period !\u003d 0, then it should throw an exception, as I think that is the behaviour that we want. Additionally, you could add validation logic for these if there is some validation that you want to do on the address.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"c4f70c808e8af7f8cfbedb9004a22fa3f4c95e9b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                if (period !\u003d 0){"},{"line_number":48,"context_line":"                    throw Exceptions.unprocessableEntity(\"Period can not be non zero for Pagerduty\");"},{"line_number":49,"context_line":"            }"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"        if (period !\u003d 0 \u0026\u0026 !validPeriods.contains(period)){"},{"line_number":52,"context_line":"            throw Exceptions.unprocessableEntity(\"%d is not a valid period\", period);"},{"line_number":53,"context_line":"        }"}],"source_content_type":"text/x-java","patch_set":5,"id":"1aa78d24_7a01006a","line":50,"in_reply_to":"3aaa91ec_12e7af40","updated":"2016-07-06 05:11:28.000000000","message":"You can always add full class name into configuration file that would be the validator + method name if necessary. Load that via reflection and run it.\n\nSo in configuration you would have:\nvalid_notification_types:\n  - key: SOME_TYPE\n    validator: org.apache.commons.validator.routines.UrlValidator.isValid\n\nand so on. For new notification types you could use something else available from Apache. Not sure if that would be possible in any case...but if the case is to drop hard coded notifications types it\u0027d be only for the best if you would drop their direct validation in monasca-api.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"9d0eaf95bf147c73a71d9fabc18e726d3c0ccffb","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                if (period !\u003d 0){"},{"line_number":48,"context_line":"                    throw Exceptions.unprocessableEntity(\"Period can not be non zero for Pagerduty\");"},{"line_number":49,"context_line":"            }"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"        if (period !\u003d 0 \u0026\u0026 !validPeriods.contains(period)){"},{"line_number":52,"context_line":"            throw Exceptions.unprocessableEntity(\"%d is not a valid period\", period);"},{"line_number":53,"context_line":"        }"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_12e7af40","line":50,"in_reply_to":"3aaa91ec_49a4ffb8","updated":"2016-06-25 15:01:18.000000000","message":"Was just reviewing my comments again. Minimally, I think we want  the default logic to be to throw Exceptions.unprocessableEntity, if the period is anything but 0, and it isn\u0027t a WEBHOOK for now. For SLACK, HIPCHAT, and JIRA it doesn\u0027t make any sense to periodically send a notification.\n\nAlso, since we know that we are planning on adding HIPCHAT, SLACK and JIRA, if any authentication is possible on the address, I would be OK adding hard-coded authenticators. Note, in the case of PAGERDUTY, there is no validation on the address, so I\u0027m not sure there should be anything done in the case of the above either.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"636086647aeb61081417f702e2e831de449eafec","unresolved":false,"context_lines":[{"line_number":46,"context_line":"                }"},{"line_number":47,"context_line":"        }"},{"line_number":48,"context_line":"        if (period !\u003d 0 \u0026\u0026 !type.equals(\"WEBHOOK\")){"},{"line_number":49,"context_line":"        \tthrow Exceptions.unprocessableEntity(\"Period can not be non zero for %s\", type);"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":"}"}],"source_content_type":"text/x-java","patch_set":6,"id":"1aa78d24_8c2d8c97","line":49,"range":{"start_line":49,"start_character":0,"end_line":49,"end_character":9},"updated":"2016-07-06 10:45:20.000000000","message":"tab","commit_id":"6b30a7effe9cd08b89456d50a86facd2ffb57803"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"79753c5055016cfd791df1b717fb1a8aea790363","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        }"},{"line_number":48,"context_line":"        if (period !\u003d 0 \u0026\u0026 !type.equals(\"WEBHOOK\")){"},{"line_number":49,"context_line":"               throw Exceptions.unprocessableEntity(\"Period can not be non zero for %s\", type);"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":"}"}],"source_content_type":"text/x-java","patch_set":7,"id":"1aa78d24_7f4857cd","line":50,"updated":"2016-07-07 22:34:50.000000000","message":"This method should also throw error if supplied type is not among those considered valid. I couldn\u0027t find such line of code in Java, but Python does have it.","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"15bdcd61a18e8c9a20aa7ecf224b633363ebb141","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        }"},{"line_number":48,"context_line":"        if (period !\u003d 0 \u0026\u0026 !type.equals(\"WEBHOOK\")){"},{"line_number":49,"context_line":"               throw Exceptions.unprocessableEntity(\"Period can not be non zero for %s\", type);"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"    }"},{"line_number":52,"context_line":"}"}],"source_content_type":"text/x-java","patch_set":7,"id":"1aa78d24_a36105d6","line":50,"in_reply_to":"1aa78d24_7f4857cd","updated":"2016-07-08 04:44:26.000000000","message":"Done","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"9bcc880df9b6300f6e8ca0ed49fc6a29efa0677e","unresolved":false,"context_lines":[{"line_number":49,"context_line":"               throw Exceptions.unprocessableEntity(\"Period can not be non zero for %s\", type);"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"        if (!containsIgnoreCase(type, validNotificationMethodTypes)){"},{"line_number":52,"context_line":"               throw Exceptions.unprocessableEntity(\"Invalid notification type %s\", type);"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"    "}],"source_content_type":"text/x-java","patch_set":9,"id":"1aa78d24_aaed3190","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":90},"updated":"2016-07-08 17:17:50.000000000","message":"I am not sure if that\u0027s that important, but shouldn\u0027t the exception string should be the same in both implementations (java, python). I mean, looking at the code right now, there some exceptions to that rule, so I guess I am thinking out loud.\n\nDoes anyone have a comment on that ? Should the errors be consistent between implementations where it can be achieved.","commit_id":"258bf943add2e82de0c6982edd418678efebb873"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"e230fced0762b8c18a353e66aa3eaff7d9d9823a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"               throw Exceptions.unprocessableEntity(\"Period can not be non zero for %s\", type);"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"        if (!containsIgnoreCase(type, validNotificationMethodTypes)){"},{"line_number":52,"context_line":"               throw Exceptions.unprocessableEntity(\"Invalid notification type %s\", type);"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"    "}],"source_content_type":"text/x-java","patch_set":9,"id":"1aa78d24_0a95603f","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":90},"in_reply_to":"1aa78d24_aaed3190","updated":"2016-07-08 18:44:09.000000000","message":"That should not be a problem. If that is the pattern followed then we should do that","commit_id":"258bf943add2e82de0c6982edd418678efebb873"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"3ae113eef7b7870d01124270cfcd859554eff55a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"               throw Exceptions.unprocessableEntity(\"Period can not be non zero for %s\", type);"},{"line_number":50,"context_line":"        }"},{"line_number":51,"context_line":"        if (!containsIgnoreCase(type, validNotificationMethodTypes)){"},{"line_number":52,"context_line":"               throw Exceptions.unprocessableEntity(\"Invalid notification type %s\", type);"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":"    }"},{"line_number":55,"context_line":"    "}],"source_content_type":"text/x-java","patch_set":9,"id":"1aa78d24_0aca804f","line":52,"range":{"start_line":52,"start_character":57,"end_line":52,"end_character":90},"in_reply_to":"1aa78d24_aaed3190","updated":"2016-07-08 18:46:35.000000000","message":"We\u0027ve been trying to make the Python API follow the spec as closely as possible so where we can the Java API should return the same errors.","commit_id":"258bf943add2e82de0c6982edd418678efebb873"}],"java/src/main/java/monasca/api/domain/model/notificationmethod/NotificationMethod.java":[{"author":{"_account_id":2419,"name":"Roland Hochmuth","email":"roland.hochmuth@hpe.com","username":"roland-hochmuth-s"},"change_message_id":"879393f6f68aba8f2434009b5de9357cbc990369","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":64,"context_line":"      return false;"},{"line_number":65,"context_line":"    return true;"},{"line_number":66,"context_line":"  }"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"  public String getAddress() {"},{"line_number":69,"context_line":"    return address;"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_a993e359","line":66,"updated":"2016-06-24 21:32:32.000000000","message":"I guess we missed hashCode here too. It should probably be added.","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"4cf9fe1da9d928b23a7fa150ef97dd8e9dc77c74","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    } else if (!type.equalsIgnoreCase(other.type))"},{"line_number":64,"context_line":"      return false;"},{"line_number":65,"context_line":"    return true;"},{"line_number":66,"context_line":"  }"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"  public String getAddress() {"},{"line_number":69,"context_line":"    return address;"}],"source_content_type":"text/x-java","patch_set":5,"id":"3aaa91ec_3054ee52","line":66,"in_reply_to":"3aaa91ec_a993e359","updated":"2016-07-05 19:53:56.000000000","message":"It is at line 94","commit_id":"9d390ad577a46bb6000757c16be52669f337ed89"}],"java/src/main/java/monasca/api/infrastructure/persistence/mysql/NotificationMethodMySqlRepoImpl.java":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"7df5872a25427fd3efc004e8cd48591107f243e0","unresolved":false,"context_lines":[{"line_number":63,"context_line":"      String id \u003d UUID.randomUUID().toString();"},{"line_number":64,"context_line":"      h.insert("},{"line_number":65,"context_line":"          \"insert into notification_method (id, tenant_id, name, type, address, period, created_at, updated_at) values (?, ?, ?, ?, ?, ?, NOW(), NOW())\","},{"line_number":66,"context_line":"          id, tenantId, name, notificaitonMethodType, address, period);"},{"line_number":67,"context_line":"      LOG.debug(\"Creating notification method {} for {}\", name, tenantId);"},{"line_number":68,"context_line":"      h.commit();"},{"line_number":69,"context_line":"      return new NotificationMethod(id, name, notificaitonMethodType, address, period);"}],"source_content_type":"text/x-java","patch_set":4,"id":"3aaa91ec_1a442119","line":66,"range":{"start_line":66,"start_character":30,"end_line":66,"end_character":52},"updated":"2016-06-24 05:47:41.000000000","message":"typo for this variable and the reset of variables here","commit_id":"97d32231638199cac0d5b6b45a2a4e337df7c4ff"}],"java/src/main/java/monasca/api/resource/NotificationMethodResource.java":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                                                    \"address\", \"updated_at\","},{"line_number":57,"context_line":"                                                                    \"created_at\");"},{"line_number":58,"context_line":"  private final static List\u003cString\u003e DEFAULT_NOTIFICATION_METHODS \u003d Arrays.asList(\"Email\", \"PagerDuty\", \"WebHook\");"},{"line_number":59,"context_line":"  "},{"line_number":60,"context_line":"  private final List\u003cInteger\u003e validPeriods;"},{"line_number":61,"context_line":"  private final List\u003cString\u003e validNotificationMethods;"},{"line_number":62,"context_line":"  "}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_cb7df56f","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":2},"updated":"2016-06-23 04:32:57.000000000","message":"Whitespace","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"1d269b0d3e0f45e76659d52f6c01a5786195f416","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                                                    \"address\", \"updated_at\","},{"line_number":57,"context_line":"                                                                    \"created_at\");"},{"line_number":58,"context_line":"  private final static List\u003cString\u003e DEFAULT_NOTIFICATION_METHODS \u003d Arrays.asList(\"Email\", \"PagerDuty\", \"WebHook\");"},{"line_number":59,"context_line":"  "},{"line_number":60,"context_line":"  private final List\u003cInteger\u003e validPeriods;"},{"line_number":61,"context_line":"  private final List\u003cString\u003e validNotificationMethods;"},{"line_number":62,"context_line":"  "}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_28d729ee","line":59,"range":{"start_line":59,"start_character":0,"end_line":59,"end_character":2},"in_reply_to":"3aaa91ec_cb7df56f","updated":"2016-06-23 20:52:27.000000000","message":"Done","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    this.validPeriods \u003d config.validNotificationPeriods \u003d\u003d null ? Arrays.asList(0, 60):"},{"line_number":70,"context_line":"            config.validNotificationPeriods;"},{"line_number":71,"context_line":"    this.validNotificationMethods \u003d config.validNotificationMethods \u003d\u003d null ? DEFAULT_NOTIFICATION_METHODS :"},{"line_number":72,"context_line":"    \tconfig.validNotificationMethods;"},{"line_number":73,"context_line":"  }"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"  @POST"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_0b989dbf","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":5},"updated":"2016-06-23 04:32:57.000000000","message":"Should be space, not tab","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"1d269b0d3e0f45e76659d52f6c01a5786195f416","unresolved":false,"context_lines":[{"line_number":69,"context_line":"    this.validPeriods \u003d config.validNotificationPeriods \u003d\u003d null ? Arrays.asList(0, 60):"},{"line_number":70,"context_line":"            config.validNotificationPeriods;"},{"line_number":71,"context_line":"    this.validNotificationMethods \u003d config.validNotificationMethods \u003d\u003d null ? DEFAULT_NOTIFICATION_METHODS :"},{"line_number":72,"context_line":"    \tconfig.validNotificationMethods;"},{"line_number":73,"context_line":"  }"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"  @POST"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_a801596c","line":72,"range":{"start_line":72,"start_character":0,"end_line":72,"end_character":5},"in_reply_to":"3aaa91ec_0b989dbf","updated":"2016-06-23 20:52:27.000000000","message":"Done","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"}],"java/src/test/java/monasca/api/resource/NotificationMethodResourceTest.java":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"6100faf0bfbd70a7d2d32780e97a613635c306eb","unresolved":false,"context_lines":[{"line_number":46,"context_line":"  private NotificationMethod notificationMethod, notificationMethodWebhook, notificationMethodPagerduty;"},{"line_number":47,"context_line":"  private NotificationMethodRepo repo;"},{"line_number":48,"context_line":"  private ApiConfig config;"},{"line_number":49,"context_line":"  "},{"line_number":50,"context_line":"  private static final String NOTIFICATION_METHOD_WEBHOOK \u003d \"WEBHOOK\";"},{"line_number":51,"context_line":"  private static final String NOTIFICATION_METHOD_EMAIL   \u003d \"EMAIL\";"},{"line_number":52,"context_line":"  private static final String NOTIFICATION_METHOD_PAGERDUTY   \u003d \"PAGERDUTY\";"}],"source_content_type":"text/x-java","patch_set":2,"id":"3aaa91ec_4bbbc527","line":49,"updated":"2016-06-23 04:32:57.000000000","message":"Whitespace","commit_id":"094db8e94b6de1280a73a56535a99bd6877c36d7"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"636086647aeb61081417f702e2e831de449eafec","unresolved":false,"context_lines":[{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    String e \u003d response.getEntity(String.class);"},{"line_number":238,"context_line":"    ErrorMessages.assertThat(e).matches(\"unprocessable_entity\", 422,"},{"line_number":239,"context_line":"            \"Period can not be non zero for\");"},{"line_number":240,"context_line":"  }"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"  public void should422OnInvalidPeriodForWebhook() {"}],"source_content_type":"text/x-java","patch_set":6,"id":"1aa78d24_4c30c4e8","line":239,"updated":"2016-07-06 10:45:20.000000000","message":"For what ? ;-)","commit_id":"6b30a7effe9cd08b89456d50a86facd2ffb57803"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"145608b09caa5ec5d3ea252df16340200c6714bd","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    String e \u003d response.getEntity(String.class);"},{"line_number":224,"context_line":"    ErrorMessages.assertThat(e).matches(\"unprocessable_entity\", 422,"},{"line_number":225,"context_line":"            \"Period can not be non zero for \");"},{"line_number":226,"context_line":"  }"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"  public void should422OnNonZeroPeriodForPagerduty() {"}],"source_content_type":"text/x-java","patch_set":7,"id":"1aa78d24_54cd7d85","line":225,"range":{"start_line":225,"start_character":40,"end_line":225,"end_character":43},"updated":"2016-07-08 01:00:23.000000000","message":"Also need to specify what is being rejected here.","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"15bdcd61a18e8c9a20aa7ecf224b633363ebb141","unresolved":false,"context_lines":[{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    String e \u003d response.getEntity(String.class);"},{"line_number":224,"context_line":"    ErrorMessages.assertThat(e).matches(\"unprocessable_entity\", 422,"},{"line_number":225,"context_line":"            \"Period can not be non zero for \");"},{"line_number":226,"context_line":"  }"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"  public void should422OnNonZeroPeriodForPagerduty() {"}],"source_content_type":"text/x-java","patch_set":7,"id":"1aa78d24_e3994dd2","line":225,"range":{"start_line":225,"start_character":40,"end_line":225,"end_character":43},"in_reply_to":"1aa78d24_54cd7d85","updated":"2016-07-08 04:44:26.000000000","message":"Done","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"}],"java/src/test/resources/monasca-api-config.yml":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"fc7fe3c25ff09dc099d317173240dd3abd4fbf89","unresolved":false,"context_lines":[{"line_number":13,"context_line":"validNotificationPeriods:"},{"line_number":14,"context_line":"  - 60"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"validNotificationMethods:"},{"line_number":17,"context_line":"  - Email"},{"line_number":18,"context_line":"  - WebHooks"},{"line_number":19,"context_line":"  - PagerDuty"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dada55a8_7f998578","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":25},"updated":"2016-07-21 22:36:29.000000000","message":"This config option isn\u0027t considered valid in the java API and will cause it to fail on startup. Did you mean to use the database to get the valid types instead?","commit_id":"c3ecbfccfc78230d2da490d5dac5e5d486894186"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"05cd19d99c60ead9e22c708d43e51a1690f98868","unresolved":false,"context_lines":[{"line_number":13,"context_line":"validNotificationPeriods:"},{"line_number":14,"context_line":"  - 60"},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"validNotificationMethods:"},{"line_number":17,"context_line":"  - Email"},{"line_number":18,"context_line":"  - WebHooks"},{"line_number":19,"context_line":"  - PagerDuty"}],"source_content_type":"text/x-yaml","patch_set":15,"id":"dada55a8_54b2a34c","line":16,"range":{"start_line":16,"start_character":0,"end_line":16,"end_character":25},"in_reply_to":"dada55a8_7f998578","updated":"2016-07-22 01:17:08.000000000","message":"Sorry I thought I removed this. Looks like this place I forgot to remove it.  This is not required as per latest patch","commit_id":"c3ecbfccfc78230d2da490d5dac5e5d486894186"}],"monasca_api/tests/test_validation.py":[{"author":{"_account_id":14517,"name":"Ryan Brandt","email":"ryan.brandt@hpe.com","username":"ryan-brandt"},"change_message_id":"fc7fe3c25ff09dc099d317173240dd3abd4fbf89","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        except schemas_exceptions.ValidationException:"},{"line_number":279,"context_line":"            self.fail(\"shouldn\u0027t happen\")"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def test_validation_for_custom_notification_type(self):"},{"line_number":282,"context_line":"        notification \u003d {\"name\": \"MyWebhook\", \"type\": \"MyNotificaitonType\", \"address\": \"SomeAddress\"}"},{"line_number":283,"context_line":"        with self.assertRaises(schemas_exceptions.ValidationException) as ve:"},{"line_number":284,"context_line":"            schemas_notifications.parse_and_validate(notification, valid_periods)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_b1e4d6ab","line":281,"range":{"start_line":281,"start_character":28,"end_line":281,"end_character":35},"updated":"2016-07-21 22:36:29.000000000","message":"Nitpick but this should probably specify that the type is meant to be invalid. The title suggests that this is a positive test.","commit_id":"c3ecbfccfc78230d2da490d5dac5e5d486894186"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"05cd19d99c60ead9e22c708d43e51a1690f98868","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        except schemas_exceptions.ValidationException:"},{"line_number":279,"context_line":"            self.fail(\"shouldn\u0027t happen\")"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":"    def test_validation_for_custom_notification_type(self):"},{"line_number":282,"context_line":"        notification \u003d {\"name\": \"MyWebhook\", \"type\": \"MyNotificaitonType\", \"address\": \"SomeAddress\"}"},{"line_number":283,"context_line":"        with self.assertRaises(schemas_exceptions.ValidationException) as ve:"},{"line_number":284,"context_line":"            schemas_notifications.parse_and_validate(notification, valid_periods)"}],"source_content_type":"text/x-python","patch_set":15,"id":"dada55a8_b4879f5f","line":281,"range":{"start_line":281,"start_character":28,"end_line":281,"end_character":35},"in_reply_to":"dada55a8_b1e4d6ab","updated":"2016-07-22 01:17:08.000000000","message":"Will do it","commit_id":"c3ecbfccfc78230d2da490d5dac5e5d486894186"}],"monasca_api/v2/common/schemas/notifications_request_body_schema.py":[{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"79753c5055016cfd791df1b717fb1a8aea790363","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if (msg[\u0027type\u0027].upper() not in valid_notification_method_types):"},{"line_number":59,"context_line":"        raise exceptions.ValidationException(\"{} is not a valid notification method type\""},{"line_number":60,"context_line":"                                             .format(msg[\u0027type\u0027]))"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_dfb34be8","line":58,"updated":"2016-07-07 22:34:50.000000000","message":"parentheses is not needed here.","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"15bdcd61a18e8c9a20aa7ecf224b633363ebb141","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if (msg[\u0027type\u0027].upper() not in valid_notification_method_types):"},{"line_number":59,"context_line":"        raise exceptions.ValidationException(\"{} is not a valid notification method type\""},{"line_number":60,"context_line":"                                             .format(msg[\u0027type\u0027]))"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_035bb92f","line":58,"in_reply_to":"1aa78d24_dfb34be8","updated":"2016-07-08 04:44:26.000000000","message":"Done","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":16168,"name":"Tomasz Trębski","email":"kornicameister@gmail.com","username":"trebskit"},"change_message_id":"79753c5055016cfd791df1b717fb1a8aea790363","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if (msg[\u0027type\u0027].upper() not in valid_notification_method_types):"},{"line_number":59,"context_line":"        raise exceptions.ValidationException(\"{} is not a valid notification method type\""},{"line_number":60,"context_line":"                                             .format(msg[\u0027type\u0027]))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    notification_type \u003d str(msg[\u0027type\u0027]).upper()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_5fd75bed","line":59,"updated":"2016-07-07 22:34:50.000000000","message":"perhaps it\u0027d be good to log those that are valid.\nsomething like\n\n \u0027{} not found in valid available notification types {}\u0027 % (type, valid_type)","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"15bdcd61a18e8c9a20aa7ecf224b633363ebb141","unresolved":false,"context_lines":[{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if (msg[\u0027type\u0027].upper() not in valid_notification_method_types):"},{"line_number":59,"context_line":"        raise exceptions.ValidationException(\"{} is not a valid notification method type\""},{"line_number":60,"context_line":"                                             .format(msg[\u0027type\u0027]))"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    notification_type \u003d str(msg[\u0027type\u0027]).upper()"}],"source_content_type":"text/x-python","patch_set":7,"id":"1aa78d24_6340bd36","line":59,"in_reply_to":"1aa78d24_5fd75bed","updated":"2016-07-08 04:44:26.000000000","message":"Done","commit_id":"94ddbe9e07d2ac9dc6dabc8549d17f000d3ed578"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"eaf0fa8d525593fc32fffbd52890328ed15d5b20","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        msg[\u0027period\u0027] \u003d _parse_and_validate_period(msg[\u0027period\u0027], valid_periods)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if msg[\u0027type\u0027].upper() not in valid_notification_method_types:"},{"line_number":59,"context_line":"        ex \u003d exceptions.ValidationException(\"Invalid notification type {}\".format(msg[\u0027type\u0027]))"}],"source_content_type":"text/x-python","patch_set":14,"id":"dada55a8_2bc993ac","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":35},"updated":"2016-07-21 20:49:47.000000000","message":"Should this be reading the valid types from the database now that we\u0027re adding the notification types endpoint?","commit_id":"a89300d6caf03e45e8e9599541a60a29fc47be9b"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"ba57ce13ef04159c43fcc80fb85d1ff5e29a56c5","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        msg[\u0027period\u0027] \u003d _parse_and_validate_period(msg[\u0027period\u0027], valid_periods)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if msg[\u0027type\u0027].upper() not in valid_notification_method_types:"},{"line_number":59,"context_line":"        ex \u003d exceptions.ValidationException(\"Invalid notification type {}\".format(msg[\u0027type\u0027]))"}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_6bf7d9f5","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":35},"updated":"2016-07-22 16:52:17.000000000","message":"If you\u0027re doing validation when you attempt to create the notification in another patch set doesn\u0027t this have to change either here or in the other patch set?","commit_id":"ac1235d3ebb0175d6ecc17776d53bbc45ceceee4"},{"author":{"_account_id":220,"name":"Haneef Ali","email":"haneef.ali@hp.com","username":"haneef"},"change_message_id":"5e69fc98f689276eba9c9c5ca27bbf60f7ae4e11","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        msg[\u0027period\u0027] \u003d _parse_and_validate_period(msg[\u0027period\u0027], valid_periods)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if msg[\u0027type\u0027].upper() not in valid_notification_method_types:"},{"line_number":59,"context_line":"        ex \u003d exceptions.ValidationException(\"Invalid notification type {}\".format(msg[\u0027type\u0027]))"}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_cb7b6528","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":35},"in_reply_to":"dada55a8_6bf7d9f5","updated":"2016-07-22 16:56:59.000000000","message":"You are correct. This should be removed here. I removed in other review. Let me go trough this review once again.  Other way to avoid this confusion is to merge both the reviews to one big reivew, but it is too big.","commit_id":"ac1235d3ebb0175d6ecc17776d53bbc45ceceee4"},{"author":{"_account_id":14273,"name":"Joe Keen","email":"joe.keen@hpe.com","username":"jkeen"},"change_message_id":"bcd28f96fe12e9a4bbf08f264b6e487be80d9da3","unresolved":false,"context_lines":[{"line_number":53,"context_line":"    else:"},{"line_number":54,"context_line":"        msg[\u0027period\u0027] \u003d _parse_and_validate_period(msg[\u0027period\u0027], valid_periods)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    valid_notification_method_types \u003d [types.upper() for types in cfg.CONF.valid_notification_method_types]"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    if msg[\u0027type\u0027].upper() not in valid_notification_method_types:"},{"line_number":59,"context_line":"        ex \u003d exceptions.ValidationException(\"Invalid notification type {}\".format(msg[\u0027type\u0027]))"}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_4bdc9518","line":56,"range":{"start_line":56,"start_character":4,"end_line":56,"end_character":35},"in_reply_to":"dada55a8_cb7b6528","updated":"2016-07-22 16:58:52.000000000","message":"I didn\u0027t see any modification of this file in the other review.  Are you sure you modified it there?","commit_id":"ac1235d3ebb0175d6ecc17776d53bbc45ceceee4"}]}
