)]}'
{"zun/api/utils.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"27b89acf15d7d5846f6815e67baaf3cb89e460e2","unresolved":false,"context_lines":[{"line_number":33,"context_line":"DOCKER_MINIMUM_MEMORY \u003d 4 * 1024 * 1024"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def none_from_string(value):"},{"line_number":37,"context_line":"    if value in [None, \u0027None\u0027]:"},{"line_number":38,"context_line":"        return None"},{"line_number":39,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_ffc6a266","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":20},"updated":"2017-01-21 21:39:40.000000000","message":"How about renaming this method to \u0027string_or_none\u0027?","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"421a62949a724cb6b1773c5ac965dc159e3a9f25","unresolved":false,"context_lines":[{"line_number":33,"context_line":"DOCKER_MINIMUM_MEMORY \u003d 4 * 1024 * 1024"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def none_from_string(value):"},{"line_number":37,"context_line":"    if value in [None, \u0027None\u0027]:"},{"line_number":38,"context_line":"        return None"},{"line_number":39,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_52b0028c","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":20},"in_reply_to":"5a3905b3_2b48e7cb","updated":"2017-01-25 19:35:43.000000000","message":"Done","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"6a6afc4a4d25cc6ee8f3137c4eb0d7e54ebb5da9","unresolved":false,"context_lines":[{"line_number":33,"context_line":"DOCKER_MINIMUM_MEMORY \u003d 4 * 1024 * 1024"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def none_from_string(value):"},{"line_number":37,"context_line":"    if value in [None, \u0027None\u0027]:"},{"line_number":38,"context_line":"        return None"},{"line_number":39,"context_line":"    else:"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_2b48e7cb","line":36,"range":{"start_line":36,"start_character":4,"end_line":36,"end_character":20},"in_reply_to":"5a3905b3_ffc6a266","updated":"2017-01-22 07:03:49.000000000","message":"will do it.","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"505441f3b9623e258c34ccb6e4a1743e1ba17408","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    if value in [None, \u0027None\u0027]:"},{"line_number":38,"context_line":"        return None"},{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        return value"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def validate_limit(limit):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_e42365a5","line":40,"updated":"2017-01-30 06:57:43.000000000","message":"Should it be str(value) ? Or you assume that value will always be a string if not None?","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"0fcf88783168a4d379ddd6c19b41ede01348c6c6","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    if value in [None, \u0027None\u0027]:"},{"line_number":38,"context_line":"        return None"},{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        return value"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def validate_limit(limit):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_baf7ad57","line":40,"in_reply_to":"3a461143_647db5b0","updated":"2017-01-30 13:14:43.000000000","message":"Fair enough.","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"72a07f43da499fc60d1c674f7d0b2edc6c5b6caf","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    if value in [None, \u0027None\u0027]:"},{"line_number":38,"context_line":"        return None"},{"line_number":39,"context_line":"    else:"},{"line_number":40,"context_line":"        return value"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def validate_limit(limit):"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_647db5b0","line":40,"in_reply_to":"3a461143_e42365a5","updated":"2017-01-30 07:51:48.000000000","message":"This function don\u0027t care for type of value.  This is used by image_driver validation only and that field always will be of string type.\nI was just worried for \u0027None\u0027 case, please see https://bugs.launchpad.net/zun/+bug/1658613. Once the bug is fixed this function can be removed completely.","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"}],"zun/common/validation/parameter_types.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"27b89acf15d7d5846f6815e67baaf3cb89e460e2","unresolved":false,"context_lines":[{"line_number":18,"context_line":"image_driver_list \u003d ["},{"line_number":19,"context_line":"    driver.split(\u0027.\u0027)[0] for driver in CONF.image_driver_list]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"image_driver_list_with_none \u003d image_driver_list + [None, \u0027None\u0027]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"non_negative_integer \u003d {"},{"line_number":24,"context_line":"    \u0027type\u0027: [\u0027integer\u0027, \u0027string\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_9f5d9e7b","line":21,"range":{"start_line":21,"start_character":51,"end_line":21,"end_character":63},"updated":"2017-01-21 21:39:40.000000000","message":"@Pradeep,\n\nI wonder if it is possible to do it in an alternative way. It seems this is for processing request like:\n\n  {\u0027image_driver\u0027: None,...} or {\u0027image_driver\u0027: \u0027None\u0027}\n\nHowever, I wonder if it is possible to simply remove the key \u0027image_driver\u0027 if there is no specified driver. If we can do that in client side, the processing in the server will be easier.","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"6a6afc4a4d25cc6ee8f3137c4eb0d7e54ebb5da9","unresolved":false,"context_lines":[{"line_number":18,"context_line":"image_driver_list \u003d ["},{"line_number":19,"context_line":"    driver.split(\u0027.\u0027)[0] for driver in CONF.image_driver_list]"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"image_driver_list_with_none \u003d image_driver_list + [None, \u0027None\u0027]"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"non_negative_integer \u003d {"},{"line_number":24,"context_line":"    \u0027type\u0027: [\u0027integer\u0027, \u0027string\u0027],"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_ab0a1777","line":21,"range":{"start_line":21,"start_character":51,"end_line":21,"end_character":63},"in_reply_to":"5a3905b3_9f5d9e7b","updated":"2017-01-22 07:03:49.000000000","message":"That would be great, i was thinking the same. Once this patch is merged i will correct it and submit another patch in client too.","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"}],"zun/image/driver.py":[{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"27b89acf15d7d5846f6815e67baaf3cb89e460e2","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"IMAGE_DRIVERS \u003d {"},{"line_number":33,"context_line":"    \u0027docker\u0027: \u0027docker.driver.DockerDriver\u0027,"},{"line_number":34,"context_line":"    \u0027glance\u0027: \u0027glance.driver.GlanceDriver\u0027"},{"line_number":35,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_7f80f2f7","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":13},"updated":"2017-01-21 21:39:40.000000000","message":"Suggest to put these into entry points (similar with scheduler driver: https://github.com/openstack/zun/blob/master/setup.cfg#L63) . This allows an out-of-tree image driver to be loaded at runtime, which is more flexible.","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"6a6afc4a4d25cc6ee8f3137c4eb0d7e54ebb5da9","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"IMAGE_DRIVERS \u003d {"},{"line_number":33,"context_line":"    \u0027docker\u0027: \u0027docker.driver.DockerDriver\u0027,"},{"line_number":34,"context_line":"    \u0027glance\u0027: \u0027glance.driver.GlanceDriver\u0027"},{"line_number":35,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":8,"id":"5a3905b3_eb289fe4","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":13},"in_reply_to":"5a3905b3_7f80f2f7","updated":"2017-01-22 07:03:49.000000000","message":"Need to look into it. Will do that.","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"421a62949a724cb6b1773c5ac965dc159e3a9f25","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"IMAGE_DRIVERS \u003d {"},{"line_number":33,"context_line":"    \u0027docker\u0027: \u0027docker.driver.DockerDriver\u0027,"},{"line_number":34,"context_line":"    \u0027glance\u0027: \u0027glance.driver.GlanceDriver\u0027"},{"line_number":35,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":8,"id":"3a461143_d2495290","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":13},"in_reply_to":"5a3905b3_eb289fe4","updated":"2017-01-25 19:35:43.000000000","message":"done","commit_id":"3407b7d8f16490ad0a3e37b28ffded9d7c5b253e"},{"author":{"_account_id":11536,"name":"hongbin","email":"hongbin034@gmail.com","username":"hongbin"},"change_message_id":"e50e0bd78b531738e471a0dd1ccbb6b8c67c7114","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"IMAGE_DRIVERS \u003d {"},{"line_number":33,"context_line":"    \u0027docker\u0027: \u0027docker.driver.DockerDriver\u0027,"},{"line_number":34,"context_line":"    \u0027glance\u0027: \u0027glance.driver.GlanceDriver\u0027"},{"line_number":35,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a461143_078450d2","line":32,"range":{"start_line":32,"start_character":0,"end_line":32,"end_character":13},"updated":"2017-01-26 16:00:24.000000000","message":"I saw you putted this into entry point, so here can be removed? It seems you can load it from entry point instead.","commit_id":"57c2e802ff573eec5218fe1c6fd95e6622042312"},{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"505441f3b9623e258c34ccb6e4a1743e1ba17408","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def load_image_driver(image_driver\u003dNone):"},{"line_number":33,"context_line":"    \"\"\"Load an image driver module."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    Load the container image driver module specified by the image_driver"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_2ee70e12","line":32,"updated":"2017-01-30 06:57:43.000000000","message":"I am reviewing this code for the first time. While image_driver is made an optional parameter, we are looking at line 41 for a \"not image_driver\" check and that says that the image driver option is mandatory. Weird.","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"72a07f43da499fc60d1c674f7d0b2edc6c5b6caf","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def load_image_driver(image_driver\u003dNone):"},{"line_number":33,"context_line":"    \"\"\"Load an image driver module."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    Load the container image driver module specified by the image_driver"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_e43e05d9","line":32,"in_reply_to":"3a461143_2ee70e12","updated":"2017-01-30 07:51:48.000000000","message":"If user don\u0027t provide the image_driver, then default image_driver is used which is the list of drivers specified in CONF in file https://review.openstack.org/#/c/423592/11/zun/conf/image_driver.py at line #21. So it can\u0027t be None. This can be none only when field in conf is empty. Please see line #64-67 of this file below.","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"0fcf88783168a4d379ddd6c19b41ede01348c6c6","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def load_image_driver(image_driver\u003dNone):"},{"line_number":33,"context_line":"    \"\"\"Load an image driver module."},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    Load the container image driver module specified by the image_driver"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_daef1985","line":32,"in_reply_to":"3a461143_e43e05d9","updated":"2017-01-30 13:14:43.000000000","message":"I got the logic, I just questioned about this parameter being optional and the check in Line 41 checking for None. Nevermind.","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"505441f3b9623e258c34ccb6e4a1743e1ba17408","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    for driver in image_driver_list:"},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            image_driver \u003d load_image_driver(driver)"},{"line_number":72,"context_line":"            image \u003d image_driver.pull_image(context, repo,"},{"line_number":73,"context_line":"                                            tag, image_pull_policy)"},{"line_number":74,"context_line":"            if image:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_2e20ee47","line":71,"updated":"2017-01-30 06:57:43.000000000","message":"Stevedore above can throw an exception saying \"Expected driver of type\" etc...So this code would then go into the exception block at Line 79 where it\u0027s going to say \"Unknown exception occurred...\". We kind of know why the exception occurred. Rather getting into this place of concern - how about we validate the driver entered by the user with the one that\u0027s available in the CONF files and give a proper reply saying - \"XYZ driver is not the right driver for this operation. Talk to your operator for the valid list\".\n\nThis is my wishlist though.","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":16277,"name":"Pradeep Kumar Singh","email":"ps4openstack@gmail.com","username":"pradeep_singh"},"change_message_id":"72a07f43da499fc60d1c674f7d0b2edc6c5b6caf","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    for driver in image_driver_list:"},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            image_driver \u003d load_image_driver(driver)"},{"line_number":72,"context_line":"            image \u003d image_driver.pull_image(context, repo,"},{"line_number":73,"context_line":"                                            tag, image_pull_policy)"},{"line_number":74,"context_line":"            if image:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_5f196278","line":71,"in_reply_to":"3a461143_2e20ee47","updated":"2017-01-30 07:51:48.000000000","message":"When stevedore will throw exception compute process will exit, please see line #60. I know that\u0027s bad, we should verify that image_driver list present in Conf should not be none and should be valid ,when compute process starts but i think that requires some extra framework, which i can target in someother BP. \n\nDriver validation is occurring at https://review.openstack.org/#/c/423592/11/zun/api/controllers/v1/schemas/containers.py at line #30  and https://review.openstack.org/#/c/423592/11/zun/common/validation/parameter_types.py line #18-20","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"},{"author":{"_account_id":9775,"name":"Sudipta Biswas","email":"sbiswas7@in.ibm.com","username":"sudswas"},"change_message_id":"0fcf88783168a4d379ddd6c19b41ede01348c6c6","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    for driver in image_driver_list:"},{"line_number":70,"context_line":"        try:"},{"line_number":71,"context_line":"            image_driver \u003d load_image_driver(driver)"},{"line_number":72,"context_line":"            image \u003d image_driver.pull_image(context, repo,"},{"line_number":73,"context_line":"                                            tag, image_pull_policy)"},{"line_number":74,"context_line":"            if image:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a461143_95ef22e8","line":71,"in_reply_to":"3a461143_5f196278","updated":"2017-01-30 13:14:43.000000000","message":"k","commit_id":"dbe629302232dd70a7858fd71fe053c1227cbb6e"}]}
