)]}'
{"diskimage_builder/block_device/basefactory.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8ba1aa08a68838726813e53871e70aa8f95d009b","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":20,"context_line":"class BaseFactory(object):"},{"line_number":21,"context_line":"    \"\"\"Abstract base factory for block device modules"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_63809547","line":19,"updated":"2017-03-20 04:32:03.000000000","message":"I feel like for clarity this could live ok in the basemodule.py\n\nalso I think we should go with [module|plugin]_base.py, sticking with the _ convention (also common in other projects)","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"0979aba01d5589e7cd3ed6fca9caf73f0895e1c8","unresolved":false,"context_lines":[{"line_number":16,"context_line":"import six"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":20,"context_line":"class BaseFactory(object):"},{"line_number":21,"context_line":"    \"\"\"Abstract base factory for block device modules"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_f9cf4853","line":19,"in_reply_to":"1a1ced50_63809547","updated":"2017-03-22 20:34:41.000000000","message":"Done","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8ba1aa08a68838726813e53871e70aa8f95d009b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    @abc.abstractmethod"},{"line_number":28,"context_line":"    def create(self, config, default_config):"},{"line_number":29,"context_line":"        \"\"\"Creates a module for block device."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        The parameters are typically directly passed to the module"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_632a552e","line":28,"updated":"2017-03-20 04:32:03.000000000","message":"I did think that the \".obj\" in stevedore would be the class referenced in the plugin if invoke_on_load is False?  Thus essentially calling .obj() would give you a new object?  \n\nMaybe @doug can clear up if the factory is needed here...","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"0979aba01d5589e7cd3ed6fca9caf73f0895e1c8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    \"\"\""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    @abc.abstractmethod"},{"line_number":28,"context_line":"    def create(self, config, default_config):"},{"line_number":29,"context_line":"        \"\"\"Creates a module for block device."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        The parameters are typically directly passed to the module"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_d9fb6c77","line":28,"in_reply_to":"1a1ced50_632a552e","updated":"2017-03-22 20:34:41.000000000","message":"IMHO it\u0027s not .obj() but .plugin().","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"}],"diskimage_builder/block_device/basemodule.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8ba1aa08a68838726813e53871e70aa8f95d009b","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":21,"context_line":"class BaseModule(object):"},{"line_number":22,"context_line":"    \"\"\"Abstract base class for block device modules\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __init__(self, name):"},{"line_number":25,"context_line":"        \"\"\"All modules must have a name\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_48d2d6d3","line":22,"updated":"2017-03-20 04:32:03.000000000","message":"A nit, but what about just calling these \"plugins\", becoming BasePlugin?  just that reflects the standard terminology","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"0979aba01d5589e7cd3ed6fca9caf73f0895e1c8","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":21,"context_line":"class BaseModule(object):"},{"line_number":22,"context_line":"    \"\"\"Abstract base class for block device modules\"\"\""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"    def __init__(self, name):"},{"line_number":25,"context_line":"        \"\"\"All modules must have a name\"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_597cdceb","line":22,"in_reply_to":"1a1ced50_48d2d6d3","updated":"2017-03-22 20:34:41.000000000","message":"I\u0027d stay with the current name; IMHO there might be other plugins in future in the block device - therefore \u0027plugin\u0027 might be to generic.","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8ba1aa08a68838726813e53871e70aa8f95d009b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                      later runs of dib-block-device for cleaning up."},{"line_number":37,"context_line":"        :type state: dict(str:?)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param rollback: a list of python functions that will be"},{"line_number":40,"context_line":"                         called to cleanup if there occurs an error"},{"line_number":41,"context_line":"                         later within the same dib-block-device run."},{"line_number":42,"context_line":"        :type rollback: list(function)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_48a01644","line":39,"updated":"2017-03-20 04:32:03.000000000","message":"mention arguments to the called function?  i guess it is implied they are called in list order","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"0979aba01d5589e7cd3ed6fca9caf73f0895e1c8","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                      later runs of dib-block-device for cleaning up."},{"line_number":37,"context_line":"        :type state: dict(str:?)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"        :param rollback: a list of python functions that will be"},{"line_number":40,"context_line":"                         called to cleanup if there occurs an error"},{"line_number":41,"context_line":"                         later within the same dib-block-device run."},{"line_number":42,"context_line":"        :type rollback: list(function)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_d970cc0d","line":39,"in_reply_to":"1a1ced50_48a01644","updated":"2017-03-22 20:34:41.000000000","message":"Done","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"}],"diskimage_builder/block_device/blockdevice.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8ba1aa08a68838726813e53871e70aa8f95d009b","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                logger.error(\"Configured top level element [%s] \""},{"line_number":138,"context_line":"                             \"does not exists.\" % cfg_obj_name)"},{"line_number":139,"context_line":"                return 1"},{"line_number":140,"context_line":"            cfg_obj \u003d self.module_manager[cfg_obj_name].obj.create("},{"line_number":141,"context_line":"                cfg_obj_val, default_config)"},{"line_number":142,"context_line":"            # At this point it is only possible to add the nodes:"},{"line_number":143,"context_line":"            # adding the edges needs all nodes first."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_43b559ec","line":140,"updated":"2017-03-20 04:32:03.000000000","message":"If obj is not set when invoke_on_load\u003dFalse (as I thought it was, but might be wrong) could you do typeof(.obj) here and avoid the indirection of the factory?","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"0979aba01d5589e7cd3ed6fca9caf73f0895e1c8","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                logger.error(\"Configured top level element [%s] \""},{"line_number":138,"context_line":"                             \"does not exists.\" % cfg_obj_name)"},{"line_number":139,"context_line":"                return 1"},{"line_number":140,"context_line":"            cfg_obj \u003d self.module_manager[cfg_obj_name].obj.create("},{"line_number":141,"context_line":"                cfg_obj_val, default_config)"},{"line_number":142,"context_line":"            # At this point it is only possible to add the nodes:"},{"line_number":143,"context_line":"            # adding the edges needs all nodes first."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_5963fc41","line":140,"in_reply_to":"1a1ced50_43b559ec","updated":"2017-03-22 20:34:41.000000000","message":"It\u0027s a little bit different - but yes: removed the factory already.","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"495fd58dbc04a185eb02a98b4f33dc6c518b3531","unresolved":false,"context_lines":[{"line_number":137,"context_line":"                logger.error(\"Configured top level element [%s] \""},{"line_number":138,"context_line":"                             \"does not exists.\" % cfg_obj_name)"},{"line_number":139,"context_line":"                return 1"},{"line_number":140,"context_line":"            cfg_obj \u003d self.module_manager[cfg_obj_name].plugin("},{"line_number":141,"context_line":"                cfg_obj_val, default_config)"},{"line_number":142,"context_line":"            # At this point it is only possible to add the nodes:"},{"line_number":143,"context_line":"            # adding the edges needs all nodes first."}],"source_content_type":"text/x-python","patch_set":5,"id":"ffe62b97_ae837c56","line":140,"updated":"2017-03-24 04:49:33.000000000","message":"I do feel like the fact we\u0027re calling \"plugin()\" methods, all the stevedore documentation talks about plugins ... but yet we have \"modules\" for really no apparent reason.  it\u0027s not really like \"module\" has some specific meaning.\n\ni think there\u0027s another slight layer of confusion in that \"module\" doesn\u0027t appear in the path ... it\u0027s diskimage_builder/level0/ ... without anything suggesting \"level0\" maps to a \"module\"\n\nwhat about something like the (long, i admit)\n\ndiskimage_builder.block_device.plugins.level0\ndiskimage_builder.block_device.plugins.level1\n\ni think you\u0027re suggesting that there might be other plugins other than \"levelX\" type things in the future ... but is that really a concern?  we could, i guess choose something like block_plugins but that makes it even longer","commit_id":"c6b1472b611d89069c084c4d53a9414974371f03"}],"diskimage_builder/block_device/level1/partitioning.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"8ba1aa08a68838726813e53871e70aa8f95d009b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class Partitioning(BaseModule):"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    type_string \u003d \"partitioning\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    flag_boot \u003d 1"},{"line_number":77,"context_line":"    flag_primary \u003d 2"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_e31645f0","line":74,"updated":"2017-03-20 04:32:03.000000000","message":"Shouldn\u0027t type_string part of the BaseModule ABC too?","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"0979aba01d5589e7cd3ed6fca9caf73f0895e1c8","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"class Partitioning(BaseModule):"},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    type_string \u003d \"partitioning\""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    flag_boot \u003d 1"},{"line_number":77,"context_line":"    flag_primary \u003d 2"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a1ced50_79f4385a","line":74,"in_reply_to":"1a1ced50_e31645f0","updated":"2017-03-22 20:34:41.000000000","message":"With stevedore this is not needed any more (the name is now configured in the setup.cfg file). Removed the type_string already in the latest patch.","commit_id":"fb92083b94704c47eb2b609c2e188087557d3f60"}],"diskimage_builder/block_device/plugin_base.py":[{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"1028db36fa5ef22e364cb500c808142019377f9b","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        \"\"\""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class NodePluginBase(PluginBase, Digraph.Node):"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def insert_nodes(self, dg):"},{"line_number":50,"context_line":"        \"\"\"Adds self as a node to the given digraph\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"ffe62b97_aff0d068","line":47,"updated":"2017-03-27 07:02:17.000000000","message":"have you made local-loop only a PluginBase, rather than NodePluginBase because there can only be one local-loop device?  Why would insert_nodes not exist in PluginBase but raise a NotImplemented error?\n\nI\u0027m a bit confused so i think this needs some more description.\n\nIn retrospect, I guess we don\u0027t have clear descriptions of what level0 and level1 mean in the docs.  maybe we should have chosen more descriptive names...","commit_id":"57c9e0bb414d7d0255ae99828632dbfe6daad41f"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"081c8d0dac511614004d91b2538054e590c1bf9e","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        \"\"\""},{"line_number":45,"context_line":""},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"class NodePluginBase(PluginBase, Digraph.Node):"},{"line_number":48,"context_line":""},{"line_number":49,"context_line":"    def insert_nodes(self, dg):"},{"line_number":50,"context_line":"        \"\"\"Adds self as a node to the given digraph\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"ffe62b97_989bed64","line":47,"in_reply_to":"ffe62b97_aff0d068","updated":"2017-03-27 20:36:29.000000000","message":"The levels are described in the original spec [1] - and in the user guide [2].  The naming levelX is not very descriptive: you are right; but this is only an internal (developer) structure to put similar things into one directory - no way the user comes in contact here. So we can rename them as we want. Do you have more usable and understandable names?\n\nThe typical use case is, that each plugin describes / creates exactly one \u0027element\u0027 (i.e. node).  Such a plugin is using one node (referenced by \u0027base\u0027) and creates another (that can be referenced by \u0027name\u0027).  This is valid for mostly all plugins, like mkfs, fstab, mount, ....  They can all use the \u0027NodePluginBase\u0027.\n\nOthers, which are more complicated, like partitioning (takes one \u0027base\u0027 and provides a list of partitions) or even LVM (takes a list of \u0027bases\u0027 and provides a list of LVs) have to use the PluginBase and need to provide their own \u0027Node\u0027 classes (for partitioning there is a class Partition(PluginBase) ).\n\nA special case are the \u0027level0\u0027 ones: they have no \u0027base\u0027.  They \u0027generate\u0027 the block device out of thin air (with respect to the diskimage-builder).  They use resources like an image file for local_loop; but there can (will be?) others like: an existing block device (/dev/sdf1 /dev/mmcblk0p2) or an iSCSI device or whatsoever can be used as a block device.\n\nThe level0 plugins provide the root of the block-device tree - whereas currently (with the open patch in mind) the fstab entries are the leaves.\n\n(Of course it is possible to use multiple local_loop block devices.)\n\n\n[1] https://git.openstack.org/cgit/openstack/diskimage-builder/tree/doc/source/specs/v1/approved/block-device-overview.rst\n[2] https://git.openstack.org/cgit/openstack/diskimage-builder/tree/doc/source/user_guide/building_an_image.rst","commit_id":"57c9e0bb414d7d0255ae99828632dbfe6daad41f"}],"setup.cfg":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"fa102a202e30bd1085a4d07d71d537a0bf0ff08a","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    ramdisk-image-create \u003d diskimage_builder.disk_image_create:main"},{"line_number":58,"context_line":"    dib-run-parts \u003d diskimage_builder.dib_run_parts:main"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"diskimage_builder.block_device.module \u003d"},{"line_number":61,"context_line":"    local_loop \u003d diskimage_builder.block_device.level0.localloop:LocalLoopFactory"},{"line_number":62,"context_line":"    partitioning \u003d diskimage_builder.block_device.level1.partitioning:PartitioningFactory"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"1a1ced50_19cf6d57","line":60,"updated":"2017-03-17 18:56:23.000000000","message":"Will there be other things under the diskimage_builder.block_device namespace that are not \"modules\"?","commit_id":"7c9cf692ce4181a81259d4cbc089c176a57bda9d"},{"author":{"_account_id":21741,"name":"Andreas Florath","email":"andreas@florath.net","username":"florath"},"change_message_id":"cebdaa4ff131a73fad699741ef933d382cbfbaa9","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    ramdisk-image-create \u003d diskimage_builder.disk_image_create:main"},{"line_number":58,"context_line":"    dib-run-parts \u003d diskimage_builder.dib_run_parts:main"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"diskimage_builder.block_device.module \u003d"},{"line_number":61,"context_line":"    local_loop \u003d diskimage_builder.block_device.level0.localloop:LocalLoopFactory"},{"line_number":62,"context_line":"    partitioning \u003d diskimage_builder.block_device.level1.partitioning:PartitioningFactory"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"1a1ced50_f902913d","line":60,"in_reply_to":"1a1ced50_19cf6d57","updated":"2017-03-17 19:03:23.000000000","message":"I have no idea - maybe.\n\nIn principle there are two layers here: the directory structure (that is currently named level0 and level1) and the modules themselves. Theoretically it is possible also to introduce another namespace that handles the levels.","commit_id":"7c9cf692ce4181a81259d4cbc089c176a57bda9d"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"ab011f4a481f5e944cb9b6801ebfd230e3ae5806","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    ramdisk-image-create \u003d diskimage_builder.disk_image_create:main"},{"line_number":58,"context_line":"    dib-run-parts \u003d diskimage_builder.dib_run_parts:main"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"diskimage_builder.block_device.module \u003d"},{"line_number":61,"context_line":"    local_loop \u003d diskimage_builder.block_device.level0.localloop:LocalLoopFactory"},{"line_number":62,"context_line":"    partitioning \u003d diskimage_builder.block_device.level1.partitioning:PartitioningFactory"}],"source_content_type":"text/x-ttcn-cfg","patch_set":1,"id":"1a1ced50_02037643","line":60,"in_reply_to":"1a1ced50_f902913d","updated":"2017-03-17 20:25:52.000000000","message":"OK. My point was that the namespace here does not need to correspond to the directory structure, so if you don\u0027t need the \"module\" piece you can drop it and use a shorter namespace. If you know (or even strongly think it likely) that you\u0027ll have other things under block_device though then it makes sense to keep it. And yes, if you need to separate level 0 and 1 plugins for some reason, you\u0027d either want separate namespaces or to do some sort of detection by querying the plugin when it is loaded.","commit_id":"7c9cf692ce4181a81259d4cbc089c176a57bda9d"}]}
