)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"c94c82b7428c4c3e229312aa0551ed15671413a5","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Clif Houck \u003cme@clifhouck.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-12 16:27:05 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added support for image caching for the agent driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds several methods to the agent driver to support image caching on"},{"line_number":10,"context_line":"nodes. Includes validation of the presence of arguments to the cache_image"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a80dd14_07f8f248","line":7,"updated":"2015-03-19 14:17:19.000000000","message":"s/Added/Add/ is better.","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Clif Houck \u003cme@clifhouck.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-03-12 16:27:05 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Added support for image caching for the agent driver"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds several methods to the agent driver to support image caching on"},{"line_number":10,"context_line":"nodes. Includes validation of the presence of arguments to the cache_image"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a6ced46_c8ef3daf","line":7,"in_reply_to":"9a80dd14_07f8f248","updated":"2015-03-23 21:07:23.000000000","message":"Done","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"c94c82b7428c4c3e229312aa0551ed15671413a5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Adds several methods to the agent driver to support image caching on"},{"line_number":10,"context_line":"nodes. Includes validation of the presence of arguments to the cache_image"},{"line_number":11,"context_line":"endpoint, marking the node\u0027s driver_internal_info dictionary about the"},{"line_number":12,"context_line":"presence of a cached image, asyncronous handling of the caching operation"},{"line_number":13,"context_line":"finishing through the heartbeat method, and several tests surrounding this new"},{"line_number":14,"context_line":"functionality."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9a80dd14_c7889ac8","line":12,"updated":"2015-03-19 14:17:19.000000000","message":"s/asyncronous/asynchronous/","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Adds several methods to the agent driver to support image caching on"},{"line_number":10,"context_line":"nodes. Includes validation of the presence of arguments to the cache_image"},{"line_number":11,"context_line":"endpoint, marking the node\u0027s driver_internal_info dictionary about the"},{"line_number":12,"context_line":"presence of a cached image, asyncronous handling of the caching operation"},{"line_number":13,"context_line":"finishing through the heartbeat method, and several tests surrounding this new"},{"line_number":14,"context_line":"functionality."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"1a6ced46_a8f20198","line":12,"in_reply_to":"9a80dd14_c7889ac8","updated":"2015-03-23 21:07:23.000000000","message":"Done","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"}],"ironic/dhcp/neutron.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1669ae37212959da8bc2581e96d49b29ece390d0","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        :param task: a TaskManager instance."},{"line_number":423,"context_line":"        \"\"\""},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            self.delete_handler(task)"},{"line_number":426,"context_line":"        except Exception:"},{"line_number":427,"context_line":"            # Log the error, but let the caller invoke the"},{"line_number":428,"context_line":"            # manager.cleaning_error_handler()."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_f8695abf","line":425,"updated":"2015-04-08 23:33:22.000000000","message":"This seems like self needs to be dropped... I don\u0027t think that will use the argument supplied as delete_handler","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"1b4c5838dd38a47887259ea989e5ac158f6e0b7f","unresolved":false,"context_lines":[{"line_number":422,"context_line":"        :param task: a TaskManager instance."},{"line_number":423,"context_line":"        \"\"\""},{"line_number":424,"context_line":"        try:"},{"line_number":425,"context_line":"            self.delete_handler(task)"},{"line_number":426,"context_line":"        except Exception:"},{"line_number":427,"context_line":"            # Log the error, but let the caller invoke the"},{"line_number":428,"context_line":"            # manager.cleaning_error_handler()."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_202d24fe","line":425,"in_reply_to":"9aa53dc9_f8695abf","updated":"2015-04-09 21:30:46.000000000","message":"Done","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":53,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when \u0027"},{"line_number":54,"context_line":"                    \u0027booting to a ramdisk for cleaning/zapping using Neutron \u0027"},{"line_number":55,"context_line":"                    \u0027DHCP\u0027),"},{"line_number":56,"context_line":"    cfg.StrOpt(\u0027caching_network_uuid\u0027,"},{"line_number":57,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when \u0027"},{"line_number":58,"context_line":"                    \u0027booting to a ramdisk for caching an image using Neutron \u0027"},{"line_number":59,"context_line":"                    \u0027DHCP\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_8a51c438","line":56,"updated":"2015-06-09 12:51:39.000000000","message":"Is there any reason why someone will have a different network for caching and cleaning ? I think connectivity of bare metal to this network is to talk to Ironic conductor as well talk to other openstack services to cache the image.  Can we just have one network for thus purpose ?  Then in that case, I think most of the code in this class can be generalized into \n\n  def create_management_ports()\n\n  def delete_management_ports()","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":53,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when \u0027"},{"line_number":54,"context_line":"                    \u0027booting to a ramdisk for cleaning/zapping using Neutron \u0027"},{"line_number":55,"context_line":"                    \u0027DHCP\u0027),"},{"line_number":56,"context_line":"    cfg.StrOpt(\u0027caching_network_uuid\u0027,"},{"line_number":57,"context_line":"               help\u003d\u0027UUID of the network to create Neutron ports on when \u0027"},{"line_number":58,"context_line":"                    \u0027booting to a ramdisk for caching an image using Neutron \u0027"},{"line_number":59,"context_line":"                    \u0027DHCP\u0027)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_14dff2d9","line":56,"in_reply_to":"3afb71cf_8a51c438","updated":"2015-06-10 17:01:10.000000000","message":"I\u0027m not 100% sure about the answer to this question. However, it does seem reasonable to have a situation where the operator would want caching to happen on a network separate from where cleaning takes place. Maybe images aren\u0027t available/accessible on the network where cleaning takes place? I\u0027m willing to go either way with this, but I don\u0027t see the downside of having the option. Other than having another option.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"}],"ironic/drivers/modules/agent.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e5f4e5661633f6a76d6bf6a9851a648808e1d401","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            if None is image_info.get(key):"},{"line_number":203,"context_line":"                missing_keys.append(key)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if len(missing_keys) \u003e 0:"},{"line_number":206,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":207,"context_line":"                \"cache_image is missing the following keys: \""},{"line_number":208,"context_line":"                \"%(missing_keys)s\") % {\u0027missing_keys\u0027: missing_keys})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_63437042","line":205,"updated":"2015-03-06 17:37:03.000000000","message":"Can simplify this to: if missing_keys:","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"559f79afc0a32386d904cdafff44cb60d6bd71e4","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            if None is image_info.get(key):"},{"line_number":203,"context_line":"                missing_keys.append(key)"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"        if len(missing_keys) \u003e 0:"},{"line_number":206,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":207,"context_line":"                \"cache_image is missing the following keys: \""},{"line_number":208,"context_line":"                \"%(missing_keys)s\") % {\u0027missing_keys\u0027: missing_keys})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_9c127507","line":205,"in_reply_to":"9a80dd14_63437042","updated":"2015-03-07 00:07:41.000000000","message":"Done","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e5f4e5661633f6a76d6bf6a9851a648808e1d401","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        :raises: MissingParameterValue"},{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":221,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        node \u003d task.node"},{"line_number":224,"context_line":"        params \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_6397f048","line":221,"updated":"2015-03-06 17:37:03.000000000","message":"Shouldn\u0027t the validation be in the vendor interface?","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"559f79afc0a32386d904cdafff44cb60d6bd71e4","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        :raises: MissingParameterValue"},{"line_number":219,"context_line":"        \"\"\""},{"line_number":220,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":221,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        node \u003d task.node"},{"line_number":224,"context_line":"        params \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_fcee11ec","line":221,"in_reply_to":"9a80dd14_6397f048","updated":"2015-03-07 00:07:41.000000000","message":"Yes, you\u0027re right.","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e5f4e5661633f6a76d6bf6a9851a648808e1d401","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        driver_info \u003d node.driver_info"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        # Make sure the node does not already contain a cached image."},{"line_number":433,"context_line":"        if driver_info.get(\u0027cached\u0027, None):"},{"line_number":434,"context_line":"            LOG.warning(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":435,"context_line":"                        \u0027Refusing to cache another image.\u0027,"},{"line_number":436,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_03a39401","line":433,"updated":"2015-03-06 17:37:03.000000000","message":"None is the default for .get(), can remove it","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"559f79afc0a32386d904cdafff44cb60d6bd71e4","unresolved":false,"context_lines":[{"line_number":430,"context_line":"        driver_info \u003d node.driver_info"},{"line_number":431,"context_line":""},{"line_number":432,"context_line":"        # Make sure the node does not already contain a cached image."},{"line_number":433,"context_line":"        if driver_info.get(\u0027cached\u0027, None):"},{"line_number":434,"context_line":"            LOG.warning(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":435,"context_line":"                        \u0027Refusing to cache another image.\u0027,"},{"line_number":436,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_bca499a6","line":433,"in_reply_to":"9a80dd14_03a39401","updated":"2015-03-07 00:07:41.000000000","message":"I was still conflating dict.get() and getattr() here. Done!","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e5f4e5661633f6a76d6bf6a9851a648808e1d401","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        # Mark the node with some meta-data to show that it should be"},{"line_number":447,"context_line":"        # in the middle of a caching operation."},{"line_number":448,"context_line":"        driver_info[\u0027caching\u0027] \u003d True"},{"line_number":449,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":450,"context_line":"        node.driver_info \u003d driver_info"},{"line_number":451,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_8395c488","line":448,"updated":"2015-03-06 17:37:03.000000000","message":"I see you\u0027re using \u0027caching\u0027 and \u0027cached\u0027, seems like it could be error-prone or racy. Maybe simplify to \u0027cache_status\u0027 with a value of \u0027caching\u0027 or \u0027cached\u0027?","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"559f79afc0a32386d904cdafff44cb60d6bd71e4","unresolved":false,"context_lines":[{"line_number":445,"context_line":""},{"line_number":446,"context_line":"        # Mark the node with some meta-data to show that it should be"},{"line_number":447,"context_line":"        # in the middle of a caching operation."},{"line_number":448,"context_line":"        driver_info[\u0027caching\u0027] \u003d True"},{"line_number":449,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":450,"context_line":"        node.driver_info \u003d driver_info"},{"line_number":451,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_7caea182","line":448,"in_reply_to":"9a80dd14_8395c488","updated":"2015-03-07 00:07:41.000000000","message":"That\u0027s probably cleaner. Done.","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bb9aefb5c178ca82bb3fcf807d90934d447a3a92","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    def validate(self, task, method, **kwargs):"},{"line_number":342,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":343,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":344,"context_line":"        return True"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def deploy_is_done(self, task):"},{"line_number":347,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_480757ca","line":344,"updated":"2015-03-07 02:02:51.000000000","message":"Probably want to call the superclass\u0027 validate method in case things are added there.","commit_id":"8118cec615bd600dee32ee81b9ed5a366d58468b"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"f54413fab8c5636658e1db5364fa8576eff97cfa","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    def validate(self, task, method, **kwargs):"},{"line_number":342,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":343,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":344,"context_line":"        return True"},{"line_number":345,"context_line":""},{"line_number":346,"context_line":"    def deploy_is_done(self, task):"},{"line_number":347,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_1ae017f9","line":344,"in_reply_to":"9a80dd14_480757ca","updated":"2015-03-09 18:31:58.000000000","message":"Done","commit_id":"8118cec615bd600dee32ee81b9ed5a366d58468b"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bb9aefb5c178ca82bb3fcf807d90934d447a3a92","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            driver_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":476,"context_line":"        # Hopefully it succeeded though."},{"line_number":477,"context_line":"        else:"},{"line_number":478,"context_line":"            driver_info[\u0027cache_status\u0027] \u003d \u0027cached\u0027"},{"line_number":479,"context_line":"            LOG.debug(\u0027Caching operation finished successfully on node \u0027"},{"line_number":480,"context_line":"                      \u0027%(node)s)\u0027 % {\u0027node\u0027: node.uuid})"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_e8e56b09","line":478,"updated":"2015-03-07 02:02:51.000000000","message":"Probably also want to clear this key after a deploy or tear down.\n\nAlso also, I\u0027m thinking this should be in driver_internal_info, as driver_info is primarily for deployers to pass parameters to drivers.","commit_id":"8118cec615bd600dee32ee81b9ed5a366d58468b"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"f54413fab8c5636658e1db5364fa8576eff97cfa","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            driver_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":476,"context_line":"        # Hopefully it succeeded though."},{"line_number":477,"context_line":"        else:"},{"line_number":478,"context_line":"            driver_info[\u0027cache_status\u0027] \u003d \u0027cached\u0027"},{"line_number":479,"context_line":"            LOG.debug(\u0027Caching operation finished successfully on node \u0027"},{"line_number":480,"context_line":"                      \u0027%(node)s)\u0027 % {\u0027node\u0027: node.uuid})"},{"line_number":481,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_a0b99ecd","line":478,"in_reply_to":"9a80dd14_e8e56b09","updated":"2015-03-09 18:31:58.000000000","message":"Done","commit_id":"8118cec615bd600dee32ee81b9ed5a366d58468b"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"78c1fd8b3085f71af56bbc15bf8b5edf99425a79","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        node.instance_info \u003d build_instance_info_for_deploy(task)"},{"line_number":265,"context_line":"        node.save()"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def _clean_cache_information(self, task):"},{"line_number":268,"context_line":"        \"\"\"Clean up metadata left over from a cache operation.\"\"\""},{"line_number":269,"context_line":"        node \u003d task.node"},{"line_number":270,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_9b2860e3","line":267,"updated":"2015-03-10 14:00:27.000000000","message":"Better to add a test for this part too, for completeness.","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        node.instance_info \u003d build_instance_info_for_deploy(task)"},{"line_number":265,"context_line":"        node.save()"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"    def _clean_cache_information(self, task):"},{"line_number":268,"context_line":"        \"\"\"Clean up metadata left over from a cache operation.\"\"\""},{"line_number":269,"context_line":"        node \u003d task.node"},{"line_number":270,"context_line":"        driver_internal_info \u003d node.driver_internal_info"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_d9f731d3","line":267,"in_reply_to":"9a80dd14_9b2860e3","updated":"2015-03-10 22:16:10.000000000","message":"Good call, done.","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"78c1fd8b3085f71af56bbc15bf8b5edf99425a79","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":342,"context_line":"                \"cache_image is missing or is not a dictionary value.\"))"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        missing_keys \u003d []"},{"line_number":345,"context_line":"        for key in [\u0027id\u0027, \u0027url\u0027, \u0027checksum\u0027]:"},{"line_number":346,"context_line":"            if None is image_info.get(key):"},{"line_number":347,"context_line":"                missing_keys.append(key)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_3b2cd498","line":344,"updated":"2015-03-10 14:00:27.000000000","message":"You could also use deploy_utils.check_for_missing_params","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":341,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":342,"context_line":"                \"cache_image is missing or is not a dictionary value.\"))"},{"line_number":343,"context_line":""},{"line_number":344,"context_line":"        missing_keys \u003d []"},{"line_number":345,"context_line":"        for key in [\u0027id\u0027, \u0027url\u0027, \u0027checksum\u0027]:"},{"line_number":346,"context_line":"            if None is image_info.get(key):"},{"line_number":347,"context_line":"                missing_keys.append(key)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_7ced5325","line":344,"in_reply_to":"9a80dd14_3b2cd498","updated":"2015-03-10 22:16:10.000000000","message":"Done","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f797ede5c4ba30dcdfbc6173bb5a44b1d844e450","unresolved":false,"context_lines":[{"line_number":354,"context_line":"    def validate(self, task, method, **kwargs):"},{"line_number":355,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":356,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":357,"context_line":"        return super(AgentVendorInterface, self).validate(self,"},{"line_number":358,"context_line":"                                                          task,"},{"line_number":359,"context_line":"                                                          method,"},{"line_number":360,"context_line":"                                                          **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_13ba8f0a","line":357,"updated":"2015-03-10 16:35:02.000000000","message":"don\u0027t pass in \u0027self\u0027 to validate()","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":354,"context_line":"    def validate(self, task, method, **kwargs):"},{"line_number":355,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":356,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":357,"context_line":"        return super(AgentVendorInterface, self).validate(self,"},{"line_number":358,"context_line":"                                                          task,"},{"line_number":359,"context_line":"                                                          method,"},{"line_number":360,"context_line":"                                                          **kwargs)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_59bb4175","line":357,"in_reply_to":"9a80dd14_13ba8f0a","updated":"2015-03-10 22:16:10.000000000","message":"Right, that was silly. Thanks!","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"09c85287b514388a72576b720fcc92e8fb1b6524","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        return super(AgentVendorInterface, self).validate(self,"},{"line_number":358,"context_line":"                                                          task,"},{"line_number":359,"context_line":"                                                          method,"},{"line_number":360,"context_line":"                                                          **kwargs)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def deploy_is_done(self, task):"},{"line_number":363,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_2c98241b","line":360,"updated":"2015-03-10 12:23:46.000000000","message":"This line is throwing in the agent tempest jobs, though it looks right?","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":357,"context_line":"        return super(AgentVendorInterface, self).validate(self,"},{"line_number":358,"context_line":"                                                          task,"},{"line_number":359,"context_line":"                                                          method,"},{"line_number":360,"context_line":"                                                          **kwargs)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"    def deploy_is_done(self, task):"},{"line_number":363,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_19a9c924","line":360,"in_reply_to":"9a80dd14_2c98241b","updated":"2015-03-10 22:16:10.000000000","message":"That pesky self!","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"78c1fd8b3085f71af56bbc15bf8b5edf99425a79","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":449,"context_line":"        # is preparing to cache one."},{"line_number":450,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":451,"context_line":"            LOG.warning(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":452,"context_line":"                        \u0027Refusing to cache another image.\u0027,"},{"line_number":453,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"},{"line_number":454,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_e01e0dba","line":451,"updated":"2015-03-10 14:00:27.000000000","message":"nit - _LW","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":448,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":449,"context_line":"        # is preparing to cache one."},{"line_number":450,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":451,"context_line":"            LOG.warning(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":452,"context_line":"                        \u0027Refusing to cache another image.\u0027,"},{"line_number":453,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"},{"line_number":454,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_b9719de2","line":451,"in_reply_to":"9a80dd14_e01e0dba","updated":"2015-03-10 22:16:10.000000000","message":"Fixed. Thanks!","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4187d7be854831189ae2aafe76e10ca5c0503cb9","unresolved":false,"context_lines":[{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        # Make the call to the agent to cache."},{"line_number":457,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":458,"context_line":"        response \u003d self._client.cache_image(node, image_info\u003dimage_info)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        LOG.debug(\u0027cache_image got response %(res)s for node %(node)s\u0027,"},{"line_number":461,"context_line":"                  {\u0027res\u0027: response, \u0027node\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_7f03850d","line":458,"updated":"2015-03-10 19:28:10.000000000","message":"Might want to catch exceptions here? Not sure.","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":455,"context_line":""},{"line_number":456,"context_line":"        # Make the call to the agent to cache."},{"line_number":457,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":458,"context_line":"        response \u003d self._client.cache_image(node, image_info\u003dimage_info)"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        LOG.debug(\u0027cache_image got response %(res)s for node %(node)s\u0027,"},{"line_number":461,"context_line":"                  {\u0027res\u0027: response, \u0027node\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_68c02de1","line":458,"in_reply_to":"9a80dd14_7f03850d","updated":"2015-03-10 22:16:10.000000000","message":"Other calls to _client appear similar in that they don\u0027t catch any exceptions. The new cache_image call doesn\u0027t appear to be special in any way. Any thoughts?","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"4187d7be854831189ae2aafe76e10ca5c0503cb9","unresolved":false,"context_lines":[{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        # Mark the node with some meta-data to show that it should be"},{"line_number":464,"context_line":"        # in the middle of a caching operation."},{"line_number":465,"context_line":"        driver_internal_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":466,"context_line":"        driver_internal_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":467,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":468,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_3c02fb0b","line":465,"updated":"2015-03-10 19:28:10.000000000","message":"There could be a race here if cache_image is called again before saving this status to the DB... I\u0027d probably update the node status before issuing the cache_image command.","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":462,"context_line":""},{"line_number":463,"context_line":"        # Mark the node with some meta-data to show that it should be"},{"line_number":464,"context_line":"        # in the middle of a caching operation."},{"line_number":465,"context_line":"        driver_internal_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":466,"context_line":"        driver_internal_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":467,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":468,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_4830c907","line":465,"in_reply_to":"9a80dd14_3c02fb0b","updated":"2015-03-10 22:16:10.000000000","message":"Sounds reasonable, fixed.","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"78c1fd8b3085f71af56bbc15bf8b5edf99425a79","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        # Caching may have failed."},{"line_number":480,"context_line":"        error \u003d self._check_last_command_success(node)"},{"line_number":481,"context_line":"        if error is not None:"},{"line_number":482,"context_line":"            msg \u003d _(\"node %(node)s failed to cache image %(image_id)s: \""},{"line_number":483,"context_line":"                    \"%(error)s\") % {\u0027node\u0027: node.uuid,"},{"line_number":484,"context_line":"                        \u0027image_id\u0027: driver_internal_info[\u0027cache_image_id\u0027],"},{"line_number":485,"context_line":"                        \u0027error\u0027: error}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_60593d8d","line":482,"updated":"2015-03-10 14:00:27.000000000","message":"nit - _LE","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":479,"context_line":"        # Caching may have failed."},{"line_number":480,"context_line":"        error \u003d self._check_last_command_success(node)"},{"line_number":481,"context_line":"        if error is not None:"},{"line_number":482,"context_line":"            msg \u003d _(\"node %(node)s failed to cache image %(image_id)s: \""},{"line_number":483,"context_line":"                    \"%(error)s\") % {\u0027node\u0027: node.uuid,"},{"line_number":484,"context_line":"                        \u0027image_id\u0027: driver_internal_info[\u0027cache_image_id\u0027],"},{"line_number":485,"context_line":"                        \u0027error\u0027: error}"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_3954cd20","line":482,"in_reply_to":"9a80dd14_60593d8d","updated":"2015-03-10 22:16:10.000000000","message":"Done","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"78c1fd8b3085f71af56bbc15bf8b5edf99425a79","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        else:"},{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027cached\u0027"},{"line_number":493,"context_line":"            LOG.debug(\u0027Caching operation finished successfully on node \u0027"},{"line_number":494,"context_line":"                      \u0027%(node)s)\u0027 % {\u0027node\u0027: node.uuid})"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":497,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_e0e36da1","line":494,"updated":"2015-03-10 14:00:27.000000000","message":"nit - comma instead of %","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":491,"context_line":"        else:"},{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027cached\u0027"},{"line_number":493,"context_line":"            LOG.debug(\u0027Caching operation finished successfully on node \u0027"},{"line_number":494,"context_line":"                      \u0027%(node)s)\u0027 % {\u0027node\u0027: node.uuid})"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":"        node.driver_internal_info \u003d driver_internal_info"},{"line_number":497,"context_line":"        node.save()"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_5917c154","line":494,"in_reply_to":"9a80dd14_e0e36da1","updated":"2015-03-10 22:16:10.000000000","message":"Done","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d88f53bc2995ab0fc589009bc51cb3e0a5c753b4","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\""},{"line_number":192,"context_line":"        return COMMON_PROPERTIES"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def validate(self, task, **kwargs):"},{"line_number":195,"context_line":"        \"\"\"Validate the driver-specific Node deployment info."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        This method validates whether the properties of the supplied node"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_65c0532b","line":194,"updated":"2015-03-10 23:08:17.000000000","message":"kwargs appears to be unused","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"4d85de727473fdee54a8b55e83c71822915cbb2f","unresolved":false,"context_lines":[{"line_number":191,"context_line":"        \"\"\""},{"line_number":192,"context_line":"        return COMMON_PROPERTIES"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def validate(self, task, **kwargs):"},{"line_number":195,"context_line":"        \"\"\"Validate the driver-specific Node deployment info."},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"        This method validates whether the properties of the supplied node"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_38059e14","line":194,"in_reply_to":"9a80dd14_65c0532b","updated":"2015-03-10 23:20:19.000000000","message":"I think I understand that it is there because of a change in base class.  If that is the case maybe a comment to say that it is intentionally unused.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d88f53bc2995ab0fc589009bc51cb3e0a5c753b4","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Clean up metadata left over from a cache operation.\"\"\""},{"line_number":270,"context_line":"        node \u003d task.node"},{"line_number":271,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":272,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027):"},{"line_number":273,"context_line":"            del driver_internal_info[\u0027cache_status\u0027]"},{"line_number":274,"context_line":"        if driver_internal_info.get(\u0027cache_image_id\u0027):"},{"line_number":275,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_e510c3aa","line":272,"updated":"2015-03-10 23:08:17.000000000","message":"Two thoughts.\n\n1. Do we only care if the value exists?  Is an empty value okay (e.g. driver_internal_info[\u0027cache_status\u0027] \u003d []) ?  If not then maybe:\n if \u0027cache_status\u0027 in driver_internal_info:\n\n2. Maybe it could be a for loop:\n for key in (\u0027cache_status\u0027, \u0027cache_image_id\u0027):\n   if key in driver_internal_info:\n     del driver_internal_info[key]\n\nI like the for loop as the key only needs to be changed in one place if future modifications.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Clean up metadata left over from a cache operation.\"\"\""},{"line_number":270,"context_line":"        node \u003d task.node"},{"line_number":271,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":272,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027):"},{"line_number":273,"context_line":"            del driver_internal_info[\u0027cache_status\u0027]"},{"line_number":274,"context_line":"        if driver_internal_info.get(\u0027cache_image_id\u0027):"},{"line_number":275,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_81850409","line":272,"in_reply_to":"9a80dd14_1820b1f6","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Clean up metadata left over from a cache operation.\"\"\""},{"line_number":270,"context_line":"        node \u003d task.node"},{"line_number":271,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":272,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027):"},{"line_number":273,"context_line":"            del driver_internal_info[\u0027cache_status\u0027]"},{"line_number":274,"context_line":"        if driver_internal_info.get(\u0027cache_image_id\u0027):"},{"line_number":275,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_6182d001","line":272,"in_reply_to":"9a80dd14_e510c3aa","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"873963dc0e140390f3f94f9c8a17bd0c32fb3f5b","unresolved":false,"context_lines":[{"line_number":269,"context_line":"        \"\"\"Clean up metadata left over from a cache operation.\"\"\""},{"line_number":270,"context_line":"        node \u003d task.node"},{"line_number":271,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":272,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027):"},{"line_number":273,"context_line":"            del driver_internal_info[\u0027cache_status\u0027]"},{"line_number":274,"context_line":"        if driver_internal_info.get(\u0027cache_image_id\u0027):"},{"line_number":275,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_1820b1f6","line":272,"in_reply_to":"9a80dd14_e510c3aa","updated":"2015-03-11 17:14:08.000000000","message":"IMO these parameters should be removed here w/o any checks.\n\n driver_internal_info.pop(\u0027cache_status\u0027, None)\n driver_internal_info.pop(\u0027cache_image_id\u0027, None)","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":324,"context_line":""},{"line_number":325,"context_line":"class AgentVendorInterface(agent_base_vendor.BaseAgentVendor):"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def is_caching_done(self, task):"},{"line_number":328,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"},{"line_number":329,"context_line":"        # If there are no commands running on the agent, then something has"},{"line_number":330,"context_line":"        # gone wrong, because we\u0027re expecting the node to be in the middle"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_5b2a1e91","line":327,"updated":"2015-03-11 19:39:57.000000000","message":"missing proper docstring - atleast one liner would be good.\n\nmissing unit tests for this method.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":324,"context_line":""},{"line_number":325,"context_line":"class AgentVendorInterface(agent_base_vendor.BaseAgentVendor):"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def is_caching_done(self, task):"},{"line_number":328,"context_line":"        commands \u003d self._client.get_commands_status(task.node)"},{"line_number":329,"context_line":"        # If there are no commands running on the agent, then something has"},{"line_number":330,"context_line":"        # gone wrong, because we\u0027re expecting the node to be in the middle"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_c4062a21","line":327,"in_reply_to":"9a80dd14_5b2a1e91","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            raise exception.CachingOperationFailed(node\u003dtask.node.uuid)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        last_command \u003d commands[-1]"},{"line_number":336,"context_line":"        if last_command[\u0027command_status\u0027] !\u003d \u0027RUNNING\u0027:"},{"line_number":337,"context_line":"            return True"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_3be56aa8","line":336,"updated":"2015-03-11 19:39:57.000000000","message":"can\u0027t we check the \n\n  last_command[\u0027command_status\u0027] \u003d\u003d \u0027FAILED\u0027\n\nand raise the exception ?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":333,"context_line":"            raise exception.CachingOperationFailed(node\u003dtask.node.uuid)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        last_command \u003d commands[-1]"},{"line_number":336,"context_line":"        if last_command[\u0027command_status\u0027] !\u003d \u0027RUNNING\u0027:"},{"line_number":337,"context_line":"            return True"},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"        return False"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_072f6489","line":336,"in_reply_to":"9a80dd14_3be56aa8","updated":"2015-03-12 21:28:39.000000000","message":"I decided to move the exception to finish_cache, as it makes more logical sense to keep this method \u0027pure\u0027, in that it simply returns True or False. The caching operation is done even if it didn\u0027t complete properly.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e017942939319b9e03a5fefab7ea898fee724935","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    def _validate_cache_image(self, task, **kwargs):"},{"line_number":342,"context_line":"        \"\"\"Validate arguments to the cache_image method.\"\"\""},{"line_number":343,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":344,"context_line":"        if image_info is None or not isinstance(image_info, dict):"},{"line_number":345,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":346,"context_line":"                \"cache_image is missing or is not a dictionary value.\"))"},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_7bee1eb6","line":344,"updated":"2015-03-11 10:56:00.000000000","message":"You can only test\n if not isinstance(image_info, dict):\n\n\u003e\u003e\u003e isinstance(None, dict)\n\nFalse","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":341,"context_line":"    def _validate_cache_image(self, task, **kwargs):"},{"line_number":342,"context_line":"        \"\"\"Validate arguments to the cache_image method.\"\"\""},{"line_number":343,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":344,"context_line":"        if image_info is None or not isinstance(image_info, dict):"},{"line_number":345,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":346,"context_line":"                \"cache_image is missing or is not a dictionary value.\"))"},{"line_number":347,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_0746844f","line":344,"in_reply_to":"9a80dd14_7bee1eb6","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e017942939319b9e03a5fefab7ea898fee724935","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":346,"context_line":"                \"cache_image is missing or is not a dictionary value.\"))"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        info_dict \u003d {}"},{"line_number":349,"context_line":"        for key in [\u0027id\u0027, \u0027url\u0027, \u0027checksum\u0027]:"},{"line_number":350,"context_line":"            info_dict[key] \u003d image_info.get(key)"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_5b923af7","line":348,"updated":"2015-03-11 10:56:00.000000000","message":"info_dict \u003d {key: image_info.get(key) for key in (\u0027id\u0027, \u0027url\u0027, \u0027checksum\u0027)}","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            raise exception.MissingParameterValue(_(\"image_info argument to \""},{"line_number":346,"context_line":"                \"cache_image is missing or is not a dictionary value.\"))"},{"line_number":347,"context_line":""},{"line_number":348,"context_line":"        info_dict \u003d {}"},{"line_number":349,"context_line":"        for key in [\u0027id\u0027, \u0027url\u0027, \u0027checksum\u0027]:"},{"line_number":350,"context_line":"            info_dict[key] \u003d image_info.get(key)"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_a7dcd875","line":348,"in_reply_to":"9a80dd14_5b923af7","updated":"2015-03-12 21:28:39.000000000","message":"Interesting, I wasn\u0027t aware of dictionary comprehensions. Done.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                      \u0027missing\u0027) % {\u0027node\u0027: task.node.uuid}"},{"line_number":355,"context_line":"        deploy_utils.check_for_missing_params(info_dict, error_msg)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def validate(self, task, method, **kwargs):"},{"line_number":358,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":359,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":360,"context_line":"        return super(AgentVendorInterface, self).validate(task,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_cee00efd","line":357,"updated":"2015-03-11 19:39:57.000000000","message":"missing docstring.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":354,"context_line":"                      \u0027missing\u0027) % {\u0027node\u0027: task.node.uuid}"},{"line_number":355,"context_line":"        deploy_utils.check_for_missing_params(info_dict, error_msg)"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def validate(self, task, method, **kwargs):"},{"line_number":358,"context_line":"        if method \u003d\u003d \"cache_image\":"},{"line_number":359,"context_line":"            return self._validate_cache_image(task, **kwargs)"},{"line_number":360,"context_line":"        return super(AgentVendorInterface, self).validate(task,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_075044d3","line":357,"in_reply_to":"9a80dd14_cee00efd","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        {"},{"line_number":439,"context_line":"            \u0027image_info\u0027: {"},{"line_number":440,"context_line":"                \u0027id\u0027: \u0027image_id\u0027,"},{"line_number":441,"context_line":"                \u0027urls\u0027: [\u0027http://image_url\u0027, ...],"},{"line_number":442,"context_line":"                \u0027checksum\u0027: \u0027image_checksum\u0027"},{"line_number":443,"context_line":"            }"},{"line_number":444,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_18d6ecc3","line":441,"updated":"2015-03-11 19:39:57.000000000","message":"s/urls/url.  better if we had proper docstring here.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":438,"context_line":"        {"},{"line_number":439,"context_line":"            \u0027image_info\u0027: {"},{"line_number":440,"context_line":"                \u0027id\u0027: \u0027image_id\u0027,"},{"line_number":441,"context_line":"                \u0027urls\u0027: [\u0027http://image_url\u0027, ...],"},{"line_number":442,"context_line":"                \u0027checksum\u0027: \u0027image_checksum\u0027"},{"line_number":443,"context_line":"            }"},{"line_number":444,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_9567fae9","line":441,"in_reply_to":"9a80dd14_18d6ecc3","updated":"2015-03-12 21:28:39.000000000","message":"I\u0027m basing \u0027urls\u0027 off of the ironic-python-agent, which is what it is currently coded to accept, not \u0027url\u0027.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            }"},{"line_number":444,"context_line":"        }"},{"line_number":445,"context_line":"        \"\"\""},{"line_number":446,"context_line":"        node \u003d task.node"},{"line_number":447,"context_line":"        LOG.debug(\u0027Caching image to node %s.\u0027, node.uuid)"},{"line_number":448,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":449,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_7b9b62c9","line":446,"updated":"2015-03-11 19:39:57.000000000","message":"isn\u0027t better to allow caching only when the node is in available state ?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            }"},{"line_number":444,"context_line":"        }"},{"line_number":445,"context_line":"        \"\"\""},{"line_number":446,"context_line":"        node \u003d task.node"},{"line_number":447,"context_line":"        LOG.debug(\u0027Caching image to node %s.\u0027, node.uuid)"},{"line_number":448,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":449,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_550f42e1","line":446,"in_reply_to":"9a80dd14_7b9b62c9","updated":"2015-03-12 21:28:39.000000000","message":"Probably, adding a check here, and a test.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e017942939319b9e03a5fefab7ea898fee724935","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":451,"context_line":"        # is preparing to cache one."},{"line_number":452,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":453,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":454,"context_line":"                            \u0027Refusing to cache another image.\u0027),"},{"line_number":455,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_16cdf986","line":452,"updated":"2015-03-11 10:56:00.000000000","message":"When we remove \u0027cache_status\u0027: \u0027cached\u0027 from a node? AFAIK at least we should do this on zapping/cleaning/undeploy etc.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"873963dc0e140390f3f94f9c8a17bd0c32fb3f5b","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":451,"context_line":"        # is preparing to cache one."},{"line_number":452,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":453,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":454,"context_line":"                            \u0027Refusing to cache another image.\u0027),"},{"line_number":455,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_b8296539","line":452,"in_reply_to":"9a80dd14_16cdf986","updated":"2015-03-11 17:14:08.000000000","message":"OK see in clean_up().","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":451,"context_line":"        # is preparing to cache one."},{"line_number":452,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":453,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":454,"context_line":"                            \u0027Refusing to cache another image.\u0027),"},{"line_number":455,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_fb12f256","line":452,"in_reply_to":"9a80dd14_b8296539","updated":"2015-03-11 19:39:57.000000000","message":"why do we prevent cache update when the status is cached ? can\u0027t the user/operator request to cache a new image and forget about the old image ?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":449,"context_line":""},{"line_number":450,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":451,"context_line":"        # is preparing to cache one."},{"line_number":452,"context_line":"        if driver_internal_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":453,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":454,"context_line":"                            \u0027Refusing to cache another image.\u0027),"},{"line_number":455,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_15a14aa9","line":452,"in_reply_to":"9a80dd14_fb12f256","updated":"2015-03-12 21:28:39.000000000","message":"The worry is that unless we force the node through cleaning before caching another image, then the disk can get into a state where things behave badly. The example I\u0027ve been given are raid superblocks left over on the disk. If the disk hasn\u0027t gone through an erase/secure erase before writing a new image, Bad Things can happen.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":465,"context_line":""},{"line_number":466,"context_line":"        # Make the actual call to the client which should initiate the"},{"line_number":467,"context_line":"        # caching operation."},{"line_number":468,"context_line":"        response \u003d self._client.cache_image(node, image_info\u003dimage_info)"},{"line_number":469,"context_line":""},{"line_number":470,"context_line":"        LOG.debug(\u0027cache_image got response %(res)s for node %(node)s\u0027,"},{"line_number":471,"context_line":"                  {\u0027res\u0027: response, \u0027node\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ae583afb","line":468,"updated":"2015-03-11 19:39:57.000000000","message":"better to check the examine the response and check if triggering command failed.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d88f53bc2995ab0fc589009bc51cb3e0a5c753b4","unresolved":false,"context_lines":[{"line_number":487,"context_line":"                        \u0027image_id\u0027: driver_internal_info[\u0027cache_image_id\u0027],"},{"line_number":488,"context_line":"                        \u0027error\u0027: error}"},{"line_number":489,"context_line":"            LOG.error(msg)"},{"line_number":490,"context_line":"            # This is not true anymore."},{"line_number":491,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"},{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":493,"context_line":"        # Hopefully it succeeded though."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_c53adfe6","line":490,"updated":"2015-03-10 23:08:17.000000000","message":"I\u0027m not sure what this comment means.  What is not true anymore?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":487,"context_line":"                        \u0027image_id\u0027: driver_internal_info[\u0027cache_image_id\u0027],"},{"line_number":488,"context_line":"                        \u0027error\u0027: error}"},{"line_number":489,"context_line":"            LOG.error(msg)"},{"line_number":490,"context_line":"            # This is not true anymore."},{"line_number":491,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"},{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":493,"context_line":"        # Hopefully it succeeded though."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_75852606","line":490,"in_reply_to":"9a80dd14_c53adfe6","updated":"2015-03-12 21:28:39.000000000","message":"It was in reference to the \u0027cache_image_id\u0027 key/data pair being untrue because the caching operation failed.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"e017942939319b9e03a5fefab7ea898fee724935","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                        \u0027error\u0027: error}"},{"line_number":489,"context_line":"            LOG.error(msg)"},{"line_number":490,"context_line":"            # This is not true anymore."},{"line_number":491,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"},{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":493,"context_line":"        # Hopefully it succeeded though."},{"line_number":494,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_16da59e9","line":491,"updated":"2015-03-11 10:56:00.000000000","message":"IMO better do not remove this, we set failed state, but what was image?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":488,"context_line":"                        \u0027error\u0027: error}"},{"line_number":489,"context_line":"            LOG.error(msg)"},{"line_number":490,"context_line":"            # This is not true anymore."},{"line_number":491,"context_line":"            del driver_internal_info[\u0027cache_image_id\u0027]"},{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":493,"context_line":"        # Hopefully it succeeded though."},{"line_number":494,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_f599167a","line":491,"in_reply_to":"9a80dd14_16da59e9","updated":"2015-03-12 21:28:39.000000000","message":"That sounds reasonable. I\u0027ll refrain from deleting it here.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":493,"context_line":"        # Hopefully it succeeded though."},{"line_number":494,"context_line":"        else:"},{"line_number":495,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027cached\u0027"},{"line_number":496,"context_line":"            LOG.debug(\u0027Caching operation finished successfully on node \u0027"},{"line_number":497,"context_line":"                      \u0027%(node)s)\u0027, {\u0027node\u0027: node.uuid})"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_9b4d769c","line":495,"updated":"2015-03-11 19:39:57.000000000","message":"We write the information back in driver_internal_info everywhere and can be viewed only by Ironic.  So who is the consumer of this ? How will an external person who raised the vendor passthru know if the caching is complete or not ?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":492,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":493,"context_line":"        # Hopefully it succeeded though."},{"line_number":494,"context_line":"        else:"},{"line_number":495,"context_line":"            driver_internal_info[\u0027cache_status\u0027] \u003d \u0027cached\u0027"},{"line_number":496,"context_line":"            LOG.debug(\u0027Caching operation finished successfully on node \u0027"},{"line_number":497,"context_line":"                      \u0027%(node)s)\u0027, {\u0027node\u0027: node.uuid})"},{"line_number":498,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_f5b72df3","line":495,"in_reply_to":"9a80dd14_9b4d769c","updated":"2015-03-12 21:28:39.000000000","message":"Good point. I was originally using driver_info, but was told driver_internal_info would be more appropriate. However, after some more discussion I think I\u0027ll move this data back into driver_info.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"e23268799aa16a73d1a68b003648b164751cfba6","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        contain the required information for this driver to deploy images to"},{"line_number":199,"context_line":"        the node."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :param task: a TaskManager instance"},{"line_number":202,"context_line":"        :raises: MissingParameterValue"},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":"        node \u003d task.node"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_a3a4954b","line":201,"updated":"2015-03-13 00:28:52.000000000","message":"Please document kwargs.  Explain it is unused.","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":198,"context_line":"        contain the required information for this driver to deploy images to"},{"line_number":199,"context_line":"        the node."},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"        :param task: a TaskManager instance"},{"line_number":202,"context_line":"        :raises: MissingParameterValue"},{"line_number":203,"context_line":"        \"\"\""},{"line_number":204,"context_line":"        node \u003d task.node"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_888625b8","line":201,"in_reply_to":"9a80dd14_a3a4954b","updated":"2015-03-23 21:07:23.000000000","message":"Done","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"c94c82b7428c4c3e229312aa0551ed15671413a5","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        Once the possibility of the cache operation has been dealt with,"},{"line_number":330,"context_line":"        this function calls the base class\u0027s heartbeat to resolve the rest of"},{"line_number":331,"context_line":"        the exepected heartbeat behavior."},{"line_number":332,"context_line":"        \"\"\""},{"line_number":333,"context_line":"        if ((task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027) and"},{"line_number":334,"context_line":"             self.is_caching_done(task)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_47602a35","line":331,"updated":"2015-03-19 14:17:19.000000000","message":"s/exepected/expected/","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":328,"context_line":""},{"line_number":329,"context_line":"        Once the possibility of the cache operation has been dealt with,"},{"line_number":330,"context_line":"        this function calls the base class\u0027s heartbeat to resolve the rest of"},{"line_number":331,"context_line":"        the exepected heartbeat behavior."},{"line_number":332,"context_line":"        \"\"\""},{"line_number":333,"context_line":"        if ((task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027) and"},{"line_number":334,"context_line":"             self.is_caching_done(task)):"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_08c235e9","line":331,"in_reply_to":"9a80dd14_47602a35","updated":"2015-03-23 21:07:23.000000000","message":"Done","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1669ae37212959da8bc2581e96d49b29ece390d0","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    @base.passthru([\u0027POST\u0027])"},{"line_number":468,"context_line":"    def heartbeat(self, task, **kwargs):"},{"line_number":469,"context_line":"        \"\"\"Override of heartbeat to take care of caching operations."},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        First allow the base class to deal with the heartbeat, then check"},{"line_number":472,"context_line":"        for image caching cases."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_98512edb","line":469,"updated":"2015-04-08 23:33:22.000000000","message":"Not sure if this necessarily needs to be outside of the base class, but it isn\u0027t a bad thing either.","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"1b4c5838dd38a47887259ea989e5ac158f6e0b7f","unresolved":false,"context_lines":[{"line_number":466,"context_line":""},{"line_number":467,"context_line":"    @base.passthru([\u0027POST\u0027])"},{"line_number":468,"context_line":"    def heartbeat(self, task, **kwargs):"},{"line_number":469,"context_line":"        \"\"\"Override of heartbeat to take care of caching operations."},{"line_number":470,"context_line":""},{"line_number":471,"context_line":"        First allow the base class to deal with the heartbeat, then check"},{"line_number":472,"context_line":"        for image caching cases."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_f45ffde2","line":469,"in_reply_to":"9aa53dc9_98512edb","updated":"2015-04-09 21:30:46.000000000","message":"It\u0027s nice in that it keeps agent caching related code consolidated in this file. Otherwise, it\u0027s a little dirty in that its harder to follow whats happening in AgentVendorInterface.heartbeat().\n\nNot sure what the best way is.","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1669ae37212959da8bc2581e96d49b29ece390d0","unresolved":false,"context_lines":[{"line_number":481,"context_line":"            try:"},{"line_number":482,"context_line":"                self.continue_cache(task)"},{"line_number":483,"context_line":"            except exception.CachingOperationTerminatedAbnormally as e:"},{"line_number":484,"context_line":"                LOG.exception(e.message)"},{"line_number":485,"context_line":"        elif ((task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027) and"},{"line_number":486,"context_line":"             task.node.driver_internal_info.get(\u0027cache_image_info\u0027) is None and"},{"line_number":487,"context_line":"             self.is_caching_done(task)):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_d8ca166e","line":484,"updated":"2015-04-08 23:33:22.000000000","message":"Do we want to do anything here, such as put the node into an error state or something?","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"1b4c5838dd38a47887259ea989e5ac158f6e0b7f","unresolved":false,"context_lines":[{"line_number":481,"context_line":"            try:"},{"line_number":482,"context_line":"                self.continue_cache(task)"},{"line_number":483,"context_line":"            except exception.CachingOperationTerminatedAbnormally as e:"},{"line_number":484,"context_line":"                LOG.exception(e.message)"},{"line_number":485,"context_line":"        elif ((task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027) and"},{"line_number":486,"context_line":"             task.node.driver_internal_info.get(\u0027cache_image_info\u0027) is None and"},{"line_number":487,"context_line":"             self.is_caching_done(task)):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_947e7168","line":484,"in_reply_to":"9aa53dc9_d8ca166e","updated":"2015-04-09 21:30:46.000000000","message":"Done","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1669ae37212959da8bc2581e96d49b29ece390d0","unresolved":false,"context_lines":[{"line_number":488,"context_line":"            try:"},{"line_number":489,"context_line":"                self.finish_cache(task)"},{"line_number":490,"context_line":"            except exception.CachingOperationTerminatedAbnormally as e:"},{"line_number":491,"context_line":"                LOG.exception(e.message)"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def is_caching_done(self, task):"},{"line_number":494,"context_line":"        \"\"\"Check to see if the caching operation appears to be done."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_98c48e5f","line":491,"updated":"2015-04-08 23:33:22.000000000","message":"Ditto","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"1b4c5838dd38a47887259ea989e5ac158f6e0b7f","unresolved":false,"context_lines":[{"line_number":488,"context_line":"            try:"},{"line_number":489,"context_line":"                self.finish_cache(task)"},{"line_number":490,"context_line":"            except exception.CachingOperationTerminatedAbnormally as e:"},{"line_number":491,"context_line":"                LOG.exception(e.message)"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"    def is_caching_done(self, task):"},{"line_number":494,"context_line":"        \"\"\"Check to see if the caching operation appears to be done."}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_74988dc0","line":491,"in_reply_to":"9aa53dc9_98c48e5f","updated":"2015-04-09 21:30:46.000000000","message":"Done","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1669ae37212959da8bc2581e96d49b29ece390d0","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        node \u003d task.node"},{"line_number":704,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":705,"context_line":"        image_info \u003d driver_internal_info[\u0027cache_image_info\u0027]"},{"line_number":706,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027]"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"        response \u003d self._client.cache_image(node, image_info\u003dimage_info)"},{"line_number":709,"context_line":"        LOG.debug(\u0027cache_image got response %(res)s for node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_f8cb9a51","line":706,"updated":"2015-04-08 23:33:22.000000000","message":"This line should be removed, yes?","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"1b4c5838dd38a47887259ea989e5ac158f6e0b7f","unresolved":false,"context_lines":[{"line_number":703,"context_line":"        node \u003d task.node"},{"line_number":704,"context_line":"        driver_internal_info \u003d node.driver_internal_info"},{"line_number":705,"context_line":"        image_info \u003d driver_internal_info[\u0027cache_image_info\u0027]"},{"line_number":706,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027]"},{"line_number":707,"context_line":""},{"line_number":708,"context_line":"        response \u003d self._client.cache_image(node, image_info\u003dimage_info)"},{"line_number":709,"context_line":"        LOG.debug(\u0027cache_image got response %(res)s for node %(node)s\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_348e8579","line":706,"in_reply_to":"9aa53dc9_f8cb9a51","updated":"2015-04-09 21:30:46.000000000","message":"Uhg, yes.","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":13997,"name":"SHIGEMATSU Mitsuhiro","email":"shigematsu.mitsuhiro@lab.ntt.co.jp","username":"pshige"},"change_message_id":"ce4d7b8c3c18e5a86c6406fec12a06a3654718f1","unresolved":false,"context_lines":[{"line_number":247,"context_line":""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"def _caching_error_handler(task, msg):"},{"line_number":250,"context_line":"    \"\"\"Error handler for image caching related activites.\"\"\""},{"line_number":251,"context_line":"    driver_info \u003d task.node.driver_info"},{"line_number":252,"context_line":"    driver_info[\u0027cache_status\u0027] \u003d \u0027failed\u0027"},{"line_number":253,"context_line":"    driver_info[\u0027cache_error\u0027] \u003d msg"}],"source_content_type":"text/x-python","patch_set":10,"id":"9aa53dc9_c380bdc1","line":250,"updated":"2015-04-10 01:26:45.000000000","message":"s/activites/activities/","commit_id":"3e638a136a65306d35f3c613e222a137bc243015"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"2812c1a3152fdf5468420cdcc0cc1382e567f322","unresolved":false,"context_lines":[{"line_number":492,"context_line":"            except exception.CachingOperationTerminatedAbnormally as e:"},{"line_number":493,"context_line":"                _caching_error_handler(task.node, e.message)"},{"line_number":494,"context_line":"                LOG.exception(e.message)"},{"line_number":495,"context_line":"        elif ((task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027) and"},{"line_number":496,"context_line":"             task.node.driver_internal_info.get(\u0027cache_image_info\u0027) is None and"},{"line_number":497,"context_line":"             self.is_caching_done(task)):"},{"line_number":498,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_b168c2bb","line":495,"updated":"2015-05-27 10:18:37.000000000","message":"This double check not needed\n if task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027:\n     if task.node.driver_internal_info.get(\u0027cache_image_info\u0027) is not None:    \n     ...\n     elif self.is_caching_done(task):\n     ...","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"e6e09fce5bd4a2b6888cfbc4f50a87669b0d6a03","unresolved":false,"context_lines":[{"line_number":492,"context_line":"            except exception.CachingOperationTerminatedAbnormally as e:"},{"line_number":493,"context_line":"                _caching_error_handler(task.node, e.message)"},{"line_number":494,"context_line":"                LOG.exception(e.message)"},{"line_number":495,"context_line":"        elif ((task.node.driver_info.get(\u0027cache_status\u0027) \u003d\u003d \u0027caching\u0027) and"},{"line_number":496,"context_line":"             task.node.driver_internal_info.get(\u0027cache_image_info\u0027) is None and"},{"line_number":497,"context_line":"             self.is_caching_done(task)):"},{"line_number":498,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_50685621","line":495,"in_reply_to":"7a016987_b168c2bb","updated":"2015-05-27 17:28:05.000000000","message":"Done","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"2812c1a3152fdf5468420cdcc0cc1382e567f322","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":649,"context_line":"        # is preparing to cache one."},{"line_number":650,"context_line":"        if driver_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":651,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":652,"context_line":"                            \u0027Refusing to cache another image.\u0027),"},{"line_number":653,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"},{"line_number":654,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_0e0893d8","line":651,"updated":"2015-05-27 10:18:37.000000000","message":"%(node_uuid) -\u003e %(node_uuid)s","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"e6e09fce5bd4a2b6888cfbc4f50a87669b0d6a03","unresolved":false,"context_lines":[{"line_number":648,"context_line":"        # Make sure the node does not already contain a cached image, or"},{"line_number":649,"context_line":"        # is preparing to cache one."},{"line_number":650,"context_line":"        if driver_info.get(\u0027cache_status\u0027) in (\u0027caching\u0027, \u0027cached\u0027):"},{"line_number":651,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid) already has an image cached. \u0027"},{"line_number":652,"context_line":"                            \u0027Refusing to cache another image.\u0027),"},{"line_number":653,"context_line":"                        {\u0027node_uuid\u0027: node.uuid})"},{"line_number":654,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_b03aeae5","line":651,"in_reply_to":"7a016987_0e0893d8","updated":"2015-05-27 17:28:05.000000000","message":"Done","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"2812c1a3152fdf5468420cdcc0cc1382e567f322","unresolved":false,"context_lines":[{"line_number":674,"context_line":"        except Exception as e:"},{"line_number":675,"context_line":"            LOG.error(\"Image caching failed due to a problem getting a swift \""},{"line_number":676,"context_line":"                      \"URL for the image: %(error_msg)s\","},{"line_number":677,"context_line":"                      {\u0027error_msg\u0027: e.message})"},{"line_number":678,"context_line":"            return _caching_error_handler(task, e.message)"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_ee59b78f","line":677,"updated":"2015-05-27 10:18:37.000000000","message":"\u0027message\u0027 attribute deprecated for generic exception, please use {\u0027error_msg\u0027: e}","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"e6e09fce5bd4a2b6888cfbc4f50a87669b0d6a03","unresolved":false,"context_lines":[{"line_number":674,"context_line":"        except Exception as e:"},{"line_number":675,"context_line":"            LOG.error(\"Image caching failed due to a problem getting a swift \""},{"line_number":676,"context_line":"                      \"URL for the image: %(error_msg)s\","},{"line_number":677,"context_line":"                      {\u0027error_msg\u0027: e.message})"},{"line_number":678,"context_line":"            return _caching_error_handler(task, e.message)"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_b00b0a7d","line":677,"in_reply_to":"7a016987_ee59b78f","updated":"2015-05-27 17:28:05.000000000","message":"Done","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"2812c1a3152fdf5468420cdcc0cc1382e567f322","unresolved":false,"context_lines":[{"line_number":675,"context_line":"            LOG.error(\"Image caching failed due to a problem getting a swift \""},{"line_number":676,"context_line":"                      \"URL for the image: %(error_msg)s\","},{"line_number":677,"context_line":"                      {\u0027error_msg\u0027: e.message})"},{"line_number":678,"context_line":"            return _caching_error_handler(task, e.message)"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":681,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_ceea7b74","line":678,"updated":"2015-05-27 10:18:37.000000000","message":"ditto","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"e6e09fce5bd4a2b6888cfbc4f50a87669b0d6a03","unresolved":false,"context_lines":[{"line_number":675,"context_line":"            LOG.error(\"Image caching failed due to a problem getting a swift \""},{"line_number":676,"context_line":"                      \"URL for the image: %(error_msg)s\","},{"line_number":677,"context_line":"                      {\u0027error_msg\u0027: e.message})"},{"line_number":678,"context_line":"            return _caching_error_handler(task, e.message)"},{"line_number":679,"context_line":""},{"line_number":680,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":681,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"7a016987_900ece8a","line":678,"in_reply_to":"7a016987_ceea7b74","updated":"2015-05-27 17:28:05.000000000","message":"Done","commit_id":"d871bd36efd64ec90de1527e690cf3466451562e"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        }"},{"line_number":642,"context_line":"        \"\"\""},{"line_number":643,"context_line":"        node \u003d task.node"},{"line_number":644,"context_line":"        if node.provision_state !\u003d states.AVAILABLE:"},{"line_number":645,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid)s is not available for \u0027"},{"line_number":646,"context_line":"                            \u0027provisioning, refusing to cache an image.\u0027),"},{"line_number":647,"context_line":"                            {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_4515fd46","line":644,"updated":"2015-06-09 12:51:39.000000000","message":"Please do this in validate() method of vendor passthru so that you can raise an exception and it gives back 400 to the operator invoking vendor passthru.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        }"},{"line_number":642,"context_line":"        \"\"\""},{"line_number":643,"context_line":"        node \u003d task.node"},{"line_number":644,"context_line":"        if node.provision_state !\u003d states.AVAILABLE:"},{"line_number":645,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid)s is not available for \u0027"},{"line_number":646,"context_line":"                            \u0027provisioning, refusing to cache an image.\u0027),"},{"line_number":647,"context_line":"                            {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_77d98856","line":644,"in_reply_to":"3afb71cf_4515fd46","updated":"2015-06-10 17:01:10.000000000","message":"If raising an exception is the proper course, why not do it here?\n\nvalidate() exists to validate arguments to the method, and while the node could be seen as an argument, the node is a valid argument as long as it exists within the system.\n\nTaking precautions to not pass along the cache_image command based on node state seems less like validating arguments, and more like guarding nodes against receiving the cache_image command if they are not in a good state to receive them. If something more should be done to return a better error to the caller of the API, I\u0027m willing to do that.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"072260ae53aa10da79f779d33503e9067e58c780","unresolved":false,"context_lines":[{"line_number":641,"context_line":"        }"},{"line_number":642,"context_line":"        \"\"\""},{"line_number":643,"context_line":"        node \u003d task.node"},{"line_number":644,"context_line":"        if node.provision_state !\u003d states.AVAILABLE:"},{"line_number":645,"context_line":"            LOG.warning(_LW(\u0027Node %(node_uuid)s is not available for \u0027"},{"line_number":646,"context_line":"                            \u0027provisioning, refusing to cache an image.\u0027),"},{"line_number":647,"context_line":"                            {\u0027node_uuid\u0027: node.uuid})"}],"source_content_type":"text/x-python","patch_set":15,"id":"1af86dd1_5041a60a","line":644,"in_reply_to":"3afb71cf_77d98856","updated":"2015-06-12 16:48:30.000000000","message":"I think I agree with Ramesh here; the validate method is designed to ensure things are in the right state. I think checking this in validate will end with a better user experience.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":669,"context_line":""},{"line_number":670,"context_line":"        # Mark the node with some meta-data to show that it should be"},{"line_number":671,"context_line":"        # in the middle of a caching operation."},{"line_number":672,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        try:"},{"line_number":675,"context_line":"            glance \u003d image_service.GlanceImageService(version\u003d2,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_805403ff","line":672,"updated":"2015-06-09 12:51:39.000000000","message":"can we have it as image_href ?","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":669,"context_line":""},{"line_number":670,"context_line":"        # Mark the node with some meta-data to show that it should be"},{"line_number":671,"context_line":"        # in the middle of a caching operation."},{"line_number":672,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        try:"},{"line_number":675,"context_line":"            glance \u003d image_service.GlanceImageService(version\u003d2,"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_f45c564c","line":672,"in_reply_to":"3afb71cf_805403ff","updated":"2015-06-10 17:01:10.000000000","message":"That doesn\u0027t accurately describe the key/value pair though. \u0027image_info\u0027 points to a dict of information about the image. The name would need to change elsewhere as well, as it doesn\u0027t originate from my patch.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        try:"},{"line_number":675,"context_line":"            glance \u003d image_service.GlanceImageService(version\u003d2,"},{"line_number":676,"context_line":"                                                      context\u003dtask.context)"},{"line_number":677,"context_line":"            swift_temp_url \u003d glance.swift_temp_url(image_info)"},{"line_number":678,"context_line":"            image_info[\u0027urls\u0027] \u003d [swift_temp_url]"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_e06057d1","line":675,"updated":"2015-06-09 12:51:39.000000000","message":"Please allow http urls also to be passed, agent can directly download from them.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":672,"context_line":"        image_info \u003d kwargs.get(\u0027image_info\u0027)"},{"line_number":673,"context_line":""},{"line_number":674,"context_line":"        try:"},{"line_number":675,"context_line":"            glance \u003d image_service.GlanceImageService(version\u003d2,"},{"line_number":676,"context_line":"                                                      context\u003dtask.context)"},{"line_number":677,"context_line":"            swift_temp_url \u003d glance.swift_temp_url(image_info)"},{"line_number":678,"context_line":"            image_info[\u0027urls\u0027] \u003d [swift_temp_url]"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_a2bea0ab","line":675,"in_reply_to":"3afb71cf_e06057d1","updated":"2015-06-10 17:01:10.000000000","message":"I will address this soon.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":683,"context_line":"            return _caching_error_handler(task, str(e))"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":686,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":687,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        # Save data back to the DB."}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_254e813b","line":686,"updated":"2015-06-09 12:51:39.000000000","message":"Please use driver_internal_info for cache_status.  It needs to be somewhere which cannot be overwritten by operator.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":683,"context_line":"            return _caching_error_handler(task, str(e))"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":686,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":687,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        # Save data back to the DB."}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_f7c8d856","line":686,"in_reply_to":"3afb71cf_254e813b","updated":"2015-06-10 17:01:10.000000000","message":"AFAIK, if we use driver_internal_info, then other services, such as nova, can\u0027t get that data in order to make decisions about weighing different nodes.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"072260ae53aa10da79f779d33503e9067e58c780","unresolved":false,"context_lines":[{"line_number":683,"context_line":"            return _caching_error_handler(task, str(e))"},{"line_number":684,"context_line":""},{"line_number":685,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":686,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":687,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        # Save data back to the DB."}],"source_content_type":"text/x-python","patch_set":15,"id":"1af86dd1_d01a3617","line":686,"in_reply_to":"3afb71cf_f7c8d856","updated":"2015-06-12 16:48:30.000000000","message":"driver_internal_info is returned by the api.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":686,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":687,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        # Save data back to the DB."},{"line_number":690,"context_line":"        node.driver_info \u003d driver_info"},{"line_number":691,"context_line":"        node.driver_internal_info \u003d driver_internal_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_60f10701","line":688,"updated":"2015-06-09 12:51:39.000000000","message":"Please have all things related to validation of states, validation of image, etc in validate() of vendor passthru so that 400 can be returned back to the user invoking vendor passthru synchronously.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":685,"context_line":"        driver_internal_info[\u0027cache_image_info\u0027] \u003d image_info"},{"line_number":686,"context_line":"        driver_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"},{"line_number":687,"context_line":"        driver_info[\u0027cache_image_id\u0027] \u003d image_info[\u0027id\u0027]"},{"line_number":688,"context_line":""},{"line_number":689,"context_line":"        # Save data back to the DB."},{"line_number":690,"context_line":"        node.driver_info \u003d driver_info"},{"line_number":691,"context_line":"        node.driver_internal_info \u003d driver_internal_info"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_17581487","line":688,"in_reply_to":"3afb71cf_60f10701","updated":"2015-06-10 17:01:10.000000000","message":"If that\u0027s the proper place to do things, I can move most of this code there. Though, validation of state is a bit different than validation of arguments, at least in my humble opinion.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":692,"context_line":"        node.save()"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"        # If we have left over ports from a previous caching, remove them"},{"line_number":695,"context_line":"        provider \u003d dhcp_factory.DHCPFactory()"},{"line_number":696,"context_line":"        if getattr(provider.provider, \u0027delete_caching_ports\u0027, None):"},{"line_number":697,"context_line":"            provider.provider.delete_caching_ports(task,"},{"line_number":698,"context_line":"                                                   _caching_error_handler)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_e06a9780","line":695,"updated":"2015-06-09 12:51:39.000000000","message":"As said in another comment, I think this was better if we unified the cleaning ports and caching ports into a single thing (unless we need it separately for some reason).","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":692,"context_line":"        node.save()"},{"line_number":693,"context_line":""},{"line_number":694,"context_line":"        # If we have left over ports from a previous caching, remove them"},{"line_number":695,"context_line":"        provider \u003d dhcp_factory.DHCPFactory()"},{"line_number":696,"context_line":"        if getattr(provider.provider, \u0027delete_caching_ports\u0027, None):"},{"line_number":697,"context_line":"            provider.provider.delete_caching_ports(task,"},{"line_number":698,"context_line":"                                                   _caching_error_handler)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_97076481","line":695,"in_reply_to":"3afb71cf_e06a9780","updated":"2015-06-10 17:01:10.000000000","message":"See my previous response.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":704,"context_line":"                        task, _caching_error_handler)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        # We assume the agent is not present, and get it to load and boot."},{"line_number":707,"context_line":"        _prepare_pxe_boot(task)"},{"line_number":708,"context_line":"        _do_pxe_boot(task, ports)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def continue_cache(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_00ced381","line":707,"updated":"2015-06-09 12:51:39.000000000","message":"Now there is a problem here, what if we get a nova boot request and nova tries to create a neutron port.  It will fail because a neutron port already exists.  Now the consequence of that might be the node cannot be used until the caching_ports are cleaned up - which should be okay in my opinion.  But to prevent any race between nova and ironic on this, I think it\u0027s better if we somehow prevent nova from considering these machines.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":704,"context_line":"                        task, _caching_error_handler)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        # We assume the agent is not present, and get it to load and boot."},{"line_number":707,"context_line":"        _prepare_pxe_boot(task)"},{"line_number":708,"context_line":"        _do_pxe_boot(task, ports)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def continue_cache(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_b74380ae","line":707,"in_reply_to":"3afb71cf_00ced381","updated":"2015-06-10 17:01:10.000000000","message":"Nova creates the neutron port? Or does Ironic? Is there no error-checking to see if the port already exists?","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"072260ae53aa10da79f779d33503e9067e58c780","unresolved":false,"context_lines":[{"line_number":704,"context_line":"                        task, _caching_error_handler)"},{"line_number":705,"context_line":""},{"line_number":706,"context_line":"        # We assume the agent is not present, and get it to load and boot."},{"line_number":707,"context_line":"        _prepare_pxe_boot(task)"},{"line_number":708,"context_line":"        _do_pxe_boot(task, ports)"},{"line_number":709,"context_line":""},{"line_number":710,"context_line":"    def continue_cache(self, task):"}],"source_content_type":"text/x-python","patch_set":15,"id":"1af86dd1_10032e44","line":707,"in_reply_to":"3afb71cf_b74380ae","updated":"2015-06-12 16:48:30.000000000","message":"Mmm, this will be a problem. Clif, this isn\u0027t a problem in the Rackspace environment because we don\u0027t use Neutron for DHCP.\n\nNormal flow: Nova creates ports, gives them to Ironic, Ironic tells neutron dhcp options for those ports\n\nRackspace environment: Nodes DHCP without any Neutron ports, Nova creates ports, passes them to Ironic, Ironic doesn\u0027t do anything with them in terms of DHCP.\n\nIronic doesn\u0027t really support long-running ramdisks today. It\u0027s all about booting at deploy time.\n\nThis will be a problem and we need to fix it. If we can get the agent to read back what image is cached, when it boots up, then we can (optionally) power the machine back off after it\u0027s done caching. Should be doable as the agent gets the full node object back when it calls lookup after booting. That won\u0027t solve the entire problem, though, as it will still be a problem when scheduling to nodes that are currently caching (which could happen even if they are weighted down).\n\nNeed to think on this some more...","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"792f8f8b876768dfa8ef4d04e89010c7ae48c602","unresolved":false,"context_lines":[{"line_number":749,"context_line":"                      \"running or finished!\") % {\u0027node\u0027: node.uuid}"},{"line_number":750,"context_line":"            _caching_error_handler(task, msg)"},{"line_number":751,"context_line":"            _clean_up_pxe(task)"},{"line_number":752,"context_line":"            raise exception.CachingOperationTerminatedAbnormally("},{"line_number":753,"context_line":"                    node\u003dnode.uuid)"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"        error \u003d self.check_last_command_success(node)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_e0d97723","line":752,"updated":"2015-06-09 12:51:39.000000000","message":"We catch this again in L503 and run _caching_error_handler(task, msg) again there.","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"81198966fb06103a7ba4185b03859d54d9d13290","unresolved":false,"context_lines":[{"line_number":749,"context_line":"                      \"running or finished!\") % {\u0027node\u0027: node.uuid}"},{"line_number":750,"context_line":"            _caching_error_handler(task, msg)"},{"line_number":751,"context_line":"            _clean_up_pxe(task)"},{"line_number":752,"context_line":"            raise exception.CachingOperationTerminatedAbnormally("},{"line_number":753,"context_line":"                    node\u003dnode.uuid)"},{"line_number":754,"context_line":""},{"line_number":755,"context_line":"        error \u003d self.check_last_command_success(node)"}],"source_content_type":"text/x-python","patch_set":15,"id":"3afb71cf_17101456","line":752,"in_reply_to":"3afb71cf_e0d97723","updated":"2015-06-10 17:01:10.000000000","message":"Done","commit_id":"58362143172812665672c2c6b41a1ad783d2790a"},{"author":{"_account_id":13719,"name":"Naohiro Tamura","email":"naohirot.openstack@gmail.com","username":"nao"},"change_message_id":"eaedf026afa71aa02a989386f4321d2f64b8361b","unresolved":false,"context_lines":[{"line_number":552,"context_line":"        if last_command[\u0027command_status\u0027] !\u003d \u0027RUNNING\u0027:"},{"line_number":553,"context_line":"            return True"},{"line_number":554,"context_line":""},{"line_number":555,"context_line":"        return False"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"    def _validate_cache_image(self, task, **kwargs):"},{"line_number":558,"context_line":"        \"\"\"Validate arguments to the cache_image method.\"\"\""}],"source_content_type":"text/x-python","patch_set":18,"id":"3a50d1a3_3792bf4c","line":555,"updated":"2015-07-30 07:21:32.000000000","message":"I felt that it would be able to improve this function further succinct.\nBecause there are three \"return\" statements even if the return type is Boolean.\n\nWouldn\u0027t it possible to consolidate two \"return False\" statements if we merged the first \"return False\" case and the last \"return False\" case by moving the \"return True\" case at the beginning of this function?\n\nIf the below code is equivalent, \n  if not commands:\n   return False\n elif task.node.provision_state !\u003d states.AVAILABLE:\n   return False\n elif commands[-1][\u0027command_status\u0027] !\u003d \u0027RUNNING\u0027:\n   return True\n else:\n   return False\n\nwould we be able to rewrite like this?\n if commands and commands[-1][\u0027command_status\u0027] !\u003d \u0027RUNNING\u0027:\n   return True\n else:\n   return False","commit_id":"eb0549869f1b2c1492c176cfd5a735fa674617ac"},{"author":{"_account_id":7080,"name":"Mathieu Mitchell","email":"mat128@gmail.com","username":"mat128"},"change_message_id":"e18e891af2cf5979696dbd8d257f4a771b7f1c54","unresolved":false,"context_lines":[{"line_number":644,"context_line":"        if getattr(provider.provider, \u0027create_caching_ports\u0027, None):"},{"line_number":645,"context_line":"            # FIXME(ClifHouck): It\u0027s not clear to me since the interface has"},{"line_number":646,"context_line":"            # has changed. Does something need to be done with the port"},{"line_number":647,"context_line":"            # information returned by create_caching_ports now?"},{"line_number":648,"context_line":"            # The cleaning port creation doesn\u0027t seem to"},{"line_number":649,"context_line":"            # explicitly save this anywhere."},{"line_number":650,"context_line":"            provider.provider.create_caching_ports("}],"source_content_type":"text/x-python","patch_set":20,"id":"9a061dce_982e7a41","line":647,"updated":"2016-04-06 15:41:10.000000000","message":"What makes you think we need to do anything with it?\n\nhttps://github.com/openstack/ironic/blob/master/ironic/drivers/modules/deploy_utils.py#L925\nAffects vif_port_id for each port, but that might not be relevant here.","commit_id":"1f76907157ba2f915ff6deb8e6b537ec209d0ddd"}],"ironic/drivers/modules/agent_base_vendor.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e5f4e5661633f6a76d6bf6a9851a648808e1d401","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            elif (node.driver_info.get(\u0027caching\u0027) and"},{"line_number":168,"context_line":"                  self.is_caching_done(task)):"},{"line_number":169,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":170,"context_line":"                self.finish_cache(task)"},{"line_number":171,"context_line":"        except Exception as e:"},{"line_number":172,"context_line":"            err_info \u003d {\u0027node\u0027: node.uuid, \u0027msg\u0027: msg, \u0027e\u0027: e}"},{"line_number":173,"context_line":"            last_error \u003d _(\u0027Asynchronous exception for node %(node)s: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_a318081f","line":170,"updated":"2015-03-06 17:37:03.000000000","message":"Other drivers also inherit from this class, need to make these methods in this class as a no-op or something.","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"559f79afc0a32386d904cdafff44cb60d6bd71e4","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            elif (node.driver_info.get(\u0027caching\u0027) and"},{"line_number":168,"context_line":"                  self.is_caching_done(task)):"},{"line_number":169,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":170,"context_line":"                self.finish_cache(task)"},{"line_number":171,"context_line":"        except Exception as e:"},{"line_number":172,"context_line":"            err_info \u003d {\u0027node\u0027: node.uuid, \u0027msg\u0027: msg, \u0027e\u0027: e}"},{"line_number":173,"context_line":"            last_error \u003d _(\u0027Asynchronous exception for node %(node)s: \u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_bc6e592d","line":170,"in_reply_to":"9a80dd14_a318081f","updated":"2015-03-07 00:07:41.000000000","message":"Can you elaborate a bit? Are you wanting me to remove this and place it elsewhere, or are you saying that this method needs to be abstract? Is that outside the scope of this work?","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"bb9aefb5c178ca82bb3fcf807d90934d447a3a92","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            elif (node.driver_info.get(\u0027caching\u0027) and"},{"line_number":168,"context_line":"                  self.is_caching_done(task)):"},{"line_number":169,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":170,"context_line":"                self.finish_cache(task)"},{"line_number":171,"context_line":"        except Exception as e:"},{"line_number":172,"context_line":"            err_info \u003d {\u0027node\u0027: node.uuid, \u0027msg\u0027: msg, \u0027e\u0027: e}"},{"line_number":173,"context_line":"            last_error \u003d _(\u0027Asynchronous exception for node %(node)s: \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_88db0f4e","line":170,"updated":"2015-03-07 02:02:51.000000000","message":"To elaborate: I think finish_cache (and maybe cache_image?) should be methods in this class, that just do \u0027pass\u0027. Then override it/them in the AgentVendor class.\n\nIt\u0027s probably mostly unnecessary, as we shouldn\u0027t get here with other drivers, however it\u0027s extra protection and cleaner for the future.","commit_id":"8118cec615bd600dee32ee81b9ed5a366d58468b"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"f54413fab8c5636658e1db5364fa8576eff97cfa","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            elif (node.driver_info.get(\u0027caching\u0027) and"},{"line_number":168,"context_line":"                  self.is_caching_done(task)):"},{"line_number":169,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":170,"context_line":"                self.finish_cache(task)"},{"line_number":171,"context_line":"        except Exception as e:"},{"line_number":172,"context_line":"            err_info \u003d {\u0027node\u0027: node.uuid, \u0027msg\u0027: msg, \u0027e\u0027: e}"},{"line_number":173,"context_line":"            last_error \u003d _(\u0027Asynchronous exception for node %(node)s: \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a80dd14_60bde601","line":170,"in_reply_to":"9a80dd14_88db0f4e","updated":"2015-03-09 18:31:58.000000000","message":"Done","commit_id":"8118cec615bd600dee32ee81b9ed5a366d58468b"},{"author":{"_account_id":10380,"name":"Josh Gachnang","email":"josh@pcsforeducation.com","username":"JoshNang"},"change_message_id":"09c85287b514388a72576b720fcc92e8fb1b6524","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                  self.deploy_is_done(task)):"},{"line_number":190,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":191,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":192,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":193,"context_line":"                  self.is_caching_done(task)):"},{"line_number":194,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":195,"context_line":"                self.finish_cache(task)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_ecb7ec37","line":192,"updated":"2015-03-10 12:23:46.000000000","message":"If the agent gets rebooted while it is caching, it\u0027ll sort of get stuck here. The agent won\u0027t know what image was written to disk, so it\u0027ll present as a clean node with no commands. You\u0027d be able to deploy to the node, but if you tried to cache a new image, it wouldn\u0027t work. Maybe you can check command status of the agent, and if None, reset the node\u0027s DB about what image is cached?","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":189,"context_line":"                  self.deploy_is_done(task)):"},{"line_number":190,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":191,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":192,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":193,"context_line":"                  self.is_caching_done(task)):"},{"line_number":194,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":195,"context_line":"                self.finish_cache(task)"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_027b0d2a","line":192,"in_reply_to":"9a80dd14_ecb7ec37","updated":"2015-03-10 22:16:10.000000000","message":"Done","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                                    \u0027payload version: %s\u0027)"},{"line_number":127,"context_line":"                                                    % version)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def cache_image(self, task, **kwargs):"},{"line_number":130,"context_line":"        \"\"\"Instruct the agent to cache an image to the node."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param task: a TaskManager instance"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_4ee25e30","line":129,"updated":"2015-03-11 19:39:57.000000000","message":"Are these method ever going to be used by other child classes of BaseAgentVendor ? Atleast for now, I would suppose they wouldn\u0027t implement.  I assume this is here only because we needed to call these methods in heartbeat ? \n\nBut another alternative was that we could reimplement heartbeat for AgentVendorInterface and then first check the caching part and then call the super method.  In that way you can avoid touching the base vendor and keep it sane.\n\nAlteast cache_image, i think it\u0027s not required to be in BaseAgentVendor","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                                                    \u0027payload version: %s\u0027)"},{"line_number":127,"context_line":"                                                    % version)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def cache_image(self, task, **kwargs):"},{"line_number":130,"context_line":"        \"\"\"Instruct the agent to cache an image to the node."},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        :param task: a TaskManager instance"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_3507051f","line":129,"in_reply_to":"9a80dd14_4ee25e30","updated":"2015-03-12 21:28:39.000000000","message":"The problem with just removing cache_image is that it doesn\u0027t really make sense to have finish_cache or is_caching done here either then.\n\nI suppose overriding heartbeat method in AgentDeploy could avoid the need for any caching functionality or interface to be present in the base.\n\nThat seems a bit cleaner, so I\u0027ll go that route for now.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                  self.deploy_is_done(task)):"},{"line_number":196,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":197,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":198,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":199,"context_line":"                  self.is_caching_done(task)):"},{"line_number":200,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":201,"context_line":"                self.finish_cache(task)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_9bd65626","line":198,"updated":"2015-03-11 19:39:57.000000000","message":"\u003cI don\u0027t know how exactly caching is used\u003e\n\nI see we are checking the status of driver_internal_info.get(\u0027caching\u0027) during a heartbeat and then checking if caching is finished or not.  But what if someone triggered a deploy before caching got complete. Since there is no lock on the node, I guess the node would go into DEPLOYING state, and the heartbeat would never come here - because we check DEPLOYING before caching.\n\nBut I think we would want this to be first check done before the state checks so that this doesn\u0027t get overriden by state checks.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"d88f53bc2995ab0fc589009bc51cb3e0a5c753b4","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                  self.deploy_is_done(task)):"},{"line_number":196,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":197,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":198,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":199,"context_line":"                  self.is_caching_done(task)):"},{"line_number":200,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":201,"context_line":"                self.finish_cache(task)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_5845f2b1","line":198,"updated":"2015-03-10 23:08:17.000000000","message":"Is there test case for this?\n\nI\u0027m confused about \u0027caching\u0027 as the key value.  I don\u0027t see in this patch set where it uses a key name \u0027caching\u0027.  Is that coming from somewhere else?","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                  self.deploy_is_done(task)):"},{"line_number":196,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":197,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":198,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":199,"context_line":"                  self.is_caching_done(task)):"},{"line_number":200,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":201,"context_line":"                self.finish_cache(task)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_c9be71d4","line":198,"in_reply_to":"9a80dd14_5845f2b1","updated":"2015-03-12 21:28:39.000000000","message":"No, and there should be. It would\u0027ve caught the error here. The \u0027caching\u0027 key is left-over from a previous patch set that doesn\u0027t apply here anymore.\n\nAdding a test case for this, and correcting the key.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":195,"context_line":"                  self.deploy_is_done(task)):"},{"line_number":196,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":197,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":198,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":199,"context_line":"                  self.is_caching_done(task)):"},{"line_number":200,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":201,"context_line":"                self.finish_cache(task)"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2bcfa180","line":198,"in_reply_to":"9a80dd14_9bd65626","updated":"2015-03-12 21:28:39.000000000","message":"I think I need to do something in order to prevent nodes in the middle of a caching operation to start deploying. I\u0027ll also check in is_caching_done and finish_cache, but I feel like the driver should prevent a deploy from occurring if the cache operation is in progress. Maybe the node needs to have an exclusive lock on it.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":197,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":198,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":199,"context_line":"                  self.is_caching_done(task)):"},{"line_number":200,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":201,"context_line":"                self.finish_cache(task)"},{"line_number":202,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_9b98161d","line":199,"updated":"2015-03-11 19:39:57.000000000","message":"this is inside the try block of deploy, so if caching failed, then the node would be set to DEPLOYFAIL state since we call deploy_utils.set_failed_state in the except block.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":196,"context_line":"                msg \u003d _(\u0027Node failed to move to active state.\u0027)"},{"line_number":197,"context_line":"                self.reboot_to_instance(task, **kwargs)"},{"line_number":198,"context_line":"            elif (node.driver_internal_info.get(\u0027caching\u0027) and"},{"line_number":199,"context_line":"                  self.is_caching_done(task)):"},{"line_number":200,"context_line":"                msg \u003d _(\u0027Node failed to finish caching image.\u0027)"},{"line_number":201,"context_line":"                self.finish_cache(task)"},{"line_number":202,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_0bce6283","line":199,"in_reply_to":"9a80dd14_9b98161d","updated":"2015-03-12 21:28:39.000000000","message":"I think I should go ahead and override heartbeat in the derived class and do a bit more detailed checking there to see if the node has entered the deploying state from caching.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"}],"ironic/tests/drivers/test_agent.py":[{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"e5f4e5661633f6a76d6bf6a9851a648808e1d401","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        super(TestAgentVendor, self).setUp()"},{"line_number":213,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"fake_agent\")"},{"line_number":214,"context_line":"        self.passthru \u003d agent.AgentVendorInterface()"},{"line_number":215,"context_line":"        self.driver \u003d agent.AgentDeploy()"},{"line_number":216,"context_line":"        n \u003d {"},{"line_number":217,"context_line":"              \u0027driver\u0027: \u0027fake_agent\u0027,"},{"line_number":218,"context_line":"              \u0027instance_info\u0027: INSTANCE_INFO,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_0390f448","line":215,"updated":"2015-03-06 17:37:03.000000000","message":"Shouldn\u0027t need this here, the vendor interface shouldn\u0027t rely on a specific driver interface.","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"559f79afc0a32386d904cdafff44cb60d6bd71e4","unresolved":false,"context_lines":[{"line_number":212,"context_line":"        super(TestAgentVendor, self).setUp()"},{"line_number":213,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\"fake_agent\")"},{"line_number":214,"context_line":"        self.passthru \u003d agent.AgentVendorInterface()"},{"line_number":215,"context_line":"        self.driver \u003d agent.AgentDeploy()"},{"line_number":216,"context_line":"        n \u003d {"},{"line_number":217,"context_line":"              \u0027driver\u0027: \u0027fake_agent\u0027,"},{"line_number":218,"context_line":"              \u0027instance_info\u0027: INSTANCE_INFO,"}],"source_content_type":"text/x-python","patch_set":1,"id":"9a80dd14_9cd435be","line":215,"in_reply_to":"9a80dd14_0390f448","updated":"2015-03-07 00:07:41.000000000","message":"Right, this is due to the call to validate below, which I placed within the wrong interface. Fixed.","commit_id":"ad8e714b42f2afe9a57de1f9494be72b0aca94f6"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"78c1fd8b3085f71af56bbc15bf8b5edf99425a79","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":345,"context_line":"                                    shared\u003dFalse) as task:"},{"line_number":346,"context_line":"            self.passthru.cache_image(task, **DEFAULT_CACHE_IMAGE_KWARGS)"},{"line_number":347,"context_line":"            cache_image_mock.assert_has_calls([], any_order\u003dFalse)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @mock.patch.object(agent_client.AgentClient, \u0027cache_image\u0027)"},{"line_number":350,"context_line":"    def test_cache_image_started_properly(self, cache_image_mock):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_bb1d2411","line":347,"updated":"2015-03-10 14:00:27.000000000","message":"maybe better rewrite it as self.assertFalse(cache_image_mock.called)?","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"255ec3a9bbccb05057642baf4fa762ea0d9b6fd9","unresolved":false,"context_lines":[{"line_number":344,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":345,"context_line":"                                    shared\u003dFalse) as task:"},{"line_number":346,"context_line":"            self.passthru.cache_image(task, **DEFAULT_CACHE_IMAGE_KWARGS)"},{"line_number":347,"context_line":"            cache_image_mock.assert_has_calls([], any_order\u003dFalse)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"    @mock.patch.object(agent_client.AgentClient, \u0027cache_image\u0027)"},{"line_number":350,"context_line":"    def test_cache_image_started_properly(self, cache_image_mock):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_c2e1faff","line":347,"in_reply_to":"9a80dd14_bb1d2411","updated":"2015-03-10 22:16:10.000000000","message":"Done","commit_id":"8fb84bd4a86d7a166b3b2b7807c555b59629c088"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":39,"context_line":"DEFAULT_CACHE_IMAGE_KWARGS \u003d {"},{"line_number":40,"context_line":"    \u0027image_info\u0027: {"},{"line_number":41,"context_line":"        \u0027id\u0027: \u0027image_id\u0027,"},{"line_number":42,"context_line":"        \u0027urls\u0027: [\u0027http://image_url\u0027],"},{"line_number":43,"context_line":"        \u0027checksum\u0027: \u0027image_checksum\u0027"},{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_4e9a5e6f","line":42,"updated":"2015-03-11 19:39:57.000000000","message":"url","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":39,"context_line":"DEFAULT_CACHE_IMAGE_KWARGS \u003d {"},{"line_number":40,"context_line":"    \u0027image_info\u0027: {"},{"line_number":41,"context_line":"        \u0027id\u0027: \u0027image_id\u0027,"},{"line_number":42,"context_line":"        \u0027urls\u0027: [\u0027http://image_url\u0027],"},{"line_number":43,"context_line":"        \u0027checksum\u0027: \u0027image_checksum\u0027"},{"line_number":44,"context_line":"    }"},{"line_number":45,"context_line":"}"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_95c9ba5c","line":42,"in_reply_to":"9a80dd14_4e9a5e6f","updated":"2015-03-12 21:28:39.000000000","message":"I think its urls as evidenced by ipa.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            task.node.driver_internal_info[\u0027cache_image_id\u0027] \u003d \u0027image_id\u0027"},{"line_number":212,"context_line":"            self.driver._clean_cache_information(task)"},{"line_number":213,"context_line":"            self.assertEqual("},{"line_number":214,"context_line":"                task.node.driver_internal_info.get(\u0027cache_status\u0027),"},{"line_number":215,"context_line":"                None,"},{"line_number":216,"context_line":"                \"_clean_cache_information did not clear the cache_status \""},{"line_number":217,"context_line":"                \"information from driver_internal_info!\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ae991a70","line":214,"updated":"2015-03-11 19:39:57.000000000","message":"the expected argument should be first.  a better one\n\n  self.assertNotIn(\u0027cache_status\u0027, task.node.driver_internal_info)","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":211,"context_line":"            task.node.driver_internal_info[\u0027cache_image_id\u0027] \u003d \u0027image_id\u0027"},{"line_number":212,"context_line":"            self.driver._clean_cache_information(task)"},{"line_number":213,"context_line":"            self.assertEqual("},{"line_number":214,"context_line":"                task.node.driver_internal_info.get(\u0027cache_status\u0027),"},{"line_number":215,"context_line":"                None,"},{"line_number":216,"context_line":"                \"_clean_cache_information did not clear the cache_status \""},{"line_number":217,"context_line":"                \"information from driver_internal_info!\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_cb0a8589","line":214,"in_reply_to":"9a80dd14_ae991a70","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                None,"},{"line_number":216,"context_line":"                \"_clean_cache_information did not clear the cache_status \""},{"line_number":217,"context_line":"                \"information from driver_internal_info!\")"},{"line_number":218,"context_line":"            self.assertEqual("},{"line_number":219,"context_line":"                task.node.driver_internal_info.get(\u0027cache_image_id\u0027),"},{"line_number":220,"context_line":"                None,"},{"line_number":221,"context_line":"                \"_clean_cache_information did not clear cache_image_id\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_eea23299","line":218,"updated":"2015-03-11 19:39:57.000000000","message":"ditto, assertNotIn seems better","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":215,"context_line":"                None,"},{"line_number":216,"context_line":"                \"_clean_cache_information did not clear the cache_status \""},{"line_number":217,"context_line":"                \"information from driver_internal_info!\")"},{"line_number":218,"context_line":"            self.assertEqual("},{"line_number":219,"context_line":"                task.node.driver_internal_info.get(\u0027cache_image_id\u0027),"},{"line_number":220,"context_line":"                None,"},{"line_number":221,"context_line":"                \"_clean_cache_information did not clear cache_image_id\""}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ebfbc978","line":218,"in_reply_to":"9a80dd14_eea23299","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            self.passthru.cache_image(task, **DEFAULT_CACHE_IMAGE_KWARGS)"},{"line_number":369,"context_line":"            self.assertEqual("},{"line_number":370,"context_line":"                task.node.driver_internal_info.get(\u0027cache_status\u0027),"},{"line_number":371,"context_line":"                \u0027caching\u0027,"},{"line_number":372,"context_line":"                \"The node was not marked as caching after the operation \""},{"line_number":373,"context_line":"                \"completed!\")"},{"line_number":374,"context_line":"            self.assertEqual("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_ce0f2e87","line":371,"updated":"2015-03-11 19:39:57.000000000","message":"in assertEqual, first argument expected value, and then second argument actual value. ditto for all tests below.","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            self.passthru.cache_image(task, **DEFAULT_CACHE_IMAGE_KWARGS)"},{"line_number":369,"context_line":"            self.assertEqual("},{"line_number":370,"context_line":"                task.node.driver_internal_info.get(\u0027cache_status\u0027),"},{"line_number":371,"context_line":"                \u0027caching\u0027,"},{"line_number":372,"context_line":"                \"The node was not marked as caching after the operation \""},{"line_number":373,"context_line":"                \"completed!\")"},{"line_number":374,"context_line":"            self.assertEqual("}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_eb0f4937","line":371,"in_reply_to":"9a80dd14_ce0f2e87","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    @mock.patch.object(agent.AgentVendorInterface,"},{"line_number":383,"context_line":"                       \u0027_check_last_command_success\u0027)"},{"line_number":384,"context_line":"    def test_cache_image_finished_properly(self, last_command_success_mock):"},{"line_number":385,"context_line":"        last_command_success_mock.return_value \u003d None"},{"line_number":386,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":387,"context_line":"            task.node.driver_internal_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_0e686620","line":384,"updated":"2015-03-11 19:39:57.000000000","message":"better to rename as \n\n  def test_finish_cache_xxxxx","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    @mock.patch.object(agent.AgentVendorInterface,"},{"line_number":383,"context_line":"                       \u0027_check_last_command_success\u0027)"},{"line_number":384,"context_line":"    def test_cache_image_finished_properly(self, last_command_success_mock):"},{"line_number":385,"context_line":"        last_command_success_mock.return_value \u003d None"},{"line_number":386,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":387,"context_line":"            task.node.driver_internal_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_e606a01b","line":384,"in_reply_to":"9a80dd14_0e686620","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    @mock.patch.object(agent.AgentVendorInterface,"},{"line_number":396,"context_line":"                       \u0027_check_last_command_success\u0027)"},{"line_number":397,"context_line":"    def test_cache_image_finished_with_error(self, last_command_success_mock):"},{"line_number":398,"context_line":"        last_command_success_mock.return_value \u003d \u0027Caching failed!\u0027"},{"line_number":399,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":400,"context_line":"            task.node.driver_internal_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_8e637640","line":397,"updated":"2015-03-11 19:39:57.000000000","message":"ditto about test name","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":394,"context_line":""},{"line_number":395,"context_line":"    @mock.patch.object(agent.AgentVendorInterface,"},{"line_number":396,"context_line":"                       \u0027_check_last_command_success\u0027)"},{"line_number":397,"context_line":"    def test_cache_image_finished_with_error(self, last_command_success_mock):"},{"line_number":398,"context_line":"        last_command_success_mock.return_value \u003d \u0027Caching failed!\u0027"},{"line_number":399,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":400,"context_line":"            task.node.driver_internal_info[\u0027cache_status\u0027] \u003d \u0027caching\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_060c943a","line":397,"in_reply_to":"9a80dd14_8e637640","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"8b0804ff6121a646235c3e674241072bf0dfa4f6","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                \"node\u0027s driver info despite failure!\")"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    @mock.patch.object(agent_client.AgentClient, \u0027get_commands_status\u0027)"},{"line_number":415,"context_line":"    def test_cache_image_is_caching_done_raises(self, commands_status_mock):"},{"line_number":416,"context_line":"        commands_status_mock.return_value \u003d []"},{"line_number":417,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":418,"context_line":"            self.assertRaises(exception.CachingOperationFailed,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_2e4e0ac2","line":415,"updated":"2015-03-11 19:39:57.000000000","message":"ditto about method name","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"369882220498d82443d8ba4c4d58d299d20c5d70","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                \"node\u0027s driver info despite failure!\")"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"    @mock.patch.object(agent_client.AgentClient, \u0027get_commands_status\u0027)"},{"line_number":415,"context_line":"    def test_cache_image_is_caching_done_raises(self, commands_status_mock):"},{"line_number":416,"context_line":"        commands_status_mock.return_value \u003d []"},{"line_number":417,"context_line":"        with task_manager.acquire(self.context, self.node.uuid) as task:"},{"line_number":418,"context_line":"            self.assertRaises(exception.CachingOperationFailed,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a80dd14_c62c3c9c","line":415,"in_reply_to":"9a80dd14_2e4e0ac2","updated":"2015-03-12 21:28:39.000000000","message":"Done","commit_id":"5467a59281b3aa62167d8b62e040b2e8725e621d"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"e23268799aa16a73d1a68b003648b164751cfba6","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self.node.driver_info \u003d driver_info"},{"line_number":355,"context_line":"        self.node.save()"},{"line_number":356,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":357,"context_line":"                                    shared\u003dFalse) as task:"},{"line_number":358,"context_line":"            self.passthru.cache_image(task, **DEFAULT_CACHE_IMAGE_KWARGS)"},{"line_number":359,"context_line":"            cache_image_mock.assertFalse(cache_image_mock.called,"},{"line_number":360,"context_line":"                    \"cache_image called on client, even though the node is \""}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_d9d6d64e","line":357,"updated":"2015-03-13 00:28:52.000000000","message":"nit: indentation","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":354,"context_line":"        self.node.driver_info \u003d driver_info"},{"line_number":355,"context_line":"        self.node.save()"},{"line_number":356,"context_line":"        with task_manager.acquire(self.context, self.node.uuid,"},{"line_number":357,"context_line":"                                    shared\u003dFalse) as task:"},{"line_number":358,"context_line":"            self.passthru.cache_image(task, **DEFAULT_CACHE_IMAGE_KWARGS)"},{"line_number":359,"context_line":"            cache_image_mock.assertFalse(cache_image_mock.called,"},{"line_number":360,"context_line":"                    \"cache_image called on client, even though the node is \""}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_685e4947","line":357,"in_reply_to":"9a80dd14_d9d6d64e","updated":"2015-03-23 21:07:23.000000000","message":"Done","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"1669ae37212959da8bc2581e96d49b29ece390d0","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                    \"a deploy.\")"},{"line_number":299,"context_line":"            self.assertFalse(pxe_boot_mock.called, \"_do_pxe_boot should not \""},{"line_number":300,"context_line":"                    \"have been called, since the node was already cached, \""},{"line_number":301,"context_line":"                    \"and should have a running agent.\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"class TestAgentVendor(db_base.DbTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_b8f3d29d","line":301,"updated":"2015-04-08 23:33:22.000000000","message":"In general, we tend not to attach strings to these asserts. I don\u0027t mind one way or the other, not sure if anybody else has a strong opinion","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"1b4c5838dd38a47887259ea989e5ac158f6e0b7f","unresolved":false,"context_lines":[{"line_number":298,"context_line":"                    \"a deploy.\")"},{"line_number":299,"context_line":"            self.assertFalse(pxe_boot_mock.called, \"_do_pxe_boot should not \""},{"line_number":300,"context_line":"                    \"have been called, since the node was already cached, \""},{"line_number":301,"context_line":"                    \"and should have a running agent.\")"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"class TestAgentVendor(db_base.DbTestCase):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9aa53dc9_d40bd9d4","line":301,"in_reply_to":"9aa53dc9_b8f3d29d","updated":"2015-04-09 21:30:46.000000000","message":"It may be a little verbose, and perhaps superfluous, but I\u0027ll keep it unless someone else objects.","commit_id":"103c311922edc62844c75a5152a7b436f30048eb"}],"ironic/tests/drivers/test_agent_base_vendor.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"e23268799aa16a73d1a68b003648b164751cfba6","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":291,"context_line":"            vendor_routes \u003d task.driver.vendor.vendor_routes"},{"line_number":292,"context_line":"            self.assertIsInstance(vendor_routes, dict)"},{"line_number":293,"context_line":"            self.assertItemsEqual(expected, list(vendor_routes.keys()))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_vendor_passthru_driver_routes(self):"},{"line_number":296,"context_line":"        expected \u003d [\u0027lookup\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_79488a5c","line":293,"updated":"2015-03-13 00:28:52.000000000","message":"For python 3 compatibility use:\n\n six.assertCountEqual()\n\nhttps://pythonhosted.org/six/","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":291,"context_line":"            vendor_routes \u003d task.driver.vendor.vendor_routes"},{"line_number":292,"context_line":"            self.assertIsInstance(vendor_routes, dict)"},{"line_number":293,"context_line":"            self.assertItemsEqual(expected, list(vendor_routes.keys()))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_vendor_passthru_driver_routes(self):"},{"line_number":296,"context_line":"        expected \u003d [\u0027lookup\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_28137167","line":293,"in_reply_to":"9a80dd14_18e29a01","updated":"2015-03-23 21:07:23.000000000","message":"TIL, done.","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":10343,"name":"Jim Rollenhagen","email":"jim@jimrollenhagen.com","username":"jimrollenhagen"},"change_message_id":"b9abe2481d873535d02c31378b039a51c2c4812a","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":291,"context_line":"            vendor_routes \u003d task.driver.vendor.vendor_routes"},{"line_number":292,"context_line":"            self.assertIsInstance(vendor_routes, dict)"},{"line_number":293,"context_line":"            self.assertItemsEqual(expected, list(vendor_routes.keys()))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_vendor_passthru_driver_routes(self):"},{"line_number":296,"context_line":"        expected \u003d [\u0027lookup\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a80dd14_18e29a01","line":293,"in_reply_to":"9a80dd14_79488a5c","updated":"2015-03-17 14:44:31.000000000","message":".keys() is unnecessary here:\n\n    \u003e\u003e\u003e list({\u0027a\u0027: \u0027b\u0027, \u0027c\u0027: \u0027d\u0027})\n    [\u0027a\u0027, \u0027c\u0027]\n    \u003e\u003e\u003e list({\u0027a\u0027: \u0027b\u0027, \u0027c\u0027: \u0027d\u0027}.keys())\n    [\u0027a\u0027, \u0027c\u0027]","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"},{"author":{"_account_id":14228,"name":"Clif Houck","email":"me@clifhouck.com","username":"clif_h"},"change_message_id":"35f26b6777db248368bc421e2dbdab1cd25fd769","unresolved":false,"context_lines":[{"line_number":290,"context_line":"                                  shared\u003dTrue) as task:"},{"line_number":291,"context_line":"            vendor_routes \u003d task.driver.vendor.vendor_routes"},{"line_number":292,"context_line":"            self.assertIsInstance(vendor_routes, dict)"},{"line_number":293,"context_line":"            self.assertItemsEqual(expected, list(vendor_routes.keys()))"},{"line_number":294,"context_line":""},{"line_number":295,"context_line":"    def test_vendor_passthru_driver_routes(self):"},{"line_number":296,"context_line":"        expected \u003d [\u0027lookup\u0027]"}],"source_content_type":"text/x-python","patch_set":5,"id":"1a6ced46_a82f61a0","line":293,"in_reply_to":"9a80dd14_79488a5c","updated":"2015-03-23 21:07:23.000000000","message":"Done","commit_id":"4e9b25626d1ac33d30074a259f5a1fe2e78c1abe"}]}
