)]}'
{"cinder/volume/driver.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a5841e2e3e9eb69a44f14164e95ffe6828bb8cc0","unresolved":false,"context_lines":[{"line_number":1856,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        param snapshots is a list of objects. It cannot be assigned to"},{"line_number":1859,"context_line":"        snapshots_model_update. snapshots_model_update is a list of of"},{"line_number":1860,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1861,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1862,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_c815439c","line":1859,"range":{"start_line":1859,"start_character":67,"end_line":1859,"end_character":70},"updated":"2016-08-31 00:27:16.000000000","message":"of repeated","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"7da10431938d7c0a311500a48a7348b35b86d164","unresolved":false,"context_lines":[{"line_number":1773,"context_line":"        \"\"\""},{"line_number":1774,"context_line":"        raise NotImplementedError()"},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"    def create_group_from_src(self, context, group, volumes,"},{"line_number":1777,"context_line":"                              group_snapshot\u003dNone, snapshots\u003dNone,"},{"line_number":1778,"context_line":"                              source_group\u003dNone, source_vols\u003dNone):"},{"line_number":1779,"context_line":"        \"\"\"Creates a group from source."},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"        :param context: the context of the caller."},{"line_number":1782,"context_line":"        :param group: the Group object to be created."},{"line_number":1783,"context_line":"        :param volumes: a list of Volume objects in the group."},{"line_number":1784,"context_line":"        :param group_snapshot: the GroupSnapshot object as source."},{"line_number":1785,"context_line":"        :param snapshots: a list of snapshot objects in group_snapshot."},{"line_number":1786,"context_line":"        :param source_group: the Group object as source."},{"line_number":1787,"context_line":"        :param source_vols: a list of volume objects in the source_group."},{"line_number":1788,"context_line":"        :returns: model_update, volumes_model_update"},{"line_number":1789,"context_line":""},{"line_number":1790,"context_line":"        The source can be group_snapshot or a source_group."},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"        param volumes is retrieved directly from the db. It is a list of"},{"line_number":1793,"context_line":"        cinder.db.sqlalchemy.models.Volume to be precise. It cannot be"},{"line_number":1794,"context_line":"        assigned to volumes_model_update. volumes_model_update is a list of"},{"line_number":1795,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1796,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1797,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1798,"context_line":""},{"line_number":1799,"context_line":"        To be consistent with other volume operations, the manager will"},{"line_number":1800,"context_line":"        assume the operation is successful if no exception is thrown by"},{"line_number":1801,"context_line":"        the driver. For a successful operation, the driver can either build"},{"line_number":1802,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1803,"context_line":"        return None, None."},{"line_number":1804,"context_line":"        \"\"\""},{"line_number":1805,"context_line":"        raise NotImplementedError()"},{"line_number":1806,"context_line":""},{"line_number":1807,"context_line":"    def create_group_snapshot(self, context, group_snapshot, snapshots):"},{"line_number":1808,"context_line":"        \"\"\"Creates a group_snapshot."},{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":"        :param context: the context of the caller."},{"line_number":1811,"context_line":"        :param group_snapshot: the GroupSnapshot object to be created."},{"line_number":1812,"context_line":"        :param snapshots: a list of Snapshot objects in the group_snapshot."},{"line_number":1813,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        param snapshots is a list of Snapshot objects. It cannot be assigned"},{"line_number":1816,"context_line":"        to snapshots_model_update. snapshots_model_update is a list of"},{"line_number":1817,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1818,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1819,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"        The driver should populate snapshots_model_update and model_update"},{"line_number":1822,"context_line":"        and return them."},{"line_number":1823,"context_line":""},{"line_number":1824,"context_line":"        The manager will check snapshots_model_update and update db accordingly"},{"line_number":1825,"context_line":"        for each snapshot. If the driver successfully deleted some snapshots"},{"line_number":1826,"context_line":"        but failed to delete others, it should set statuses of the snapshots"},{"line_number":1827,"context_line":"        accordingly so that the manager can update db correctly."},{"line_number":1828,"context_line":""},{"line_number":1829,"context_line":"        If the status in any entry of snapshots_model_update is \u0027error\u0027, the"},{"line_number":1830,"context_line":"        status in model_update will be set to the same if it is not already"},{"line_number":1831,"context_line":"        \u0027error\u0027."},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"        If the status in model_update is \u0027error\u0027, the manager will raise an"},{"line_number":1834,"context_line":"        exception and the status of group_snapshot will be set to \u0027error\u0027 in"},{"line_number":1835,"context_line":"        the db. If snapshots_model_update is not returned by the driver, the"},{"line_number":1836,"context_line":"        manager will set the status of every snapshot to \u0027error\u0027 in the except"},{"line_number":1837,"context_line":"        block."},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"        If the driver raises an exception during the operation, it will be"},{"line_number":1840,"context_line":"        caught by the try-except block in the manager and the statuses of"},{"line_number":1841,"context_line":"        group_snapshot and all snapshots will be set to \u0027error\u0027."},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"        For a successful operation, the driver can either build the"},{"line_number":1844,"context_line":"        model_update and snapshots_model_update and return them or"},{"line_number":1845,"context_line":"        return None, None. The statuses of group_snapshot and all snapshots"},{"line_number":1846,"context_line":"        will be set to \u0027available\u0027 at the end of the manager function."},{"line_number":1847,"context_line":"        \"\"\""},{"line_number":1848,"context_line":"        raise NotImplementedError()"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"    def delete_group_snapshot(self, context, group_snapshot, snapshots):"},{"line_number":1851,"context_line":"        \"\"\"Deletes a group_snapshot."},{"line_number":1852,"context_line":""},{"line_number":1853,"context_line":"        :param context: the context of the caller."},{"line_number":1854,"context_line":"        :param group_snapshot: the GroupSnapshot object to be deleted."},{"line_number":1855,"context_line":"        :param snapshots: a list of snapshot objects in the group_snapshot."},{"line_number":1856,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        param snapshots is a list of objects. It cannot be assigned to"},{"line_number":1859,"context_line":"        snapshots_model_update. snapshots_model_update is a list of of"},{"line_number":1860,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1861,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1862,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1863,"context_line":""},{"line_number":1864,"context_line":"        The driver should populate snapshots_model_update and model_update"},{"line_number":1865,"context_line":"        and return them."},{"line_number":1866,"context_line":""},{"line_number":1867,"context_line":"        The manager will check snapshots_model_update and update db accordingly"},{"line_number":1868,"context_line":"        for each snapshot. If the driver successfully deleted some snapshots"},{"line_number":1869,"context_line":"        but failed to delete others, it should set statuses of the snapshots"},{"line_number":1870,"context_line":"        accordingly so that the manager can update db correctly."},{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"        If the status in any entry of snapshots_model_update is"},{"line_number":1873,"context_line":"        \u0027error_deleting\u0027 or \u0027error\u0027, the status in model_update will be set to"},{"line_number":1874,"context_line":"        the same if it is not already \u0027error_deleting\u0027 or \u0027error\u0027."},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        If the status in model_update is \u0027error_deleting\u0027 or \u0027error\u0027, the"},{"line_number":1877,"context_line":"        manager will raise an exception and the status of group_snapshot will"},{"line_number":1878,"context_line":"        be set to \u0027error\u0027 in the db. If snapshots_model_update is not returned"},{"line_number":1879,"context_line":"        by the driver, the manager will set the status of every snapshot to"},{"line_number":1880,"context_line":"        \u0027error\u0027 in the except block."},{"line_number":1881,"context_line":""},{"line_number":1882,"context_line":"        If the driver raises an exception during the operation, it will be"},{"line_number":1883,"context_line":"        caught by the try-except block in the manager and the statuses of"},{"line_number":1884,"context_line":"        group_snapshot and all snapshots will be set to \u0027error\u0027."},{"line_number":1885,"context_line":""},{"line_number":1886,"context_line":"        For a successful operation, the driver can either build the"},{"line_number":1887,"context_line":"        model_update and snapshots_model_update and return them or"},{"line_number":1888,"context_line":"        return None, None. The statuses of group_snapshot and all snapshots"},{"line_number":1889,"context_line":"        will be set to \u0027deleted\u0027 after the manager deletes them from db."},{"line_number":1890,"context_line":"        \"\"\""},{"line_number":1891,"context_line":"        raise NotImplementedError()"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":""},{"line_number":1894,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_87c948af","line":1891,"range":{"start_line":1776,"start_character":0,"end_line":1891,"end_character":35},"updated":"2016-08-31 12:21:56.000000000","message":"Shouldn\u0027t we have some default, generic implementation? At least for snapshot operations?","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"3eec5d0a3c38411b8cd000217184572c9747bdb3","unresolved":false,"context_lines":[{"line_number":1773,"context_line":"        \"\"\""},{"line_number":1774,"context_line":"        raise NotImplementedError()"},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"    def create_group_from_src(self, context, group, volumes,"},{"line_number":1777,"context_line":"                              group_snapshot\u003dNone, snapshots\u003dNone,"},{"line_number":1778,"context_line":"                              source_group\u003dNone, source_vols\u003dNone):"},{"line_number":1779,"context_line":"        \"\"\"Creates a group from source."},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"        :param context: the context of the caller."},{"line_number":1782,"context_line":"        :param group: the Group object to be created."},{"line_number":1783,"context_line":"        :param volumes: a list of Volume objects in the group."},{"line_number":1784,"context_line":"        :param group_snapshot: the GroupSnapshot object as source."},{"line_number":1785,"context_line":"        :param snapshots: a list of snapshot objects in group_snapshot."},{"line_number":1786,"context_line":"        :param source_group: the Group object as source."},{"line_number":1787,"context_line":"        :param source_vols: a list of volume objects in the source_group."},{"line_number":1788,"context_line":"        :returns: model_update, volumes_model_update"},{"line_number":1789,"context_line":""},{"line_number":1790,"context_line":"        The source can be group_snapshot or a source_group."},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"        param volumes is retrieved directly from the db. It is a list of"},{"line_number":1793,"context_line":"        cinder.db.sqlalchemy.models.Volume to be precise. It cannot be"},{"line_number":1794,"context_line":"        assigned to volumes_model_update. volumes_model_update is a list of"},{"line_number":1795,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1796,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1797,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1798,"context_line":""},{"line_number":1799,"context_line":"        To be consistent with other volume operations, the manager will"},{"line_number":1800,"context_line":"        assume the operation is successful if no exception is thrown by"},{"line_number":1801,"context_line":"        the driver. For a successful operation, the driver can either build"},{"line_number":1802,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1803,"context_line":"        return None, None."},{"line_number":1804,"context_line":"        \"\"\""},{"line_number":1805,"context_line":"        raise NotImplementedError()"},{"line_number":1806,"context_line":""},{"line_number":1807,"context_line":"    def create_group_snapshot(self, context, group_snapshot, snapshots):"},{"line_number":1808,"context_line":"        \"\"\"Creates a group_snapshot."},{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":"        :param context: the context of the caller."},{"line_number":1811,"context_line":"        :param group_snapshot: the GroupSnapshot object to be created."},{"line_number":1812,"context_line":"        :param snapshots: a list of Snapshot objects in the group_snapshot."},{"line_number":1813,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        param snapshots is a list of Snapshot objects. It cannot be assigned"},{"line_number":1816,"context_line":"        to snapshots_model_update. snapshots_model_update is a list of"},{"line_number":1817,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1818,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1819,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"        The driver should populate snapshots_model_update and model_update"},{"line_number":1822,"context_line":"        and return them."},{"line_number":1823,"context_line":""},{"line_number":1824,"context_line":"        The manager will check snapshots_model_update and update db accordingly"},{"line_number":1825,"context_line":"        for each snapshot. If the driver successfully deleted some snapshots"},{"line_number":1826,"context_line":"        but failed to delete others, it should set statuses of the snapshots"},{"line_number":1827,"context_line":"        accordingly so that the manager can update db correctly."},{"line_number":1828,"context_line":""},{"line_number":1829,"context_line":"        If the status in any entry of snapshots_model_update is \u0027error\u0027, the"},{"line_number":1830,"context_line":"        status in model_update will be set to the same if it is not already"},{"line_number":1831,"context_line":"        \u0027error\u0027."},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"        If the status in model_update is \u0027error\u0027, the manager will raise an"},{"line_number":1834,"context_line":"        exception and the status of group_snapshot will be set to \u0027error\u0027 in"},{"line_number":1835,"context_line":"        the db. If snapshots_model_update is not returned by the driver, the"},{"line_number":1836,"context_line":"        manager will set the status of every snapshot to \u0027error\u0027 in the except"},{"line_number":1837,"context_line":"        block."},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"        If the driver raises an exception during the operation, it will be"},{"line_number":1840,"context_line":"        caught by the try-except block in the manager and the statuses of"},{"line_number":1841,"context_line":"        group_snapshot and all snapshots will be set to \u0027error\u0027."},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"        For a successful operation, the driver can either build the"},{"line_number":1844,"context_line":"        model_update and snapshots_model_update and return them or"},{"line_number":1845,"context_line":"        return None, None. The statuses of group_snapshot and all snapshots"},{"line_number":1846,"context_line":"        will be set to \u0027available\u0027 at the end of the manager function."},{"line_number":1847,"context_line":"        \"\"\""},{"line_number":1848,"context_line":"        raise NotImplementedError()"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"    def delete_group_snapshot(self, context, group_snapshot, snapshots):"},{"line_number":1851,"context_line":"        \"\"\"Deletes a group_snapshot."},{"line_number":1852,"context_line":""},{"line_number":1853,"context_line":"        :param context: the context of the caller."},{"line_number":1854,"context_line":"        :param group_snapshot: the GroupSnapshot object to be deleted."},{"line_number":1855,"context_line":"        :param snapshots: a list of snapshot objects in the group_snapshot."},{"line_number":1856,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        param snapshots is a list of objects. It cannot be assigned to"},{"line_number":1859,"context_line":"        snapshots_model_update. snapshots_model_update is a list of of"},{"line_number":1860,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1861,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1862,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1863,"context_line":""},{"line_number":1864,"context_line":"        The driver should populate snapshots_model_update and model_update"},{"line_number":1865,"context_line":"        and return them."},{"line_number":1866,"context_line":""},{"line_number":1867,"context_line":"        The manager will check snapshots_model_update and update db accordingly"},{"line_number":1868,"context_line":"        for each snapshot. If the driver successfully deleted some snapshots"},{"line_number":1869,"context_line":"        but failed to delete others, it should set statuses of the snapshots"},{"line_number":1870,"context_line":"        accordingly so that the manager can update db correctly."},{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"        If the status in any entry of snapshots_model_update is"},{"line_number":1873,"context_line":"        \u0027error_deleting\u0027 or \u0027error\u0027, the status in model_update will be set to"},{"line_number":1874,"context_line":"        the same if it is not already \u0027error_deleting\u0027 or \u0027error\u0027."},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        If the status in model_update is \u0027error_deleting\u0027 or \u0027error\u0027, the"},{"line_number":1877,"context_line":"        manager will raise an exception and the status of group_snapshot will"},{"line_number":1878,"context_line":"        be set to \u0027error\u0027 in the db. If snapshots_model_update is not returned"},{"line_number":1879,"context_line":"        by the driver, the manager will set the status of every snapshot to"},{"line_number":1880,"context_line":"        \u0027error\u0027 in the except block."},{"line_number":1881,"context_line":""},{"line_number":1882,"context_line":"        If the driver raises an exception during the operation, it will be"},{"line_number":1883,"context_line":"        caught by the try-except block in the manager and the statuses of"},{"line_number":1884,"context_line":"        group_snapshot and all snapshots will be set to \u0027error\u0027."},{"line_number":1885,"context_line":""},{"line_number":1886,"context_line":"        For a successful operation, the driver can either build the"},{"line_number":1887,"context_line":"        model_update and snapshots_model_update and return them or"},{"line_number":1888,"context_line":"        return None, None. The statuses of group_snapshot and all snapshots"},{"line_number":1889,"context_line":"        will be set to \u0027deleted\u0027 after the manager deletes them from db."},{"line_number":1890,"context_line":"        \"\"\""},{"line_number":1891,"context_line":"        raise NotImplementedError()"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":""},{"line_number":1894,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_d23950da","line":1891,"range":{"start_line":1776,"start_character":0,"end_line":1891,"end_character":35},"in_reply_to":"fa7ab95a_87c948af","updated":"2016-08-31 12:27:23.000000000","message":"+1","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"b35f6e9a00fa7ce6981a1db442c39d923ccdc1e8","unresolved":false,"context_lines":[{"line_number":1773,"context_line":"        \"\"\""},{"line_number":1774,"context_line":"        raise NotImplementedError()"},{"line_number":1775,"context_line":""},{"line_number":1776,"context_line":"    def create_group_from_src(self, context, group, volumes,"},{"line_number":1777,"context_line":"                              group_snapshot\u003dNone, snapshots\u003dNone,"},{"line_number":1778,"context_line":"                              source_group\u003dNone, source_vols\u003dNone):"},{"line_number":1779,"context_line":"        \"\"\"Creates a group from source."},{"line_number":1780,"context_line":""},{"line_number":1781,"context_line":"        :param context: the context of the caller."},{"line_number":1782,"context_line":"        :param group: the Group object to be created."},{"line_number":1783,"context_line":"        :param volumes: a list of Volume objects in the group."},{"line_number":1784,"context_line":"        :param group_snapshot: the GroupSnapshot object as source."},{"line_number":1785,"context_line":"        :param snapshots: a list of snapshot objects in group_snapshot."},{"line_number":1786,"context_line":"        :param source_group: the Group object as source."},{"line_number":1787,"context_line":"        :param source_vols: a list of volume objects in the source_group."},{"line_number":1788,"context_line":"        :returns: model_update, volumes_model_update"},{"line_number":1789,"context_line":""},{"line_number":1790,"context_line":"        The source can be group_snapshot or a source_group."},{"line_number":1791,"context_line":""},{"line_number":1792,"context_line":"        param volumes is retrieved directly from the db. It is a list of"},{"line_number":1793,"context_line":"        cinder.db.sqlalchemy.models.Volume to be precise. It cannot be"},{"line_number":1794,"context_line":"        assigned to volumes_model_update. volumes_model_update is a list of"},{"line_number":1795,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1796,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1797,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1798,"context_line":""},{"line_number":1799,"context_line":"        To be consistent with other volume operations, the manager will"},{"line_number":1800,"context_line":"        assume the operation is successful if no exception is thrown by"},{"line_number":1801,"context_line":"        the driver. For a successful operation, the driver can either build"},{"line_number":1802,"context_line":"        the model_update and volumes_model_update and return them or"},{"line_number":1803,"context_line":"        return None, None."},{"line_number":1804,"context_line":"        \"\"\""},{"line_number":1805,"context_line":"        raise NotImplementedError()"},{"line_number":1806,"context_line":""},{"line_number":1807,"context_line":"    def create_group_snapshot(self, context, group_snapshot, snapshots):"},{"line_number":1808,"context_line":"        \"\"\"Creates a group_snapshot."},{"line_number":1809,"context_line":""},{"line_number":1810,"context_line":"        :param context: the context of the caller."},{"line_number":1811,"context_line":"        :param group_snapshot: the GroupSnapshot object to be created."},{"line_number":1812,"context_line":"        :param snapshots: a list of Snapshot objects in the group_snapshot."},{"line_number":1813,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1814,"context_line":""},{"line_number":1815,"context_line":"        param snapshots is a list of Snapshot objects. It cannot be assigned"},{"line_number":1816,"context_line":"        to snapshots_model_update. snapshots_model_update is a list of"},{"line_number":1817,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1818,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1819,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"        The driver should populate snapshots_model_update and model_update"},{"line_number":1822,"context_line":"        and return them."},{"line_number":1823,"context_line":""},{"line_number":1824,"context_line":"        The manager will check snapshots_model_update and update db accordingly"},{"line_number":1825,"context_line":"        for each snapshot. If the driver successfully deleted some snapshots"},{"line_number":1826,"context_line":"        but failed to delete others, it should set statuses of the snapshots"},{"line_number":1827,"context_line":"        accordingly so that the manager can update db correctly."},{"line_number":1828,"context_line":""},{"line_number":1829,"context_line":"        If the status in any entry of snapshots_model_update is \u0027error\u0027, the"},{"line_number":1830,"context_line":"        status in model_update will be set to the same if it is not already"},{"line_number":1831,"context_line":"        \u0027error\u0027."},{"line_number":1832,"context_line":""},{"line_number":1833,"context_line":"        If the status in model_update is \u0027error\u0027, the manager will raise an"},{"line_number":1834,"context_line":"        exception and the status of group_snapshot will be set to \u0027error\u0027 in"},{"line_number":1835,"context_line":"        the db. If snapshots_model_update is not returned by the driver, the"},{"line_number":1836,"context_line":"        manager will set the status of every snapshot to \u0027error\u0027 in the except"},{"line_number":1837,"context_line":"        block."},{"line_number":1838,"context_line":""},{"line_number":1839,"context_line":"        If the driver raises an exception during the operation, it will be"},{"line_number":1840,"context_line":"        caught by the try-except block in the manager and the statuses of"},{"line_number":1841,"context_line":"        group_snapshot and all snapshots will be set to \u0027error\u0027."},{"line_number":1842,"context_line":""},{"line_number":1843,"context_line":"        For a successful operation, the driver can either build the"},{"line_number":1844,"context_line":"        model_update and snapshots_model_update and return them or"},{"line_number":1845,"context_line":"        return None, None. The statuses of group_snapshot and all snapshots"},{"line_number":1846,"context_line":"        will be set to \u0027available\u0027 at the end of the manager function."},{"line_number":1847,"context_line":"        \"\"\""},{"line_number":1848,"context_line":"        raise NotImplementedError()"},{"line_number":1849,"context_line":""},{"line_number":1850,"context_line":"    def delete_group_snapshot(self, context, group_snapshot, snapshots):"},{"line_number":1851,"context_line":"        \"\"\"Deletes a group_snapshot."},{"line_number":1852,"context_line":""},{"line_number":1853,"context_line":"        :param context: the context of the caller."},{"line_number":1854,"context_line":"        :param group_snapshot: the GroupSnapshot object to be deleted."},{"line_number":1855,"context_line":"        :param snapshots: a list of snapshot objects in the group_snapshot."},{"line_number":1856,"context_line":"        :returns: model_update, snapshots_model_update"},{"line_number":1857,"context_line":""},{"line_number":1858,"context_line":"        param snapshots is a list of objects. It cannot be assigned to"},{"line_number":1859,"context_line":"        snapshots_model_update. snapshots_model_update is a list of of"},{"line_number":1860,"context_line":"        dictionaries. It has to be built by the driver. An entry will be"},{"line_number":1861,"context_line":"        in this format: {\u0027id\u0027: xxx, \u0027status\u0027: xxx, ......}. model_update"},{"line_number":1862,"context_line":"        will be in this format: {\u0027status\u0027: xxx, ......}."},{"line_number":1863,"context_line":""},{"line_number":1864,"context_line":"        The driver should populate snapshots_model_update and model_update"},{"line_number":1865,"context_line":"        and return them."},{"line_number":1866,"context_line":""},{"line_number":1867,"context_line":"        The manager will check snapshots_model_update and update db accordingly"},{"line_number":1868,"context_line":"        for each snapshot. If the driver successfully deleted some snapshots"},{"line_number":1869,"context_line":"        but failed to delete others, it should set statuses of the snapshots"},{"line_number":1870,"context_line":"        accordingly so that the manager can update db correctly."},{"line_number":1871,"context_line":""},{"line_number":1872,"context_line":"        If the status in any entry of snapshots_model_update is"},{"line_number":1873,"context_line":"        \u0027error_deleting\u0027 or \u0027error\u0027, the status in model_update will be set to"},{"line_number":1874,"context_line":"        the same if it is not already \u0027error_deleting\u0027 or \u0027error\u0027."},{"line_number":1875,"context_line":""},{"line_number":1876,"context_line":"        If the status in model_update is \u0027error_deleting\u0027 or \u0027error\u0027, the"},{"line_number":1877,"context_line":"        manager will raise an exception and the status of group_snapshot will"},{"line_number":1878,"context_line":"        be set to \u0027error\u0027 in the db. If snapshots_model_update is not returned"},{"line_number":1879,"context_line":"        by the driver, the manager will set the status of every snapshot to"},{"line_number":1880,"context_line":"        \u0027error\u0027 in the except block."},{"line_number":1881,"context_line":""},{"line_number":1882,"context_line":"        If the driver raises an exception during the operation, it will be"},{"line_number":1883,"context_line":"        caught by the try-except block in the manager and the statuses of"},{"line_number":1884,"context_line":"        group_snapshot and all snapshots will be set to \u0027error\u0027."},{"line_number":1885,"context_line":""},{"line_number":1886,"context_line":"        For a successful operation, the driver can either build the"},{"line_number":1887,"context_line":"        model_update and snapshots_model_update and return them or"},{"line_number":1888,"context_line":"        return None, None. The statuses of group_snapshot and all snapshots"},{"line_number":1889,"context_line":"        will be set to \u0027deleted\u0027 after the manager deletes them from db."},{"line_number":1890,"context_line":"        \"\"\""},{"line_number":1891,"context_line":"        raise NotImplementedError()"},{"line_number":1892,"context_line":""},{"line_number":1893,"context_line":""},{"line_number":1894,"context_line":"@six.add_metaclass(abc.ABCMeta)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_1281f88f","line":1891,"range":{"start_line":1776,"start_character":0,"end_line":1891,"end_character":35},"in_reply_to":"fa7ab95a_d23950da","updated":"2016-08-31 12:49:18.000000000","message":"In earlier patch sets, I had default implementation in driver.py.  Please see my previous implementation in driver.py and Eric\u0027s feedback.  To address Eric\u0027s comments, I moved the generic implementation to manager.py.  This is now similar to how generic volume migration is implemented (call driver method first, then generic method in manager.py).\n\nhttps://review.openstack.org/#/c/328052/38/cinder/volume/driver.py@1833\n\nSee generic implementation such as _create_group_from_src_generic() in manager.py.","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"}],"cinder/volume/manager.py":[{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"7da10431938d7c0a311500a48a7348b35b86d164","unresolved":false,"context_lines":[{"line_number":2685,"context_line":"                           \u0027id\u0027: group.id})"},{"line_number":2686,"context_line":"        return group"},{"line_number":2687,"context_line":""},{"line_number":2688,"context_line":"    def create_group_from_src(self, context, group,"},{"line_number":2689,"context_line":"                              group_snapshot\u003dNone, source_group\u003dNone):"},{"line_number":2690,"context_line":"        \"\"\"Creates the group from source."},{"line_number":2691,"context_line":""},{"line_number":2692,"context_line":"        The source can be a group snapshot or a source group."}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_a7e1ec00","line":2689,"range":{"start_line":2688,"start_character":0,"end_line":2689,"end_character":70},"updated":"2016-08-31 12:21:56.000000000","message":"This is the way CGs had gone, but I think we should differentiate between clone and create from snapshot like in volumes case.","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a5841e2e3e9eb69a44f14164e95ffe6828bb8cc0","unresolved":false,"context_lines":[{"line_number":3745,"context_line":"                except exception.CinderException as ex:"},{"line_number":3746,"context_line":"                    LOG.error(_LE(\"Failed updating %(snapshot_id)s\""},{"line_number":3747,"context_line":"                                  \" metadata using the provided volumes\""},{"line_number":3748,"context_line":"                                  \" %(volume_id)s metadata\"),"},{"line_number":3749,"context_line":"                              {\u0027volume_id\u0027: volume_id,"},{"line_number":3750,"context_line":"                               \u0027snapshot_id\u0027: snapshot_id})"},{"line_number":3751,"context_line":"                    snapshot.status \u003d fields.SnapshotStatus.ERROR"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_88541b22","line":3748,"range":{"start_line":3748,"start_character":57,"end_line":3748,"end_character":59},"updated":"2016-08-31 00:27:16.000000000","message":"Suggest \u0027.\u0027 here for consistency.","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a5841e2e3e9eb69a44f14164e95ffe6828bb8cc0","unresolved":false,"context_lines":[{"line_number":3760,"context_line":"        group_snapshot.status \u003d \u0027available\u0027"},{"line_number":3761,"context_line":"        group_snapshot.save()"},{"line_number":3762,"context_line":""},{"line_number":3763,"context_line":"        LOG.info(_LI(\"group_snapshot %s: created successfully\"),"},{"line_number":3764,"context_line":"                 group_snapshot.id)"},{"line_number":3765,"context_line":"        self._notify_about_group_snapshot_usage("},{"line_number":3766,"context_line":"            context, group_snapshot, \"create.end\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_e83927f4","line":3763,"range":{"start_line":3763,"start_character":60,"end_line":3763,"end_character":62},"updated":"2016-08-31 00:27:16.000000000","message":"Suggest \u0027.\u0027 here for consistency.","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"a5841e2e3e9eb69a44f14164e95ffe6828bb8cc0","unresolved":false,"context_lines":[{"line_number":3916,"context_line":"        context \u003d context.elevated()"},{"line_number":3917,"context_line":"        project_id \u003d group_snapshot.project_id"},{"line_number":3918,"context_line":""},{"line_number":3919,"context_line":"        LOG.info(_LI(\"group_snapshot %s: deleting\"), group_snapshot.id)"},{"line_number":3920,"context_line":""},{"line_number":3921,"context_line":"        snapshots \u003d objects.SnapshotList.get_all_for_group_snapshot("},{"line_number":3922,"context_line":"            context, group_snapshot.id)"}],"source_content_type":"text/x-python","patch_set":10,"id":"fa7ab95a_e810475c","line":3919,"range":{"start_line":3919,"start_character":49,"end_line":3919,"end_character":50},"updated":"2016-08-31 00:27:16.000000000","message":"Same here.","commit_id":"4a67bc8218abe92883f0f6703bda81fb80b30a4d"}]}
