)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implemented the Objects and APIs for vf/pf"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added table Attribute"},{"line_number":10,"context_line":"Added Objects physical_function and virtual_function"},{"line_number":11,"context_line":"Added foreign key constrain for deployable to accelerator"},{"line_number":12,"context_line":"Added an API deployable_get_by_filters"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"bf659307_e6a0e792","line":9,"range":{"start_line":9,"start_character":12,"end_line":9,"end_character":21},"updated":"2018-04-02 18:57:56.000000000","message":"had better elaborate what is Attribute used for?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"ffbb5b044bb4cfe71b71911337c3ba2cbb727174","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implemented the Objects and APIs for vf/pf"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Added table Attribute"},{"line_number":10,"context_line":"Added Objects physical_function and virtual_function"},{"line_number":11,"context_line":"Added foreign key constrain for deployable to accelerator"},{"line_number":12,"context_line":"Added an API deployable_get_by_filters"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"bf659307_dccd7285","line":9,"range":{"start_line":9,"start_character":12,"end_line":9,"end_character":21},"in_reply_to":"bf659307_e6a0e792","updated":"2018-04-02 21:11:47.000000000","message":"The Attribute is not quite ready to use, I will have a separated commit for it and provide more details there.","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"}],"cyborg/common/exception.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":148,"context_line":""},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"class InvalidDeployType(CyborgException):"},{"line_number":151,"context_line":"    _msg_fmt \u003d _(\"Deployable have a invalid type\")"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"class Conflict(CyborgException):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_0be9667e","line":151,"range":{"start_line":151,"start_character":34,"end_line":151,"end_character":35},"updated":"2018-04-02 18:57:56.000000000","message":"an","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"}],"cyborg/db/api.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":93,"context_line":"                                  filters, sort_key\u003d\u0027created_at\u0027,"},{"line_number":94,"context_line":"                                  sort_dir\u003d\u0027desc\u0027, limit\u003dNone,"},{"line_number":95,"context_line":"                                  marker\u003dNone, columns_to_join\u003dNone):"},{"line_number":96,"context_line":"        \"\"\"Get requested deployable by host.\"\"\""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    # attributes"},{"line_number":99,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_2b6f8afc","line":96,"range":{"start_line":96,"start_character":39,"end_line":96,"end_character":43},"updated":"2018-04-02 18:57:56.000000000","message":"filters","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"}],"cyborg/db/sqlalchemy/api.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        if not values.get(\u0027uuid\u0027):"},{"line_number":183,"context_line":"            values[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":184,"context_line":"        if values.get(\u0027id\u0027):"},{"line_number":185,"context_line":"            values.pop(\u0027id\u0027)"},{"line_number":186,"context_line":"        deployable \u003d models.Deployable()"},{"line_number":187,"context_line":"        deployable.update(values)"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_06087b25","line":185,"range":{"start_line":185,"start_character":26,"end_line":185,"end_character":28},"updated":"2018-04-02 18:57:56.000000000","message":"values.pop(\"id\", None) ?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                  sort_dir\u003d\u0027desc\u0027, limit\u003dNone,"},{"line_number":254,"context_line":"                                  marker\u003dNone, join_columns\u003dNone):"},{"line_number":255,"context_line":"        \"\"\"Return list of deployables matching all filters sorted by"},{"line_number":256,"context_line":"        the primary key. See deployable_get_by_filters_sort for"},{"line_number":257,"context_line":"        more information."},{"line_number":258,"context_line":"        \"\"\""},{"line_number":259,"context_line":"        return self.deployable_get_by_filters_sort(context, filters,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_eb0bd226","line":256,"range":{"start_line":256,"start_character":12,"end_line":256,"end_character":19},"updated":"2018-04-02 18:57:56.000000000","message":"default is by time sequence?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"ffbb5b044bb4cfe71b71911337c3ba2cbb727174","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                                  sort_dir\u003d\u0027desc\u0027, limit\u003dNone,"},{"line_number":254,"context_line":"                                  marker\u003dNone, join_columns\u003dNone):"},{"line_number":255,"context_line":"        \"\"\"Return list of deployables matching all filters sorted by"},{"line_number":256,"context_line":"        the primary key. See deployable_get_by_filters_sort for"},{"line_number":257,"context_line":"        more information."},{"line_number":258,"context_line":"        \"\"\""},{"line_number":259,"context_line":"        return self.deployable_get_by_filters_sort(context, filters,"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_5c6642c3","line":256,"range":{"start_line":256,"start_character":12,"end_line":256,"end_character":19},"in_reply_to":"bf659307_eb0bd226","updated":"2018-04-02 21:11:47.000000000","message":"yes, the default is by \"created_at\"","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        filters consumed."},{"line_number":269,"context_line":"        :param query: query to apply filters to"},{"line_number":270,"context_line":"        :param filters: dictionary of filters; values that are lists,"},{"line_number":271,"context_line":"                        tuples, sets, or frozensets cause an \u0027IN\u0027 test to"},{"line_number":272,"context_line":"                        be performed, while exact matching (\u0027\u003d\u003d\u0027 operator)"},{"line_number":273,"context_line":"                        is used for other values"},{"line_number":274,"context_line":"        :param legal_keys: list of keys to apply exact filtering to"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_06cb9ba4","line":271,"range":{"start_line":271,"start_character":62,"end_line":271,"end_character":64},"updated":"2018-04-02 18:57:56.000000000","message":"which include which?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"ffbb5b044bb4cfe71b71911337c3ba2cbb727174","unresolved":false,"context_lines":[{"line_number":268,"context_line":"        filters consumed."},{"line_number":269,"context_line":"        :param query: query to apply filters to"},{"line_number":270,"context_line":"        :param filters: dictionary of filters; values that are lists,"},{"line_number":271,"context_line":"                        tuples, sets, or frozensets cause an \u0027IN\u0027 test to"},{"line_number":272,"context_line":"                        be performed, while exact matching (\u0027\u003d\u003d\u0027 operator)"},{"line_number":273,"context_line":"                        is used for other values"},{"line_number":274,"context_line":"        :param legal_keys: list of keys to apply exact filtering to"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_dc71f277","line":271,"range":{"start_line":271,"start_character":62,"end_line":271,"end_character":64},"in_reply_to":"bf659307_06cb9ba4","updated":"2018-04-02 21:11:47.000000000","message":"for instance, if the value is {A, B, C}, the filter will find all the matchings that contain any of A, B or C.","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"            if isinstance(value, (list, tuple, set, frozenset)):"},{"line_number":290,"context_line":"                if not value:"},{"line_number":291,"context_line":"                    return None"},{"line_number":292,"context_line":"                # Looking for values in a list; apply to query directly"},{"line_number":293,"context_line":"                column_attr \u003d getattr(model, key)"},{"line_number":294,"context_line":"                query \u003d query.filter(column_attr.in_(value))"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_e66787e8","line":291,"range":{"start_line":291,"start_character":20,"end_line":291,"end_character":31},"updated":"2018-04-02 18:57:56.000000000","message":"what about other keys?\nvalues means empty? Does it means in model column_attr?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"ffbb5b044bb4cfe71b71911337c3ba2cbb727174","unresolved":false,"context_lines":[{"line_number":288,"context_line":""},{"line_number":289,"context_line":"            if isinstance(value, (list, tuple, set, frozenset)):"},{"line_number":290,"context_line":"                if not value:"},{"line_number":291,"context_line":"                    return None"},{"line_number":292,"context_line":"                # Looking for values in a list; apply to query directly"},{"line_number":293,"context_line":"                column_attr \u003d getattr(model, key)"},{"line_number":294,"context_line":"                query \u003d query.filter(column_attr.in_(value))"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_5c0ba2d4","line":291,"range":{"start_line":291,"start_character":20,"end_line":291,"end_character":31},"in_reply_to":"bf659307_e66787e8","updated":"2018-04-02 21:11:47.000000000","message":"This is an invalid input case, if the user provides an empty set like {} in the value, the filter will just return an empty set.","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                            default_dir\u003d\u0027asc\u0027):"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        # Determine direction to use for when adding default keys"},{"line_number":401,"context_line":"        if sort_dirs and len(sort_dirs) !\u003d 0:"},{"line_number":402,"context_line":"            default_dir_value \u003d sort_dirs[0]"},{"line_number":403,"context_line":"        else:"},{"line_number":404,"context_line":"            default_dir_value \u003d default_dir"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_06271b66","line":401,"range":{"start_line":401,"start_character":11,"end_line":401,"end_character":20},"updated":"2018-04-02 18:57:56.000000000","message":"Does here sort_keys is allowed as None?\n\nhow about set sort_dirs as key arguments. default is []?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"ffbb5b044bb4cfe71b71911337c3ba2cbb727174","unresolved":false,"context_lines":[{"line_number":398,"context_line":"                            default_dir\u003d\u0027asc\u0027):"},{"line_number":399,"context_line":""},{"line_number":400,"context_line":"        # Determine direction to use for when adding default keys"},{"line_number":401,"context_line":"        if sort_dirs and len(sort_dirs) !\u003d 0:"},{"line_number":402,"context_line":"            default_dir_value \u003d sort_dirs[0]"},{"line_number":403,"context_line":"        else:"},{"line_number":404,"context_line":"            default_dir_value \u003d default_dir"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_9c15bae7","line":401,"range":{"start_line":401,"start_character":11,"end_line":401,"end_character":20},"in_reply_to":"bf659307_06271b66","updated":"2018-04-02 21:11:47.000000000","message":"according to my previous code at line 262, \n\n    sort_dirs\u003d[sort_dir]\n\nthe default is []","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"fe85bf8804f71ed28bb01b7bb018b315bc56df98","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    def deployable_create(self, context, values):"},{"line_number":182,"context_line":"        if not values.get(\u0027uuid\u0027):"},{"line_number":183,"context_line":"            values[\u0027uuid\u0027] \u003d uuidutils.generate_uuid()"},{"line_number":184,"context_line":"        if values.get(\u0027id\u0027):"},{"line_number":185,"context_line":"            values.pop(\u0027id\u0027, None)"},{"line_number":186,"context_line":"        deployable \u003d models.Deployable()"},{"line_number":187,"context_line":"        deployable.update(values)"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_4c49aa5d","line":185,"range":{"start_line":184,"start_character":7,"end_line":185,"end_character":34},"updated":"2018-04-03 08:37:55.000000000","message":"Oh, sorry.\n\nI means you do not care \"id\" since db layer maintain it. \nSo just pop() it rudely.\n\nno need to test it exist by get().\n\n\nHere is just a suggestion.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"}],"cyborg/objects/attribute.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                                              self.uuid,"},{"line_number":73,"context_line":"                                              self.key,"},{"line_number":74,"context_line":"                                              self.value)"},{"line_number":75,"context_line":"        self._from_db_object(self, db_attr)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def destroy(self, context):"},{"line_number":78,"context_line":"        \"\"\"Delete a Deployable from the DB.\"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_42765140","line":75,"range":{"start_line":75,"start_character":13,"end_line":75,"end_character":28},"updated":"2018-04-03 10:13:37.000000000","message":"why _from_db_object?\nDoes that means some fields of the object will be changed after save them in db?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"496ec18fb0a4e50dc67b600f3b563875a0cfd9ce","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.dbapi.attribute_delete(context, self.uuid)"},{"line_number":80,"context_line":"        self.obj_reset_changes()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def set_key_value_pair(self, set_key, set_value):"},{"line_number":83,"context_line":"        self.key \u003d set_key"},{"line_number":84,"context_line":"        self.value \u003d set_value"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_e6e4670f","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":26},"updated":"2018-04-02 18:57:56.000000000","message":"should call save after set_key_value_pair?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.dbapi.attribute_delete(context, self.uuid)"},{"line_number":80,"context_line":"        self.obj_reset_changes()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def set_key_value_pair(self, set_key, set_value):"},{"line_number":83,"context_line":"        self.key \u003d set_key"},{"line_number":84,"context_line":"        self.value \u003d set_value"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_e2b3e5e7","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":26},"in_reply_to":"bf659307_bcd2fe26","updated":"2018-04-03 10:13:37.000000000","message":"we are say same things.","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"ffbb5b044bb4cfe71b71911337c3ba2cbb727174","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.dbapi.attribute_delete(context, self.uuid)"},{"line_number":80,"context_line":"        self.obj_reset_changes()"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def set_key_value_pair(self, set_key, set_value):"},{"line_number":83,"context_line":"        self.key \u003d set_key"},{"line_number":84,"context_line":"        self.value \u003d set_value"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_bcd2fe26","line":82,"range":{"start_line":82,"start_character":8,"end_line":82,"end_character":26},"in_reply_to":"bf659307_e6e4670f","updated":"2018-04-02 21:11:47.000000000","message":"No, this function should be called before save() if the user wants to change the key/value","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"                                              self.uuid,"},{"line_number":73,"context_line":"                                              self.key,"},{"line_number":74,"context_line":"                                              self.value)"},{"line_number":75,"context_line":"        self._from_db_object(self, db_attr)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def destroy(self, context):"},{"line_number":78,"context_line":"        \"\"\"Delete a Deployable from the DB.\"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_02093994","line":75,"range":{"start_line":75,"start_character":0,"end_line":75,"end_character":43},"updated":"2018-04-03 10:18:44.000000000","message":"why _from_db_object?\nDoes that means some fields of the object will be changed after\nsave them in db?","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"}],"cyborg/objects/deployable.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.obj_reset_changes()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def add_attribute(self, attribute):"},{"line_number":113,"context_line":"        \"\"\"add a attribute object to the attribute_list."},{"line_number":114,"context_line":"        If the attribute already exists, it will update the value,"},{"line_number":115,"context_line":"        otherwise, the vf will be appended to the list"},{"line_number":116,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_e210c502","line":113,"range":{"start_line":113,"start_character":15,"end_line":113,"end_character":17},"updated":"2018-04-03 10:13:37.000000000","message":"an","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def add_attribute(self, attribute):"},{"line_number":113,"context_line":"        \"\"\"add a attribute object to the attribute_list."},{"line_number":114,"context_line":"        If the attribute already exists, it will update the value,"},{"line_number":115,"context_line":"        otherwise, the vf will be appended to the list"},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        if not isinstance(vf, VirtualFunction) or vf.type !\u003d \u0027vf\u0027:"},{"line_number":118,"context_line":"            raise exception.InvalidDeployType()"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_a21f2d06","line":115,"range":{"start_line":115,"start_character":8,"end_line":115,"end_character":54},"updated":"2018-04-03 10:13:37.000000000","message":"Does not see the vf is appended to the list.","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"571e0691168eb1c5d02eb04f120ca600e6cf81e8","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        # The id of the virtualized accelerator instance"},{"line_number":56,"context_line":"        \u0027availability\u0027: object_fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        # identify the state of acc, e.g released/claimed/..."},{"line_number":58,"context_line":"        \u0027accelerator_id\u0027: object_fields.IntegerField(nullable\u003dFalse)"},{"line_number":59,"context_line":"        # Foreign key constrain to reference accelerator table"},{"line_number":60,"context_line":"    }"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_parent_root_uuid(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_ddf482f3","line":59,"range":{"start_line":58,"start_character":1,"end_line":59,"end_character":62},"updated":"2018-04-03 10:42:54.000000000","message":"have you consider the rest api?\n\nget /cyborg/acclerators\n\nor \nget /cyborg/deployables  (Now we get pf and vf information by this api)","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"a52c3cf9749608e421667868d9554c6738f528fa","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        # The id of the virtualized accelerator instance"},{"line_number":56,"context_line":"        \u0027availability\u0027: object_fields.StringField(nullable\u003dFalse),"},{"line_number":57,"context_line":"        # identify the state of acc, e.g released/claimed/..."},{"line_number":58,"context_line":"        \u0027accelerator_id\u0027: object_fields.IntegerField(nullable\u003dFalse)"},{"line_number":59,"context_line":"        # Foreign key constrain to reference accelerator table"},{"line_number":60,"context_line":"    }"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def _get_parent_root_uuid(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_e4fbdcba","line":59,"range":{"start_line":58,"start_character":1,"end_line":59,"end_character":62},"in_reply_to":"bf659307_ddf482f3","updated":"2018-04-04 04:38:20.000000000","message":"For now, the only user is the resource tracker, which uses rpc calls. That is why I did not put REST APIs for this patch. If we need, I think we should have a separated patch for it.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":110,"context_line":"        self.obj_reset_changes()"},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def add_attribute(self, attribute):"},{"line_number":113,"context_line":"        \"\"\"add a attribute object to the attribute_list."},{"line_number":114,"context_line":"        If the attribute already exists, it will update the value,"},{"line_number":115,"context_line":"        otherwise, the vf will be appended to the list"},{"line_number":116,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_42f2d19b","line":113,"range":{"start_line":113,"start_character":15,"end_line":113,"end_character":16},"updated":"2018-04-03 10:18:44.000000000","message":"an","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def add_attribute(self, attribute):"},{"line_number":113,"context_line":"        \"\"\"add a attribute object to the attribute_list."},{"line_number":114,"context_line":"        If the attribute already exists, it will update the value,"},{"line_number":115,"context_line":"        otherwise, the vf will be appended to the list"},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        if not isinstance(vf, VirtualFunction) or vf.type !\u003d \u0027vf\u0027:"},{"line_number":118,"context_line":"            raise exception.InvalidDeployType()"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_8241c9ab","line":115,"range":{"start_line":115,"start_character":8,"end_line":115,"end_character":54},"updated":"2018-04-03 10:18:44.000000000","message":"Does not see the vf is appended to the list.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"a52c3cf9749608e421667868d9554c6738f528fa","unresolved":false,"context_lines":[{"line_number":112,"context_line":"    def add_attribute(self, attribute):"},{"line_number":113,"context_line":"        \"\"\"add a attribute object to the attribute_list."},{"line_number":114,"context_line":"        If the attribute already exists, it will update the value,"},{"line_number":115,"context_line":"        otherwise, the vf will be appended to the list"},{"line_number":116,"context_line":"        \"\"\""},{"line_number":117,"context_line":"        if not isinstance(vf, VirtualFunction) or vf.type !\u003d \u0027vf\u0027:"},{"line_number":118,"context_line":"            raise exception.InvalidDeployType()"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_0424d05c","line":115,"range":{"start_line":115,"start_character":8,"end_line":115,"end_character":54},"in_reply_to":"bf659307_8241c9ab","updated":"2018-04-04 04:38:20.000000000","message":"This is just a dummy call. I havn\u0027t started implementing the functions related to attributes yet. But you are right. I will put a TODO here.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"}],"cyborg/objects/physical_function.py":[{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        if not isinstance(vf, VirtualFunction) or vf.type !\u003d \u0027vf\u0027:"},{"line_number":60,"context_line":"            raise exception.InvalidDeployType()"},{"line_number":61,"context_line":"        for exist_vf in self.virtual_function_list:"},{"line_number":62,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":63,"context_line":"                LOG.warning(\"The vf already exists\")"},{"line_number":64,"context_line":"                return None"},{"line_number":65,"context_line":"        vf.parent_uuid \u003d self.uuid"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_9f2282b8","line":62,"range":{"start_line":62,"start_character":20,"end_line":62,"end_character":35},"updated":"2018-04-03 10:13:37.000000000","message":"too strict.\nfor example,  \u0027instance_uuid\u0027 of the vf can be different. \n\nMaybe it is enough that uuid or pcie_addr can be used for be compared.","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if the vf does not exist, ignore it"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":"        for idx, exist_vf in self.virtual_function_list:"},{"line_number":75,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":76,"context_line":"                removed_vf \u003d self.virtual_function_list.pop(idx)"},{"line_number":77,"context_line":"                removed_vf.destroy(context)"},{"line_number":78,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_22055d11","line":75,"range":{"start_line":75,"start_character":12,"end_line":75,"end_character":50},"updated":"2018-04-03 10:13:37.000000000","message":"ditto","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        LOG.warning(\"The removing vf does not exist!\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def destroy(self, context):"},{"line_number":82,"context_line":"        \"\"\"Delete a the pf from the DB.\"\"\""},{"line_number":83,"context_line":"        del self.virtual_function_list[:]"},{"line_number":84,"context_line":"        super(PhysicalFunction, self).destroy(context)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_9f25a20b","line":82,"range":{"start_line":82,"start_character":17,"end_line":82,"end_character":24},"updated":"2018-04-03 10:13:37.000000000","message":"the","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"c81278776799115620eb38d95d131e0f89b08816","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                                                          marker\u003dmarker,"},{"line_number":116,"context_line":"                                                          join_columns\u003djoin)"},{"line_number":117,"context_line":"        for db_dpl in db_dpl_list:"},{"line_number":118,"context_line":"            obj_dpl \u003d cls._from_db_object(cls(context), db_dpl)"},{"line_number":119,"context_line":"            obj_dpl_list.append(obj_dpl)"},{"line_number":120,"context_line":"        return obj_dpl_list"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"bf659307_82b1c949","line":118,"range":{"start_line":118,"start_character":0,"end_line":118,"end_character":63},"updated":"2018-04-03 10:13:37.000000000","message":"This pf just return pf info,  does not include vf list?","commit_id":"d234cd635a1d7a801d76ed9a53b76444cb217dc9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        if not isinstance(vf, VirtualFunction) or vf.type !\u003d \u0027vf\u0027:"},{"line_number":60,"context_line":"            raise exception.InvalidDeployType()"},{"line_number":61,"context_line":"        for exist_vf in self.virtual_function_list:"},{"line_number":62,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":63,"context_line":"                LOG.warning(\"The vf already exists\")"},{"line_number":64,"context_line":"                return None"},{"line_number":65,"context_line":"        vf.parent_uuid \u003d self.uuid"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_c20ca195","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":50},"updated":"2018-04-03 10:18:44.000000000","message":"too strict.\nfor example,  \u0027instance_uuid\u0027 of the vf can be different.\n\nMaybe it is enough that uuid or pcie_addr can be used for be\ncompared.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"a52c3cf9749608e421667868d9554c6738f528fa","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        if not isinstance(vf, VirtualFunction) or vf.type !\u003d \u0027vf\u0027:"},{"line_number":60,"context_line":"            raise exception.InvalidDeployType()"},{"line_number":61,"context_line":"        for exist_vf in self.virtual_function_list:"},{"line_number":62,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":63,"context_line":"                LOG.warning(\"The vf already exists\")"},{"line_number":64,"context_line":"                return None"},{"line_number":65,"context_line":"        vf.parent_uuid \u003d self.uuid"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_84bea0d2","line":62,"range":{"start_line":62,"start_character":12,"end_line":62,"end_character":50},"in_reply_to":"bf659307_c20ca195","updated":"2018-04-04 04:38:20.000000000","message":"I don\u0027t see why for the same vf, the instance_uuid can be different tho. Also, the vf\u0027s uuid might not have been assigned at this point. It will be assigned a uuid after create() is specifically called.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if the vf does not exist, ignore it"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":"        for idx, exist_vf in self.virtual_function_list:"},{"line_number":75,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":76,"context_line":"                removed_vf \u003d self.virtual_function_list.pop(idx)"},{"line_number":77,"context_line":"                removed_vf.destroy(context)"},{"line_number":78,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_422091f7","line":75,"range":{"start_line":75,"start_character":11,"end_line":75,"end_character":50},"updated":"2018-04-03 10:18:44.000000000","message":"ditto","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        LOG.warning(\"The removing vf does not exist!\")"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def destroy(self, context):"},{"line_number":82,"context_line":"        \"\"\"Delete a the pf from the DB.\"\"\""},{"line_number":83,"context_line":"        del self.virtual_function_list[:]"},{"line_number":84,"context_line":"        super(PhysicalFunction, self).destroy(context)"},{"line_number":85,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_c28101c5","line":82,"range":{"start_line":82,"start_character":18,"end_line":82,"end_character":24},"updated":"2018-04-03 10:18:44.000000000","message":"the","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"4a536a5c7c422e1b34eb0eaafc174b64988729dd","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                                                          marker\u003dmarker,"},{"line_number":116,"context_line":"                                                          join_columns\u003djoin)"},{"line_number":117,"context_line":"        for db_dpl in db_dpl_list:"},{"line_number":118,"context_line":"            obj_dpl \u003d cls._from_db_object(cls(context), db_dpl)"},{"line_number":119,"context_line":"            obj_dpl_list.append(obj_dpl)"},{"line_number":120,"context_line":"        return obj_dpl_list"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_0265b945","line":118,"range":{"start_line":118,"start_character":11,"end_line":118,"end_character":63},"updated":"2018-04-03 10:18:44.000000000","message":"This pf just return pf info,  does not include vf list?","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"a52c3cf9749608e421667868d9554c6738f528fa","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                                                          marker\u003dmarker,"},{"line_number":116,"context_line":"                                                          join_columns\u003djoin)"},{"line_number":117,"context_line":"        for db_dpl in db_dpl_list:"},{"line_number":118,"context_line":"            obj_dpl \u003d cls._from_db_object(cls(context), db_dpl)"},{"line_number":119,"context_line":"            obj_dpl_list.append(obj_dpl)"},{"line_number":120,"context_line":"        return obj_dpl_list"},{"line_number":121,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bf659307_a48f2428","line":118,"range":{"start_line":118,"start_character":11,"end_line":118,"end_character":63},"in_reply_to":"bf659307_0265b945","updated":"2018-04-04 04:38:20.000000000","message":"You are right. I think I missed it. Will do the fix.","commit_id":"30bc1132de36b5a12f988febb246235979470fa9"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"9cb6aec5dafbc7f941c7f62776b004cb8379f675","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if the vf does not exist, ignore it"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":"        for idx, exist_vf in self.virtual_function_list:"},{"line_number":75,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":76,"context_line":"                removed_vf \u003d self.virtual_function_list.pop(idx)"},{"line_number":77,"context_line":"                removed_vf.destroy(context)"},{"line_number":78,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_1b441f74","line":75,"range":{"start_line":75,"start_character":14,"end_line":75,"end_character":50},"updated":"2018-04-04 16:15:49.000000000","message":"As we discussed, if we have do the instance-vf binding. \n\nshould not remove the VF.","commit_id":"19841be77c48beb2a240ac4d1338f4ec6390fdfd"},{"author":{"_account_id":27458,"name":"Li Liu","email":"liliueecg@gmail.com","username":"liliu"},"change_message_id":"fe22c1abdd26f468948d924e35aa2e3abaa11c8a","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if the vf does not exist, ignore it"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":"        for idx, exist_vf in self.virtual_function_list:"},{"line_number":75,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":76,"context_line":"                removed_vf \u003d self.virtual_function_list.pop(idx)"},{"line_number":77,"context_line":"                removed_vf.destroy(context)"},{"line_number":78,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_e084e4b3","line":75,"range":{"start_line":75,"start_character":14,"end_line":75,"end_character":50},"in_reply_to":"bf659307_1b441f74","updated":"2018-04-06 20:11:41.000000000","message":"Here I just implemented the API for removing it. But under what circumstances the vf should be removed is totally up to the user/resource manager.","commit_id":"19841be77c48beb2a240ac4d1338f4ec6390fdfd"},{"author":{"_account_id":14131,"name":"shaohef","email":"shaohe.feng@intel.com","username":"shaohefeng"},"change_message_id":"f44627bc1cc4ee5871a8371ea425b6ae256ba864","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        if the vf does not exist, ignore it"},{"line_number":73,"context_line":"        \"\"\""},{"line_number":74,"context_line":"        for idx, exist_vf in self.virtual_function_list:"},{"line_number":75,"context_line":"            if base.obj_equal_prims(vf, exist_vf):"},{"line_number":76,"context_line":"                removed_vf \u003d self.virtual_function_list.pop(idx)"},{"line_number":77,"context_line":"                removed_vf.destroy(context)"},{"line_number":78,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":13,"id":"bf659307_237dfc1b","line":75,"range":{"start_line":75,"start_character":14,"end_line":75,"end_character":50},"in_reply_to":"bf659307_e084e4b3","updated":"2018-04-08 07:09:40.000000000","message":"OK, let\u0027s the API caller to make sure to remove the VF safely.","commit_id":"19841be77c48beb2a240ac4d1338f4ec6390fdfd"}]}
