)]}'
{"nova/objects/fields.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a80e10535c02a6f598f19694d6a25d4e65029e4d","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova import exception"},{"line_number":22,"context_line":"from nova.i18n import _"},{"line_number":23,"context_line":"from nova.network import model as network_model"},{"line_number":24,"context_line":"import nova.objects"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# Import field errors from oslo.versionedobjects"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_f2d61e26","line":24,"updated":"2017-03-08 00:25:08.000000000","message":"Why not:\n\n from nova import objects\n\n? That\u0027s the more common convention and saves you precious columns elsewhere.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2675ec3a2195dee80bcdc28a582aec73d4eb0ca6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from nova import exception"},{"line_number":22,"context_line":"from nova.i18n import _"},{"line_number":23,"context_line":"from nova.network import model as network_model"},{"line_number":24,"context_line":"import nova.objects"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"# Import field errors from oslo.versionedobjects"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_c816a254","line":24,"in_reply_to":"9a30ddce_f2d61e26","updated":"2017-03-08 23:32:59.000000000","message":"Thought it would introduce a circular import. It doesn\u0027t. :) Changed.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"3dbba3a668d477d1b2240ffb0913c4221117ac85","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d nova.objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_0f82c452","line":479,"range":{"start_line":479,"start_character":8,"end_line":479,"end_character":43},"updated":"2017-03-07 16:08:21.000000000","message":"This should be generic, and sometimes the name being passed will be \u0027FOO\u0027, and sometimes \u0027CUSTOM_FOO\u0027. If `norm_name` already begins with CUSTOM_, we should leave it as-is.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"8aaa7979b3f665b03febdd781eff481fe265b3e5","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d nova.objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_a2f62fd5","line":479,"range":{"start_line":479,"start_character":8,"end_line":479,"end_character":43},"in_reply_to":"9a30ddce_0f82c452","updated":"2017-03-07 16:17:50.000000000","message":"No, we specifically decided *not* to do that. Dan can elaborate but essentially we said \"drivers are responsible for  *either* calling this normalize method (in which case the driver can strip the CUSTOM_ prefix itself if it likes) *or* the driver should not normalize the resource class name at all (which will be the default for every driver other than Ironic, frankly).","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"76aaacc7338344eb3748e2ce5421d024f450e41e","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d nova.objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_e2aae76f","line":479,"range":{"start_line":479,"start_character":8,"end_line":479,"end_character":43},"in_reply_to":"9a30ddce_a2f62fd5","updated":"2017-03-07 16:19:30.000000000","message":"Yeah, I specifically asked for this to not be ambiguous. Details in the previous comments on the original unified patch if you\u0027re interested.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":1063,"name":"Ed Leafe","email":"ed@leafe.com","username":"ed-leafe"},"change_message_id":"e163ecad2532705a2ced0825467a775e0a1cd710","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d nova.objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_45e73de4","line":479,"range":{"start_line":479,"start_character":8,"end_line":479,"end_character":43},"in_reply_to":"9a30ddce_e2aae76f","updated":"2017-03-07 16:33:44.000000000","message":"OK, so if we end up with CUSTOM_CUSTOM_CUSTOM_foo, it\u0027s a bug in the driver. Got it.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cae6de0fee6caee982e029c36c59cc46f906728","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        if rc_name is None:"},{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_2becebc6","line":479,"range":{"start_line":478,"start_character":8,"end_line":479,"end_character":43},"updated":"2017-03-15 01:03:07.000000000","message":"Shouldn\u0027t you check if cust_prefix is a prefix on norm_name before doing this so we don\u0027t end up with CUSTOM_CUSTOM_BAREMETAL_GOLD? I believe this has come up before and we said that eventually this will result in a 400 or 404 when trying to create/update/get the resource class from the placement API which should be reported as a bug in the virt driver that\u0027s reporting garbage?\n\nI don\u0027t think a POST to /resource_classes with CUSTOM_CUSTOM_BAREMETAL_GOLD to the placement API would fail with a 400 though, or am I missing something?","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75938ab69212836b4816361916f880f6c65ee6f7","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        if rc_name is None:"},{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_b4d1facf","line":479,"range":{"start_line":478,"start_character":8,"end_line":479,"end_character":43},"in_reply_to":"3a1ff146_23c23686","updated":"2017-03-15 15:03:11.000000000","message":"Yeah, it\u0027s just kind of gross IMO for a caller (Ironic for example) to need to know this wrinkle about what\u0027s going on inside Nova, it\u0027s tight-coupling I\u0027d like to avoid. But I won\u0027t block on this.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5bdbcec1b50529351bc7d5707946c794bf823459","unresolved":false,"context_lines":[{"line_number":475,"context_line":"        if rc_name is None:"},{"line_number":476,"context_line":"            return None"},{"line_number":477,"context_line":"        norm_name \u003d rc_name.upper()"},{"line_number":478,"context_line":"        cust_prefix \u003d objects.ResourceClass.CUSTOM_NAMESPACE"},{"line_number":479,"context_line":"        norm_name \u003d cust_prefix + norm_name"},{"line_number":480,"context_line":"        # Replace some punctuation characters with underscores"},{"line_number":481,"context_line":"        norm_name \u003d re.sub(\u0027[^0-9A-Z]+\u0027, \u0027_\u0027, norm_name)"},{"line_number":482,"context_line":"        return norm_name"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_23c23686","line":479,"range":{"start_line":478,"start_character":8,"end_line":479,"end_character":43},"in_reply_to":"3a1ff146_2becebc6","updated":"2017-03-15 14:33:20.000000000","message":"See @dansmith\u0027s explanation. We wanted to keep things simple and easy-to-reason about. Callers of normalize_name() can strip CUSTOM_ off their supplied resource class names if they are worried about that happening.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"}],"nova/tests/functional/compute/test_resource_tracker.py":[{"author":{"_account_id":22255,"name":"Tuan","email":"tuanla@vn.fujitsu.com","username":"Tuan"},"change_message_id":"cd0f483638a2c488e002edab78834a0e4b20e4b0","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    FLAVOR_FIXTURES \u003d {"},{"line_number":45,"context_line":"        \u0027CUSTOM_SMALL_IRON\u0027: objects.Flavor("},{"line_number":46,"context_line":"            name\u003d\u0027CUSTOM_SMALL_IRON\u0027,"},{"line_number":47,"context_line":"            flavorid\u003d42,"},{"line_number":48,"context_line":"            vcpus\u003d4,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_f118d386","line":45,"range":{"start_line":45,"start_character":22,"end_line":45,"end_character":26},"updated":"2017-03-08 07:37:05.000000000","message":"I prefer IRONIC instead of IRON for more detail and meaning.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"d0adfbb77b10decb54fecf13e23559bea7b2f57f","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \"\"\""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    FLAVOR_FIXTURES \u003d {"},{"line_number":45,"context_line":"        \u0027CUSTOM_SMALL_IRON\u0027: objects.Flavor("},{"line_number":46,"context_line":"            name\u003d\u0027CUSTOM_SMALL_IRON\u0027,"},{"line_number":47,"context_line":"            flavorid\u003d42,"},{"line_number":48,"context_line":"            vcpus\u003d4,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_de666a28","line":45,"range":{"start_line":45,"start_character":22,"end_line":45,"end_character":26},"in_reply_to":"9a30ddce_f118d386","updated":"2017-03-08 15:37:16.000000000","message":"This is just a test, so it\u0027s fine. The operator can define whatever they want.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"abaeb4aba45a887241060971c7c93a37dee7fc8c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"9a30ddce_791e4a60","updated":"2017-03-09 15:54:23.000000000","message":"nice use of comments to highlight the flow through the test","commit_id":"bb7e79e249802992264127ca5c0611b4a8b68264"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        )"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        self.ctx \u003d context.RequestContext(\u0027user\u0027, \u0027project\u0027)"},{"line_number":141,"context_line":"        self.cell_db \u003d self.useFixture(fixtures.Database())"},{"line_number":142,"context_line":"        self.api_db \u003d self.useFixture(fixtures.Database(database\u003d\u0027api\u0027))"},{"line_number":143,"context_line":"        self.app \u003d lambda: deploy.loadapp(CONF)"},{"line_number":144,"context_line":"        self.report_client \u003d test_report_client.NoAuthReportClient()"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_2f7857f2","line":142,"range":{"start_line":141,"start_character":8,"end_line":142,"end_character":72},"updated":"2017-03-15 15:33:39.000000000","message":"Why are we setting these up ourselves? Extending TestCase gives us that for free:\n\nhttps://github.com/openstack/nova/blob/master/nova/test.py#L242\n\nIf you want to do this yourself, you should extend NoDBTestCase and set USES_DB_SELF\u003dTrue, but I don\u0027t see why you would do that. TestCase gives us this all for free by default.\n\n-1 for this.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":138,"context_line":"        )"},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        self.ctx \u003d context.RequestContext(\u0027user\u0027, \u0027project\u0027)"},{"line_number":141,"context_line":"        self.cell_db \u003d self.useFixture(fixtures.Database())"},{"line_number":142,"context_line":"        self.api_db \u003d self.useFixture(fixtures.Database(database\u003d\u0027api\u0027))"},{"line_number":143,"context_line":"        self.app \u003d lambda: deploy.loadapp(CONF)"},{"line_number":144,"context_line":"        self.report_client \u003d test_report_client.NoAuthReportClient()"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_d512e6b3","line":142,"range":{"start_line":141,"start_character":8,"end_line":142,"end_character":72},"in_reply_to":"3a1ff146_2f7857f2","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.app \u003d lambda: deploy.loadapp(CONF)"},{"line_number":144,"context_line":"        self.report_client \u003d test_report_client.NoAuthReportClient()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        driver \u003d mock.MagicMock()"},{"line_number":147,"context_line":"        driver.node_is_available.return_value \u003d True"},{"line_number":148,"context_line":"        self.driver_mock \u003d driver"},{"line_number":149,"context_line":"        self.rt \u003d resource_tracker.ResourceTracker(COMPUTE_HOST, driver)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_0fc2bb85","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":33},"updated":"2017-03-15 15:33:39.000000000","message":"nit: I\u0027d prefer that we autospec this to be \u0027nova.virt.driver.ComputeDriver\u0027.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self.app \u003d lambda: deploy.loadapp(CONF)"},{"line_number":144,"context_line":"        self.report_client \u003d test_report_client.NoAuthReportClient()"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        driver \u003d mock.MagicMock()"},{"line_number":147,"context_line":"        driver.node_is_available.return_value \u003d True"},{"line_number":148,"context_line":"        self.driver_mock \u003d driver"},{"line_number":149,"context_line":"        self.rt \u003d resource_tracker.ResourceTracker(COMPUTE_HOST, driver)"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_75cdb25c","line":146,"range":{"start_line":146,"start_character":17,"end_line":146,"end_character":33},"in_reply_to":"3a1ff146_0fc2bb85","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def tearDown(self):"},{"line_number":155,"context_line":"        super(IronicResourceTrackerTest, self).tearDown()"},{"line_number":156,"context_line":"        self.assertFalse(self.driver_mock.called)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def create_fixtures(self):"},{"line_number":159,"context_line":"        for flavor in self.FLAVOR_FIXTURES.values():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_0fe55b08","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":49},"updated":"2017-03-15 15:33:39.000000000","message":"Huh? What is this validating? It would be nice to have a comment explaining this one. I don\u0027t even see how this is not failing since we should be calling driver.get_inventory() right?\n\n-1 for this, would like to see a comment explaining it.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"    def tearDown(self):"},{"line_number":155,"context_line":"        super(IronicResourceTrackerTest, self).tearDown()"},{"line_number":156,"context_line":"        self.assertFalse(self.driver_mock.called)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def create_fixtures(self):"},{"line_number":159,"context_line":"        for flavor in self.FLAVOR_FIXTURES.values():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_55d27601","line":156,"range":{"start_line":156,"start_character":8,"end_line":156,"end_character":49},"in_reply_to":"3a1ff146_0fe55b08","updated":"2017-03-15 19:38:35.000000000","message":"LOL, I have zero idea where that came from. Removed.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def create_fixtures(self):"},{"line_number":159,"context_line":"        for flavor in self.FLAVOR_FIXTURES.values():"},{"line_number":160,"context_line":"            flavor._context \u003d self.ctx"},{"line_number":161,"context_line":"            flavor.obj_set_defaults()"},{"line_number":162,"context_line":"            flavor.create()"},{"line_number":163,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_4f74b334","line":160,"range":{"start_line":160,"start_character":30,"end_line":160,"end_character":38},"updated":"2017-03-15 15:33:39.000000000","message":"Normally this would be an admin context.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        # data before adding integration for Ironic baremetal nodes with the"},{"line_number":166,"context_line":"        # placement API..."},{"line_number":167,"context_line":"        for cn in self.COMPUTE_NODE_FIXTURES.values():"},{"line_number":168,"context_line":"            cn._context \u003d self.ctx"},{"line_number":169,"context_line":"            cn.obj_set_defaults()"},{"line_number":170,"context_line":"            cn.create()"},{"line_number":171,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_0fa1db94","line":168,"range":{"start_line":168,"start_character":26,"end_line":168,"end_character":34},"updated":"2017-03-15 15:33:39.000000000","message":"same","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        if 200 \u003c\u003d resp.status_code \u003c 300:"},{"line_number":181,"context_line":"            return resp.json()[\u0027inventories\u0027]"},{"line_number":182,"context_line":"        else:"},{"line_number":183,"context_line":"            return resp.status_code"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def placement_get_allocations(self, consumer_uuid):"},{"line_number":186,"context_line":"        url \u003d \u0027/allocations/%s\u0027 % consumer_uuid"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_8fcceb36","line":183,"range":{"start_line":183,"start_character":12,"end_line":183,"end_character":35},"updated":"2017-03-15 15:33:39.000000000","message":"Should this raise an error?","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        if 200 \u003c\u003d resp.status_code \u003c 300:"},{"line_number":181,"context_line":"            return resp.json()[\u0027inventories\u0027]"},{"line_number":182,"context_line":"        else:"},{"line_number":183,"context_line":"            return resp.status_code"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    def placement_get_allocations(self, consumer_uuid):"},{"line_number":186,"context_line":"        url \u003d \u0027/allocations/%s\u0027 % consumer_uuid"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_557d161b","line":183,"range":{"start_line":183,"start_character":12,"end_line":183,"end_character":35},"in_reply_to":"3a1ff146_8fcceb36","updated":"2017-03-15 19:38:35.000000000","message":"No, I check for the return code in, for example, line 226.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":188,"context_line":"        if 200 \u003c\u003d resp.status_code \u003c 300:"},{"line_number":189,"context_line":"            return resp.json()[\u0027allocations\u0027]"},{"line_number":190,"context_line":"        else:"},{"line_number":191,"context_line":"            return resp.status_code"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def placement_get_custom_rcs(self):"},{"line_number":194,"context_line":"        url \u003d \u0027/resource_classes\u0027"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_cfd6e3c4","line":191,"updated":"2017-03-15 15:33:39.000000000","message":"same","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b07212fef1c6092b8ff9d6e978fd6140c18c48e0","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                return_value\u003d\u0027http://localhost/placement\u0027)"},{"line_number":208,"context_line":"    def test_ironic_newton_to_ocata(self, mock_vbi, mock_endpoint, mock_auth,"},{"line_number":209,"context_line":"            mock_cn):"},{"line_number":210,"context_line":"        \"\"\"Check that when going from a Newton installation with Ironic having"},{"line_number":211,"context_line":"        node\u0027s resource class attributes set, that we properly \"auto-heal\" the"},{"line_number":212,"context_line":"        inventory and allocation records in the placement API to account for"},{"line_number":213,"context_line":"        both the old-style VCPU/MEMORY_MB/DISK_GB resources as well as the new"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_0795783f","line":210,"updated":"2017-03-14 14:33:51.000000000","message":"nit: Should this be Ocata? (And should the method name be test_ironic_ocata_to_pike?)","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"5bdbcec1b50529351bc7d5707946c794bf823459","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                return_value\u003d\u0027http://localhost/placement\u0027)"},{"line_number":208,"context_line":"    def test_ironic_newton_to_ocata(self, mock_vbi, mock_endpoint, mock_auth,"},{"line_number":209,"context_line":"            mock_cn):"},{"line_number":210,"context_line":"        \"\"\"Check that when going from a Newton installation with Ironic having"},{"line_number":211,"context_line":"        node\u0027s resource class attributes set, that we properly \"auto-heal\" the"},{"line_number":212,"context_line":"        inventory and allocation records in the placement API to account for"},{"line_number":213,"context_line":"        both the old-style VCPU/MEMORY_MB/DISK_GB resources as well as the new"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_23e5d608","line":210,"in_reply_to":"3a1ff146_0795783f","updated":"2017-03-15 14:33:20.000000000","message":"yeah, it should. I can rename the method in a future revision if needed.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                return_value\u003d\u0027http://localhost/placement\u0027)"},{"line_number":208,"context_line":"    def test_ironic_newton_to_ocata(self, mock_vbi, mock_endpoint, mock_auth,"},{"line_number":209,"context_line":"            mock_cn):"},{"line_number":210,"context_line":"        \"\"\"Check that when going from a Newton installation with Ironic having"},{"line_number":211,"context_line":"        node\u0027s resource class attributes set, that we properly \"auto-heal\" the"},{"line_number":212,"context_line":"        inventory and allocation records in the placement API to account for"},{"line_number":213,"context_line":"        both the old-style VCPU/MEMORY_MB/DISK_GB resources as well as the new"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_8ff30b73","line":210,"in_reply_to":"3a1ff146_23e5d608","updated":"2017-03-15 15:33:39.000000000","message":"I think you need to respin to address some comments I have above, so let\u0027s fix it up as part of that.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                return_value\u003d\u0027http://localhost/placement\u0027)"},{"line_number":208,"context_line":"    def test_ironic_newton_to_ocata(self, mock_vbi, mock_endpoint, mock_auth,"},{"line_number":209,"context_line":"            mock_cn):"},{"line_number":210,"context_line":"        \"\"\"Check that when going from a Newton installation with Ironic having"},{"line_number":211,"context_line":"        node\u0027s resource class attributes set, that we properly \"auto-heal\" the"},{"line_number":212,"context_line":"        inventory and allocation records in the placement API to account for"},{"line_number":213,"context_line":"        both the old-style VCPU/MEMORY_MB/DISK_GB resources as well as the new"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_15ac7e9f","line":210,"in_reply_to":"3a1ff146_8ff30b73","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":220,"context_line":"            self.assertEqual(0, len(self.rt.compute_nodes))"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"            # Nor should there be any records in the placement API. We\u0027re"},{"line_number":223,"context_line":"            # emulating here a Newton-start situation before placement was"},{"line_number":224,"context_line":"            # enabled."},{"line_number":225,"context_line":"            for cn in self.COMPUTE_NODE_FIXTURES.values():"},{"line_number":226,"context_line":"                self.assertEqual(404, self.placement_get_inventory(cn.uuid))"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_af3b67ea","line":224,"range":{"start_line":223,"start_character":31,"end_line":224,"end_character":22},"updated":"2017-03-15 15:33:39.000000000","message":"Similar to Jim\u0027s comment above, does this also need to change? Starting in Ocata, placement was required and nova-compute won\u0027t start if it can\u0027t talk to Placement and register itself as a resource provider.\n\nThis check is fine to have, it\u0027s going to result in a 404 since we haven\u0027t actually run update_available_resource yet from the compute manager.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":220,"context_line":"            self.assertEqual(0, len(self.rt.compute_nodes))"},{"line_number":221,"context_line":""},{"line_number":222,"context_line":"            # Nor should there be any records in the placement API. We\u0027re"},{"line_number":223,"context_line":"            # emulating here a Newton-start situation before placement was"},{"line_number":224,"context_line":"            # enabled."},{"line_number":225,"context_line":"            for cn in self.COMPUTE_NODE_FIXTURES.values():"},{"line_number":226,"context_line":"                self.assertEqual(404, self.placement_get_inventory(cn.uuid))"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_35e17aff","line":224,"range":{"start_line":223,"start_character":31,"end_line":224,"end_character":22},"in_reply_to":"3a1ff146_af3b67ea","updated":"2017-03-15 19:38:35.000000000","message":"Changed the wording.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            self.assertEqual(0, len(self.placement_get_custom_rcs()))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            # Now \"initialize\" the resource tracker as if the compute host is a"},{"line_number":236,"context_line":"            # Newton host, with Ironic virt driver, but the admin has not yet"},{"line_number":237,"context_line":"            # added a resource_class attribute to the Ironic baremetal nodes in"},{"line_number":238,"context_line":"            # her system."},{"line_number":239,"context_line":"            # NOTE(jaypipes): This is what the nova.compute.manager.Manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_411ba772","line":236,"range":{"start_line":236,"start_character":14,"end_line":236,"end_character":20},"updated":"2017-03-15 15:33:39.000000000","message":"Ocata?","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":233,"context_line":"            self.assertEqual(0, len(self.placement_get_custom_rcs()))"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"            # Now \"initialize\" the resource tracker as if the compute host is a"},{"line_number":236,"context_line":"            # Newton host, with Ironic virt driver, but the admin has not yet"},{"line_number":237,"context_line":"            # added a resource_class attribute to the Ironic baremetal nodes in"},{"line_number":238,"context_line":"            # her system."},{"line_number":239,"context_line":"            # NOTE(jaypipes): This is what the nova.compute.manager.Manager"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_d55e66e8","line":236,"range":{"start_line":236,"start_character":14,"end_line":236,"end_character":20},"in_reply_to":"3a1ff146_411ba772","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":235,"context_line":"            # Now \"initialize\" the resource tracker as if the compute host is a"},{"line_number":236,"context_line":"            # Newton host, with Ironic virt driver, but the admin has not yet"},{"line_number":237,"context_line":"            # added a resource_class attribute to the Ironic baremetal nodes in"},{"line_number":238,"context_line":"            # her system."},{"line_number":239,"context_line":"            # NOTE(jaypipes): This is what the nova.compute.manager.Manager"},{"line_number":240,"context_line":"            # does when \"initializing\" the service..."},{"line_number":241,"context_line":"            for cn in self.COMPUTE_NODE_FIXTURES.values():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_812bdf81","line":238,"range":{"start_line":238,"start_character":14,"end_line":238,"end_character":17},"updated":"2017-03-15 15:33:39.000000000","message":"This is offensive to me as a white male. :P","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            # Newton host, with Ironic virt driver, but the admin has not yet"},{"line_number":237,"context_line":"            # added a resource_class attribute to the Ironic baremetal nodes in"},{"line_number":238,"context_line":"            # her system."},{"line_number":239,"context_line":"            # NOTE(jaypipes): This is what the nova.compute.manager.Manager"},{"line_number":240,"context_line":"            # does when \"initializing\" the service..."},{"line_number":241,"context_line":"            for cn in self.COMPUTE_NODE_FIXTURES.values():"},{"line_number":242,"context_line":"                nodename \u003d cn.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_e141f33a","line":239,"range":{"start_line":239,"start_character":68,"end_line":239,"end_character":75},"updated":"2017-03-15 15:33:39.000000000","message":"nit: ComputeManager","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":236,"context_line":"            # Newton host, with Ironic virt driver, but the admin has not yet"},{"line_number":237,"context_line":"            # added a resource_class attribute to the Ironic baremetal nodes in"},{"line_number":238,"context_line":"            # her system."},{"line_number":239,"context_line":"            # NOTE(jaypipes): This is what the nova.compute.manager.Manager"},{"line_number":240,"context_line":"            # does when \"initializing\" the service..."},{"line_number":241,"context_line":"            for cn in self.COMPUTE_NODE_FIXTURES.values():"},{"line_number":242,"context_line":"                nodename \u003d cn.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_1542be10","line":239,"range":{"start_line":239,"start_character":68,"end_line":239,"end_character":75},"in_reply_to":"3a1ff146_e141f33a","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                    VCPU: {"},{"line_number":258,"context_line":"                        \u0027total\u0027: cn.vcpus,"},{"line_number":259,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":260,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":261,"context_line":"                        \u0027max_unit\u0027: cn.vcpus,"},{"line_number":262,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":263,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_c1f877e8","line":260,"range":{"start_line":260,"start_character":36,"end_line":260,"end_character":37},"updated":"2017-03-15 15:33:39.000000000","message":"This should match total and max_unit according to:\n\nhttps://review.openstack.org/#/c/441544/7/nova/virt/ironic/driver.py@633","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                    VCPU: {"},{"line_number":258,"context_line":"                        \u0027total\u0027: cn.vcpus,"},{"line_number":259,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":260,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":261,"context_line":"                        \u0027max_unit\u0027: cn.vcpus,"},{"line_number":262,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":263,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_d5e9061c","line":260,"range":{"start_line":260,"start_character":36,"end_line":260,"end_character":37},"in_reply_to":"3a1ff146_a1d1bbcf","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"30f6fb6a50ca02abe2ee945fe88f1bf57fc49bc5","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                    VCPU: {"},{"line_number":258,"context_line":"                        \u0027total\u0027: cn.vcpus,"},{"line_number":259,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":260,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":261,"context_line":"                        \u0027max_unit\u0027: cn.vcpus,"},{"line_number":262,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":263,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_a1d1bbcf","line":260,"range":{"start_line":260,"start_character":36,"end_line":260,"end_character":37},"in_reply_to":"3a1ff146_c1f877e8","updated":"2017-03-15 15:36:04.000000000","message":"-1 for this also.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                    MEMORY_MB: {"},{"line_number":266,"context_line":"                        \u0027total\u0027: cn.memory_mb,"},{"line_number":267,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":268,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":269,"context_line":"                        \u0027max_unit\u0027: cn.memory_mb,"},{"line_number":270,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":271,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_01db6f7d","line":268,"updated":"2017-03-15 15:33:39.000000000","message":"same","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":265,"context_line":"                    MEMORY_MB: {"},{"line_number":266,"context_line":"                        \u0027total\u0027: cn.memory_mb,"},{"line_number":267,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":268,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":269,"context_line":"                        \u0027max_unit\u0027: cn.memory_mb,"},{"line_number":270,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":271,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_f5ec422b","line":268,"in_reply_to":"3a1ff146_01db6f7d","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                    DISK_GB: {"},{"line_number":274,"context_line":"                        \u0027total\u0027: cn.local_gb,"},{"line_number":275,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":276,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":277,"context_line":"                        \u0027max_unit\u0027: cn.local_gb,"},{"line_number":278,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":279,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_41e56735","line":276,"updated":"2017-03-15 15:33:39.000000000","message":"same","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":273,"context_line":"                    DISK_GB: {"},{"line_number":274,"context_line":"                        \u0027total\u0027: cn.local_gb,"},{"line_number":275,"context_line":"                        \u0027reserved\u0027: 0,"},{"line_number":276,"context_line":"                        \u0027min_unit\u0027: 1,"},{"line_number":277,"context_line":"                        \u0027max_unit\u0027: cn.local_gb,"},{"line_number":278,"context_line":"                        \u0027step_size\u0027: 1,"},{"line_number":279,"context_line":"                        \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_15f47ef0","line":276,"in_reply_to":"3a1ff146_41e56735","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                VCPU: {"},{"line_number":337,"context_line":"                    \u0027total\u0027: cn1_obj.vcpus,"},{"line_number":338,"context_line":"                    \u0027reserved\u0027: 0,"},{"line_number":339,"context_line":"                    \u0027min_unit\u0027: 1,"},{"line_number":340,"context_line":"                    \u0027max_unit\u0027: cn1_obj.vcpus,"},{"line_number":341,"context_line":"                    \u0027step_size\u0027: 1,"},{"line_number":342,"context_line":"                    \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_8194bf37","line":339,"range":{"start_line":339,"start_character":19,"end_line":339,"end_character":34},"updated":"2017-03-15 15:33:39.000000000","message":"same as above","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":336,"context_line":"                VCPU: {"},{"line_number":337,"context_line":"                    \u0027total\u0027: cn1_obj.vcpus,"},{"line_number":338,"context_line":"                    \u0027reserved\u0027: 0,"},{"line_number":339,"context_line":"                    \u0027min_unit\u0027: 1,"},{"line_number":340,"context_line":"                    \u0027max_unit\u0027: cn1_obj.vcpus,"},{"line_number":341,"context_line":"                    \u0027step_size\u0027: 1,"},{"line_number":342,"context_line":"                    \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_d5d02656","line":339,"range":{"start_line":339,"start_character":19,"end_line":339,"end_character":34},"in_reply_to":"3a1ff146_8194bf37","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                MEMORY_MB: {"},{"line_number":345,"context_line":"                    \u0027total\u0027: cn1_obj.memory_mb,"},{"line_number":346,"context_line":"                    \u0027reserved\u0027: 0,"},{"line_number":347,"context_line":"                    \u0027min_unit\u0027: 1,"},{"line_number":348,"context_line":"                    \u0027max_unit\u0027: cn1_obj.memory_mb,"},{"line_number":349,"context_line":"                    \u0027step_size\u0027: 1,"},{"line_number":350,"context_line":"                    \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_a199bb70","line":347,"range":{"start_line":347,"start_character":20,"end_line":347,"end_character":34},"updated":"2017-03-15 15:33:39.000000000","message":"ditto","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                MEMORY_MB: {"},{"line_number":345,"context_line":"                    \u0027total\u0027: cn1_obj.memory_mb,"},{"line_number":346,"context_line":"                    \u0027reserved\u0027: 0,"},{"line_number":347,"context_line":"                    \u0027min_unit\u0027: 1,"},{"line_number":348,"context_line":"                    \u0027max_unit\u0027: cn1_obj.memory_mb,"},{"line_number":349,"context_line":"                    \u0027step_size\u0027: 1,"},{"line_number":350,"context_line":"                    \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_f5d3625d","line":347,"range":{"start_line":347,"start_character":20,"end_line":347,"end_character":34},"in_reply_to":"3a1ff146_a199bb70","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                DISK_GB: {"},{"line_number":353,"context_line":"                    \u0027total\u0027: cn1_obj.local_gb,"},{"line_number":354,"context_line":"                    \u0027reserved\u0027: 0,"},{"line_number":355,"context_line":"                    \u0027min_unit\u0027: 1,"},{"line_number":356,"context_line":"                    \u0027max_unit\u0027: cn1_obj.local_gb,"},{"line_number":357,"context_line":"                    \u0027step_size\u0027: 1,"},{"line_number":358,"context_line":"                    \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_01a1af94","line":355,"range":{"start_line":355,"start_character":20,"end_line":355,"end_character":34},"updated":"2017-03-15 15:33:39.000000000","message":"and here","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":352,"context_line":"                DISK_GB: {"},{"line_number":353,"context_line":"                    \u0027total\u0027: cn1_obj.local_gb,"},{"line_number":354,"context_line":"                    \u0027reserved\u0027: 0,"},{"line_number":355,"context_line":"                    \u0027min_unit\u0027: 1,"},{"line_number":356,"context_line":"                    \u0027max_unit\u0027: cn1_obj.local_gb,"},{"line_number":357,"context_line":"                    \u0027step_size\u0027: 1,"},{"line_number":358,"context_line":"                    \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_15cb9ea6","line":355,"range":{"start_line":355,"start_character":20,"end_line":355,"end_character":34},"in_reply_to":"3a1ff146_01a1af94","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0176aa1305c418b96ba4f9b623073cd1c2cbf34e","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            }"},{"line_number":369,"context_line":"            self.rt.update_available_resource(self.ctx, cn1_nodename)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            # Verify the auto-creation of the custom resource class, normalized"},{"line_number":372,"context_line":"            # to what the placement API expects"},{"line_number":373,"context_line":"            self.assertIn(\u0027CUSTOM_SMALL_IRON\u0027, self.placement_get_custom_rcs())"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"            allocs \u003d self.placement_get_allocations(inst.uuid)"},{"line_number":376,"context_line":"            self.assertEqual(1, len(allocs))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_61dd0314","line":373,"range":{"start_line":371,"start_character":12,"end_line":373,"end_character":79},"updated":"2017-03-15 15:33:39.000000000","message":"This is a bit of a lie. You\u0027ve mocked out get_inventory on the driver, so we bypass obj_fields.ResourceClass.normalize_name(rc_name). In reality, this would result in CUSTOM_CUSTOM_SMALL_IRON, which is the thing I\u0027ve been complaining about. :)","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"a7aa379a7ceb2291d9682a007d0519d1c32ceac3","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            }"},{"line_number":369,"context_line":"            self.rt.update_available_resource(self.ctx, cn1_nodename)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            # Verify the auto-creation of the custom resource class, normalized"},{"line_number":372,"context_line":"            # to what the placement API expects"},{"line_number":373,"context_line":"            self.assertIn(\u0027CUSTOM_SMALL_IRON\u0027, self.placement_get_custom_rcs())"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"            allocs \u003d self.placement_get_allocations(inst.uuid)"},{"line_number":376,"context_line":"            self.assertEqual(1, len(allocs))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_b5baca08","line":373,"range":{"start_line":371,"start_character":12,"end_line":373,"end_character":79},"in_reply_to":"3a1ff146_414727bb","updated":"2017-03-15 19:38:35.000000000","message":"Done","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"c7de83ee6f7fdd6e6ab0836f3167fa3f771c4807","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            }"},{"line_number":369,"context_line":"            self.rt.update_available_resource(self.ctx, cn1_nodename)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":"            # Verify the auto-creation of the custom resource class, normalized"},{"line_number":372,"context_line":"            # to what the placement API expects"},{"line_number":373,"context_line":"            self.assertIn(\u0027CUSTOM_SMALL_IRON\u0027, self.placement_get_custom_rcs())"},{"line_number":374,"context_line":""},{"line_number":375,"context_line":"            allocs \u003d self.placement_get_allocations(inst.uuid)"},{"line_number":376,"context_line":"            self.assertEqual(1, len(allocs))"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_414727bb","line":373,"range":{"start_line":371,"start_character":12,"end_line":373,"end_character":79},"in_reply_to":"3a1ff146_61dd0314","updated":"2017-03-15 15:33:59.000000000","message":"I\u0027m -1 on this also.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"39a40f49d87428e266f187e4a90c11a89b76dadd","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            self.assertEqual(0, len(self.placement_get_custom_rcs()))"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"            # Now \"initialize\" the resource tracker as if the compute host is a"},{"line_number":229,"context_line":"            # Newton host, with Ironic virt driver, but the admin has not yet"},{"line_number":230,"context_line":"            # added a resource_class attribute to the Ironic baremetal nodes in"},{"line_number":231,"context_line":"            # her system."},{"line_number":232,"context_line":"            # NOTE(jaypipes): This is what nova.compute.manager.ComputeManager"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a1ff146_c0d786eb","line":229,"range":{"start_line":229,"start_character":14,"end_line":229,"end_character":20},"updated":"2017-03-15 19:52:45.000000000","message":"Ocata?","commit_id":"be41887e43593645f372abc9bb6a86a60a860d4c"}],"nova/tests/unit/virt/ironic/test_driver.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"abaeb4aba45a887241060971c7c93a37dee7fc8c","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver, \u0027_node_resource\u0027)"},{"line_number":800,"context_line":"    def test_get_inventory_with_rc(self, mock_nr):"},{"line_number":801,"context_line":"        \"\"\"Ensure that when node.resource_class is missing, that we return the"},{"line_number":802,"context_line":"        legacy VCPU, MEMORY_MB and DISK_GB resources for inventory in addition"},{"line_number":803,"context_line":"        to the custom resource class inventory record."},{"line_number":804,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_1930eee7","line":801,"updated":"2017-03-09 15:54:23.000000000","message":"is present?","commit_id":"bb7e79e249802992264127ca5c0611b4a8b68264"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f239082a03e38acfb69d5204349392778174cc78","unresolved":false,"context_lines":[{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @mock.patch.object(ironic_driver.IronicDriver, \u0027_node_resource\u0027)"},{"line_number":800,"context_line":"    def test_get_inventory_with_rc(self, mock_nr):"},{"line_number":801,"context_line":"        \"\"\"Ensure that when node.resource_class is missing, that we return the"},{"line_number":802,"context_line":"        legacy VCPU, MEMORY_MB and DISK_GB resources for inventory in addition"},{"line_number":803,"context_line":"        to the custom resource class inventory record."},{"line_number":804,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_ac331d61","line":801,"in_reply_to":"9a30ddce_1930eee7","updated":"2017-03-09 18:25:22.000000000","message":"Done","commit_id":"bb7e79e249802992264127ca5c0611b4a8b68264"}],"nova/virt/ironic/driver.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a80e10535c02a6f598f19694d6a25d4e65029e4d","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":620,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":621,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":622,"context_line":"            return {}"},{"line_number":623,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_52960a4d","line":620,"updated":"2017-03-08 00:25:08.000000000","message":"This isn\u0027t a comment for the conditional below is it?","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2675ec3a2195dee80bcdc28a582aec73d4eb0ca6","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":620,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":621,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":622,"context_line":"            return {}"},{"line_number":623,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_231f6160","line":620,"in_reply_to":"9a30ddce_52960a4d","updated":"2017-03-08 23:32:59.000000000","message":"Nope, just a note about the Nova requiring Ironic to return the node.resource_class some time in Queens","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a80e10535c02a6f598f19694d6a25d4e65029e4d","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":620,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":621,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":622,"context_line":"            return {}"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"        result \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_72914e52","line":621,"updated":"2017-03-08 00:25:08.000000000","message":"This probably deserves a comment about the ironic-specific behavior you\u0027re handling here.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"2675ec3a2195dee80bcdc28a582aec73d4eb0ca6","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":620,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":621,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":622,"context_line":"            return {}"},{"line_number":623,"context_line":""},{"line_number":624,"context_line":"        result \u003d {"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a30ddce_632799b6","line":621,"in_reply_to":"9a30ddce_72914e52","updated":"2017-03-08 23:32:59.000000000","message":"done.","commit_id":"fec84f5ac981dc84c633e6a8f9b6787425960828"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"abaeb4aba45a887241060971c7c93a37dee7fc8c","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            obj_fields.ResourceClass.VCPU: {"},{"line_number":630,"context_line":"                \u0027total\u0027: info[\u0027vcpus\u0027],"},{"line_number":631,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":632,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":633,"context_line":"                \u0027max_unit\u0027: info[\u0027vcpus\u0027],"},{"line_number":634,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":635,"context_line":"                \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_99a85edd","line":632,"updated":"2017-03-09 15:54:23.000000000","message":"I\u0027m still confused about why min_unit is 1 here, instead of \u003d\u003d max_unit, same with step_size.\n\nIn the baremetal situation we can\u0027t allocate a chunk of this inventory, it\u0027s all or nothing, shouldn\u0027t the inventory say so?","commit_id":"bb7e79e249802992264127ca5c0611b4a8b68264"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f239082a03e38acfb69d5204349392778174cc78","unresolved":false,"context_lines":[{"line_number":629,"context_line":"            obj_fields.ResourceClass.VCPU: {"},{"line_number":630,"context_line":"                \u0027total\u0027: info[\u0027vcpus\u0027],"},{"line_number":631,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":632,"context_line":"                \u0027min_unit\u0027: 1,"},{"line_number":633,"context_line":"                \u0027max_unit\u0027: info[\u0027vcpus\u0027],"},{"line_number":634,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":635,"context_line":"                \u0027allocation_ratio\u0027: 1.0,"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a30ddce_af330f61","line":632,"in_reply_to":"9a30ddce_99a85edd","updated":"2017-03-09 18:25:22.000000000","message":"I\u0027ll change it back. I changed it for some reason in a past commit because I was running into a failure in some unit test somewhere around the whole 0-valued inventory thing. But Now that we\u0027re not reporting any inventory records that are 0-valued here, it should be changed back to min_unit \u003d\u003d total","commit_id":"bb7e79e249802992264127ca5c0611b4a8b68264"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"7da4be1f1d7653c258d20da086cda6ca50d12cbe","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        \"\"\"Return a dict, keyed by resource class, of inventory information for"},{"line_number":614,"context_line":"        the supplied node."},{"line_number":615,"context_line":"        \"\"\""},{"line_number":616,"context_line":"        info \u003d self._node_resource(nodename)"},{"line_number":617,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_1f033bb9","line":616,"updated":"2017-03-10 15:56:19.000000000","message":"I\u0027m not sure if `nodename` is supposed to be a full node object or just a name -- _node_resource seems to expect a node object. If this is only the name/uuid, you\u0027ll have to fetch a copy of the node. If it is the node, can we change the variable in the signature to be `node` to match the rest of the driver?\n\nIf you *do* need to fetch the node, make sure to use the cache code from get_available_nodes to avoid causing N API calls to ironic for N nodes.","commit_id":"f1f5772b2d0456d75c88be76b6d15a0a74c4807b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"d3b1744f782169ecde2205aee703962251b0b03b","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        \"\"\"Return a dict, keyed by resource class, of inventory information for"},{"line_number":614,"context_line":"        the supplied node."},{"line_number":615,"context_line":"        \"\"\""},{"line_number":616,"context_line":"        info \u003d self._node_resource(nodename)"},{"line_number":617,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_42e07c96","line":616,"in_reply_to":"9a30ddce_1f033bb9","updated":"2017-03-10 16:22:04.000000000","message":"Doh. Jay, nice catch. I\u0027ll pull the cache code from get_available_resource() out into a helper function and fix this up.","commit_id":"f1f5772b2d0456d75c88be76b6d15a0a74c4807b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c11f8e3fd2e64e16f0721825f2137b6a296eae02","unresolved":false,"context_lines":[{"line_number":613,"context_line":"        \"\"\"Return a dict, keyed by resource class, of inventory information for"},{"line_number":614,"context_line":"        the supplied node."},{"line_number":615,"context_line":"        \"\"\""},{"line_number":616,"context_line":"        info \u003d self._node_resource(nodename)"},{"line_number":617,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":618,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":619,"context_line":"        # *always* return the custom resource class that represents the"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_a50ea2e2","line":616,"in_reply_to":"9a30ddce_42e07c96","updated":"2017-03-10 16:32:19.000000000","message":"Yup, right now when the parse_instance_properties tries to do node.pop(memory_mb) and all the other stuff, it fails, and sets all the values to 0. Because of that the ironic job fails on this patch.","commit_id":"f1f5772b2d0456d75c88be76b6d15a0a74c4807b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a7fed96f5d5097d4e3ac45fe0bf3c232a8686186","unresolved":false,"context_lines":[{"line_number":631,"context_line":"                \u0027reserved\u0027: 0,"},{"line_number":632,"context_line":"                \u0027min_unit\u0027: info[\u0027vcpus\u0027],"},{"line_number":633,"context_line":"                \u0027max_unit\u0027: info[\u0027vcpus\u0027],"},{"line_number":634,"context_line":"                \u0027step_size\u0027: 1,"},{"line_number":635,"context_line":"                \u0027allocation_ratio\u0027: 1.0,"},{"line_number":636,"context_line":"            },"},{"line_number":637,"context_line":"            obj_fields.ResourceClass.MEMORY_MB: {"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a30ddce_18bd3f02","line":634,"updated":"2017-03-09 19:26:23.000000000","message":"Just to note (already discussed with jay in IRC), the use of step_size: 1 is okay here because \n\n   N % N \u003d\u003d N % 1\n\nand the math on the server side that checks allocations is:\n\n          if (amount_needed \u003c min_unit or amount_needed \u003e max_unit or\n                amount_needed % step_size !\u003d 0):","commit_id":"f1f5772b2d0456d75c88be76b6d15a0a74c4807b"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b07212fef1c6092b8ff9d6e978fd6140c18c48e0","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":619,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":620,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":621,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":622,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":623,"context_line":"            # NOTE(jaypipes): The driver can return 0-valued vcpus when the"},{"line_number":624,"context_line":"            # node is \"disabled\".  In the future, we should detach inventory"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_eace63b3","line":621,"updated":"2017-03-14 14:33:51.000000000","message":"I don\u0027t see any reason why we couldn\u0027t force the custom resource class now, FWIW. Just tell people they need to set that before upgrading. And actually, I think we need to.\n\nWe\u0027d still need to return VCPU/MEMORY_MB/DISK_GB in Pike, while people transition their flavors to use the custom resource class. Then, dropping those resource classes in Queens will effectively enforce the new flavor.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75938ab69212836b4816361916f880f6c65ee6f7","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":619,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":620,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":621,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":622,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":623,"context_line":"            # NOTE(jaypipes): The driver can return 0-valued vcpus when the"},{"line_number":624,"context_line":"            # node is \"disabled\".  In the future, we should detach inventory"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_54e366a3","line":621,"in_reply_to":"3a1ff146_34e8aa10","updated":"2017-03-15 15:03:11.000000000","message":"I\u0027d like the plan documented, and if you\u0027re already working on that, great.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abb1d1380f3808f18b77dcd76734b268d009583f","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":619,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":620,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":621,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":622,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":623,"context_line":"            # NOTE(jaypipes): The driver can return 0-valued vcpus when the"},{"line_number":624,"context_line":"            # node is \"disabled\".  In the future, we should detach inventory"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_34e8aa10","line":621,"in_reply_to":"3a1ff146_ab745bfd","updated":"2017-03-15 14:49:10.000000000","message":"Right, only this method.\n\nAnd yes, it will enforce it because scheduling the old style flavors will result in NoValidHost.\n\nDid you want the fact that we overwrite documented? Or the plan? I\u0027m working on the latter, fwiw.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cae6de0fee6caee982e029c36c59cc46f906728","unresolved":false,"context_lines":[{"line_number":618,"context_line":"        # TODO(jaypipes): Completely remove the reporting of VCPU, MEMORY_MB,"},{"line_number":619,"context_line":"        # and DISK_GB resource classes in early Queens when Ironic nodes will"},{"line_number":620,"context_line":"        # *always* return the custom resource class that represents the"},{"line_number":621,"context_line":"        # baremetal node class in an atomic, singular unit."},{"line_number":622,"context_line":"        if info[\u0027vcpus\u0027] \u003d\u003d 0:"},{"line_number":623,"context_line":"            # NOTE(jaypipes): The driver can return 0-valued vcpus when the"},{"line_number":624,"context_line":"            # node is \"disabled\".  In the future, we should detach inventory"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_ab745bfd","line":621,"in_reply_to":"3a1ff146_eace63b3","updated":"2017-03-15 01:03:07.000000000","message":"\u003e Then, dropping those resource classes in Queens will effectively enforce the new flavor.\n\nDropping them from where? Just this method, right? Because those are standard resource classes so we won\u0027t \u0027remove\u0027 them outright.\n\nDo you mean dropping the old resource class usage here will enforce the new flavor because the queens deployment wouldn\u0027t be able to schedule properly? If we have stale inventory data with these resource classes from pike though, and the flavor is using those values still, it seems the scheduler could still place things on a node, even though it\u0027s inventory is wrong. Unless of course we\u0027re doing a total re-write of the inventory in the resource tracker...which I think we might be if get_inventory() is implemented.\n\n/me checks\n\n\u003clater\u003e\n\nOK, I guess it would be a total overwrite of the inventory:\n\nhttps://github.com/openstack/nova/blob/master/nova/scheduler/client/report.py#L504\n\nSo yeah, if you have old flavors w/o the custom resource class pointing at the standard vcpu/memory_mb/disk_gb resource classes, and the ironic driver is no longer reporting inventory for those, the scheduler won\u0027t be able to find a match for the flavor and we\u0027ll get NoValidHost.\n\nWhew, I hope ^ is correct. If so, might be nice to document that somewhere if we haven\u0027t already.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cae6de0fee6caee982e029c36c59cc46f906728","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            },"},{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_6b5b4355","line":656,"range":{"start_line":656,"start_character":8,"end_line":656,"end_character":31},"updated":"2017-03-15 01:03:07.000000000","message":"So in Queens when we drop support for vcpus/memory_mb/disk_gb, as noted above, do we also make this an error if resource_class isn\u0027t defined on the node? If so, shouldn\u0027t we start warning about that case in Pike? Like, get your ass ready because change is coming.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"03fd893dc12f95f7607e2a3923f264be9752167d","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            },"},{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_7df8667d","line":656,"range":{"start_line":656,"start_character":8,"end_line":656,"end_character":31},"in_reply_to":"3a1ff146_6b5b4355","updated":"2017-03-15 01:20:54.000000000","message":"This is a really good idea. We should log this case, I\u0027ll also push a patch to the Ironic upgrade guide for Newton-\u003eOcata to more explicitly call out adding a resource_class to all enrolled nodes.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abb1d1380f3808f18b77dcd76734b268d009583f","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            },"},{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_b4581afc","line":656,"range":{"start_line":656,"start_character":8,"end_line":656,"end_character":31},"in_reply_to":"3a1ff146_7df8667d","updated":"2017-03-15 14:49:10.000000000","message":"Yes, we should start warning about this in Pike. I\u0027m currently working on a spec for this (not in gerrit yet) which will document all of the changes we need to make to have a smooth transition here (including ironic\u0027s upgrade guide).","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75938ab69212836b4816361916f880f6c65ee6f7","unresolved":false,"context_lines":[{"line_number":653,"context_line":"            },"},{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_d4ed968c","line":656,"range":{"start_line":656,"start_character":8,"end_line":656,"end_character":31},"in_reply_to":"3a1ff146_b4581afc","updated":"2017-03-15 15:03:11.000000000","message":"OK, we can do the warning in a follow up patch so this change isn\u0027t further held up.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cae6de0fee6caee982e029c36c59cc46f906728","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"},{"line_number":660,"context_line":"                    \u0027total\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_7d3a26cf","line":657,"range":{"start_line":657,"start_character":12,"end_line":657,"end_character":72},"updated":"2017-03-15 01:03:07.000000000","message":"Again, I worry about this if the node.resource_class already has the CUSTOM_ prefix on it. Couldn\u0027t the operator mistakenly set that? Or is the Ironic API enforcing that you can\u0027t set node.resource_class to anything that starts with CUSTOM_?","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"09a4a5afd4184502b16123565892e09971ac488e","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"},{"line_number":660,"context_line":"                    \u0027total\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_e0cf34ae","line":657,"range":{"start_line":657,"start_character":12,"end_line":657,"end_character":72},"in_reply_to":"3a1ff146_7d3a26cf","updated":"2017-03-15 13:35:32.000000000","message":"I assume this was from after we spoke last night, but as we discussed:\n\nI feel pretty strongly that this should be extremely predictable behavior, in that we take the node class and simply filter/uppercase it and slap CUSTOM_ on the front of it. Any other behavior is confusing, IMHO, and has to be replicated in other things that may look at ironic and placement (say, some custom-rolled DC inventory scripting).","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"87aaf9de5045df72d777c4d42d375dfea2523a43","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"},{"line_number":660,"context_line":"                    \u0027total\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_a1e8db7d","line":657,"range":{"start_line":657,"start_character":12,"end_line":657,"end_character":72},"in_reply_to":"3a1ff146_af09a72e","updated":"2017-03-15 15:36:30.000000000","message":"Yeah, -1 on anything that requires the ironic service to know about this. I could live with stripping it in the driver, though.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"75938ab69212836b4816361916f880f6c65ee6f7","unresolved":false,"context_lines":[{"line_number":654,"context_line":"        }"},{"line_number":655,"context_line":"        rc_name \u003d info.get(\u0027resource_class\u0027)"},{"line_number":656,"context_line":"        if rc_name is not None:"},{"line_number":657,"context_line":"            norm_name \u003d obj_fields.ResourceClass.normalize_name(rc_name)"},{"line_number":658,"context_line":"            if norm_name is not None:"},{"line_number":659,"context_line":"                result[norm_name] \u003d {"},{"line_number":660,"context_line":"                    \u0027total\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_af09a72e","line":657,"range":{"start_line":657,"start_character":12,"end_line":657,"end_character":72},"in_reply_to":"3a1ff146_e0cf34ae","updated":"2017-03-15 15:03:11.000000000","message":"I made this comment before we talked in IRC last night.\n\nI can see arguments both ways. I worry about tight-coupling the internal behavior of nova and how it tracks this stuff. For example, if Ironic isn\u0027t enforcing what I put into node.resource_class, but I read somewhere that resource classes in the placement API must start with \"CUSTOM_\", so I set node.resource_class\u003dCUSTOM_BAREMETAL_GOLD. I also put that in my flavor extra specs.\n\nNow when the Ironic virt driver reports the inventory here, it\u0027s going to result in CUSTOM_CUSTOM_BAREMETAL_GOLD which won\u0027t match my flavor extra spec and things won\u0027t be scheduled properly, and I\u0027ll probably be confused as to why since I doubt we log anything on the scheduler side when that fails (we\u0027ll just filter out all of the hosts on the placement side).\n\nOnce I figure it out, I can fix my flavor, but I\u0027d be annoyed.\n\nMaybe my fears would be less so if we detected that the node.resource_class already has the CUSTOM_ prefix and we logged a warning in that case? I assume you and Jay wouldn\u0027t like that idea, since it codifies how we expect the caller to pass this in, and to avoid the warning, Ironic could help out the operator by stripping the CUSTOM_ prefix, which again gets us back to tight-coupling the behavior between Nova, Placement and Ironic.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10342,"name":"Jay Faulkner","display_name":"JayF","email":"jay@jvf.cc","username":"JayF","status":"youtube.com/@oss-gr / podcast.gr-oss.io"},"change_message_id":"a40ac92b082d52cb40c1a09285f6b7b7dad7bb5b","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        node \u003d self._node_from_cache(nodename)"},{"line_number":689,"context_line":"        return self._node_resource(node)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    def _node_from_cache(self, nodename):"},{"line_number":692,"context_line":"        \"\"\"Returns a node from the cache, retrieving the node from Ironic API"},{"line_number":693,"context_line":"        if the node doesn\u0027t yet exist in the cache."},{"line_number":694,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_8bbfe85f","line":691,"updated":"2017-03-10 19:22:49.000000000","message":"So in get_available_nodes, we refresh this cache when it\u0027s called -- in fact, afaict, it\u0027s the only code that refreshes the cache.\n\nIs get_available_nodes going to be continue to be called regularly? Should we put some (potentially configurable) cache expiration settings/logic so that operators can have less stale data if they choose?","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6d531e16fb66fdb91b4e7397bb5581d9760b83f2","unresolved":false,"context_lines":[{"line_number":688,"context_line":"        node \u003d self._node_from_cache(nodename)"},{"line_number":689,"context_line":"        return self._node_resource(node)"},{"line_number":690,"context_line":""},{"line_number":691,"context_line":"    def _node_from_cache(self, nodename):"},{"line_number":692,"context_line":"        \"\"\"Returns a node from the cache, retrieving the node from Ironic API"},{"line_number":693,"context_line":"        if the node doesn\u0027t yet exist in the cache."},{"line_number":694,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a30ddce_fe9900c5","line":691,"in_reply_to":"9a30ddce_8bbfe85f","updated":"2017-03-10 19:32:42.000000000","message":"I think you mean get_available_resource(), but yeah. get_available_resource() is *always* called in the resource tracker before get_inventory() would ever be called. Thus, the cache is always populated before _node_from_cache() would ever be called from get_inventory(). So, there\u0027s no worry about inefficiency at this point.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0cae6de0fee6caee982e029c36c59cc46f906728","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            LOG.debug(\"Node %(node)s not found in cache, age: %(age)s\","},{"line_number":702,"context_line":"                      {\u0027node\u0027: nodename, \u0027age\u0027: cache_age})"},{"line_number":703,"context_line":"            node \u003d self._get_node(nodename)"},{"line_number":704,"context_line":"            self.node_cache[nodename] \u003d node"},{"line_number":705,"context_line":"            return node"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    def get_info(self, instance):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_1da052f4","line":704,"range":{"start_line":704,"start_character":12,"end_line":704,"end_character":44},"updated":"2017-03-15 01:03:07.000000000","message":"Why weren\u0027t we ever doing this before when this was just used in get_available_resource? I guess it happened automatically by calling get_available_nodes() which would call _refresh_cache?","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"abb1d1380f3808f18b77dcd76734b268d009583f","unresolved":false,"context_lines":[{"line_number":701,"context_line":"            LOG.debug(\"Node %(node)s not found in cache, age: %(age)s\","},{"line_number":702,"context_line":"                      {\u0027node\u0027: nodename, \u0027age\u0027: cache_age})"},{"line_number":703,"context_line":"            node \u003d self._get_node(nodename)"},{"line_number":704,"context_line":"            self.node_cache[nodename] \u003d node"},{"line_number":705,"context_line":"            return node"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"    def get_info(self, instance):"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a1ff146_f4f9b2c9","line":704,"range":{"start_line":704,"start_character":12,"end_line":704,"end_character":44},"in_reply_to":"3a1ff146_1da052f4","updated":"2017-03-15 14:49:10.000000000","message":"Yeah, this should be a rare case, and the next get_available_nodes() run will get it into the cache anyway.","commit_id":"073c0e739758a698c3f31de392b38c53edb0a400"}]}
