)]}'
{"cinder/volume/drivers/vmware/datastore.py":[{"author":{"_account_id":22257,"name":"Manish","email":"deolalkar.manish@hpe.com","username":"manishd"},"change_message_id":"6ce86d0b216b34322bd7a4395be23f3d305fac2f","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            return True"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        profile_id \u003d self.get_profile_id(profile_name)"},{"line_number":297,"context_line":"        is_compliant \u003d bool(self._filter_by_profile({datastore: None},"},{"line_number":298,"context_line":"                                                    profile_id))"},{"line_number":299,"context_line":"        LOG.debug(\"Compliance is %(is_compliant)s for datastore: \""},{"line_number":300,"context_line":"                  \"%(datastore)s against profile: %(profile)s.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_c1f49a88","line":297,"range":{"start_line":297,"start_character":33,"end_line":297,"end_character":51},"updated":"2016-07-29 10:58:45.000000000","message":"Why are we passing datastore as None here?\nCan we add a check if \u0027datastore\u0027 which we get as function argument, is a dictionary here, and pass it like self._filter_by_profile(datastore,...)\nPassing \"datastore: None\" will pass it always as None .","commit_id":"7eded824f0bcb5a30376433a1c5e35ca3193d911"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"a96c9d634255f2c9a3014ff3ed71b4d39b2aa1f3","unresolved":false,"context_lines":[{"line_number":294,"context_line":"            return True"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"        profile_id \u003d self.get_profile_id(profile_name)"},{"line_number":297,"context_line":"        is_compliant \u003d bool(self._filter_by_profile({datastore: None},"},{"line_number":298,"context_line":"                                                    profile_id))"},{"line_number":299,"context_line":"        LOG.debug(\"Compliance is %(is_compliant)s for datastore: \""},{"line_number":300,"context_line":"                  \"%(datastore)s against profile: %(profile)s.\","}],"source_content_type":"text/x-python","patch_set":2,"id":"bacf61ea_444ef896","line":297,"range":{"start_line":297,"start_character":33,"end_line":297,"end_character":51},"in_reply_to":"bacf61ea_c1f49a88","updated":"2016-07-29 11:39:47.000000000","message":"_filter_by_profile expects a dictionary which maps datastore to its properties and filter out non-complaint datastores and returns a map of compliant datastores and its properties. In this method, we don\u0027t care about the properties of compliant datastores, but that is not the case with other call sites of the utility method \u0027_filter_by_profile\u0027.\n\nI prefer passing None as properties instead of adding conditionals in _filter_by_profile.\n\nWill add a comment here to clarify this.","commit_id":"7eded824f0bcb5a30376433a1c5e35ca3193d911"}]}
