)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4457e5780c3e4629f812e263bb21abc748e38472","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and RAID types per volume. The driver currently only uses the"},{"line_number":12,"context_line":"default Storage Profile configured for the Cinder user account."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch adds the capability to use different Storage Profiles"},{"line_number":15,"context_line":"by using extra specs to allow the creation of different volume"},{"line_number":16,"context_line":"types for the desired profiles."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_cbe09dfd","line":14,"updated":"2015-06-19 09:33:06.000000000","message":"I think this is a new feature and requires a blueprint.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"920bfa8067888a1d085e289d5fb181fb09167ec2","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and RAID types per volume. The driver currently only uses the"},{"line_number":12,"context_line":"default Storage Profile configured for the Cinder user account."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch adds the capability to use different Storage Profiles"},{"line_number":15,"context_line":"by using extra specs to allow the creation of different volume"},{"line_number":16,"context_line":"types for the desired profiles."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_a2d9b385","line":14,"in_reply_to":"fa32b979_2ccb5c20","updated":"2015-06-19 12:24:24.000000000","message":"Thanks for this link which we can cite often :)\n\nCould you please take a look at https://review.openstack.org/#/c/186664/\n\nDo we need a blueprint for this (in your opinion)?","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cd3188ee0d1b9eebaf7cadb61ffa7ddbb48b236e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"and RAID types per volume. The driver currently only uses the"},{"line_number":12,"context_line":"default Storage Profile configured for the Cinder user account."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This patch adds the capability to use different Storage Profiles"},{"line_number":15,"context_line":"by using extra specs to allow the creation of different volume"},{"line_number":16,"context_line":"types for the desired profiles."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"fa32b979_2ccb5c20","line":14,"in_reply_to":"fa32b979_cbe09dfd","updated":"2015-06-19 12:05:15.000000000","message":"A minor driver change does not require a blueprint:\n\n\"blueprints are used to track the implementation of significant features in OpenStack\"\n\nhttps://wiki.openstack.org/wiki/Blueprints\n\nOur marketing might consider this a \"significant feature in OpenStack\", but I doubt anyone else would. :)","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":16,"context_line":"types for the desired profiles."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DocImpact"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Icf76fceca5a0ae20bb08b276b0c41ef6cdb31087"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_d3584b8d","line":19,"updated":"2015-06-19 13:45:24.000000000","message":"Can you open a bug to keep track of this change?","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e768792297328e4d004de7d854466084a5825820","unresolved":false,"context_lines":[{"line_number":16,"context_line":"types for the desired profiles."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DocImpact"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Icf76fceca5a0ae20bb08b276b0c41ef6cdb31087"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_1313100f","line":19,"in_reply_to":"fa32b979_cee500dd","updated":"2015-06-19 14:48:49.000000000","message":"I think Mike usually wants this to be tracked with a blueprint.  I\u0027ll leave that to you though.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9cdd35a70a336d777f1b6891c4b1e090f074900d","unresolved":false,"context_lines":[{"line_number":16,"context_line":"types for the desired profiles."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"DocImpact"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Change-Id: Icf76fceca5a0ae20bb08b276b0c41ef6cdb31087"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa32b979_cee500dd","line":19,"in_reply_to":"fa32b979_d3584b8d","updated":"2015-06-19 14:00:59.000000000","message":"Based on past discussions, this wouldn\u0027t be an appropriate use of a bug report. There is not a \"bug\" here per se, just the addition of a new option for the driver.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"}],"cinder/tests/unit/test_dellscapi.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                                       mock_init):"},{"line_number":1801,"context_line":"        # Test case where _find_volume_folder returns none"},{"line_number":1802,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Blah\")"},{"line_number":1803,"context_line":"        self.assertIsNone(res, \u0027Expected None\u0027)"},{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1806,"context_line":"                       \u0027_get_json\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_b3226700","line":1803,"updated":"2015-06-19 13:45:24.000000000","message":"self.assertIsNone(res)","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e768792297328e4d004de7d854466084a5825820","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                                       mock_init):"},{"line_number":1801,"context_line":"        # Test case where _find_volume_folder returns none"},{"line_number":1802,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Blah\")"},{"line_number":1803,"context_line":"        self.assertIsNone(res, \u0027Expected None\u0027)"},{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1806,"context_line":"                       \u0027_get_json\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_b0f7ba8b","line":1803,"in_reply_to":"fa32b979_2e16eca7","updated":"2015-06-19 14:48:49.000000000","message":"You are right.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9cdd35a70a336d777f1b6891c4b1e090f074900d","unresolved":false,"context_lines":[{"line_number":1800,"context_line":"                                       mock_init):"},{"line_number":1801,"context_line":"        # Test case where _find_volume_folder returns none"},{"line_number":1802,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Blah\")"},{"line_number":1803,"context_line":"        self.assertIsNone(res, \u0027Expected None\u0027)"},{"line_number":1804,"context_line":""},{"line_number":1805,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1806,"context_line":"                       \u0027_get_json\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_2e16eca7","line":1803,"in_reply_to":"fa32b979_b3226700","updated":"2015-06-19 14:00:59.000000000","message":"These are correct. There is an optional string you can pass that is printed on assertion failure to allow a description of the failure.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":1816,"context_line":"                                       mock_init):"},{"line_number":1817,"context_line":"        # Test case where _find_storage_profile returns none"},{"line_number":1818,"context_line":"        res \u003d self.scapi._find_storage_profile(None)"},{"line_number":1819,"context_line":"        self.assertIsNone(res, \u0027Expected None\u0027)"},{"line_number":1820,"context_line":""},{"line_number":1821,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1822,"context_line":"                       \u0027_get_json\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_b3cd875f","line":1819,"updated":"2015-06-19 13:45:24.000000000","message":"assertIsNone only takes one parameter.\n\nself.assertIsNone(res)","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":1832,"context_line":"                                  mock_init):"},{"line_number":1833,"context_line":"        # Test case where requested name is cased"},{"line_number":1834,"context_line":"        res \u003d self.scapi._find_storage_profile(\"HighPriority\")"},{"line_number":1835,"context_line":"        self.assertIsNotNone(res, \u0027Expected matching storage profile!\u0027)"},{"line_number":1836,"context_line":"        self.assertEqual(\u002764158.2\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1837,"context_line":"        # Test case where requested name is lower case"},{"line_number":1838,"context_line":"        res \u003d self.scapi._find_storage_profile(\"recommended\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_933e4328","line":1835,"updated":"2015-06-19 13:45:24.000000000","message":"Same","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"        self.assertEqual(\u002764158.2\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1837,"context_line":"        # Test case where requested name is lower case"},{"line_number":1838,"context_line":"        res \u003d self.scapi._find_storage_profile(\"recommended\")"},{"line_number":1839,"context_line":"        self.assertIsNotNone(res, \u0027Expected matching storage profile!\u0027)"},{"line_number":1840,"context_line":"        self.assertEqual(\u002764158.1\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1841,"context_line":"        # Test case where full complete name is used with spaces"},{"line_number":1842,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Medium Priority\")"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_d3fccb74","line":1839,"updated":"2015-06-19 13:45:24.000000000","message":"Same","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":1840,"context_line":"        self.assertEqual(\u002764158.1\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1841,"context_line":"        # Test case where full complete name is used with spaces"},{"line_number":1842,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Medium Priority\")"},{"line_number":1843,"context_line":"        self.assertIsNotNone(res, \u0027Expected matching storage profile!\u0027)"},{"line_number":1844,"context_line":"        self.assertEqual(\u002764158.3\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1845,"context_line":""},{"line_number":1846,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_13031378","line":1843,"updated":"2015-06-19 13:45:24.000000000","message":"Same","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2d5d713c27470813389300b927f6b28a73e01ee4","unresolved":false,"context_lines":[{"line_number":1824,"context_line":"    @mock.patch.object(dell_storagecenter_api.HttpClient,"},{"line_number":1825,"context_line":"                       \u0027post\u0027,"},{"line_number":1826,"context_line":"                       return_value\u003dRESPONSE_200)"},{"line_number":1827,"context_line":"    def test_find_storage_profile(self,"},{"line_number":1828,"context_line":"                                  mock_json,"},{"line_number":1829,"context_line":"                                  mock_find_folder,"},{"line_number":1830,"context_line":"                                  mock_close_connection,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_3be134ff","line":1827,"updated":"2015-06-20 10:10:34.000000000","message":"This should be broken out as three separate tests.\n\nTo avoid code replication, you can use ddt.\n\nSee e.g. cinder/tests/unit/volume/drivers/netapp/eseries/test_library.py","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"554aeadcc0e25f7fb394a36b4388fdf73f1f98f7","unresolved":false,"context_lines":[{"line_number":1824,"context_line":"    @mock.patch.object(dell_storagecenter_api.HttpClient,"},{"line_number":1825,"context_line":"                       \u0027post\u0027,"},{"line_number":1826,"context_line":"                       return_value\u003dRESPONSE_200)"},{"line_number":1827,"context_line":"    def test_find_storage_profile(self,"},{"line_number":1828,"context_line":"                                  mock_json,"},{"line_number":1829,"context_line":"                                  mock_find_folder,"},{"line_number":1830,"context_line":"                                  mock_close_connection,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_2f400a07","line":1827,"in_reply_to":"fa32b979_3be134ff","updated":"2015-06-20 20:57:33.000000000","message":"Thanks for the point on ddt. That\u0027s perfect.\nI normally subscribe to the one assertion per unit test camp, and this originally was that way, but expanded in a later patch to show more options. Much simpler with ddt.","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"},{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"7ff9fdebb5679cd0a5b60015e5f1f37e0b33eeb6","unresolved":false,"context_lines":[{"line_number":1842,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Medium Priority\")"},{"line_number":1843,"context_line":"        self.assertIsNotNone(res, \u0027Expected matching storage profile!\u0027)"},{"line_number":1844,"context_line":"        self.assertEqual(\u002764158.3\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1845,"context_line":""},{"line_number":1846,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1847,"context_line":"                       \u0027_create_folder_path\u0027,"},{"line_number":1848,"context_line":"                       return_value\u003dFLDR)"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_c6ae39e7","line":1845,"updated":"2015-06-19 21:40:58.000000000","message":"Do we want to be yelling?","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b009405134b8b6c044d81dfbcd5eff110b3a59a7","unresolved":false,"context_lines":[{"line_number":1802,"context_line":"                                       mock_init):"},{"line_number":1803,"context_line":"        # Test case where _find_volume_folder returns none"},{"line_number":1804,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Blah\")"},{"line_number":1805,"context_line":"        self.assertIsNone(res, \u0027Expected None\u0027)"},{"line_number":1806,"context_line":""},{"line_number":1807,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1808,"context_line":"                       \u0027_get_json\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_7926b217","line":1805,"updated":"2015-06-22 20:09:52.000000000","message":"Message \u0027Expected None\u0027 is not useful and should be removed. The same comment for the tests below","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"fcc6df7534bc0d0d7af1837a9697e285b0ef3719","unresolved":false,"context_lines":[{"line_number":1802,"context_line":"                                       mock_init):"},{"line_number":1803,"context_line":"        # Test case where _find_volume_folder returns none"},{"line_number":1804,"context_line":"        res \u003d self.scapi._find_storage_profile(\"Blah\")"},{"line_number":1805,"context_line":"        self.assertIsNone(res, \u0027Expected None\u0027)"},{"line_number":1806,"context_line":""},{"line_number":1807,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1808,"context_line":"                       \u0027_get_json\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_d46f83fa","line":1805,"in_reply_to":"fa32b979_7926b217","updated":"2015-06-22 20:49:16.000000000","message":"Done","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b009405134b8b6c044d81dfbcd5eff110b3a59a7","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"                                  mock_init):"},{"line_number":1837,"context_line":"        res \u003d self.scapi._find_storage_profile(value)"},{"line_number":1838,"context_line":"        self.assertIsNotNone(res, \u0027Expected matching storage profile!\u0027)"},{"line_number":1839,"context_line":"        self.assertEqual(\u002764158.2\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1840,"context_line":""},{"line_number":1841,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1842,"context_line":"                       \u0027_create_folder_path\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_b9599a90","line":1839,"updated":"2015-06-22 20:09:52.000000000","message":"Please, create constants for magic numbers in lines #1829 and #1991.","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"fcc6df7534bc0d0d7af1837a9697e285b0ef3719","unresolved":false,"context_lines":[{"line_number":1836,"context_line":"                                  mock_init):"},{"line_number":1837,"context_line":"        res \u003d self.scapi._find_storage_profile(value)"},{"line_number":1838,"context_line":"        self.assertIsNotNone(res, \u0027Expected matching storage profile!\u0027)"},{"line_number":1839,"context_line":"        self.assertEqual(\u002764158.2\u0027, res.get(\u0027instanceId\u0027))"},{"line_number":1840,"context_line":""},{"line_number":1841,"context_line":"    @mock.patch.object(dell_storagecenter_api.StorageCenterApi,"},{"line_number":1842,"context_line":"                       \u0027_create_folder_path\u0027,"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_94725be2","line":1839,"in_reply_to":"fa32b979_b9599a90","updated":"2015-06-22 20:49:16.000000000","message":"Done (sorta)","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"}],"cinder/volume/drivers/dell/dell_storagecenter_api.py":[{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"57f6c101e986917de3e9270595a19c1ee8e8b029","unresolved":false,"context_lines":[{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        :param storage_profile: The Storage Profile name to find with any"},{"line_number":512,"context_line":"                                spaces stripped."},{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if storage_profile is None:"},{"line_number":516,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_94587f8b","line":513,"updated":"2015-06-19 04:35:07.000000000","message":"Returns storage_profile \"name\", not the whole object.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4457e5780c3e4629f812e263bb21abc748e38472","unresolved":false,"context_lines":[{"line_number":510,"context_line":""},{"line_number":511,"context_line":"        :param storage_profile: The Storage Profile name to find with any"},{"line_number":512,"context_line":"                                spaces stripped."},{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if storage_profile is None:"},{"line_number":516,"context_line":"            return None"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_eb1001ae","line":513,"in_reply_to":"fa32b979_94587f8b","updated":"2015-06-19 09:33:06.000000000","message":"No, it\u0027s returning the object.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"57f6c101e986917de3e9270595a19c1ee8e8b029","unresolved":false,"context_lines":[{"line_number":530,"context_line":"            for profile in profiles:"},{"line_number":531,"context_line":"                # Look for the stripped, case insensitive match"},{"line_number":532,"context_line":"                name \u003d profile.get(\u0027name\u0027, \u0027\u0027).replace(\u0027 \u0027, \u0027\u0027).lower()"},{"line_number":533,"context_line":"                if name \u003d\u003d storage_profile:"},{"line_number":534,"context_line":"                    return profile"},{"line_number":535,"context_line":"        return None"},{"line_number":536,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_344893b2","line":533,"updated":"2015-06-19 04:35:07.000000000","message":"Suggestion: You can return true or false since you are searching if the given \"storage profile\" is available on the array or not.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4457e5780c3e4629f812e263bb21abc748e38472","unresolved":false,"context_lines":[{"line_number":530,"context_line":"            for profile in profiles:"},{"line_number":531,"context_line":"                # Look for the stripped, case insensitive match"},{"line_number":532,"context_line":"                name \u003d profile.get(\u0027name\u0027, \u0027\u0027).replace(\u0027 \u0027, \u0027\u0027).lower()"},{"line_number":533,"context_line":"                if name \u003d\u003d storage_profile:"},{"line_number":534,"context_line":"                    return profile"},{"line_number":535,"context_line":"        return None"},{"line_number":536,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_6b25d108","line":533,"in_reply_to":"fa32b979_344893b2","updated":"2015-06-19 09:33:06.000000000","message":"The profile ID is required later on.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4457e5780c3e4629f812e263bb21abc748e38472","unresolved":false,"context_lines":[{"line_number":534,"context_line":"                    return profile"},{"line_number":535,"context_line":"        return None"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"    def create_volume(self, name, size, storage_profile\u003dNone):"},{"line_number":538,"context_line":"        \u0027\u0027\u0027Creates a new volume on the Storage Center."},{"line_number":539,"context_line":""},{"line_number":540,"context_line":"        It will create it in a folder called self.vfname.  If self.vfname"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_8b505560","line":537,"updated":"2015-06-19 09:33:06.000000000","message":"storage_profile -\u003e profile_name or storage_profile_name ?","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"4457e5780c3e4629f812e263bb21abc748e38472","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":569,"context_line":"                _(\u0027Storage Profile %s not found.\u0027) % storage_profile)"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_cb5dfd7a","line":567,"updated":"2015-06-19 09:33:06.000000000","message":"if storage_profile:\n  profile \u003d self._find_storage_profile(storage_profile)\n  if profile is None:\n      raise","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":9171,"name":"Vipin Balachandran","email":"vipin.bl@gmail.com","username":"vbala"},"change_message_id":"920bfa8067888a1d085e289d5fb181fb09167ec2","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":569,"context_line":"                _(\u0027Storage Profile %s not found.\u0027) % storage_profile)"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_02fe5f05","line":567,"in_reply_to":"fa32b979_6ce1649a","updated":"2015-06-19 12:24:24.000000000","message":"I had this question while reading the code initially:\n\"Why would we need to call a helper to find the profile object corresponding to an empty name?\"","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cd3188ee0d1b9eebaf7cadb61ffa7ddbb48b236e","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":569,"context_line":"                _(\u0027Storage Profile %s not found.\u0027) % storage_profile)"},{"line_number":570,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_6ce1649a","line":567,"in_reply_to":"fa32b979_cb5dfd7a","updated":"2015-06-19 12:05:15.000000000","message":"profile is checked later, so that would actually require setting profile \u003d None ahead of time. Since _find_storage_profile will just return None if storage_profile is None it is more readable and concise like this IMO.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":14377,"name":"Apoorva","email":"apps.desh@gmail.com","username":"apoorvad"},"change_message_id":"57f6c101e986917de3e9270595a19c1ee8e8b029","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        if folder is not None:"},{"line_number":581,"context_line":"            payload[\u0027VolumeFolder\u0027] \u003d self._get_id(folder)"},{"line_number":582,"context_line":"        if profile:"},{"line_number":583,"context_line":"            payload[\u0027StorageProfile\u0027] \u003d self._get_id(profile)"},{"line_number":584,"context_line":"        r \u003d self.client.post(\u0027StorageCenter/ScVolume\u0027,"},{"line_number":585,"context_line":"                             payload)"},{"line_number":586,"context_line":"        if r.status_code \u003d\u003d 201:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_b4a02343","line":583,"updated":"2015-06-19 04:35:07.000000000","message":"\"profile\" would potentially have spaces. hope that\u0027s ok for the use.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"cd3188ee0d1b9eebaf7cadb61ffa7ddbb48b236e","unresolved":false,"context_lines":[{"line_number":580,"context_line":"        if folder is not None:"},{"line_number":581,"context_line":"            payload[\u0027VolumeFolder\u0027] \u003d self._get_id(folder)"},{"line_number":582,"context_line":"        if profile:"},{"line_number":583,"context_line":"            payload[\u0027StorageProfile\u0027] \u003d self._get_id(profile)"},{"line_number":584,"context_line":"        r \u003d self.client.post(\u0027StorageCenter/ScVolume\u0027,"},{"line_number":585,"context_line":"                             payload)"},{"line_number":586,"context_line":"        if r.status_code \u003d\u003d 201:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa32b979_eca2544b","line":583,"in_reply_to":"fa32b979_b4a02343","updated":"2015-06-19 12:05:15.000000000","message":"Yes, actually naming does not matter at this point.","commit_id":"b3bd8f02542b11724dc4c09b98af6471d3a75c66"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                                spaces stripped."},{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if storage_profile is None:"},{"line_number":516,"context_line":"            return None"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        # Since we are stripping out spaces for convenience we are not"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_93c3a38a","line":515,"updated":"2015-06-19 13:45:24.000000000","message":"if not storage_profile:","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9cdd35a70a336d777f1b6891c4b1e090f074900d","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                                spaces stripped."},{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if storage_profile is None:"},{"line_number":516,"context_line":"            return None"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        # Since we are stripping out spaces for convenience we are not"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_cecf4028","line":515,"in_reply_to":"fa32b979_93c3a38a","updated":"2015-06-19 14:00:59.000000000","message":"Either syntax is appropriate, but I know we\u0027ve pushed the \"is None\" or \"is not None\" in the past because it reads a little better.\n\nIf you feel strongly about it I can certainly change it.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e768792297328e4d004de7d854466084a5825820","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                                spaces stripped."},{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if storage_profile is None:"},{"line_number":516,"context_line":"            return None"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        # Since we are stripping out spaces for convenience we are not"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_d0503e61","line":515,"in_reply_to":"fa32b979_cecf4028","updated":"2015-06-19 14:48:49.000000000","message":"I understand either syntax is correct.  I got the comment all the time to use \"if not xxx\" though.  \"if not storage_profile\" will allow you to cover more cases in addition to \"None\".\n\nI don\u0027t think this is something that has to be changed. So I\u0027m okay to leave it as is.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"be611ef7c113acac81298beb22d2f8c597226803","unresolved":false,"context_lines":[{"line_number":512,"context_line":"                                spaces stripped."},{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if storage_profile is None:"},{"line_number":516,"context_line":"            return None"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        # Since we are stripping out spaces for convenience we are not"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_593539f5","line":515,"in_reply_to":"fa32b979_d0503e61","updated":"2015-06-19 15:19:45.000000000","message":"Ah, very good point. I will update this. Thanks!","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":569,"context_line":"                _(\u0027Storage Profile %s not found.\u0027) % storage_profile)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        # Init our return."},{"line_number":572,"context_line":"        scvolume \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_73c4df5e","line":569,"updated":"2015-06-19 13:45:24.000000000","message":"raise exception.VolumeBackendAPIException(data\u003dmessage)","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9cdd35a70a336d777f1b6891c4b1e090f074900d","unresolved":false,"context_lines":[{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":569,"context_line":"                _(\u0027Storage Profile %s not found.\u0027) % storage_profile)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        # Init our return."},{"line_number":572,"context_line":"        scvolume \u003d None"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_ce42e068","line":569,"in_reply_to":"fa32b979_73c4df5e","updated":"2015-06-19 14:00:59.000000000","message":"That is cleaner, I\u0027ll get that updated.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2d5d713c27470813389300b927f6b28a73e01ee4","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        if folder is not None:"},{"line_number":582,"context_line":"            payload[\u0027VolumeFolder\u0027] \u003d self._get_id(folder)"},{"line_number":583,"context_line":"        if profile:"},{"line_number":584,"context_line":"            payload[\u0027StorageProfile\u0027] \u003d self._get_id(profile)"},{"line_number":585,"context_line":"        r \u003d self.client.post(\u0027StorageCenter/ScVolume\u0027,"},{"line_number":586,"context_line":"                             payload)"},{"line_number":587,"context_line":"        if r.status_code \u003d\u003d 201:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_db94c845","line":584,"updated":"2015-06-20 10:10:34.000000000","message":"I don\u0027t see a unit test for the positive profile case.  It would check that self.client.post was called with the right payload.","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"554aeadcc0e25f7fb394a36b4388fdf73f1f98f7","unresolved":false,"context_lines":[{"line_number":581,"context_line":"        if folder is not None:"},{"line_number":582,"context_line":"            payload[\u0027VolumeFolder\u0027] \u003d self._get_id(folder)"},{"line_number":583,"context_line":"        if profile:"},{"line_number":584,"context_line":"            payload[\u0027StorageProfile\u0027] \u003d self._get_id(profile)"},{"line_number":585,"context_line":"        r \u003d self.client.post(\u0027StorageCenter/ScVolume\u0027,"},{"line_number":586,"context_line":"                             payload)"},{"line_number":587,"context_line":"        if r.status_code \u003d\u003d 201:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_ef4a2227","line":584,"in_reply_to":"fa32b979_db94c845","updated":"2015-06-20 20:57:33.000000000","message":"Yeah, skipped that since I didn\u0027t think it was much value. Will add it though.","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b009405134b8b6c044d81dfbcd5eff110b3a59a7","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if not storage_profile:"},{"line_number":516,"context_line":"            return None"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        # Since we are stripping out spaces for convenience we are not"},{"line_number":519,"context_line":"        # able to just filter on name. Need to get all Storage Profiles"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_79ceb284","line":516,"updated":"2015-06-22 20:09:52.000000000","message":"Should we add default value (None) to storage_profile param?","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"fcc6df7534bc0d0d7af1837a9697e285b0ef3719","unresolved":false,"context_lines":[{"line_number":513,"context_line":"        :returns: The Storage Profile object or None."},{"line_number":514,"context_line":"        \u0027\u0027\u0027"},{"line_number":515,"context_line":"        if not storage_profile:"},{"line_number":516,"context_line":"            return None"},{"line_number":517,"context_line":""},{"line_number":518,"context_line":"        # Since we are stripping out spaces for convenience we are not"},{"line_number":519,"context_line":"        # able to just filter on name. Need to get all Storage Profiles"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_f6340cdf","line":516,"in_reply_to":"fa32b979_79ceb284","updated":"2015-06-22 20:49:16.000000000","message":"We shouldn\u0027t need to. We are always passing in something.","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b009405134b8b6c044d81dfbcd5eff110b3a59a7","unresolved":false,"context_lines":[{"line_number":526,"context_line":"            \u0027StorageCenter/ScStorageProfile/GetList\u0027, pf.payload)"},{"line_number":527,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":528,"context_line":"            profiles \u003d self._get_json(r)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"            for profile in profiles:"},{"line_number":531,"context_line":"                # Look for the stripped, case insensitive match"},{"line_number":532,"context_line":"                name \u003d profile.get(\u0027name\u0027, \u0027\u0027).replace(\u0027 \u0027, \u0027\u0027).lower()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_b9819afd","line":529,"updated":"2015-06-22 20:09:52.000000000","message":"Please, remove empty line here","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"fcc6df7534bc0d0d7af1837a9697e285b0ef3719","unresolved":false,"context_lines":[{"line_number":526,"context_line":"            \u0027StorageCenter/ScStorageProfile/GetList\u0027, pf.payload)"},{"line_number":527,"context_line":"        if r.status_code \u003d\u003d 200:"},{"line_number":528,"context_line":"            profiles \u003d self._get_json(r)"},{"line_number":529,"context_line":""},{"line_number":530,"context_line":"            for profile in profiles:"},{"line_number":531,"context_line":"                # Look for the stripped, case insensitive match"},{"line_number":532,"context_line":"                name \u003d profile.get(\u0027name\u0027, \u0027\u0027).replace(\u0027 \u0027, \u0027\u0027).lower()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_163090e7","line":529,"in_reply_to":"fa32b979_b9819afd","updated":"2015-06-22 20:49:16.000000000","message":"Done","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"b009405134b8b6c044d81dfbcd5eff110b3a59a7","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            msg \u003d _(\u0027Storage Profile %s not found.\u0027) % storage_profile"},{"line_number":569,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":570,"context_line":"                data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_b9fd1a70","line":567,"updated":"2015-06-22 20:09:52.000000000","message":"You don\u0027t need to check storage_profile here. \u0027profile\u0027 will be always None in case if \u0027storage_profile\u003dNone\u0027","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"e6f977ae45f15f2fe32df42dcc038e8f74cad4f4","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            msg \u003d _(\u0027Storage Profile %s not found.\u0027) % storage_profile"},{"line_number":569,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":570,"context_line":"                data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_99129308","line":567,"in_reply_to":"fa32b979_19b52330","updated":"2015-06-22 21:07:22.000000000","message":"Right, that\u0027s in the call to look up the profile. If storage_profile is None then that will return None right away. That\u0027s the good path and this if block will immediately evaluate to false and go on.\n\nIf storage_profile is not None, the call in to that function will get past that check and actually query the array to find the profile. If it finds it, it will be returned and again this check will evaluate to false and move on.\n\nThe tricky part will be if storage_profile is not None (and gets by that check) but fails to actually find a matching profile on the array. In that case storage_profile will not be None but profile will be None. That\u0027s the condition this if statement is checking for. If a storage_profile has been specified but the profile was not found, then we want to raise the exception.\n\nMake sense?","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":12112,"name":"Tom Swanson","email":"tom_swanson@dell.com","username":"tomswanson"},"change_message_id":"3a32952a8f56aec55d8cae9874ed3d0fba3c11e8","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            msg \u003d _(\u0027Storage Profile %s not found.\u0027) % storage_profile"},{"line_number":569,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":570,"context_line":"                data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_59cacb6f","line":567,"in_reply_to":"fa32b979_19b52330","updated":"2015-06-22 21:20:37.000000000","message":"profile being None is only an error if storage_profile is not none.  So he only wants to raise an exception if there should have been a profile that wasn\u0027t found.","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"fcc6df7534bc0d0d7af1837a9697e285b0ef3719","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            msg \u003d _(\u0027Storage Profile %s not found.\u0027) % storage_profile"},{"line_number":569,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":570,"context_line":"                data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_d677889d","line":567,"in_reply_to":"fa32b979_b9fd1a70","updated":"2015-06-22 20:49:16.000000000","message":"Actually I do. This is checking for the error condition that a storage_profile was passed in, but we failed to find the actual profile.","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8636b500fd83b6d65a3a183b943e05654f53455d","unresolved":false,"context_lines":[{"line_number":564,"context_line":""},{"line_number":565,"context_line":"        # See if we need a storage profile"},{"line_number":566,"context_line":"        profile \u003d self._find_storage_profile(storage_profile)"},{"line_number":567,"context_line":"        if storage_profile and profile is None:"},{"line_number":568,"context_line":"            msg \u003d _(\u0027Storage Profile %s not found.\u0027) % storage_profile"},{"line_number":569,"context_line":"            raise exception.VolumeBackendAPIException("},{"line_number":570,"context_line":"                data\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_19b52330","line":567,"in_reply_to":"fa32b979_d677889d","updated":"2015-06-22 21:02:37.000000000","message":"Sean, I mean that you check storage_profile in line #515, so you could check only \u0027profile\u0027 here","commit_id":"f943b194ec97e56c3497b5392200d2966afcb3d0"}],"cinder/volume/drivers/dell/dell_storagecenter_common.py":[{"author":{"_account_id":9003,"name":"Tom Barron","email":"tpb@dyncloud.net","username":"tbarron"},"change_message_id":"2d5d713c27470813389300b927f6b28a73e01ee4","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        with self._client.open_connection() as api:"},{"line_number":88,"context_line":"            api.find_sc()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _get_volume_extra_specs(self, volume):"},{"line_number":91,"context_line":"        \u0027\u0027\u0027Gets extra specs for the given volume.\u0027\u0027\u0027"},{"line_number":92,"context_line":"        type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":93,"context_line":"        if type_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_9b9e4062","line":90,"updated":"2015-06-20 10:10:34.000000000","message":"This seems like a useful method.  Would you consider moving it to the volume_types module?","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"554aeadcc0e25f7fb394a36b4388fdf73f1f98f7","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        with self._client.open_connection() as api:"},{"line_number":88,"context_line":"            api.find_sc()"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"    def _get_volume_extra_specs(self, volume):"},{"line_number":91,"context_line":"        \u0027\u0027\u0027Gets extra specs for the given volume.\u0027\u0027\u0027"},{"line_number":92,"context_line":"        type_id \u003d volume.get(\u0027volume_type_id\u0027)"},{"line_number":93,"context_line":"        if type_id:"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa32b979_4fb8eee5","line":90,"in_reply_to":"fa32b979_9b9e4062","updated":"2015-06-20 20:57:33.000000000","message":"The exiting volume_types.get_volume_type_extra_specs call could probably be enhanced to check for null for the type_id, but that\u0027s all this call really adds to what\u0027s already there.\n\nIt could be argued I\u0027m sure that this is never null except in my artificial unit test scenarios, but I think it\u0027s good protection anyway. Not sure if it\u0027s worth modifying the common call for this in case someone else is expecting different behavior.","commit_id":"bf6950e17718fa3ca2ad3b55d22817fa03bd6e07"}],"cinder/volume/drivers/dell/dell_storagecenter_fc.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d4b5b26dd3f165b13ad2e03c9ac5ebc66477a1d0","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        volume_driver\u003dcinder.volume.drivers.dell.DellStorageCenterFCDriver"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    Version history:"},{"line_number":38,"context_line":"        1.0.0 - Initial driver"},{"line_number":39,"context_line":"        1.0.3 - Added extra spec support for Storage Profile selection"},{"line_number":40,"context_line":"    \u0027\u0027\u0027"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_f3a8efdd","line":38,"updated":"2015-06-19 13:45:24.000000000","message":"What happened to 1.0.1 and 1.0.2?","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"},{"author":{"_account_id":11904,"name":"Sean McGinnis","email":"sean.mcginnis@gmail.com","username":"SeanM"},"change_message_id":"9cdd35a70a336d777f1b6891c4b1e090f074900d","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        volume_driver\u003dcinder.volume.drivers.dell.DellStorageCenterFCDriver"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    Version history:"},{"line_number":38,"context_line":"        1.0.0 - Initial driver"},{"line_number":39,"context_line":"        1.0.3 - Added extra spec support for Storage Profile selection"},{"line_number":40,"context_line":"    \u0027\u0027\u0027"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_4e057012","line":38,"in_reply_to":"fa32b979_f3a8efdd","updated":"2015-06-19 14:00:59.000000000","message":"We weren\u0027t very good about listing revision history up until now. Just adding these comments now and will make sure we keep a log of changes going forward.","commit_id":"653ba65f3af7d49feb6d06f193ac551de6b8a26a"}]}
