)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7c5d3a1abb9b39c286674e551ddc54f80029d21","unresolved":false,"context_lines":[{"line_number":249,"context_line":"    def _get_nodename(self, instance, context\u003dNone):"},{"line_number":250,"context_line":"        try:"},{"line_number":251,"context_line":"            ls \u003d instance.get(\u0027system_metadata\u0027, [])"},{"line_number":252,"context_line":"        except sqlexc.DetachedInstanceError:"},{"line_number":253,"context_line":"            if not context:"},{"line_number":254,"context_line":"                context \u003d nova.context.get_admin_context()"},{"line_number":255,"context_line":"            smd \u003d self.db.instance_system_metadata_get(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO6c%3D","line":252,"updated":"2012-10-01 23:08:43.000000000","message":"This seems really weird that sqlalchemy has to get exposed at this level. Definitely feels like an abstraction violation.","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"261078af6dc56ce2df89fc28f22a6234a4460ded","unresolved":false,"context_lines":[{"line_number":249,"context_line":"    def _get_nodename(self, instance, context\u003dNone):"},{"line_number":250,"context_line":"        try:"},{"line_number":251,"context_line":"            ls \u003d instance.get(\u0027system_metadata\u0027, [])"},{"line_number":252,"context_line":"        except sqlexc.DetachedInstanceError:"},{"line_number":253,"context_line":"            if not context:"},{"line_number":254,"context_line":"                context \u003d nova.context.get_admin_context()"},{"line_number":255,"context_line":"            smd \u003d self.db.instance_system_metadata_get(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FOF4%3D","line":252,"in_reply_to":"AAAALH%2F%2FO0U%3D","updated":"2012-10-03 17:55:18.000000000","message":"I see. Such code should be moved to nova.db.sqlalchemy.*. However, we want to go an easier way, if it is acceptable; we don\u0027t need handle the sqlalchemy exception if we don\u0027t use lazy loading at all and always call db.instance_system_metadata_get().\nis this ok?","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"0d5fb4c1fcb5a89a2d19ed77cdffa6900be4bdd5","unresolved":false,"context_lines":[{"line_number":249,"context_line":"    def _get_nodename(self, instance, context\u003dNone):"},{"line_number":250,"context_line":"        try:"},{"line_number":251,"context_line":"            ls \u003d instance.get(\u0027system_metadata\u0027, [])"},{"line_number":252,"context_line":"        except sqlexc.DetachedInstanceError:"},{"line_number":253,"context_line":"            if not context:"},{"line_number":254,"context_line":"                context \u003d nova.context.get_admin_context()"},{"line_number":255,"context_line":"            smd \u003d self.db.instance_system_metadata_get(context,"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO0U%3D","line":252,"in_reply_to":"AAAALH%2F%2FO6c%3D","updated":"2012-10-02 06:56:16.000000000","message":"agreed, we shouldn\u0027t be getitng sqlalchemy exceptions here.","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7c5d3a1abb9b39c286674e551ddc54f80029d21","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        return rt"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def _get_default_resource_tracker(self):"},{"line_number":275,"context_line":"        return self._get_resource_tracker(None)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _set_default_resource_tracker(self, rt):"},{"line_number":278,"context_line":"        self._resource_tracker_dict[None] \u003d rt"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO6Y%3D","line":275,"updated":"2012-10-01 23:08:43.000000000","message":"if _get_resource_tracker had a (self, nodename\u003dNone) this call could just be _get_resource_tracker()","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"896be75e97dbca113095a4514231710ba87f771e","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        return rt"},{"line_number":273,"context_line":""},{"line_number":274,"context_line":"    def _get_default_resource_tracker(self):"},{"line_number":275,"context_line":"        return self._get_resource_tracker(None)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def _set_default_resource_tracker(self, rt):"},{"line_number":278,"context_line":"        self._resource_tracker_dict[None] \u003d rt"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FN2o%3D","line":275,"in_reply_to":"AAAALH%2F%2FO6Y%3D","updated":"2012-10-04 02:57:12.000000000","message":"Done","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"f7c5d3a1abb9b39c286674e551ddc54f80029d21","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        self._resource_tracker_dict[None] \u003d rt"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    resource_tracker \u003d property(_get_default_resource_tracker,"},{"line_number":281,"context_line":"                                _set_default_resource_tracker)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":284,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO6U%3D","line":281,"updated":"2012-10-01 23:08:43.000000000","message":"Why isn\u0027t this in a function? or early in the class definition?","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"261078af6dc56ce2df89fc28f22a6234a4460ded","unresolved":false,"context_lines":[{"line_number":278,"context_line":"        self._resource_tracker_dict[None] \u003d rt"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    resource_tracker \u003d property(_get_default_resource_tracker,"},{"line_number":281,"context_line":"                                _set_default_resource_tracker)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":284,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FOEw%3D","line":281,"in_reply_to":"AAAALH%2F%2FO6U%3D","updated":"2012-10-03 17:55:18.000000000","message":"this resource_tracker property is needed for compatibility to existing test code that touches resource_tracker member, which is replaced _resource_tracker_dict member. is it better to modify the test code and remove this property?\n\n\u003eearly in the class definition?\n\nsorry, I don\u0027t understand you well... do you mean we should write this property in more upper in the class? (for example, right before def __init__)","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"0d5fb4c1fcb5a89a2d19ed77cdffa6900be4bdd5","unresolved":false,"context_lines":[{"line_number":2653,"context_line":"                capabilities[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2654,"context_line":"            else:"},{"line_number":2655,"context_line":"                for c in capabilities:"},{"line_number":2656,"context_line":"                    c[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2657,"context_line":"            self.update_service_capabilities(capabilities)"},{"line_number":2658,"context_line":""},{"line_number":2659,"context_line":"    @manager.periodic_task(ticks_between_runs\u003d10)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO0Q%3D","line":2656,"updated":"2012-10-02 06:56:16.000000000","message":"minor point but you could just convert to a list here:\n\n if not isinstance(capabilities, list):\n   capabilities \u003d [capabilities]\n for capability in capabilities:\n   capability[host_ip] \u003d FLAGS.my_ip","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"896be75e97dbca113095a4514231710ba87f771e","unresolved":false,"context_lines":[{"line_number":2653,"context_line":"                capabilities[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2654,"context_line":"            else:"},{"line_number":2655,"context_line":"                for c in capabilities:"},{"line_number":2656,"context_line":"                    c[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2657,"context_line":"            self.update_service_capabilities(capabilities)"},{"line_number":2658,"context_line":""},{"line_number":2659,"context_line":"    @manager.periodic_task(ticks_between_runs\u003d10)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FN2k%3D","line":2656,"in_reply_to":"AAAALH%2F%2FO0Q%3D","updated":"2012-10-04 02:57:12.000000000","message":"Done","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"f776b88cb9d0c6965054142591b216a9c43b71e2","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    def _get_nodename(self, instance, context\u003dNone):"},{"line_number":249,"context_line":"        try:"},{"line_number":250,"context_line":"            ls \u003d instance.get(\u0027system_metadata\u0027, [])"},{"line_number":251,"context_line":"        except sqlexc.DetachedInstanceError:"},{"line_number":252,"context_line":"            if not context:"},{"line_number":253,"context_line":"                context \u003d nova.context.get_admin_context()"},{"line_number":254,"context_line":"            smd \u003d self.db.instance_system_metadata_get(context,"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FNx8%3D","line":251,"updated":"2012-10-04 08:13:57.000000000","message":"yes i would prefer removing this and doing a metadata_get every time for now.","commit_id":"46ec7e74da77c2ee4945db494ad071c63f0b5919"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"f776b88cb9d0c6965054142591b216a9c43b71e2","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                self.db.instance_system_metadata_update("},{"line_number":525,"context_line":"                        context, instance[\u0027uuid\u0027],"},{"line_number":526,"context_line":"                        {\u0027node\u0027: nodename},"},{"line_number":527,"context_line":"                        delete\u003dFalse)"},{"line_number":528,"context_line":"            rt \u003d self._get_resource_tracker(nodename)"},{"line_number":529,"context_line":"            try:"},{"line_number":530,"context_line":"                limits \u003d filter_properties.get(\u0027limits\u0027, {})"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAALH%2F%2FNx4%3D","line":527,"updated":"2012-10-04 08:13:57.000000000","message":"It is nice to be able to do this without modifying the database, but we should probably consider adding a new field to instance for this. That would allow us to do it via instance_update and remove all the specialized checking above.  This will make the no-db-compute somewhat easier as well. We could even fallback to host if node is not set.","commit_id":"46ec7e74da77c2ee4945db494ad071c63f0b5919"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"35591eeb4dfb52d341629aa7dad592bd73b669c9","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if not context:"},{"line_number":249,"context_line":"            context \u003d nova.context.get_admin_context()"},{"line_number":250,"context_line":"        smd \u003d self.db.instance_system_metadata_get(context, instance[\u0027uuid\u0027])"},{"line_number":251,"context_line":"        return smd.get(\u0027node\u0027)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _get_resource_tracker(self, nodename\u003dNone):"},{"line_number":254,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FMHQ%3D","line":251,"updated":"2012-10-08 06:49:51.000000000","message":"I don\u0027t really like using system_metadata for this\n\nSince the node\u003c-\u003einstance association is stored in the bm_nodes table, why do we need it in system_metadata?\n\ni.e why not add a ComputeDriver.get_node_for_instance(instance_uuid) method?","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"2ca245b74bf46628f0ff2a13ebfa0d7c8662314f","unresolved":false,"context_lines":[{"line_number":248,"context_line":"        if not context:"},{"line_number":249,"context_line":"            context \u003d nova.context.get_admin_context()"},{"line_number":250,"context_line":"        smd \u003d self.db.instance_system_metadata_get(context, instance[\u0027uuid\u0027])"},{"line_number":251,"context_line":"        return smd.get(\u0027node\u0027)"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _get_resource_tracker(self, nodename\u003dNone):"},{"line_number":254,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FL5s%3D","line":251,"in_reply_to":"AAAALH%2F%2FMHQ%3D","updated":"2012-10-08 14:51:55.000000000","message":"In creating a new instance, the node\u003c-\u003einstance association is generated by the scheduler, stored in system_metadata and passed to the compute. Then the compute calls driver.spawn(). The association(the instance_uuid column in the bm_nodes table) is still None until driver.spawn() is called. So using system_metadata (or a newly created field like instance[\u0027node\u0027]) is necessary. We can use the bm database in the other parts.","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"35591eeb4dfb52d341629aa7dad592bd73b669c9","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        self._resource_tracker_dict[None] \u003d rt"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    resource_tracker \u003d property(_get_resource_tracker,"},{"line_number":267,"context_line":"                                _set_default_resource_tracker)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":270,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FMHU%3D","line":267,"updated":"2012-10-08 06:49:51.000000000","message":"While kind of clever, I think using a property here has the potential to just confuse things - e.g. anywhere internally in compute manager which uses this property would probably be broken for the bare-metal case\n\nIt looks like the property is just used by the tests, so I\u0027d prefer to just see the tests use get_resource_tracker(nodename\u003dNone) and set_resource_tracker(nodename\u003dNone)","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"2ca245b74bf46628f0ff2a13ebfa0d7c8662314f","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        self._resource_tracker_dict[None] \u003d rt"},{"line_number":265,"context_line":""},{"line_number":266,"context_line":"    resource_tracker \u003d property(_get_resource_tracker,"},{"line_number":267,"context_line":"                                _set_default_resource_tracker)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":270,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FL5k%3D","line":267,"in_reply_to":"AAAALH%2F%2FMHU%3D","updated":"2012-10-08 14:51:55.000000000","message":"OK, I\u0027ll modify the test rather than using the property.","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"35591eeb4dfb52d341629aa7dad592bd73b669c9","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                self.db.instance_system_metadata_update("},{"line_number":515,"context_line":"                        context, instance[\u0027uuid\u0027],"},{"line_number":516,"context_line":"                        {\u0027node\u0027: nodename},"},{"line_number":517,"context_line":"                        delete\u003dFalse)"},{"line_number":518,"context_line":"            rt \u003d self._get_resource_tracker(nodename)"},{"line_number":519,"context_line":"            try:"},{"line_number":520,"context_line":"                limits \u003d filter_properties.get(\u0027limits\u0027, {})"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FMIA%3D","line":517,"updated":"2012-10-08 06:49:51.000000000","message":"This is where we choose a bare-metal node to provision.\n\nI really don\u0027t like that this is in the compute manager. It would make much more sense in the spawn() method of the baremetal driver","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"2ca245b74bf46628f0ff2a13ebfa0d7c8662314f","unresolved":false,"context_lines":[{"line_number":514,"context_line":"                self.db.instance_system_metadata_update("},{"line_number":515,"context_line":"                        context, instance[\u0027uuid\u0027],"},{"line_number":516,"context_line":"                        {\u0027node\u0027: nodename},"},{"line_number":517,"context_line":"                        delete\u003dFalse)"},{"line_number":518,"context_line":"            rt \u003d self._get_resource_tracker(nodename)"},{"line_number":519,"context_line":"            try:"},{"line_number":520,"context_line":"                limits \u003d filter_properties.get(\u0027limits\u0027, {})"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FL6Y%3D","line":517,"in_reply_to":"AAAALH%2F%2FMIA%3D","updated":"2012-10-08 14:51:55.000000000","message":"Here is a fallback code in case that the scheduler dose not choose a node. Assuming the scheduler always choose a node, even if it is None, this if-block and ComputeDriver.get_nodename_for_new_instance() can be removed.\n\nWe cannot choose the node in spawn(), because we need to call the node\u0027s resource-tracker before spawn().","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"2a2f965d5720742051078bcf6e78769ea456c515","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        return rt"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def _set_resource_tracker(self, rt, nodename\u003dNone):"},{"line_number":258,"context_line":"        self._resource_tracker_dict[nodename] \u003d rt"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":261,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAALn%2F%2F%2Flw%3D","line":258,"updated":"2012-10-22 18:59:36.000000000","message":"This doesn\u0027t seem to be used anywhere. Can we remove it?","commit_id":"a72103754582d4838693d7fb5f0c157a0aaf219e"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"777eef282292e6a9053f50442396b0dce3068f56","unresolved":false,"context_lines":[{"line_number":255,"context_line":"        return rt"},{"line_number":256,"context_line":""},{"line_number":257,"context_line":"    def _set_resource_tracker(self, rt, nodename\u003dNone):"},{"line_number":258,"context_line":"        self._resource_tracker_dict[nodename] \u003d rt"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"    def _instance_update(self, context, instance_uuid, **kwargs):"},{"line_number":261,"context_line":"        \"\"\"Update an instance in the database using kwargs as value.\"\"\""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAALn%2F%2F%2Fgo%3D","line":258,"in_reply_to":"AAAALn%2F%2F%2Flw%3D","updated":"2012-10-22 21:25:48.000000000","message":"This method is used in test_compute.py though we can do it without this method.","commit_id":"a72103754582d4838693d7fb5f0c157a0aaf219e"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        self._resource_tracker_dict \u003d {}"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _get_resource_tracker(self, nodename\u003dNone):"},{"line_number":254,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"},{"line_number":255,"context_line":"        if not rt:"},{"line_number":256,"context_line":"            rtc \u003d self.driver.get_resource_tracker_class()"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lc%3D","line":253,"updated":"2012-11-02 12:30:40.000000000","message":"nodename doesn\u0027t need to be an optional argument, remove the default value","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":250,"context_line":""},{"line_number":251,"context_line":"        self._resource_tracker_dict \u003d {}"},{"line_number":252,"context_line":""},{"line_number":253,"context_line":"    def _get_resource_tracker(self, nodename\u003dNone):"},{"line_number":254,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"},{"line_number":255,"context_line":"        if not rt:"},{"line_number":256,"context_line":"            rtc \u003d self.driver.get_resource_tracker_class()"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1Oc%3D","line":253,"in_reply_to":"AAAALn%2F%2F1lc%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"},{"line_number":255,"context_line":"        if not rt:"},{"line_number":256,"context_line":"            rtc \u003d self.driver.get_resource_tracker_class()"},{"line_number":257,"context_line":"            if not rtc:"},{"line_number":258,"context_line":"                rtc \u003d resource_tracker.ResourceTracker"},{"line_number":259,"context_line":"            rt \u003d rtc(self.host, self.driver, nodename\u003dnodename)"},{"line_number":260,"context_line":"            self._resource_tracker_dict[nodename] \u003d rt"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lQ%3D","line":257,"updated":"2012-11-02 12:30:40.000000000","message":"Let\u0027s remove the resource tracker class overriding from this patch and move it to a later patch - I hope we can avoid having this at all, but we can dig into that when reviewing a subsequent patch\n\ni.e. remove the two lines above","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        rt \u003d self._resource_tracker_dict.get(nodename)"},{"line_number":255,"context_line":"        if not rt:"},{"line_number":256,"context_line":"            rtc \u003d self.driver.get_resource_tracker_class()"},{"line_number":257,"context_line":"            if not rtc:"},{"line_number":258,"context_line":"                rtc \u003d resource_tracker.ResourceTracker"},{"line_number":259,"context_line":"            rt \u003d rtc(self.host, self.driver, nodename\u003dnodename)"},{"line_number":260,"context_line":"            self._resource_tracker_dict[nodename] \u003d rt"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1OY%3D","line":257,"in_reply_to":"AAAALn%2F%2F1lQ%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            rtc \u003d self.driver.get_resource_tracker_class()"},{"line_number":257,"context_line":"            if not rtc:"},{"line_number":258,"context_line":"                rtc \u003d resource_tracker.ResourceTracker"},{"line_number":259,"context_line":"            rt \u003d rtc(self.host, self.driver, nodename\u003dnodename)"},{"line_number":260,"context_line":"            self._resource_tracker_dict[nodename] \u003d rt"},{"line_number":261,"context_line":"        return rt"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lU%3D","line":259,"updated":"2012-11-02 12:30:40.000000000","message":"No need for nodename\u003dnodename here, just do:\n\n  rt \u003d rtc(self.host, self.driver, nodename)","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            rtc \u003d self.driver.get_resource_tracker_class()"},{"line_number":257,"context_line":"            if not rtc:"},{"line_number":258,"context_line":"                rtc \u003d resource_tracker.ResourceTracker"},{"line_number":259,"context_line":"            rt \u003d rtc(self.host, self.driver, nodename\u003dnodename)"},{"line_number":260,"context_line":"            self._resource_tracker_dict[nodename] \u003d rt"},{"line_number":261,"context_line":"        return rt"},{"line_number":262,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1OU%3D","line":259,"in_reply_to":"AAAALn%2F%2F1lU%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":2738,"context_line":"            # to be sent to the Schedulers."},{"line_number":2739,"context_line":"            capabilities \u003d self.driver.get_host_stats(refresh\u003dTrue)"},{"line_number":2740,"context_line":"            if not isinstance(capabilities, list):"},{"line_number":2741,"context_line":"                capabilities \u003d [capabilities]"},{"line_number":2742,"context_line":"            for capability in capabilities:"},{"line_number":2743,"context_line":"                capability[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2744,"context_line":"            self.update_service_capabilities(capabilities)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lI%3D","line":2741,"updated":"2012-11-02 12:30:40.000000000","message":"We have these two lines in update_service_capabilities() too - I\u0027d prefer to remove them from here","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":2738,"context_line":"            # to be sent to the Schedulers."},{"line_number":2739,"context_line":"            capabilities \u003d self.driver.get_host_stats(refresh\u003dTrue)"},{"line_number":2740,"context_line":"            if not isinstance(capabilities, list):"},{"line_number":2741,"context_line":"                capabilities \u003d [capabilities]"},{"line_number":2742,"context_line":"            for capability in capabilities:"},{"line_number":2743,"context_line":"                capability[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2744,"context_line":"            self.update_service_capabilities(capabilities)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1es%3D","line":2741,"updated":"2012-11-02 11:53:11.000000000","message":"given that this pattern is needed all over the place, should this be a utility function?\n\ncapabilities \u003d ensure_is_list(capabilities)","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":2738,"context_line":"            # to be sent to the Schedulers."},{"line_number":2739,"context_line":"            capabilities \u003d self.driver.get_host_stats(refresh\u003dTrue)"},{"line_number":2740,"context_line":"            if not isinstance(capabilities, list):"},{"line_number":2741,"context_line":"                capabilities \u003d [capabilities]"},{"line_number":2742,"context_line":"            for capability in capabilities:"},{"line_number":2743,"context_line":"                capability[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2744,"context_line":"            self.update_service_capabilities(capabilities)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0fU%3D","line":2741,"in_reply_to":"AAAALn%2F%2F1lI%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":2739,"context_line":"            capabilities \u003d self.driver.get_host_stats(refresh\u003dTrue)"},{"line_number":2740,"context_line":"            if not isinstance(capabilities, list):"},{"line_number":2741,"context_line":"                capabilities \u003d [capabilities]"},{"line_number":2742,"context_line":"            for capability in capabilities:"},{"line_number":2743,"context_line":"                capability[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2744,"context_line":"            self.update_service_capabilities(capabilities)"},{"line_number":2745,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lE%3D","line":2742,"updated":"2012-11-02 12:30:40.000000000","message":"How about:\n\n  for capability in (caps if isinstance(caps, list) else [caps]):\n      ...","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":2739,"context_line":"            capabilities \u003d self.driver.get_host_stats(refresh\u003dTrue)"},{"line_number":2740,"context_line":"            if not isinstance(capabilities, list):"},{"line_number":2741,"context_line":"                capabilities \u003d [capabilities]"},{"line_number":2742,"context_line":"            for capability in capabilities:"},{"line_number":2743,"context_line":"                capability[\u0027host_ip\u0027] \u003d FLAGS.my_ip"},{"line_number":2744,"context_line":"            self.update_service_capabilities(capabilities)"},{"line_number":2745,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0fY%3D","line":2742,"in_reply_to":"AAAALn%2F%2F1lE%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":2910,"context_line":"        :param context: security context"},{"line_number":2911,"context_line":"        \"\"\""},{"line_number":2912,"context_line":"        nodenames \u003d self.driver.get_available_nodes()"},{"line_number":2913,"context_line":"        if nodenames is None:"},{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lA%3D","line":2913,"updated":"2012-11-02 12:30:40.000000000","message":"I don\u0027t like having 2 codepaths here - the node names code path shouldn\u0027t be just a thing that only the bare-metal driver hits\n\nWe should have a single nodename in the usual case - i.e. add a default get_available_nodes() implementation that returns i.e. [hypervisor_hostname]","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":2910,"context_line":"        :param context: security context"},{"line_number":2911,"context_line":"        \"\"\""},{"line_number":2912,"context_line":"        nodenames \u003d self.driver.get_available_nodes()"},{"line_number":2913,"context_line":"        if nodenames is None:"},{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2Fz9k%3D","line":2913,"in_reply_to":"AAAALn%2F%2F1lA%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":2911,"context_line":"        \"\"\""},{"line_number":2912,"context_line":"        nodenames \u003d self.driver.get_available_nodes()"},{"line_number":2913,"context_line":"        if nodenames is None:"},{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"},{"line_number":2917,"context_line":"            nodenames_to_remove \u003d set(self._resource_tracker_dict.keys())"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1ek%3D","line":2914,"updated":"2012-11-02 11:53:11.000000000","message":"just leave out the None?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":2911,"context_line":"        \"\"\""},{"line_number":2912,"context_line":"        nodenames \u003d self.driver.get_available_nodes()"},{"line_number":2913,"context_line":"        if nodenames is None:"},{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"},{"line_number":2917,"context_line":"            nodenames_to_remove \u003d set(self._resource_tracker_dict.keys())"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1lY%3D","line":2914,"updated":"2012-11-02 12:30:40.000000000","message":"pass nodename\u003dNone to be more explicit","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":2911,"context_line":"        \"\"\""},{"line_number":2912,"context_line":"        nodenames \u003d self.driver.get_available_nodes()"},{"line_number":2913,"context_line":"        if nodenames is None:"},{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"},{"line_number":2917,"context_line":"            nodenames_to_remove \u003d set(self._resource_tracker_dict.keys())"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0fg%3D","line":2914,"in_reply_to":"AAAALn%2F%2F1lY%3D","updated":"2012-11-05 11:09:43.000000000","message":"this line was removed","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"},{"line_number":2917,"context_line":"            nodenames_to_remove \u003d set(self._resource_tracker_dict.keys())"},{"line_number":2918,"context_line":"            for nodename in nodenames:"},{"line_number":2919,"context_line":"                rt \u003d self._get_resource_tracker(nodename)"},{"line_number":2920,"context_line":"                rt.update_available_resource(context)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1eY%3D","line":2917,"updated":"2012-11-02 11:53:11.000000000","message":"I guess I don\u0027t get why we build this list, then dump it. Is that just a work around for the underlying data structures? Seems like this could be much cleaner.","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":2914,"context_line":"            rt \u003d self._get_resource_tracker(None)"},{"line_number":2915,"context_line":"            rt.update_available_resource(context)"},{"line_number":2916,"context_line":"        else:"},{"line_number":2917,"context_line":"            nodenames_to_remove \u003d set(self._resource_tracker_dict.keys())"},{"line_number":2918,"context_line":"            for nodename in nodenames:"},{"line_number":2919,"context_line":"                rt \u003d self._get_resource_tracker(nodename)"},{"line_number":2920,"context_line":"                rt.update_available_resource(context)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0f0%3D","line":2917,"in_reply_to":"AAAALn%2F%2F1eY%3D","updated":"2012-11-05 11:09:43.000000000","message":"Please check new one","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"}],"nova/compute/resource_tracker.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    are built and destroyed."},{"line_number":110,"context_line":"    \"\"\""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def __init__(self, host, driver, nodename\u003dNone):"},{"line_number":113,"context_line":"        self.host \u003d host"},{"line_number":114,"context_line":"        self.driver \u003d driver"},{"line_number":115,"context_line":"        self.nodename \u003d nodename"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1k4%3D","line":112,"updated":"2012-11-02 12:30:40.000000000","message":"nodename should not be optional","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":109,"context_line":"    are built and destroyed."},{"line_number":110,"context_line":"    \"\"\""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    def __init__(self, host, driver, nodename\u003dNone):"},{"line_number":113,"context_line":"        self.host \u003d host"},{"line_number":114,"context_line":"        self.driver \u003d driver"},{"line_number":115,"context_line":"        self.nodename \u003d nodename"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0i4%3D","line":112,"in_reply_to":"AAAALn%2F%2F1k4%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        declared a need for resources, but not necessarily retrieved them from"},{"line_number":359,"context_line":"        the hypervisor layer yet."},{"line_number":360,"context_line":"        \"\"\""},{"line_number":361,"context_line":"        if self.nodename is None:"},{"line_number":362,"context_line":"            resources \u003d self.driver.get_available_resource()"},{"line_number":363,"context_line":"        else:"},{"line_number":364,"context_line":"            resources \u003d self.driver.get_available_node_resource(self.nodename)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1eU%3D","line":361,"updated":"2012-11-02 11:53:11.000000000","message":"how about\n\n if not self.nodename:","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":358,"context_line":"        declared a need for resources, but not necessarily retrieved them from"},{"line_number":359,"context_line":"        the hypervisor layer yet."},{"line_number":360,"context_line":"        \"\"\""},{"line_number":361,"context_line":"        if self.nodename is None:"},{"line_number":362,"context_line":"            resources \u003d self.driver.get_available_resource()"},{"line_number":363,"context_line":"        else:"},{"line_number":364,"context_line":"            resources \u003d self.driver.get_available_node_resource(self.nodename)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0dc%3D","line":361,"in_reply_to":"AAAALn%2F%2F1eU%3D","updated":"2012-11-05 11:09:43.000000000","message":"I used \"is None\" because I did not want to pass empty (\"\") here. Anyway, this line was removed.","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        if self.nodename is None:"},{"line_number":362,"context_line":"            resources \u003d self.driver.get_available_resource()"},{"line_number":363,"context_line":"        else:"},{"line_number":364,"context_line":"            resources \u003d self.driver.get_available_node_resource(self.nodename)"},{"line_number":365,"context_line":"        if not resources:"},{"line_number":366,"context_line":"            # The virt driver does not support this function"},{"line_number":367,"context_line":"            method \u003d \u0027get_available_resource\u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1k0%3D","line":364,"updated":"2012-11-02 12:30:40.000000000","message":"Let\u0027s avoid the two code paths here too\n\nMake get_available_resource() take a nodename which most drivers will ignore","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        if self.nodename is None:"},{"line_number":362,"context_line":"            resources \u003d self.driver.get_available_resource()"},{"line_number":363,"context_line":"        else:"},{"line_number":364,"context_line":"            resources \u003d self.driver.get_available_node_resource(self.nodename)"},{"line_number":365,"context_line":"        if not resources:"},{"line_number":366,"context_line":"            # The virt driver does not support this function"},{"line_number":367,"context_line":"            method \u003d \u0027get_available_resource\u0027"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0iQ%3D","line":364,"in_reply_to":"AAAALn%2F%2F1k0%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":366,"context_line":"            # The virt driver does not support this function"},{"line_number":367,"context_line":"            method \u003d \u0027get_available_resource\u0027"},{"line_number":368,"context_line":"            if self.nodename is not None:"},{"line_number":369,"context_line":"                method \u003d \u0027get_available_node_resource\u0027"},{"line_number":370,"context_line":"            LOG.audit(_(\"Virt driver does not support \""},{"line_number":371,"context_line":"                \"\u0027%s\u0027  Compute tracking is disabled.\") % method)"},{"line_number":372,"context_line":"            self.compute_node \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1ko%3D","line":369,"updated":"2012-11-02 12:30:40.000000000","message":"This would mean we could avoid this change too","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":366,"context_line":"            # The virt driver does not support this function"},{"line_number":367,"context_line":"            method \u003d \u0027get_available_resource\u0027"},{"line_number":368,"context_line":"            if self.nodename is not None:"},{"line_number":369,"context_line":"                method \u003d \u0027get_available_node_resource\u0027"},{"line_number":370,"context_line":"            LOG.audit(_(\"Virt driver does not support \""},{"line_number":371,"context_line":"                \"\u0027%s\u0027  Compute tracking is disabled.\") % method)"},{"line_number":372,"context_line":"            self.compute_node \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0iM%3D","line":369,"in_reply_to":"AAAALn%2F%2F1ko%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":387,"context_line":"            for instance in instances:"},{"line_number":388,"context_line":"                if instance.get(\u0027node\u0027) \u003d\u003d self.nodename:"},{"line_number":389,"context_line":"                    node_instances.append(instance)"},{"line_number":390,"context_line":"            instances \u003d node_instances"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        # Now calculate usage based on instance utilization:"},{"line_number":393,"context_line":"        self._update_usage_from_instances(resources, instances)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1kg%3D","line":390,"updated":"2012-11-02 12:30:40.000000000","message":"I\u0027d like this code path to be exercised with all virt drivers\n\nAgain, we should make normal virt drivers report a node name too","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":387,"context_line":"            for instance in instances:"},{"line_number":388,"context_line":"                if instance.get(\u0027node\u0027) \u003d\u003d self.nodename:"},{"line_number":389,"context_line":"                    node_instances.append(instance)"},{"line_number":390,"context_line":"            instances \u003d node_instances"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        # Now calculate usage based on instance utilization:"},{"line_number":393,"context_line":"        self._update_usage_from_instances(resources, instances)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0dQ%3D","line":390,"in_reply_to":"AAAALn%2F%2F1kg%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done, simply removed \"if\".\nBTW, I think what we really need is:\n\n    instances \u003d db.instance_get_all_by_host_and_node(context, self.host, self.nodename)","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                    for cn in compute_node_ref:"},{"line_number":413,"context_line":"                        if cn.get(\u0027hypervisor_hostname\u0027) \u003d\u003d self.nodename:"},{"line_number":414,"context_line":"                            self.compute_node \u003d cn"},{"line_number":415,"context_line":"                            break"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        if not self.compute_node:"},{"line_number":418,"context_line":"            # Need to create the ComputeNode record:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1kY%3D","line":415,"updated":"2012-11-02 12:30:40.000000000","message":"Again, would like this code path to be exercised with all drivers","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                    for cn in compute_node_ref:"},{"line_number":413,"context_line":"                        if cn.get(\u0027hypervisor_hostname\u0027) \u003d\u003d self.nodename:"},{"line_number":414,"context_line":"                            self.compute_node \u003d cn"},{"line_number":415,"context_line":"                            break"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        if not self.compute_node:"},{"line_number":418,"context_line":"            # Need to create the ComputeNode record:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2Fz9g%3D","line":415,"in_reply_to":"AAAALn%2F%2F1kY%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done. BTW, should we do something like this?\n\n    compute_node_ref \u003d db.compute_node_get_by_service_and_node(context, service[\u0027id\u0027], self.nodename)","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        \"\"\""},{"line_number":490,"context_line":"        resources[\u0027memory_mb_used\u0027] +\u003d sign * instance[\u0027memory_mb\u0027]"},{"line_number":491,"context_line":"        resources[\u0027local_gb_used\u0027] +\u003d sign * instance[\u0027root_gb\u0027]"},{"line_number":492,"context_line":"        resources[\u0027local_gb_used\u0027] +\u003d sign * instance[\u0027ephemeral_gb\u0027]"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def _update_usage_from_instance(self, resources, instance):"},{"line_number":495,"context_line":"        \"\"\"Update usage for a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1fQ%3D","line":492,"updated":"2012-11-02 12:30:40.000000000","message":"There doesn\u0027t appear to be any particular reason for adding this method\n\nIf you need it in a later patch, add it in that patch\n\nAlso, the method should be underscore-prefixed since it\u0027s private","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        \"\"\""},{"line_number":490,"context_line":"        resources[\u0027memory_mb_used\u0027] +\u003d sign * instance[\u0027memory_mb\u0027]"},{"line_number":491,"context_line":"        resources[\u0027local_gb_used\u0027] +\u003d sign * instance[\u0027root_gb\u0027]"},{"line_number":492,"context_line":"        resources[\u0027local_gb_used\u0027] +\u003d sign * instance[\u0027ephemeral_gb\u0027]"},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"    def _update_usage_from_instance(self, resources, instance):"},{"line_number":495,"context_line":"        \"\"\"Update usage for a single instance.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1Iw%3D","line":492,"in_reply_to":"AAAALn%2F%2F1fQ%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            hhn \u003d resources.get(\u0027hypervisor_hostname\u0027)"},{"line_number":564,"context_line":"            if hhn !\u003d self.nodename:"},{"line_number":565,"context_line":"                reason \u003d _(\"hypervisor_hostname must equal to nodename\")"},{"line_number":566,"context_line":"                raise exception.InvalidInput(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1fA%3D","line":566,"updated":"2012-11-02 12:30:40.000000000","message":"This seems like a pretty bizarre check - what user configuration or user action could result in this situation happening?\n\nIt looks like a \"check the code isn\u0027t broken\" assertion, which should really be done through unit tests rather than at runtime","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":563,"context_line":"            hhn \u003d resources.get(\u0027hypervisor_hostname\u0027)"},{"line_number":564,"context_line":"            if hhn !\u003d self.nodename:"},{"line_number":565,"context_line":"                reason \u003d _(\"hypervisor_hostname must equal to nodename\")"},{"line_number":566,"context_line":"                raise exception.InvalidInput(reason\u003dreason)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0dI%3D","line":566,"in_reply_to":"AAAALn%2F%2F1fA%3D","updated":"2012-11-05 11:09:43.000000000","message":"I removed this. The unit tests will come later...","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        node_instances \u003d []"},{"line_number":380,"context_line":"        for instance in all_instances:"},{"line_number":381,"context_line":"            if instance.get(\u0027node\u0027) \u003d\u003d self.nodename:"},{"line_number":382,"context_line":"                node_instances.append(instance)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        # Now calculate usage based on instance utilization:"},{"line_number":385,"context_line":"        self._update_usage_from_instances(resources, node_instances)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz4s%3D","line":382,"updated":"2012-11-05 14:43:11.000000000","message":"As you said, we should make this:\n\n  instances \u003d db.instance_get_all_by_host_and_node(context, self.host, self.nodename)","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":379,"context_line":"        node_instances \u003d []"},{"line_number":380,"context_line":"        for instance in all_instances:"},{"line_number":381,"context_line":"            if instance.get(\u0027node\u0027) \u003d\u003d self.nodename:"},{"line_number":382,"context_line":"                node_instances.append(instance)"},{"line_number":383,"context_line":""},{"line_number":384,"context_line":"        # Now calculate usage based on instance utilization:"},{"line_number":385,"context_line":"        self._update_usage_from_instances(resources, node_instances)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fynk%3D","line":382,"in_reply_to":"AAAALn%2F%2Fz4s%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                for cn in compute_node_refs:"},{"line_number":402,"context_line":"                    if cn.get(\u0027hypervisor_hostname\u0027) \u003d\u003d self.nodename:"},{"line_number":403,"context_line":"                        self.compute_node \u003d cn"},{"line_number":404,"context_line":"                        break"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        if not self.compute_node:"},{"line_number":407,"context_line":"            # Need to create the ComputeNode record:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz4E%3D","line":404,"updated":"2012-11-05 14:43:11.000000000","message":"Your suggestion was:\n\n  compute_node_ref \u003d db.compute_node_get_by_service_and_node(context, service[\u0027id\u0027], self.nodename)\n\nThat would be a needless extra query, so I don\u0027t think that makes sense","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                for cn in compute_node_refs:"},{"line_number":402,"context_line":"                    if cn.get(\u0027hypervisor_hostname\u0027) \u003d\u003d self.nodename:"},{"line_number":403,"context_line":"                        self.compute_node \u003d cn"},{"line_number":404,"context_line":"                        break"},{"line_number":405,"context_line":""},{"line_number":406,"context_line":"        if not self.compute_node:"},{"line_number":407,"context_line":"            # Need to create the ComputeNode record:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fyng%3D","line":404,"in_reply_to":"AAAALn%2F%2Fz4E%3D","updated":"2012-11-07 07:43:26.000000000","message":"I see, I leave it unchanged","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/db/sqlalchemy/migrate_repo/versions/135_add_node_to_instances.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    node \u003d Column(\u0027node\u0027, String(length\u003d255))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    instances.create_column(node)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1e0%3D","line":27,"updated":"2012-11-02 12:30:40.000000000","message":"If we use this field for all virt drivers like I suggested, we\u0027ll also need the migration to populate the column (from compute_nodes.hypervisor_hostname I guess?)","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    node \u003d Column(\u0027node\u0027, String(length\u003d255))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    instances.create_column(node)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1dw%3D","line":27,"updated":"2012-11-02 11:53:11.000000000","message":"Should this have a default value of \"\", or are we happy will nulls here?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    node \u003d Column(\u0027node\u0027, String(length\u003d255))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    instances.create_column(node)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2Fz9c%3D","line":27,"in_reply_to":"AAAALn%2F%2F1e0%3D","updated":"2012-11-05 11:09:43.000000000","message":"I added the migration.\n\nSean:ComputeNode.hypervisor_hostname have a default of null, so Instance.node is also null by default.","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":24,"context_line":"    meta.bind \u003d migrate_engine"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    instances \u003d Table(\u0027instances\u0027, meta, autoload\u003dTrue)"},{"line_number":27,"context_line":"    node \u003d Column(\u0027node\u0027, String(length\u003d255))"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    instances.create_column(node)"},{"line_number":30,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz1I%3D","line":27,"updated":"2012-11-05 14:43:11.000000000","message":"I\u0027d prefer not to support node\u003dNone as a special value here - do we want nullable\u003dFalse here?","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    for (instance_id, hypervisor_hostname) in q.execute():"},{"line_number":45,"context_line":"        instances.update().where(instances.c.id \u003d\u003d instance_id).\\"},{"line_number":46,"context_line":"                           values(node\u003dhypervisor_hostname).\\"},{"line_number":47,"context_line":"                           execute()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz1E%3D","line":47,"updated":"2012-11-05 14:43:11.000000000","message":"Should we also ensure that all ComputeNode entries have a hypervisor_hostname value set?","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    for (instance_id, hypervisor_hostname) in q.execute():"},{"line_number":45,"context_line":"        instances.update().where(instances.c.id \u003d\u003d instance_id).\\"},{"line_number":46,"context_line":"                           values(node\u003dhypervisor_hostname).\\"},{"line_number":47,"context_line":"                           execute()"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FynA%3D","line":47,"in_reply_to":"AAAALn%2F%2Fz1E%3D","updated":"2012-11-07 07:43:26.000000000","message":"If compute_node[\u0027hypervisor_hostname\u0027] is None, we cannot know what is a valid hypervisor_hostname in this migration script. It is available only in running nova-compute. So what all we can do here is leaving it None. Then, in nova-compute, we can migrate those instances and the compute_node with a valid hypervisor_hostname in nova-compute.","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/db/sqlalchemy/models.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    # EC2 disable_api_termination"},{"line_number":303,"context_line":"    disable_terminate \u003d Column(Boolean(), default\u003dFalse, nullable\u003dFalse)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    node \u003d Column(String(255))"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class InstanceInfoCache(BASE, NovaBase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1ew%3D","line":305,"updated":"2012-11-02 12:30:40.000000000","message":"I think you should move this up to be beside the \u0027host\u0027 column and add a comment explaining the difference between the two columns","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":302,"context_line":"    # EC2 disable_api_termination"},{"line_number":303,"context_line":"    disable_terminate \u003d Column(Boolean(), default\u003dFalse, nullable\u003dFalse)"},{"line_number":304,"context_line":""},{"line_number":305,"context_line":"    node \u003d Column(String(255))"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"class InstanceInfoCache(BASE, NovaBase):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0ds%3D","line":305,"in_reply_to":"AAAALn%2F%2F1ew%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"}],"nova/manager.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            LOG.debug(_(\u0027Notifying Schedulers of capabilities ...\u0027))"},{"line_number":238,"context_line":"            for capability_item in self.last_capabilities:"},{"line_number":239,"context_line":"                name \u003d capability_item.get(\u0027service_name\u0027, self.service_name)"},{"line_number":240,"context_line":"                host \u003d capability_item.get(\u0027host\u0027, self.host)"},{"line_number":241,"context_line":"                self.scheduler_rpcapi.update_service_capabilities(context,"},{"line_number":242,"context_line":"                        name, host, capability_item)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1eg%3D","line":240,"updated":"2012-11-02 12:30:40.000000000","message":"I don\u0027t like the fallback to self.host and self.service_name here - we should require that the capabilities always contains those fields","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":237,"context_line":"            LOG.debug(_(\u0027Notifying Schedulers of capabilities ...\u0027))"},{"line_number":238,"context_line":"            for capability_item in self.last_capabilities:"},{"line_number":239,"context_line":"                name \u003d capability_item.get(\u0027service_name\u0027, self.service_name)"},{"line_number":240,"context_line":"                host \u003d capability_item.get(\u0027host\u0027, self.host)"},{"line_number":241,"context_line":"                self.scheduler_rpcapi.update_service_capabilities(context,"},{"line_number":242,"context_line":"                        name, host, capability_item)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1Mg%3D","line":240,"in_reply_to":"AAAALn%2F%2F1eg%3D","updated":"2012-11-05 11:09:43.000000000","message":"I check it again and noticed that we can always use self.host and self.service_name here. They don\u0027t need to be in capabilities.","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                name \u003d capability_item.get(\u0027service_name\u0027, self.service_name)"},{"line_number":240,"context_line":"                host \u003d capability_item.get(\u0027host\u0027, self.host)"},{"line_number":241,"context_line":"                self.scheduler_rpcapi.update_service_capabilities(context,"},{"line_number":242,"context_line":"                        name, host, capability_item)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1eo%3D","line":242,"updated":"2012-11-02 12:30:40.000000000","message":"Hmm, the multiple RPC calls is not ideal\n\nWe should add an RPC API method that can update the capabilities of multiple nodes at once","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":239,"context_line":"                name \u003d capability_item.get(\u0027service_name\u0027, self.service_name)"},{"line_number":240,"context_line":"                host \u003d capability_item.get(\u0027host\u0027, self.host)"},{"line_number":241,"context_line":"                self.scheduler_rpcapi.update_service_capabilities(context,"},{"line_number":242,"context_line":"                        name, host, capability_item)"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1LY%3D","line":242,"in_reply_to":"AAAALn%2F%2F1eo%3D","updated":"2012-11-05 11:09:43.000000000","message":"I would like to leave it multiple RPC in this patch, ok?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            LOG.debug(_(\u0027Notifying Schedulers of capabilities ...\u0027))"},{"line_number":258,"context_line":"            for capability_item in self.last_capabilities:"},{"line_number":259,"context_line":"                self.scheduler_rpcapi.update_service_capabilities(context,"},{"line_number":260,"context_line":"                        self.service_name, self.host, capability_item)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz1A%3D","line":260,"updated":"2012-11-05 14:43:11.000000000","message":"Please add a TODO about changing the RPC API to support updating multiple capabilities at once","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":257,"context_line":"            LOG.debug(_(\u0027Notifying Schedulers of capabilities ...\u0027))"},{"line_number":258,"context_line":"            for capability_item in self.last_capabilities:"},{"line_number":259,"context_line":"                self.scheduler_rpcapi.update_service_capabilities(context,"},{"line_number":260,"context_line":"                        self.service_name, self.host, capability_item)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fym8%3D","line":260,"in_reply_to":"AAAALn%2F%2Fz1A%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/scheduler/driver.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    \u0027\u0027\u0027"},{"line_number":95,"context_line":"    now \u003d timeutils.utcnow()"},{"line_number":96,"context_line":"    values \u003d {\u0027host\u0027: None, \u0027scheduled_at\u0027: now}"},{"line_number":97,"context_line":"    return db.instance_update(context, instance_uuid, values)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def db_instance_node_set(context, instance_uuid, node):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1eM%3D","line":97,"updated":"2012-11-02 12:30:40.000000000","message":"We should just set the node column in this method","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    \u0027\u0027\u0027"},{"line_number":95,"context_line":"    now \u003d timeutils.utcnow()"},{"line_number":96,"context_line":"    values \u003d {\u0027host\u0027: None, \u0027scheduled_at\u0027: now}"},{"line_number":97,"context_line":"    return db.instance_update(context, instance_uuid, values)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def db_instance_node_set(context, instance_uuid, node):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0eY%3D","line":97,"in_reply_to":"AAAALn%2F%2F1eM%3D","updated":"2012-11-05 11:09:43.000000000","message":"It seems to need to change cast_to_compute_host() and cast_to_host() too. I cannot understand how they are used (Used in only tests for themselves?), so left instance_update_db() unchanged and added db_instance_node_set(). Anyway, do we have to change it in this patch?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    return db.instance_update(context, instance_uuid, values)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def db_instance_node_set(context, instance_uuid, node):"},{"line_number":101,"context_line":"    \u0027\u0027\u0027Set the node field of an Instance."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    :returns: An Instance with the updated fields set properly."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1dk%3D","line":100,"updated":"2012-11-02 11:53:11.000000000","message":"reason for not using the existing update function for instance?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":97,"context_line":"    return db.instance_update(context, instance_uuid, values)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"def db_instance_node_set(context, instance_uuid, node):"},{"line_number":101,"context_line":"    \u0027\u0027\u0027Set the node field of an Instance."},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    :returns: An Instance with the updated fields set properly."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0eg%3D","line":100,"in_reply_to":"AAAALn%2F%2F1dk%3D","updated":"2012-11-05 11:09:43.000000000","message":"See the comment above.","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"}],"nova/scheduler/filter_scheduler.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"35591eeb4dfb52d341629aa7dad592bd73b669c9","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                instance_uuid, weighted_host.host_state.host,"},{"line_number":155,"context_line":"                system_metadata\u003dsmd_dic)"},{"line_number":156,"context_line":"        # Ensure system_metadata is loaded and included in rpc payload"},{"line_number":157,"context_line":"        updated_instance.get(\u0027system_metadata\u0027)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        self.compute_rpcapi.run_instance(context, instance\u003dupdated_instance,"},{"line_number":160,"context_line":"                host\u003dweighted_host.host_state.host,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FMHk%3D","line":157,"updated":"2012-10-08 06:49:51.000000000","message":"If system_metadata wasn\u0027t included in the RPC before and is now required, then we need to bump the minor version number of the compute RPC API","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"2ca245b74bf46628f0ff2a13ebfa0d7c8662314f","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                instance_uuid, weighted_host.host_state.host,"},{"line_number":155,"context_line":"                system_metadata\u003dsmd_dic)"},{"line_number":156,"context_line":"        # Ensure system_metadata is loaded and included in rpc payload"},{"line_number":157,"context_line":"        updated_instance.get(\u0027system_metadata\u0027)"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"        self.compute_rpcapi.run_instance(context, instance\u003dupdated_instance,"},{"line_number":160,"context_line":"                host\u003dweighted_host.host_state.host,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAALH%2F%2FL5I%3D","line":157,"in_reply_to":"AAAALH%2F%2FMHk%3D","updated":"2012-10-08 14:51:55.000000000","message":"OK. It is true if we stop using system_metadata and use a newly added field in instance, isn\u0027t it?","commit_id":"166d75dd48c94eabb9e2a7825f475f72999be023"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        driver.db_instance_node_set(context,"},{"line_number":146,"context_line":"                instance_uuid, weighted_host.host_state.nodename)"},{"line_number":147,"context_line":"        updated_instance \u003d driver.instance_update_db(context,"},{"line_number":148,"context_line":"                instance_uuid)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.compute_rpcapi.run_instance(context, instance\u003dupdated_instance,"},{"line_number":151,"context_line":"                host\u003dweighted_host.host_state.host,"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1eE%3D","line":148,"updated":"2012-11-02 12:30:40.000000000","message":"As I said in a previous comment, we have two separate updates of the same row here","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        driver.db_instance_node_set(context,"},{"line_number":146,"context_line":"                instance_uuid, weighted_host.host_state.nodename)"},{"line_number":147,"context_line":"        updated_instance \u003d driver.instance_update_db(context,"},{"line_number":148,"context_line":"                instance_uuid)"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"        self.compute_rpcapi.run_instance(context, instance\u003dupdated_instance,"},{"line_number":151,"context_line":"                host\u003dweighted_host.host_state.host,"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0do%3D","line":148,"in_reply_to":"AAAALn%2F%2F1eE%3D","updated":"2012-11-05 11:09:43.000000000","message":"See the comment in scheduler/driver.py","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        driver.db_instance_node_set(context,"},{"line_number":140,"context_line":"                instance_uuid, weighted_host.host_state.nodename)"},{"line_number":141,"context_line":"        updated_instance \u003d driver.instance_update_db(context,"},{"line_number":142,"context_line":"                instance_uuid)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._post_select_populate_filter_properties(filter_properties,"},{"line_number":145,"context_line":"                weighted_host.host_state)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz08%3D","line":142,"updated":"2012-11-05 14:43:11.000000000","message":"Please add a TODO about combining these DB updates into one","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":139,"context_line":"        driver.db_instance_node_set(context,"},{"line_number":140,"context_line":"                instance_uuid, weighted_host.host_state.nodename)"},{"line_number":141,"context_line":"        updated_instance \u003d driver.instance_update_db(context,"},{"line_number":142,"context_line":"                instance_uuid)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        self._post_select_populate_filter_properties(filter_properties,"},{"line_number":145,"context_line":"                weighted_host.host_state)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fym4%3D","line":142,"in_reply_to":"AAAALn%2F%2Fz08%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/scheduler/host_manager.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                       \u0027are not same in capabilities from %(host)s\u0027),"},{"line_number":112,"context_line":"                      {\u0027node\u0027: self.nodename,"},{"line_number":113,"context_line":"                       \u0027hvhn\u0027: self.capabilities.get(\u0027hypervisor_hostname\u0027),"},{"line_number":114,"context_line":"                       \u0027host\u0027: self.host})"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        if service is None:"},{"line_number":117,"context_line":"            service \u003d {}"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1d8%3D","line":114,"updated":"2012-11-02 12:30:40.000000000","message":"Again, under what circumstances can this happen (e.g. user mis-configuration) ?\n\nIf it can only happen if someone breaks some assumption in the code, we should be checking those assumptions in unit tests","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                       \u0027are not same in capabilities from %(host)s\u0027),"},{"line_number":112,"context_line":"                      {\u0027node\u0027: self.nodename,"},{"line_number":113,"context_line":"                       \u0027hvhn\u0027: self.capabilities.get(\u0027hypervisor_hostname\u0027),"},{"line_number":114,"context_line":"                       \u0027host\u0027: self.host})"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        if service is None:"},{"line_number":117,"context_line":"            service \u003d {}"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2Fz9Y%3D","line":114,"in_reply_to":"AAAALn%2F%2F1d8%3D","updated":"2012-11-05 11:09:43.000000000","message":"I removed it","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def __repr__(self):"},{"line_number":271,"context_line":"        host_node \u003d self.host"},{"line_number":272,"context_line":"        if self.nodename is not None:"},{"line_number":273,"context_line":"            host_node \u003d \"%s/%s\" % (self.host, self.nodename)"},{"line_number":274,"context_line":"        return (\"%s ram:%s disk:%s io_ops:%s instances:%s vm_type:%s\" %"},{"line_number":275,"context_line":"                (host_node, self.free_ram_mb, self.free_disk_mb,"},{"line_number":276,"context_line":"                 self.num_io_ops, self.num_instances, self.allowed_vm_type))"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1d0%3D","line":273,"updated":"2012-11-02 12:30:40.000000000","message":"Again, I think a compute node should always have a node name","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":270,"context_line":"    def __repr__(self):"},{"line_number":271,"context_line":"        host_node \u003d self.host"},{"line_number":272,"context_line":"        if self.nodename is not None:"},{"line_number":273,"context_line":"            host_node \u003d \"%s/%s\" % (self.host, self.nodename)"},{"line_number":274,"context_line":"        return (\"%s ram:%s disk:%s io_ops:%s instances:%s vm_type:%s\" %"},{"line_number":275,"context_line":"                (host_node, self.free_ram_mb, self.free_disk_mb,"},{"line_number":276,"context_line":"                 self.num_io_ops, self.num_instances, self.allowed_vm_type))"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2Fz9I%3D","line":273,"in_reply_to":"AAAALn%2F%2F1d0%3D","updated":"2012-11-05 11:09:43.000000000","message":"I removed these lines (though still nodename can be None)","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        if self.nodename is not None:"},{"line_number":273,"context_line":"            host_node \u003d \"%s/%s\" % (self.host, self.nodename)"},{"line_number":274,"context_line":"        return (\"%s ram:%s disk:%s io_ops:%s instances:%s vm_type:%s\" %"},{"line_number":275,"context_line":"                (host_node, self.free_ram_mb, self.free_disk_mb,"},{"line_number":276,"context_line":"                 self.num_io_ops, self.num_instances, self.allowed_vm_type))"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1cY%3D","line":275,"updated":"2012-11-02 12:30:40.000000000","message":"So, here you\u0027d just do:\n\n  \"%s/%s ....\" %\n  (self.host, self.nodename, ...","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":272,"context_line":"        if self.nodename is not None:"},{"line_number":273,"context_line":"            host_node \u003d \"%s/%s\" % (self.host, self.nodename)"},{"line_number":274,"context_line":"        return (\"%s ram:%s disk:%s io_ops:%s instances:%s vm_type:%s\" %"},{"line_number":275,"context_line":"                (host_node, self.free_ram_mb, self.free_disk_mb,"},{"line_number":276,"context_line":"                 self.num_io_ops, self.num_instances, self.allowed_vm_type))"},{"line_number":277,"context_line":""},{"line_number":278,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0aU%3D","line":275,"in_reply_to":"AAAALn%2F%2F1cY%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done with \"(%s, %s) ... \", self.host, self.nodename, ...","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    host_state_cls \u003d HostState"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def __init__(self):"},{"line_number":286,"context_line":"        self.service_states \u003d {}  # { \u003chost\u003e : { \u003cservice\u003e : { cap k : v }}}"},{"line_number":287,"context_line":"        self.filter_classes \u003d filters.get_filter_classes("},{"line_number":288,"context_line":"                FLAGS.scheduler_available_filters)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1dg%3D","line":286,"updated":"2012-11-02 12:30:40.000000000","message":"This comment needs to be updated - the key is now \u003chost\u003e/\u003chypervisor_hostname\u003e","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":283,"context_line":"    host_state_cls \u003d HostState"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def __init__(self):"},{"line_number":286,"context_line":"        self.service_states \u003d {}  # { \u003chost\u003e : { \u003cservice\u003e : { cap k : v }}}"},{"line_number":287,"context_line":"        self.filter_classes \u003d filters.get_filter_classes("},{"line_number":288,"context_line":"                FLAGS.scheduler_available_filters)"},{"line_number":289,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0hk%3D","line":286,"in_reply_to":"AAAALn%2F%2F1dg%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def update_service_capabilities(self, service_name, host, capabilities):"},{"line_number":331,"context_line":"        \"\"\"Update the per-service capabilities based on this notification.\"\"\""},{"line_number":332,"context_line":"        # services_states is always keyed by \u0027host/hypervisor_hostname\u0027"},{"line_number":333,"context_line":"        # regardless of whether the service is multi-node or not."},{"line_number":334,"context_line":"        nodename \u003d capabilities.get(\u0027hypervisor_hostname\u0027)"},{"line_number":335,"context_line":"        if nodename is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1ds%3D","line":332,"updated":"2012-11-02 12:30:40.000000000","message":"s/services_states/service_states/","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    def update_service_capabilities(self, service_name, host, capabilities):"},{"line_number":331,"context_line":"        \"\"\"Update the per-service capabilities based on this notification.\"\"\""},{"line_number":332,"context_line":"        # services_states is always keyed by \u0027host/hypervisor_hostname\u0027"},{"line_number":333,"context_line":"        # regardless of whether the service is multi-node or not."},{"line_number":334,"context_line":"        nodename \u003d capabilities.get(\u0027hypervisor_hostname\u0027)"},{"line_number":335,"context_line":"        if nodename is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0iE%3D","line":332,"in_reply_to":"AAAALn%2F%2F1ds%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        if nodename is not None:"},{"line_number":336,"context_line":"            state_key \u003d \"%s/%s\" % (host, nodename)"},{"line_number":337,"context_line":"        else:"},{"line_number":338,"context_line":"            state_key \u003d host"},{"line_number":339,"context_line":"        LOG.debug(_(\"Received %(service_name)s service update from \""},{"line_number":340,"context_line":"                    \"%(state_key)s.\") % locals())"},{"line_number":341,"context_line":"        service_caps \u003d self.service_states.get(state_key, {})"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1do%3D","line":338,"updated":"2012-11-02 12:30:40.000000000","message":"Shouldn\u0027t we require all drivers to set hypervisor_hostname ?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        if nodename is not None:"},{"line_number":336,"context_line":"            state_key \u003d \"%s/%s\" % (host, nodename)"},{"line_number":337,"context_line":"        else:"},{"line_number":338,"context_line":"            state_key \u003d host"},{"line_number":339,"context_line":"        LOG.debug(_(\"Received %(service_name)s service update from \""},{"line_number":340,"context_line":"                    \"%(state_key)s.\") % locals())"},{"line_number":341,"context_line":"        service_caps \u003d self.service_states.get(state_key, {})"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0c4%3D","line":338,"in_reply_to":"AAAALn%2F%2F1do%3D","updated":"2012-11-05 11:09:43.000000000","message":"I modified code to search both (host, compute_node[\u0027hypervisor_hostname\u0027]) and (host, None) in get_all_host_states(). It allows capabilities[\u0027hypervisor_hostname\u0027] to be None.","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        capab_copy \u003d dict(capabilities)"},{"line_number":344,"context_line":"        capab_copy[\"timestamp\"] \u003d timeutils.utcnow()  # Reported time"},{"line_number":345,"context_line":"        service_caps[service_name] \u003d capab_copy"},{"line_number":346,"context_line":"        self.service_states[state_key] \u003d service_caps"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def get_all_host_states(self, context, topic):"},{"line_number":349,"context_line":"        \"\"\"Returns a dict of all the hosts the HostManager"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1cg%3D","line":346,"updated":"2012-11-02 12:30:40.000000000","message":"I think it\u0027s easier to just do:\n\n  self.service_states[(host, nodename)] \u003d service_caps","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        capab_copy \u003d dict(capabilities)"},{"line_number":344,"context_line":"        capab_copy[\"timestamp\"] \u003d timeutils.utcnow()  # Reported time"},{"line_number":345,"context_line":"        service_caps[service_name] \u003d capab_copy"},{"line_number":346,"context_line":"        self.service_states[state_key] \u003d service_caps"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"    def get_all_host_states(self, context, topic):"},{"line_number":349,"context_line":"        \"\"\"Returns a dict of all the hosts the HostManager"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0hs%3D","line":346,"in_reply_to":"AAAALn%2F%2F1cg%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                    capabilities\u003dcapabilities,"},{"line_number":383,"context_line":"                    service\u003ddict(service.iteritems()))"},{"line_number":384,"context_line":"            host_state.update_from_compute_node(compute)"},{"line_number":385,"context_line":"            host_state_map[state_key] \u003d host_state"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        return host_state_map"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1cc%3D","line":385,"updated":"2012-11-02 12:30:40.000000000","message":"Ditto here:\n\n  host_state_map[(host, nodename)] \u003d host_state","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":382,"context_line":"                    capabilities\u003dcapabilities,"},{"line_number":383,"context_line":"                    service\u003ddict(service.iteritems()))"},{"line_number":384,"context_line":"            host_state.update_from_compute_node(compute)"},{"line_number":385,"context_line":"            host_state_map[state_key] \u003d host_state"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        return host_state_map"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0hw%3D","line":385,"in_reply_to":"AAAALn%2F%2F1cc%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        are pre-populated and adjusted based on data in the db."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        For example:"},{"line_number":346,"context_line":"        {\u0027192.168.1.100\u0027: HostState(), ...}"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        Note: this can be very slow with a lot of instances."},{"line_number":349,"context_line":"        InstanceType table isn\u0027t required since a copy is stored"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz3g%3D","line":346,"updated":"2012-11-05 14:43:11.000000000","message":"Hmm, you have changed the key of this dict\n\nLooking through the only user of this method - i.e. filter_scheduler.py - it looks like the keys are ignored\n\nIn that case, we can just return a list of HostState objects i.e.\n\n  return self.host_state_map.values()\n\nI know this is a bit of extra work, but the alternative is do some other work to make it more clear what the key of the returned dict is\n\nSo ... I think you should submit a new patch before this one which makes this get_all_host_states() return a list of HostStates","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":343,"context_line":"        are pre-populated and adjusted based on data in the db."},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        For example:"},{"line_number":346,"context_line":"        {\u0027192.168.1.100\u0027: HostState(), ...}"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        Note: this can be very slow with a lot of instances."},{"line_number":349,"context_line":"        InstanceType table isn\u0027t required since a copy is stored"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fymg%3D","line":346,"in_reply_to":"AAAALn%2F%2Fz3g%3D","updated":"2012-11-07 07:43:26.000000000","message":"Please review https://review.openstack.org/15547","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            node \u003d compute.get(\u0027hypervisor_hostname\u0027)"},{"line_number":366,"context_line":"            state_key \u003d (host, node)"},{"line_number":367,"context_line":"            capabilities \u003d self.service_states.get(state_key, None)"},{"line_number":368,"context_line":"            if capabilities is None and node is not None:"},{"line_number":369,"context_line":"                # fallback for no hypervisor_hostname"},{"line_number":370,"context_line":"                # TODO(NTTdocomo): Ensure all ComputeDriver sends"},{"line_number":371,"context_line":"                #                  capabilities[\u0027hypervisor_hostname\u0027]."}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz28%3D","line":368,"updated":"2012-11-05 14:43:11.000000000","message":"I don\u0027t understand this \"node is not None\" check - it will only be true if the virt driver reported a hypervisor_hostname and that would also mean the service_states key would be (host, node)","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":365,"context_line":"            node \u003d compute.get(\u0027hypervisor_hostname\u0027)"},{"line_number":366,"context_line":"            state_key \u003d (host, node)"},{"line_number":367,"context_line":"            capabilities \u003d self.service_states.get(state_key, None)"},{"line_number":368,"context_line":"            if capabilities is None and node is not None:"},{"line_number":369,"context_line":"                # fallback for no hypervisor_hostname"},{"line_number":370,"context_line":"                # TODO(NTTdocomo): Ensure all ComputeDriver sends"},{"line_number":371,"context_line":"                #                  capabilities[\u0027hypervisor_hostname\u0027]."}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fyms%3D","line":368,"in_reply_to":"AAAALn%2F%2Fz28%3D","updated":"2012-11-07 07:43:26.000000000","message":"The check is simply to avoid searching service_states with the key (host, None) again. Anyway, this if-block was removed.","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                # fallback for no hypervisor_hostname"},{"line_number":370,"context_line":"                # TODO(NTTdocomo): Ensure all ComputeDriver sends"},{"line_number":371,"context_line":"                #                  capabilities[\u0027hypervisor_hostname\u0027]."},{"line_number":372,"context_line":"                #                  Then, we can remove this if-block"},{"line_number":373,"context_line":"                capabilities \u003d self.service_states.get((host, None), None)"},{"line_number":374,"context_line":"            host_state \u003d self.host_state_map.get(state_key)"},{"line_number":375,"context_line":"            if host_state:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz24%3D","line":372,"updated":"2012-11-05 14:43:11.000000000","message":"I think we should resolve this TODO in this patch","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                # fallback for no hypervisor_hostname"},{"line_number":370,"context_line":"                # TODO(NTTdocomo): Ensure all ComputeDriver sends"},{"line_number":371,"context_line":"                #                  capabilities[\u0027hypervisor_hostname\u0027]."},{"line_number":372,"context_line":"                #                  Then, we can remove this if-block"},{"line_number":373,"context_line":"                capabilities \u003d self.service_states.get((host, None), None)"},{"line_number":374,"context_line":"            host_state \u003d self.host_state_map.get(state_key)"},{"line_number":375,"context_line":"            if host_state:"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyLM%3D","line":372,"in_reply_to":"AAAALn%2F%2Fz24%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"18391bd11b41163809da9c8cc797fb011f68df73","unresolved":false,"context_lines":[{"line_number":335,"context_line":"        state_key \u003d (host, capabilities.get(\u0027hypervisor_hostname\u0027))"},{"line_number":336,"context_line":"        LOG.debug(_(\"Received %(service_name)s service update from \""},{"line_number":337,"context_line":"                    \"%(state_key)s.\") % locals())"},{"line_number":338,"context_line":"        service_caps \u003d self.service_states.get(state_key, {})"},{"line_number":339,"context_line":"        # Copy the capabilities, so we don\u0027t modify the original dict"},{"line_number":340,"context_line":"        capab_copy \u003d dict(capabilities)"},{"line_number":341,"context_line":"        capab_copy[\"timestamp\"] \u003d timeutils.utcnow()  # Reported time"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAALn%2F%2FuJQ%3D","line":338,"updated":"2012-11-09 23:46:42.000000000","message":"This is remove in patch 15716, but revived in this patch\n\nhttps://review.openstack.org/#/c/15716/1/nova/scheduler/host_manager.py","commit_id":"de72aae649aef897322c5fa030e05a8f5b190309"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"18391bd11b41163809da9c8cc797fb011f68df73","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        # Copy the capabilities, so we don\u0027t modify the original dict"},{"line_number":340,"context_line":"        capab_copy \u003d dict(capabilities)"},{"line_number":341,"context_line":"        capab_copy[\"timestamp\"] \u003d timeutils.utcnow()  # Reported time"},{"line_number":342,"context_line":"        service_caps[service_name] \u003d capab_copy"},{"line_number":343,"context_line":"        self.service_states[state_key] \u003d service_caps"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"    def get_all_host_states(self, context):"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAALn%2F%2FuJM%3D","line":342,"updated":"2012-11-09 23:46:42.000000000","message":"Same","commit_id":"de72aae649aef897322c5fa030e05a8f5b190309"}],"nova/tests/compute/test_compute.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"790140a82bbfe7be1c534317a73e7f9ba548c5f2","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        # override tracker with a version that doesn\u0027t need the database:"},{"line_number":101,"context_line":"        fake_rt \u003d fake_resource_tracker.FakeResourceTracker(self.compute.host,"},{"line_number":102,"context_line":"                    self.compute.driver)"},{"line_number":103,"context_line":"        self.compute._set_resource_tracker(fake_rt)"},{"line_number":104,"context_line":"        self.compute.update_available_resource("},{"line_number":105,"context_line":"                context.get_admin_context())"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAALn%2F%2F%2FZQ%3D","line":103,"updated":"2012-10-22 22:37:30.000000000","message":"Ah thanks. If this is the only place we are using it, then just set it manually with self.compute._resource_tracker[None] \u003d fake_rt","commit_id":"a72103754582d4838693d7fb5f0c157a0aaf219e"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"777eef282292e6a9053f50442396b0dce3068f56","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        # override tracker with a version that doesn\u0027t need the database:"},{"line_number":101,"context_line":"        fake_rt \u003d fake_resource_tracker.FakeResourceTracker(self.compute.host,"},{"line_number":102,"context_line":"                    self.compute.driver)"},{"line_number":103,"context_line":"        self.compute._set_resource_tracker(fake_rt)"},{"line_number":104,"context_line":"        self.compute.update_available_resource("},{"line_number":105,"context_line":"                context.get_admin_context())"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAALn%2F%2F%2Fgs%3D","line":103,"updated":"2012-10-22 21:25:48.000000000","message":"_set_resource_tracker is used here","commit_id":"a72103754582d4838693d7fb5f0c157a0aaf219e"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                       fake_get_nw_info)"},{"line_number":207,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":208,"context_line":"        # Just to make long lines short"},{"line_number":209,"context_line":"        self.rt \u003d self.compute._get_resource_tracker(nodename\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def tearDown(self):"},{"line_number":212,"context_line":"        super(ComputeTestCase, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1cU%3D","line":209,"updated":"2012-11-02 12:30:40.000000000","message":"Please do this cleanup as a separate patch which comes before this one\n\ni.e. do a patch which does:\n\n  +    self.rt \u003d self.compute.resource_tracker\n  ...\n  -    self.compute.resource_tracker.update_available_resource(...\n  +    self.rt.update_available_resource(...\n\nThis cleanup patch would be easy to review because it is making no functional changes and then follow-on patch would be easier to review too because it doesn\u0027t contain any cleanups","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":206,"context_line":"                       fake_get_nw_info)"},{"line_number":207,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":208,"context_line":"        # Just to make long lines short"},{"line_number":209,"context_line":"        self.rt \u003d self.compute._get_resource_tracker(nodename\u003dNone)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def tearDown(self):"},{"line_number":212,"context_line":"        super(ComputeTestCase, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0gM%3D","line":209,"in_reply_to":"AAAALn%2F%2F1cU%3D","updated":"2012-11-05 11:09:43.000000000","message":"Please review https://review.openstack.org/#/c/15333/","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"0ccd16c6ff6c2a31c4dfbf4c52dd9c52a01c1477","unresolved":false,"context_lines":[{"line_number":5668,"context_line":"                          self.context, inst_type, None)"},{"line_number":5669,"context_line":""},{"line_number":5670,"context_line":""},{"line_number":5671,"context_line":"class FakeMultiNodeVirtDriver(virt_driver.ComputeDriver):"},{"line_number":5672,"context_line":"    def __init__(self):"},{"line_number":5673,"context_line":"        self.nodes \u003d [\u0027A\u0027, \u0027B\u0027]"},{"line_number":5674,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1dc%3D","line":5671,"updated":"2012-11-02 11:53:11.000000000","message":"so this just seems like it should be a seperate test, as this is the only instance where virt_driver gets added to this file.\n\nPrefer this gets broken out","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":5668,"context_line":"                          self.context, inst_type, None)"},{"line_number":5669,"context_line":""},{"line_number":5670,"context_line":""},{"line_number":5671,"context_line":"class FakeMultiNodeVirtDriver(virt_driver.ComputeDriver):"},{"line_number":5672,"context_line":"    def __init__(self):"},{"line_number":5673,"context_line":"        self.nodes \u003d [\u0027A\u0027, \u0027B\u0027]"},{"line_number":5674,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0f8%3D","line":5671,"in_reply_to":"AAAALn%2F%2F1dc%3D","updated":"2012-11-05 11:09:43.000000000","message":"I split this out to test_multiple_nodes.py","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                       fake_get_nw_info)"},{"line_number":210,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":211,"context_line":"        # Just to make long lines short"},{"line_number":212,"context_line":"        self.rt \u003d self.compute._get_resource_tracker(nodename\u003dNone)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def tearDown(self):"},{"line_number":215,"context_line":"        super(ComputeTestCase, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz20%3D","line":212,"updated":"2012-11-05 14:43:11.000000000","message":"Hmm, I\u0027d prefer us to be testing with a valid nodename rather than None","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":209,"context_line":"                       fake_get_nw_info)"},{"line_number":210,"context_line":"        self.compute_api \u003d compute.API()"},{"line_number":211,"context_line":"        # Just to make long lines short"},{"line_number":212,"context_line":"        self.rt \u003d self.compute._get_resource_tracker(nodename\u003dNone)"},{"line_number":213,"context_line":""},{"line_number":214,"context_line":"    def tearDown(self):"},{"line_number":215,"context_line":"        super(ComputeTestCase, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FymY%3D","line":212,"in_reply_to":"AAAALn%2F%2Fz20%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        self.rt.update_available_resource(self.context.elevated())"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        # get total memory as reported by virt driver:"},{"line_number":360,"context_line":"        resources \u003d self.compute.driver.get_available_resource(None)"},{"line_number":361,"context_line":"        total_mem_mb \u003d resources[\u0027memory_mb\u0027]"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        oversub_limit_mb \u003d total_mem_mb * 1.5"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2w%3D","line":360,"updated":"2012-11-05 14:43:11.000000000","message":"Same here","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        self.rt.update_available_resource(self.context.elevated())"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"        # get total memory as reported by virt driver:"},{"line_number":360,"context_line":"        resources \u003d self.compute.driver.get_available_resource(None)"},{"line_number":361,"context_line":"        total_mem_mb \u003d resources[\u0027memory_mb\u0027]"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"        oversub_limit_mb \u003d total_mem_mb * 1.5"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FymU%3D","line":360,"in_reply_to":"AAAALn%2F%2Fz2w%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/tests/compute/test_resource_tracker.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            driver \u003d FakeVirtDriver(None)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        tracker \u003d resource_tracker.ResourceTracker(host, driver, None)"},{"line_number":156,"context_line":"        return tracker"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2s%3D","line":155,"updated":"2012-11-05 14:43:11.000000000","message":"Let\u0027s use a valid node name","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":152,"context_line":"        else:"},{"line_number":153,"context_line":"            driver \u003d FakeVirtDriver(None)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        tracker \u003d resource_tracker.ResourceTracker(host, driver, None)"},{"line_number":156,"context_line":"        return tracker"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fyl4%3D","line":155,"in_reply_to":"AAAALn%2F%2Fz2s%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/tests/scheduler/test_filter_scheduler.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        sched \u003d fakes.FakeFilterScheduler()"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        def _return_hosts(*args, **kwargs):"},{"line_number":197,"context_line":"            host_state \u003d host_manager.HostState(\u0027host2\u0027, None, \u0027compute\u0027)"},{"line_number":198,"context_line":"            return [least_cost.WeightedHost(1.0, host_state\u003dhost_state)]"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        self.stubs.Set(sched, \u0027_schedule\u0027, _return_hosts)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2o%3D","line":197,"updated":"2012-11-05 14:43:11.000000000","message":"Use a valid node name\n\nSame applies below too","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        sched \u003d fakes.FakeFilterScheduler()"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"        def _return_hosts(*args, **kwargs):"},{"line_number":197,"context_line":"            host_state \u003d host_manager.HostState(\u0027host2\u0027, None, \u0027compute\u0027)"},{"line_number":198,"context_line":"            return [least_cost.WeightedHost(1.0, host_state\u003dhost_state)]"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        self.stubs.Set(sched, \u0027_schedule\u0027, _return_hosts)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fylg%3D","line":197,"in_reply_to":"AAAALn%2F%2Fz2o%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/tests/scheduler/test_host_filters.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def test_all_host_filter(self):"},{"line_number":293,"context_line":"        filt_cls \u003d self.class_map[\u0027AllHostsFilter\u0027]()"},{"line_number":294,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, None, \u0027compute\u0027, {})"},{"line_number":295,"context_line":"        self.assertTrue(filt_cls.host_passes(host, {}))"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _stub_service_is_up(self, ret_value):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2k%3D","line":294,"updated":"2012-11-05 14:43:11.000000000","message":"Same","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":291,"context_line":""},{"line_number":292,"context_line":"    def test_all_host_filter(self):"},{"line_number":293,"context_line":"        filt_cls \u003d self.class_map[\u0027AllHostsFilter\u0027]()"},{"line_number":294,"context_line":"        host \u003d fakes.FakeHostState(\u0027host1\u0027, None, \u0027compute\u0027, {})"},{"line_number":295,"context_line":"        self.assertTrue(filt_cls.host_passes(host, {}))"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _stub_service_is_up(self, ret_value):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FylQ%3D","line":294,"in_reply_to":"AAAALn%2F%2Fz2k%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/tests/scheduler/test_host_manager.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.assertDictMatch(service_states, {})"},{"line_number":129,"context_line":"        self.mox.StubOutWithMock(timeutils, \u0027utcnow\u0027)"},{"line_number":130,"context_line":"        timeutils.utcnow().AndReturn(31337)"},{"line_number":131,"context_line":"        timeutils.utcnow().AndReturn(31338)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        host1_cap \u003d {\u0027hypervisor_hostname\u0027: \u0027host1-hvhn\u0027}"},{"line_number":134,"context_line":"        # node is not used in update_service_capabilities"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1cQ%3D","line":131,"updated":"2012-11-02 12:30:40.000000000","message":"Please use timeutils.set_time_override() and timeutils.advance_time_seconds()","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":128,"context_line":"        self.assertDictMatch(service_states, {})"},{"line_number":129,"context_line":"        self.mox.StubOutWithMock(timeutils, \u0027utcnow\u0027)"},{"line_number":130,"context_line":"        timeutils.utcnow().AndReturn(31337)"},{"line_number":131,"context_line":"        timeutils.utcnow().AndReturn(31338)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        host1_cap \u003d {\u0027hypervisor_hostname\u0027: \u0027host1-hvhn\u0027}"},{"line_number":134,"context_line":"        # node is not used in update_service_capabilities"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0f4%3D","line":131,"in_reply_to":"AAAALn%2F%2F1cQ%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done. But, should we do it in another patch that corrects the other use of mock of utcnow() as well? BTW, using set_time_override() seems to loosen the check for the count of calling utcnow(), no problem?","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        filters \u003d [\u0027fake-filter1\u0027, \u0027fake-filter2\u0027]"},{"line_number":73,"context_line":"        fake_host1 \u003d host_manager.HostState(\u0027host1\u0027, None, topic)"},{"line_number":74,"context_line":"        fake_host2 \u003d host_manager.HostState(\u0027host2\u0027, None, topic)"},{"line_number":75,"context_line":"        hosts \u003d [fake_host1, fake_host2]"},{"line_number":76,"context_line":"        filter_properties \u003d {\u0027fake_prop\u0027: \u0027fake_val\u0027}"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2c%3D","line":74,"updated":"2012-11-05 14:43:11.000000000","message":"Same","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"        filters \u003d [\u0027fake-filter1\u0027, \u0027fake-filter2\u0027]"},{"line_number":73,"context_line":"        fake_host1 \u003d host_manager.HostState(\u0027host1\u0027, None, topic)"},{"line_number":74,"context_line":"        fake_host2 \u003d host_manager.HostState(\u0027host2\u0027, None, topic)"},{"line_number":75,"context_line":"        hosts \u003d [fake_host1, fake_host2]"},{"line_number":76,"context_line":"        filter_properties \u003d {\u0027fake_prop\u0027: \u0027fake_val\u0027}"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyPI%3D","line":74,"in_reply_to":"AAAALn%2F%2Fz2c%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.mox.StubOutWithMock(timeutils, \u0027utcnow\u0027)"},{"line_number":99,"context_line":"        timeutils.utcnow().AndReturn(31337)"},{"line_number":100,"context_line":"        timeutils.utcnow().AndReturn(31338)"},{"line_number":101,"context_line":"        timeutils.utcnow().AndReturn(31339)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        host1_compute_capabs \u003d dict(free_memory\u003d1234, host_memory\u003d5678,"},{"line_number":104,"context_line":"                timestamp\u003d1)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2Q%3D","line":101,"updated":"2012-11-05 14:43:11.000000000","message":"Hmm, I hadn\u0027t spotted this existing use of stubout with utcnow()\n\nIf you could submit a separate patch to clean that up, it\u0027d be great","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.mox.StubOutWithMock(timeutils, \u0027utcnow\u0027)"},{"line_number":99,"context_line":"        timeutils.utcnow().AndReturn(31337)"},{"line_number":100,"context_line":"        timeutils.utcnow().AndReturn(31338)"},{"line_number":101,"context_line":"        timeutils.utcnow().AndReturn(31339)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        host1_compute_capabs \u003d dict(free_memory\u003d1234, host_memory\u003d5678,"},{"line_number":104,"context_line":"                timestamp\u003d1)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyPA%3D","line":101,"in_reply_to":"AAAALn%2F%2Fz2Q%3D","updated":"2012-11-07 07:43:26.000000000","message":"I will do it later","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        expected \u003d {(\u0027host1\u0027, None): {\u0027compute\u0027: host1_compute_capabs,"},{"line_number":126,"context_line":"                                      \u0027volume\u0027: host1_volume_capabs},"},{"line_number":127,"context_line":"                    (\u0027host2\u0027, None): {\u0027compute\u0027: host2_compute_capabs}}"},{"line_number":128,"context_line":"        self.assertDictMatch(service_states, expected)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def test_update_service_capabilities_node_key(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2U%3D","line":127,"updated":"2012-11-05 14:43:11.000000000","message":"Same","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":124,"context_line":""},{"line_number":125,"context_line":"        expected \u003d {(\u0027host1\u0027, None): {\u0027compute\u0027: host1_compute_capabs,"},{"line_number":126,"context_line":"                                      \u0027volume\u0027: host1_volume_capabs},"},{"line_number":127,"context_line":"                    (\u0027host2\u0027, None): {\u0027compute\u0027: host2_compute_capabs}}"},{"line_number":128,"context_line":"        self.assertDictMatch(service_states, expected)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def test_update_service_capabilities_node_key(self):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fxfg%3D","line":127,"in_reply_to":"AAAALn%2F%2Fz2U%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        for i in xrange(4):"},{"line_number":168,"context_line":"            compute_node \u003d fakes.COMPUTE_NODES[i]"},{"line_number":169,"context_line":"            host \u003d compute_node[\u0027service\u0027][\u0027host\u0027]"},{"line_number":170,"context_line":"            state_key \u003d (host, None)"},{"line_number":171,"context_line":"            self.assertEqual(host_states[state_key].service,"},{"line_number":172,"context_line":"                    compute_node[\u0027service\u0027])"},{"line_number":173,"context_line":"        self.assertEqual(host_states[(\u0027host1\u0027, None)].free_ram_mb, 512)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2I%3D","line":170,"updated":"2012-11-05 14:43:11.000000000","message":"Use valid node name","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        for i in xrange(4):"},{"line_number":168,"context_line":"            compute_node \u003d fakes.COMPUTE_NODES[i]"},{"line_number":169,"context_line":"            host \u003d compute_node[\u0027service\u0027][\u0027host\u0027]"},{"line_number":170,"context_line":"            state_key \u003d (host, None)"},{"line_number":171,"context_line":"            self.assertEqual(host_states[state_key].service,"},{"line_number":172,"context_line":"                    compute_node[\u0027service\u0027])"},{"line_number":173,"context_line":"        self.assertEqual(host_states[(\u0027host1\u0027, None)].free_ram_mb, 512)"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyO4%3D","line":170,"in_reply_to":"AAAALn%2F%2Fz2I%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done. Below too","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/virt/baremetal/driver.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        This method is called when nova-coompute launches, and"},{"line_number":667,"context_line":"        whenever admin executes \"nova-manage service update_resource\"."},{"line_number":668,"context_line":"        \"\"\""},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"        # Updating host information"},{"line_number":671,"context_line":"        dic \u003d {\u0027vcpus\u0027: self.get_vcpu_total(),"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz2A%3D","line":668,"updated":"2012-11-05 14:43:11.000000000","message":"We should be checking nodename here, I guess","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":665,"context_line":""},{"line_number":666,"context_line":"        This method is called when nova-coompute launches, and"},{"line_number":667,"context_line":"        whenever admin executes \"nova-manage service update_resource\"."},{"line_number":668,"context_line":"        \"\"\""},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"        # Updating host information"},{"line_number":671,"context_line":"        dic \u003d {\u0027vcpus\u0027: self.get_vcpu_total(),"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyMM%3D","line":668,"in_reply_to":"AAAALn%2F%2Fz2A%3D","updated":"2012-11-07 07:43:26.000000000","message":"This BareMetalDriver is still a single-node driver. It ignores nodename as well as the other drivers do.","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":675,"context_line":"               \u0027memory_mb_used\u0027: self.get_memory_mb_used(),"},{"line_number":676,"context_line":"               \u0027local_gb_used\u0027: self.get_local_gb_used(),"},{"line_number":677,"context_line":"               \u0027hypervisor_type\u0027: self.get_hypervisor_type(),"},{"line_number":678,"context_line":"               \u0027hypervisor_version\u0027: self.get_hypervisor_version(),"},{"line_number":679,"context_line":"               \u0027cpu_info\u0027: self.get_cpu_info(),"},{"line_number":680,"context_line":"               \u0027cpu_arch\u0027: FLAGS.cpu_arch}"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz18%3D","line":678,"updated":"2012-11-05 14:43:11.000000000","message":"And we should be reporting the node name here","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":675,"context_line":"               \u0027memory_mb_used\u0027: self.get_memory_mb_used(),"},{"line_number":676,"context_line":"               \u0027local_gb_used\u0027: self.get_local_gb_used(),"},{"line_number":677,"context_line":"               \u0027hypervisor_type\u0027: self.get_hypervisor_type(),"},{"line_number":678,"context_line":"               \u0027hypervisor_version\u0027: self.get_hypervisor_version(),"},{"line_number":679,"context_line":"               \u0027cpu_info\u0027: self.get_cpu_info(),"},{"line_number":680,"context_line":"               \u0027cpu_arch\u0027: FLAGS.cpu_arch}"},{"line_number":681,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyMo%3D","line":678,"in_reply_to":"AAAALn%2F%2Fz18%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/virt/driver.py":[{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"49522ff15279ad8acfe9fee5ec96b9a240835355","unresolved":false,"context_lines":[{"line_number":706,"context_line":""},{"line_number":707,"context_line":"        This method is for multi compute-nodes support. If a driver supports"},{"line_number":708,"context_line":"        multi compute-nodes, this method returns a node suitable to host the"},{"line_number":709,"context_line":"        instance. Otherwise, this method shoulf return None."},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        This method is called as a fallback in case that scheduler do not"},{"line_number":712,"context_line":"        specify nodename."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO0E%3D","line":709,"updated":"2012-10-02 06:59:14.000000000","message":"s/shoulf/should","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"896be75e97dbca113095a4514231710ba87f771e","unresolved":false,"context_lines":[{"line_number":706,"context_line":""},{"line_number":707,"context_line":"        This method is for multi compute-nodes support. If a driver supports"},{"line_number":708,"context_line":"        multi compute-nodes, this method returns a node suitable to host the"},{"line_number":709,"context_line":"        instance. Otherwise, this method shoulf return None."},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"        This method is called as a fallback in case that scheduler do not"},{"line_number":712,"context_line":"        specify nodename."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FN2g%3D","line":709,"in_reply_to":"AAAALH%2F%2FO0E%3D","updated":"2012-10-04 02:57:12.000000000","message":"Done","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"49522ff15279ad8acfe9fee5ec96b9a240835355","unresolved":false,"context_lines":[{"line_number":713,"context_line":"        \"\"\""},{"line_number":714,"context_line":"        return None"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    def get_resource_tracker_class(self):"},{"line_number":717,"context_line":"        \"\"\""},{"line_number":718,"context_line":"        Returns the name of the custom resource tacker that should be used with"},{"line_number":719,"context_line":"        this compute driver."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO0I%3D","line":716,"updated":"2012-10-02 06:59:14.000000000","message":"Need some justification for this. Not sure what the intention is.","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"261078af6dc56ce2df89fc28f22a6234a4460ded","unresolved":false,"context_lines":[{"line_number":713,"context_line":"        \"\"\""},{"line_number":714,"context_line":"        return None"},{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    def get_resource_tracker_class(self):"},{"line_number":717,"context_line":"        \"\"\""},{"line_number":718,"context_line":"        Returns the name of the custom resource tacker that should be used with"},{"line_number":719,"context_line":"        this compute driver."}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FOD0%3D","line":716,"in_reply_to":"AAAALH%2F%2FO0I%3D","updated":"2012-10-03 17:55:18.000000000","message":"In ResourceTracker, a node\u0027s resource is consumed by subtracting usage of instances on the node. In bare-metal compute, a node\u0027s resource is all consumed by single instance no matter how small the instance. So bare-metal compute has to use a custom tracker that calculates the resource in such way.\n\nWe will add more docstring/comment later...","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":67,"name":"Vish Ishaya","email":"vishvananda@gmail.com","username":"vishvananda"},"change_message_id":"49522ff15279ad8acfe9fee5ec96b9a240835355","unresolved":false,"context_lines":[{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    def get_resource_tracker_class(self):"},{"line_number":717,"context_line":"        \"\"\""},{"line_number":718,"context_line":"        Returns the name of the custom resource tacker that should be used with"},{"line_number":719,"context_line":"        this compute driver."},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        If this method returns not-None, ComputeManager uses it as a resource"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FO0A%3D","line":718,"updated":"2012-10-02 06:59:14.000000000","message":"s/tacker/tracker.","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"896be75e97dbca113095a4514231710ba87f771e","unresolved":false,"context_lines":[{"line_number":715,"context_line":""},{"line_number":716,"context_line":"    def get_resource_tracker_class(self):"},{"line_number":717,"context_line":"        \"\"\""},{"line_number":718,"context_line":"        Returns the name of the custom resource tacker that should be used with"},{"line_number":719,"context_line":"        this compute driver."},{"line_number":720,"context_line":""},{"line_number":721,"context_line":"        If this method returns not-None, ComputeManager uses it as a resource"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAALH%2F%2FN2c%3D","line":718,"in_reply_to":"AAAALH%2F%2FO0A%3D","updated":"2012-10-04 02:57:12.000000000","message":"Done","commit_id":"455a7688b27166d5b6b79c5fbda861be14c84ce8"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":728,"context_line":"        multi compute-nodes, this method returns a list of nodenames managed"},{"line_number":729,"context_line":"        by the service. Otherwise, this method should return None."},{"line_number":730,"context_line":"        \"\"\""},{"line_number":731,"context_line":"        return None"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"    def get_available_node_resource(self, nodename):"},{"line_number":734,"context_line":"        \"\"\"Returns resource information for nodename."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1cA%3D","line":731,"updated":"2012-11-02 12:30:40.000000000","message":"I think we should have a default implementation of this that does something like\n\n  return [CONF.host]\n\nor, actually, all virt drivers should implement get_hypervisor_hostname() and then we can do:\n\n  return [self.hypervisor_hostname()]","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":728,"context_line":"        multi compute-nodes, this method returns a list of nodenames managed"},{"line_number":729,"context_line":"        by the service. Otherwise, this method should return None."},{"line_number":730,"context_line":"        \"\"\""},{"line_number":731,"context_line":"        return None"},{"line_number":732,"context_line":""},{"line_number":733,"context_line":"    def get_available_node_resource(self, nodename):"},{"line_number":734,"context_line":"        \"\"\"Returns resource information for nodename."}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2Fz8o%3D","line":731,"in_reply_to":"AAAALn%2F%2F1cA%3D","updated":"2012-11-05 11:09:43.000000000","message":"I modified it to be the same as compute_node[\u0027hypervisor_hostname\u0027]:\n\n        try:\n            res \u003d self.get_available_resource(None)\n        except NotImplementedError:\n            res \u003d {}\n        return [res.get(\u0027hypervisor_hostname\u0027)]","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        If get_available_nodes() returns not-None, this method is called when"},{"line_number":741,"context_line":"        nova-compute launches, and as part of a periodic task."},{"line_number":742,"context_line":"        \"\"\""},{"line_number":743,"context_line":"        raise NotImplementedError()"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    def get_resource_tracker_class(self):"},{"line_number":746,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1b4%3D","line":743,"updated":"2012-11-02 12:30:40.000000000","message":"I think get_available_resource() should be adapted to do what we want","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":740,"context_line":"        If get_available_nodes() returns not-None, this method is called when"},{"line_number":741,"context_line":"        nova-compute launches, and as part of a periodic task."},{"line_number":742,"context_line":"        \"\"\""},{"line_number":743,"context_line":"        raise NotImplementedError()"},{"line_number":744,"context_line":""},{"line_number":745,"context_line":"    def get_resource_tracker_class(self):"},{"line_number":746,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0hQ%3D","line":743,"in_reply_to":"AAAALn%2F%2F1b4%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"6a8e82f24f7f9300da9be56096c364a690f263f4","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        If this method returns not-None, ComputeManager uses it as a resource"},{"line_number":751,"context_line":"        tracker class. Otherwise, the default resource tracker is used."},{"line_number":752,"context_line":"        \"\"\""},{"line_number":753,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F1b0%3D","line":753,"updated":"2012-11-02 12:30:40.000000000","message":"I think this should be added by a later patch","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"9fa29a01bba473717ff2b76f9648b48afce7cf78","unresolved":false,"context_lines":[{"line_number":750,"context_line":"        If this method returns not-None, ComputeManager uses it as a resource"},{"line_number":751,"context_line":"        tracker class. Otherwise, the default resource tracker is used."},{"line_number":752,"context_line":"        \"\"\""},{"line_number":753,"context_line":"        return None"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAALn%2F%2F0hU%3D","line":753,"in_reply_to":"AAAALn%2F%2F1b0%3D","updated":"2012-11-05 11:09:43.000000000","message":"Done","commit_id":"88161c7a6ac4a61b230f250db571164fb3770e5d"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            res \u003d self.get_available_resource(None)"},{"line_number":748,"context_line":"        except NotImplementedError:"},{"line_number":749,"context_line":"            res \u003d {}"},{"line_number":750,"context_line":"        return [res.get(\u0027hypervisor_hostname\u0027)]"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz1k%3D","line":750,"updated":"2012-11-05 14:43:11.000000000","message":"I actually find this quite confusing\n\ne.g. None probably shouldn\u0027t be a valid argument to get_available_resource()\n\nI think I\u0027d prefer adding a get_hypervisor_hostname() driver method","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":747,"context_line":"            res \u003d self.get_available_resource(None)"},{"line_number":748,"context_line":"        except NotImplementedError:"},{"line_number":749,"context_line":"            res \u003d {}"},{"line_number":750,"context_line":"        return [res.get(\u0027hypervisor_hostname\u0027)]"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyM0%3D","line":750,"in_reply_to":"AAAALn%2F%2Fz1k%3D","updated":"2012-11-07 07:43:26.000000000","message":"I modified this with get_host_stats().","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"}],"nova/virt/fake.py":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":264,"context_line":"               \u0027memory_mb_used\u0027: 0,"},{"line_number":265,"context_line":"               \u0027local_gb_used\u0027: 0,"},{"line_number":266,"context_line":"               \u0027hypervisor_type\u0027: \u0027fake\u0027,"},{"line_number":267,"context_line":"               \u0027hypervisor_version\u0027: \u00271.0\u0027,"},{"line_number":268,"context_line":"               \u0027cpu_info\u0027: \u0027?\u0027}"},{"line_number":269,"context_line":"        return dic"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz1c%3D","line":267,"updated":"2012-11-05 14:43:11.000000000","message":"Would like to return a node name","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"7d6e9ba7889cf6108019880899cc820cc301cef7","unresolved":false,"context_lines":[{"line_number":264,"context_line":"               \u0027memory_mb_used\u0027: 0,"},{"line_number":265,"context_line":"               \u0027local_gb_used\u0027: 0,"},{"line_number":266,"context_line":"               \u0027hypervisor_type\u0027: \u0027fake\u0027,"},{"line_number":267,"context_line":"               \u0027hypervisor_version\u0027: \u00271.0\u0027,"},{"line_number":268,"context_line":"               \u0027cpu_info\u0027: \u0027?\u0027}"},{"line_number":269,"context_line":"        return dic"},{"line_number":270,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2FyMs%3D","line":267,"in_reply_to":"AAAALn%2F%2Fz1c%3D","updated":"2012-11-07 07:43:26.000000000","message":"Done","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"59648311c9df91f983cd63247d4cfc213fe83c02","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        return {\u0027ip\u0027: \u0027127.0.0.1\u0027, \u0027initiator\u0027: \u0027fake\u0027, \u0027host\u0027: \u0027fakehost\u0027}"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"    def get_available_nodes(self):"},{"line_number":342,"context_line":"        return [None]"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"class FakeVirtAPI(virtapi.VirtAPI):"}],"source_content_type":"text/x-python","patch_set":17,"id":"AAAALn%2F%2Fz1Y%3D","line":342,"updated":"2012-11-05 14:43:11.000000000","message":"Ditto","commit_id":"e3c5ef94a69c074ba42837986fbe64b129906d3f"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"4d5aed5a90ed45bd693f6d3c93a1b0bb75bf4b5a","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    ]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"FLAGS \u003d flags.FLAGS"},{"line_number":47,"context_line":"FLAGS.register_opts(fake_opts)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class FakeInstance(object):"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAALn%2F%2Fv28%3D","line":47,"updated":"2012-11-08 17:24:53.000000000","message":"Hmm, I don\u0027t see why you need a configuration option for this\n\nA user will never want to change this configuration option\n\nWhy not just have a global FAKE_NODES variable?","commit_id":"cfce4153bef38dfeafd72b396124468844e9933b"},{"author":{"_account_id":3068,"name":"Arata Notsu","email":"notsu@virtualtech.jp","username":"arata776"},"change_message_id":"b9f703259ca23def5c06314f7245864f26542901","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    ]"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"FLAGS \u003d flags.FLAGS"},{"line_number":47,"context_line":"FLAGS.register_opts(fake_opts)"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"class FakeInstance(object):"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAALn%2F%2FvsQ%3D","line":47,"in_reply_to":"AAAALn%2F%2Fv28%3D","updated":"2012-11-08 19:43:13.000000000","message":"OK, I will change it to use FAKE_NODE.\n\nBut, let me explain why the option. It brings simpler restoring code.\n\nWith the option, it is one line:\n* self.flags(fake_nodes\u003d[...])\n\nWithout the option:\n* Save the original FAKE_NODE to a variable.\n* Set FAKE_NODE\n* Restore the original FAKE_VALUE in tearDown()\n\nI would like to add functions that help save/restore, not only add FAKE_NODE itself.","commit_id":"cfce4153bef38dfeafd72b396124468844e9933b"}]}
